markshelf 0.2.0 → 0.2.2
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +20 -20
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/asset/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/file/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/graph/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/timeline/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tree/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05ar4zx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09qrkq5._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/0.9a.v2u8pdez.css +1 -0
- package/.next/{static/chunks/0.z3b.-~oogkw.js → standalone/.next/static/chunks/10.v6fb-ptj.a.js} +1 -1
- package/.next/standalone/RELEASING.md +56 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/README.md +46 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +1 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/package.json +42 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +46 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +1 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +42 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- package/.next/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/.next/standalone/node_modules/@img/{sharp-win32-x64 → sharp-linux-x64}/package.json +46 -39
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +46 -0
- package/.next/standalone/package-lock.json +2 -2
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/scripts/docker-run.mjs +12 -2
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/components/LinkGraph.tsx +11 -0
- package/.next/static/chunks/0.9a.v2u8pdez.css +1 -0
- package/.next/{standalone/.next/static/chunks/0.z3b.-~oogkw.js → static/chunks/10.v6fb-ptj.a.js} +1 -1
- package/package.json +1 -1
- package/.next/standalone/.next/static/chunks/13tjphiswda64.css +0 -1
- package/.next/standalone/node_modules/@img/sharp-win32-x64/lib/sharp-win32-x64.node +0 -0
- package/.next/standalone/tsconfig.tsbuildinfo +0 -1
- package/.next/static/chunks/13tjphiswda64.css +0 -1
- /package/.next/standalone/.next/static/{JZXBFyFBzt6ffFpnmO9cB → 03Y0Qmra9pQhnypCdj6Wp}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{JZXBFyFBzt6ffFpnmO9cB → 03Y0Qmra9pQhnypCdj6Wp}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{JZXBFyFBzt6ffFpnmO9cB → 03Y0Qmra9pQhnypCdj6Wp}/_ssgManifest.js +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-win32-x64 → sharp-libvips-linux-x64}/versions.json +0 -0
- /package/.next/static/{JZXBFyFBzt6ffFpnmO9cB → 03Y0Qmra9pQhnypCdj6Wp}/_buildManifest.js +0 -0
- /package/.next/static/{JZXBFyFBzt6ffFpnmO9cB → 03Y0Qmra9pQhnypCdj6Wp}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{JZXBFyFBzt6ffFpnmO9cB → 03Y0Qmra9pQhnypCdj6Wp}/_ssgManifest.js +0 -0
package/.next/{static/chunks/0.z3b.-~oogkw.js → standalone/.next/static/chunks/10.v6fb-ptj.a.js}
RENAMED
|
@@ -8,4 +8,4 @@ ${e.themeCSS}`),void 0!==e.fontFamily&&(n+=`
|
|
|
8
8
|
:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(n+=`
|
|
9
9
|
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){let r=(0,r1.getEffectiveHtmlLabels)(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(e=>{(0,iS.default)(e.styles)||r.forEach(t=>{n+=aN(e.id,t,e.styles)}),(0,iS.default)(e.textStyles)||(n+=aN(e.id,"tspan",(e?.textStyles||[]).map(e=>e.replace("color","fill"))))})}return n},"createCssStyles"),az=(0,r2.__name)((e,t,n,r)=>{var i,l,a;let o=aM(e,n),s=(0,r1.styles_default)(t,o,{...e.themeVariables,theme:e.theme,look:e.look},r);return ib((a=function e(t,n,r,i,l,a,o,s,u){for(var c,d,f,p,h,m,g=0,x=0,y=o,v=0,b=0,k=0,w=1,S=1,C=1,E=0,_="",j=l,A=a,D=i,L=_;S;)switch(k=E,E=ih()){case 40:if(108!=k&&58==it(L,y-1)){-1!=(h=L+=ie(ix(E),"&","&\f"),m=r8(g?s[g-1]:0),h.indexOf("&\f",m))&&(C=-1);break}case 34:case 39:case 91:L+=ix(E);break;case 9:case 10:case 13:case 32:L+=function(e){for(;ic=im();)if(ic<33)ih();else break;return ig(e)>2||ig(ic)>3?"":" "}(k);break;case 92:L+=function(e,t){for(var n;--t&&ih()&&!(ic<48)&&!(ic>102)&&(!(ic>57)||!(ic<65))&&(!(ic>70)||!(ic<97)););return n=iu+(t<6&&32==im()&&32==ih()),ir(id,e,n)}(iu-1,7);continue;case 47:switch(im()){case 42:case 47:il((c=function(e,t){for(;ih();)if(e+ic===57)break;else if(e+ic===84&&47===im())break;return"/*"+ir(id,t,iu-1)+"*"+r7(47===e?e:ih())}(ih(),iu),d=n,f=r,p=u,ip(c,d,f,r3,r7(ic),ir(c,2,-2),0,p)),u),(5==ig(k||1)||5==ig(im()||1))&&ii(L)&&" "!==ir(L,-1,void 0)&&(L+=" ");break;default:L+="/"}break;case 123*w:s[g++]=ii(L)*C;case 125*w:case 59:case 0:switch(E){case 0:case 125:S=0;case 59+x:-1==C&&(L=ie(L,/\f/g,"")),b>0&&(ii(L)-y||0===w&&47===k)&&il(b>32?iv(L+";",i,r,y-1,u):iv(ie(L," ","")+";",i,r,y-2,u),u);break;case 59:L+=";";default:if(il(D=iy(L,n,r,g,x,l,s,_,j=[],A=[],y,a),a),123===E)if(0===x)e(L,n,D,D,j,a,y,s,A);else{switch(v){case 99:if(110===it(L,3))break;case 108:if(97===it(L,2))break;default:x=0;case 100:case 109:case 115:}x?e(t,D,D,i&&il(iy(t,D,D,0,0,l,s,_,l,j=[],y,A),A),l,A,y,s,i?j:A):e(L,D,D,D,[""],A,0,s,A)}}g=x=b=0,w=C=1,_=L="",y=o;break;case 58:y=1+ii(L),b=k;default:if(w<1){if(123==E)--w;else if(125==E&&0==w++&&125==(ic=iu>0?it(id,--iu):0,io--,10===ic&&(io=1,ia--),ic))continue}switch(L+=r7(E),E*w){case 38:C=x>0?1:(L+="\f",-1);break;case 44:s[g++]=(ii(L)-1)*C,C=1;break;case 64:45===im()&&(L+=ix(ih())),v=im(),x=y=ii(_=L+=function(e){for(;!ig(im());)ih();return ir(id,e,iu)}(iu)),E++;break;case 45:45===k&&2==ii(L)&&(w=0)}}return a}("",null,null,null,[""],(l=i=`${r}{${s}}`,ia=io=1,is=ii(id=l),iu=0,i=[]),0,[0],i),id="",a),ik)},"createUserStyles"),aI=(0,r2.__name)((e="",t,n)=>{let r=e;return n||t||(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=(r=(0,r0.decodeEntities)(r)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),aP=(0,r2.__name)((e="",t)=>{let n=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":"100%",r=aj(`<body style="margin:0">${e}</body>`);return`<iframe style="width:100%;height:${n};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${r}" sandbox="allow-top-navigation-by-user-activation allow-popups">
|
|
10
10
|
The "iframe" tag is not supported by your browser.
|
|
11
|
-
</iframe>`},"putIntoIFrame"),aR=(0,r2.__name)((e,t,n,r,i)=>{let l=e.append("div");l.attr("id",n),r&&l.attr("style",r);let a=l.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&a.attr("xmlns:xlink",i),a.append("g"),e},"appendDivSvgG");function aF(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,r2.__name)(aF,"sandboxedIframe");var aO=(0,r2.__name)((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},"removeExistingElements"),aB=(0,r2.__name)(async function(e,t,n){let r,i;ah();let l=aL(t);t=l.code;let a=(0,r1.getConfig)();r2.log.debug(a),t.length>(a?.maxTextSize??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let o="#"+e,s="i"+e,u="#"+s,c="d"+e,d="#"+c,f=(0,r2.__name)(()=>{let e=h?u:d,t=(0,r6.select)(e).node();t&&"remove"in t&&t.remove()},"removeTempElements"),p=(0,r6.select)("body"),h="sandbox"===a.securityLevel,m="loose"===a.securityLevel,g=a.fontFamily;if(void 0!==n){if(n&&(n.innerHTML=""),h){let e=aF((0,r6.select)(n),s);(p=(0,r6.select)(e.nodes()[0].contentDocument.body)).node().style.margin=0}else p=(0,r6.select)(n);aR(p,e,c,`font-family: ${g}`,"http://www.w3.org/1999/xlink")}else{if(aO(document,e,c,s),h){let e=aF((0,r6.select)("body"),s);(p=(0,r6.select)(e.nodes()[0].contentDocument.body)).node().style.margin=0}else p=(0,r6.select)("body");aR(p,e,c)}try{r=await ay.fromText(t,{title:l.title})}catch(e){if(a.suppressErrorRendering)throw f(),e;r=await ay.fromText("error"),i=e}let x=p.select(d).node(),y=r.type,v=x.firstChild,b=v.firstChild,k=az(a,y,r.renderer.getClasses?.(t,r),o),w=document.createElement("style");w.innerHTML=k,v.insertBefore(w,b);try{await r.renderer.draw(t,e,"11.14.0",r)}catch(n){throw a.suppressErrorRendering?f():lv.draw(t,e,"11.14.0"),n}a$(y,p.select(`${d} svg`),r.db.getAccTitle?.(),r.db.getAccDescription?.()),p.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let S=p.select(d).node().innerHTML;if(r2.log.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),S=aI(S,h,(0,r1.evaluate)(a.arrowMarkerAbsolute)),h?S=aP(S,p.select(d+" svg").node()):m||(S=iw.default.sanitize(S,{ADD_TAGS:aA,ADD_ATTR:aD,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),ab(),i)throw i;return f(),{diagramType:y,svg:S,bindFunctions:r.db.bindFunctions}},"render");function aH(e={}){let t=(0,r1.assignWithDepth_default)({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),(0,r1.saveConfigFromInitialize)(t),t?.theme&&t.theme in r1.themes_default?t.themeVariables=r1.themes_default[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=r1.themes_default.default.getThemeVariables(t.themeVariables));let n="object"==typeof t?(0,r1.setSiteConfig)(t):(0,r1.getSiteConfig)();(0,r2.setLogLevel)(n.logLevel),ah()}(0,r2.__name)(aH,"initialize");var aU=(0,r2.__name)((e,t={})=>{let{code:n}=a_(e);return ay.fromText(n,t)},"getDiagramFromText");function a$(e,t,n,r){ag(t,e),ax(t,n,r,t.attr("id"))}(0,r2.__name)(a$,"addA11yInfo");var aq=Object.freeze({render:aB,parse:aT,getDiagramFromText:aU,initialize:aH,getConfig:r1.getConfig,setConfig:r1.setConfig,getSiteConfig:r1.getSiteConfig,updateSiteConfig:r1.updateSiteConfig,reset:(0,r2.__name)(()=>{(0,r1.reset)()},"reset"),globalReset:(0,r2.__name)(()=>{(0,r1.reset)(r1.defaultConfig)},"globalReset"),defaultConfig:r1.defaultConfig});(0,r2.setLogLevel)((0,r1.getConfig)().logLevel),(0,r1.reset)((0,r1.getConfig)());var aV=(0,r2.__name)((e,t,n)=>{r2.log.warn(e),(0,r0.isDetailedError)(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),aW=(0,r2.__name)(async function(e={querySelector:".mermaid"}){try{await aJ(e)}catch(t){if((0,r0.isDetailedError)(t)&&r2.log.error(t.str),a3.parseError&&a3.parseError(t),!e.suppressErrors)throw r2.log.error("Use the suppressErrors option to suppress these errors"),t}},"run"),aJ=(0,r2.__name)(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:".mermaid"}){let r,i,l=aq.getConfig();if(r2.log.debug(`${!e?"No ":""}Callback function found`),n)r=n;else if(t)r=document.querySelectorAll(t);else throw Error("Nodes and querySelector are both undefined");r2.log.debug(`Found ${r.length} diagrams`),l?.startOnLoad!==void 0&&(r2.log.debug("Start On Load: "+l?.startOnLoad),aq.updateSiteConfig({startOnLoad:l?.startOnLoad}));let a=new r0.utils_default.InitIDGenerator(l.deterministicIds,l.deterministicIDSeed),o=[];for(let t of Array.from(r)){if(r2.log.info("Rendering diagram: "+t.id),t.getAttribute("data-processed"))continue;t.setAttribute("data-processed","true");let n=`mermaid-${a.next()}`;i=t.innerHTML,i=(0,r4.dedent)(r0.utils_default.entityDecode(i)).trim().replace(/<br\s*\/?>/gi,"<br/>");let r=r0.utils_default.detectInit(i);r&&r2.log.debug("Detected early reinit: ",r);try{let{svg:r,bindFunctions:l}=await a4(n,i,t);t.innerHTML=r,e&&await e(n),l&&l(t)}catch(e){aV(e,o,a3.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),aK=(0,r2.__name)(function(e){aq.initialize(e)},"initialize"),aQ=(0,r2.__name)(async function(e,t,n){r2.log.warn("mermaid.init is deprecated. Please use run instead."),e&&aK(e);let r={postRenderCallback:n,querySelector:".mermaid"};"string"==typeof t?r.querySelector=t:t&&(t instanceof HTMLElement?r.nodes=[t]:r.nodes=t),await aW(r)},"init"),aZ=(0,r2.__name)(async(e,{lazyLoad:t=!0}={})=>{ah(),(0,r1.registerLazyLoadedDiagrams)(...e),!1===t&&await am()},"registerExternalDiagrams"),aG=(0,r2.__name)(function(){if(a3.startOnLoad){let{startOnLoad:e}=aq.getConfig();e&&a3.run().catch(e=>r2.log.error("Mermaid failed to initialize",e))}},"contentLoaded");"u">typeof document&&window.addEventListener("load",aG,!1);var aX=(0,r2.__name)(function(e){a3.parseError=e},"setParseErrorHandler"),aY=[],a0=!1,a1=(0,r2.__name)(async()=>{if(!a0){for(a0=!0;aY.length>0;){let e=aY.shift();if(e)try{await e()}catch(e){r2.log.error("Error executing queue",e)}}a0=!1}},"executeQueue"),a2=(0,r2.__name)(async(e,t)=>new Promise((n,r)=>{let i=(0,r2.__name)(()=>new Promise((i,l)=>{aq.parse(e,t).then(e=>{i(e),n(e)},e=>{r2.log.error("Error parsing",e),a3.parseError?.(e),l(e),r(e)})}),"performCall");aY.push(i),a1().catch(r)}),"parse"),a4=(0,r2.__name)((e,t,n)=>new Promise((r,i)=>{let l=(0,r2.__name)(()=>new Promise((l,a)=>{aq.render(e,t,n).then(e=>{l(e),r(e)},e=>{r2.log.error("Error parsing",e),a3.parseError?.(e),a(e),i(e)})}),"performCall");aY.push(l),a1().catch(i)}),"render"),a6=(0,r2.__name)(()=>Object.keys(r1.detectors).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),a3={startOnLoad:!0,mermaidAPI:aq,parse:a2,render:a4,init:aQ,run:aW,registerExternalDiagrams:aZ,registerLayoutLoaders:rX.registerLayoutLoaders,initialize:aK,parseError:void 0,contentLoaded:aG,setParseErrorHandler:aX,detectType:r1.detectType,registerIconPacks:rY.registerIconPacks,getRegisteredDiagramsMetadata:a6};let a5=!1,a9=0;function a8({code:e}){let r=(0,n.useRef)(null),[i,l]=(0,n.useState)(null),[a,o]=(0,n.useState)(null),s=(0,n.useRef)(`mermaid-${++a9}`);return((0,n.useEffect)(()=>{let t=!1;return a5||(a5=!0,a3.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",fontFamily:"system-ui, sans-serif"})),(async()=>{try{let{svg:n}=await a3.render(s.current,e);t||(l(n),o(null))}catch(n){t||(o(n instanceof Error?n.message:"Mermaid render error"),l(null));let e=document.getElementById("d"+s.current);e?.remove()}})(),()=>{t=!0}},[e]),a)?(0,t.jsxs)("div",{className:"border border-red-200 bg-red-50 rounded p-3 text-xs text-red-700",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Mermaid エラー"}),(0,t.jsx)("pre",{className:"whitespace-pre-wrap",children:e})]}):i?(0,t.jsx)("div",{ref:r,className:"my-2 overflow-x-auto",dangerouslySetInnerHTML:{__html:i}}):(0,t.jsx)("div",{className:"text-xs text-[var(--text-muted)] py-2",children:"図を描画中..."})}var a7=e.i(47167);let oe=a7.default.env.NEXT_PUBLIC_BASE_PATH?.trim(),ot=oe&&"/"!==oe&&""!==oe?oe.replace(/\/$/,""):"";function on(e){return e.startsWith("/")?ot+e:e}function or(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s-]/gu,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim()}function oi({children:e,onHeadingsExtracted:r,fileRefs:i,currentPath:l,onNavigate:a,onPreviewShow:o,onPreviewHide:s}){let u=(0,n.useMemo)(()=>(function(e){let t=[],n=new Map,r=/^(#{1,4})\s+(.+)$/,i=/^[ \t]*(`{3,}|~{3,})/,l=null;for(let a of e.split("\n")){let e=i.exec(a);if(e){let t=e[1][0];if(null===l){l=t;continue}if(e[1].startsWith(l)){l=null;continue}}if(null!==l)continue;let o=r.exec(a);if(!o)continue;let s=o[1].length,u=o[2].replace(/[#*_`[\]]/g,"").trim(),c=or(u)||"heading",d=n.get(c)??0;n.set(c,d+1);let f=0===d?c:`${c}-${d}`;t.push({id:f,text:u,level:s})}return t})(e),[e]),c=(0,n.useMemo)(()=>{let e=new Map;for(let t of u){let n=e.get(t.text)??[];n.push(t.id),e.set(t.text,n)}return e},[u]),d=(0,n.useMemo)(()=>new Map,[u]);(0,n.useEffect)(()=>{r?.(u)},[u,r]);let f=(0,n.useMemo)(()=>{if(!i||0===i.length)return null;let e=new Map;for(let t of i.filter(e=>e.displayName.length>2&&e.path!==l).sort((e,t)=>t.displayName.length-e.displayName.length))e.set(t.displayName,t.path);return e},[i,l]),p=(0,n.useMemo)(()=>{if(!f||0===f.size)return null;let e=Array.from(f.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return RegExp(`(${e.join("|")})`,"g")},[f]),h=(0,n.useMemo)(()=>new Set((i??[]).map(e=>e.path)),[i]);function m(e){return function(n){let r=function(e){let t=c.get(e);if(!t)return or(e)||"heading";let n=d.get(e)??0;return d.set(e,n+1),t[n%t.length]}("string"==typeof n.children?n.children:function e(t){return"string"==typeof t?t:"number"==typeof t?String(t):Array.isArray(t)?t.map(e).join(""):t&&"object"==typeof t&&"props"in t?e(t.props.children):""}(n.children)),i={...n,id:r};switch(e){case 1:return(0,t.jsx)("h1",{...i});case 2:return(0,t.jsx)("h2",{...i});case 3:return(0,t.jsx)("h3",{...i});default:return(0,t.jsx)("h4",{...i})}}}let g={h1:m(1),h2:m(2),h3:m(3),h4:m(4),code:({className:e,children:n,...r})=>{if(/language-mermaid/.exec(e||"")){let e=String(n).replace(/\n$/,"");return(0,t.jsx)(a8,{code:e})}return(0,t.jsx)("code",{className:e,...r,children:n})},pre:({children:e})=>e&&"object"==typeof e&&"type"in e&&e.type===a8?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsx)("pre",{children:e}),a:({href:e,children:n,...r})=>{let i=null;if(e?.startsWith("autolink:")?i=e.slice(9):e&&(i=function(e){let t,n=e.split("#")[0].split("?")[0].trim();if(!n||/^[a-z][a-z0-9+.-]*:/i.test(n)||n.startsWith("//"))return null;try{t=decodeURI(n)}catch{t=n}let r=l&&l.includes("/")?l.slice(0,l.lastIndexOf("/")):"",i=(t.startsWith("/")?t.slice(1):r?r+"/"+t:t).split("/"),a=[];for(let e of i)if(""!==e&&"."!==e){if(".."===e){a.pop();continue}a.push(e)}let o=a.join("/");return o?h.has(o)?o:h.has(o+"/README.md")?o+"/README.md":!/\.md$/i.test(o)&&h.has(o+".md")?o+".md":null:null}(e)),i){let e=i;return(0,t.jsx)("span",{className:"text-[var(--brand-primary)] font-medium cursor-pointer hover:underline transition-colors",onClick:t=>{t.preventDefault(),s?.(),a?.(e)},onMouseEnter:t=>{let n=t.target.getBoundingClientRect();o?.(e,n)},onMouseLeave:()=>s?.(),children:n})}return(0,t.jsx)("a",{href:e,...r,children:n})},img:({src:e,alt:n,...r})=>{if("string"!=typeof e)return(0,t.jsx)("img",{src:e,alt:n,...r});let i=function(e){let t,n=e.split("#")[0].split("?")[0].trim();if(!n||/^[a-z][a-z0-9+.-]*:/i.test(n)||n.startsWith("//"))return null;try{t=decodeURI(n)}catch{t=n}let r=l&&l.includes("/")?l.slice(0,l.lastIndexOf("/")):"",i=(t.startsWith("/")?t.slice(1):r?r+"/"+t:t).split("/"),a=[];for(let e of i)if(""!==e&&"."!==e){if(".."===e){a.pop();continue}a.push(e)}return a.join("/")||null}(e);if(!i)return(0,t.jsx)("img",{src:e,alt:n,...r});let a=on(`/api/asset?path=${encodeURIComponent(i)}`);return(0,t.jsx)("img",{src:a,alt:n,...r})},p:({children:e,...n})=>(0,t.jsx)("p",{...n,children:x(e)}),li:({children:e,...n})=>(0,t.jsx)("li",{...n,children:x(e)}),td:({children:e,...n})=>(0,t.jsx)("td",{...n,children:x(e)})};function x(e){return p&&f?"string"==typeof e?y(e):Array.isArray(e)?e.map((e,n)=>"string"==typeof e?(0,t.jsx)("span",{children:y(e)},n):e):e:e}function y(e){let n;if(!p||!f)return e;let r=[],i=0;for(p.lastIndex=0;null!==(n=p.exec(e));){let l=n[0],u=f.get(l);u&&(n.index>i&&r.push(e.slice(i,n.index)),r.push((0,t.jsx)("span",{className:"text-[var(--brand-primary)] border-b border-dashed border-[var(--brand-primary)] cursor-pointer hover:bg-blue-50 transition-colors",onClick:e=>{e.preventDefault(),s?.(),a?.(u)},onMouseEnter:e=>{let t=e.target.getBoundingClientRect();o?.(u,t)},onMouseLeave:()=>s?.(),children:l},`${n.index}-${l}`)),i=n.index+l.length)}return i<e.length&&r.push(e.slice(i)),0===r.length?e:r}return(0,t.jsx)("div",{className:"prose prose-sm max-w-none prose-headings:font-semibold prose-headings:tracking-tight prose-headings:text-[var(--text-primary)] prose-h1:text-lg prose-h1:leading-snug prose-h1:mb-4 prose-h2:text-[15px] prose-h2:leading-snug prose-h2:border-b prose-h2:border-[var(--border-default)] prose-h2:pb-2 prose-h2:mt-8 prose-h2:mb-3 prose-h3:text-[13px] prose-h3:leading-snug prose-h3:mt-6 prose-h3:mb-2 prose-p:text-[var(--text-secondary)] prose-p:text-[13px] prose-p:leading-[1.75] prose-li:text-[var(--text-secondary)] prose-li:text-[13px] prose-li:leading-[1.75] prose-strong:text-[var(--text-primary)] prose-strong:font-semibold prose-a:text-[var(--brand-primary)] prose-a:font-medium prose-a:no-underline hover:prose-a:underline prose-code:text-xs prose-code:text-[var(--text-primary)] prose-code:bg-[var(--bg-muted)] prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none prose-pre:bg-[var(--bg-muted)] prose-pre:text-xs prose-pre:text-[var(--text-primary)] prose-table:text-[12px] prose-th:bg-[var(--bg-muted)] prose-th:text-[var(--text-primary)] prose-th:font-semibold prose-th:px-3 prose-th:py-1.5 prose-th:text-left prose-td:px-3 prose-td:py-1.5 prose-td:border-[var(--border-default)] prose-td:text-[var(--text-secondary)] prose-hr:border-[var(--border-default)] prose-blockquote:border-l-[var(--brand-primary)] prose-blockquote:text-[var(--text-muted)] prose-blockquote:not-italic prose-img:rounded-lg ",children:(0,t.jsx)(nF,{remarkPlugins:[rQ],components:g,children:e})})}let ol=s("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);function oa({filePath:e,hash:r}){let[i,l]=(0,n.useState)(null);return((0,n.useEffect)(()=>{l(null),fetch(on(`/api/diff?path=${encodeURIComponent(e)}&hash=${r}`)).then(e=>e.json()).then(e=>l(e.diff)).catch(()=>l("(差分を取得できませんでした)"))},[e,r]),null===i)?(0,t.jsx)("div",{className:"text-[12px] text-[var(--text-muted)] py-2",children:"差分を読み込み中..."}):(0,t.jsx)("pre",{className:"text-[11px] font-[var(--font-mono)] bg-[var(--bg-muted)] rounded-lg p-3 overflow-x-auto leading-[1.7] border border-[var(--border-default)]",children:i.split("\n").filter(e=>!e.startsWith("diff --git")&&!e.startsWith("index ")&&!e.startsWith("new file")&&!e.startsWith("deleted file")&&!e.startsWith("similarity")&&!e.startsWith("rename ")&&!e.startsWith("old mode")&&!e.startsWith("new mode")).map((e,n)=>{let r="var(--text-secondary)",i="transparent";return e.startsWith("+")&&!e.startsWith("+++")?(r="var(--add-color)",i="var(--add-bg)"):e.startsWith("-")&&!e.startsWith("---")?(r="var(--del-color)",i="var(--del-bg)"):e.startsWith("@@")&&(r="var(--brand-primary)"),(0,t.jsx)("div",{style:{color:r,backgroundColor:i},className:"px-1 -mx-1 rounded-sm",children:e},n)})})}let oo=0,os=new Set,ou=null,oc=null;function od(){for(let e of(oo++,os))e(oo)}function of(){let[e,t]=(0,n.useState)(oo);return(0,n.useEffect)(()=>{!function(){if(!ou){try{ou=new EventSource(on("/api/watch"))}catch{return}ou.addEventListener("change",()=>{oc&&clearTimeout(oc),oc=setTimeout(od,150)})}}();let e=e=>t(e);return os.add(e),()=>{os.delete(e)}},[]),e}function op({filePath:e}){let[r,i]=(0,n.useState)([]),[l,a]=(0,n.useState)(!0),[o,s]=(0,n.useState)(null),d=of();return((0,n.useEffect)(()=>{a(!0),s(null),fetch(on(`/api/history?path=${encodeURIComponent(e)}`)).then(e=>e.json()).then(e=>{i(e),a(!1)}).catch(()=>a(!1))},[e,d]),l)?(0,t.jsx)("div",{className:"p-4 text-[var(--text-muted)] text-[13px]",children:"読み込み中..."}):0===r.length?(0,t.jsx)("div",{className:"p-4 text-[var(--text-muted)] text-[13px]",children:"変更履歴がありません(git 管理外の可能性)"}):(0,t.jsx)("div",{className:"divide-y divide-[var(--border-default)]",children:r.map(n=>{let r=o===n.hash;return(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{onClick:()=>s(r?null:n.hash),className:"w-full text-left px-4 py-3 hover:bg-[var(--bg-hover)] transition-colors",children:(0,t.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,t.jsx)(ol,{size:13,className:"text-[var(--text-muted)] mt-0.5 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-[var(--font-mono)] text-[var(--brand-primary)] leading-none",children:n.hashShort}),(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] leading-none",children:new Date(n.date).toLocaleString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}),n.author&&(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] leading-none",children:n.author})]}),(0,t.jsx)("p",{className:"text-[12px] text-[var(--text-secondary)] mt-1 leading-snug line-clamp-2",children:n.message})]}),(0,t.jsx)("span",{className:"text-[var(--text-muted)] shrink-0 mt-0.5",children:r?(0,t.jsx)(u,{size:13}):(0,t.jsx)(c,{size:13})})]})}),r&&(0,t.jsx)("div",{className:"px-4 pb-3",children:(0,t.jsx)(oa,{filePath:e,hash:n.hash})})]},n.hash)})})}function oh({headings:e,scrollContainer:r}){let[i,l]=(0,n.useState)(null),a=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!r||0===e.length)return;a.current?.disconnect();let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&l(t.target.id)},{root:r,rootMargin:"0px 0px -70% 0px",threshold:.1});for(let n of(a.current=t,e)){let e=document.getElementById(n.id);e&&t.observe(e)}return()=>t.disconnect()},[e,r]);let o=(0,n.useCallback)(e=>{let t=document.getElementById(e);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),l(e))},[]);return 0===e.length?null:(0,t.jsxs)("nav",{className:"py-3 px-2 space-y-px",children:[(0,t.jsx)("div",{className:"text-[10px] font-medium text-[var(--text-muted)] tracking-wider uppercase px-1.5 mb-1.5",children:"目次"}),e.map(e=>(0,t.jsx)("button",{onClick:()=>o(e.id),className:`block w-full text-left text-[11px] leading-relaxed py-0.5 truncate transition-colors rounded px-1.5 ${i===e.id?"text-[var(--brand-primary)] font-medium bg-blue-50":"text-[var(--text-muted)] hover:text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"}`,style:{paddingLeft:`${(e.level-1)*10+6}px`},title:e.text,children:e.text},e.id))]})}let om=s("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);function og({path:e,position:r,onNavigate:i,onMouseEnter:l,onMouseLeave:a,fileRefs:o,depth:s=0}){let[u,c]=(0,n.useState)(null),[d,f]=(0,n.useState)(!1),p=(0,n.useRef)(null),[h,m]=(0,n.useState)(null),[g,x]=(0,n.useState)(null),[y,v]=(0,n.useState)(null),b=(0,n.useRef)(null),k=(0,n.useRef)(null),w=of();(0,n.useEffect)(()=>{if(b.current&&clearTimeout(b.current),k.current&&clearTimeout(k.current),!e){c(null),x(null),v(null);return}f(!0),c(null),x(null),v(null),fetch(on(`/api/file?path=${encodeURIComponent(e)}`)).then(e=>e.json()).then(e=>c(e.content??null)).catch(()=>c(null)).finally(()=>f(!1))},[e,w]),(0,n.useEffect)(()=>{if(!r||!p.current)return void m(r);let e=p.current.getBoundingClientRect(),t=window.innerWidth,n=window.innerHeight,{x:i,y:l}=r;i+e.width>t-16&&(i=t-e.width-16),i<16&&(i=16),l+e.height>n-16&&(l=r.y-e.height-8),m({x:i,y:l})},[r,u]);let S=(0,n.useCallback)((e,t)=>{s>=3||(k.current&&clearTimeout(k.current),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{x(e),v({x:t.right+8,y:t.top})},200))},[s]),C=(0,n.useCallback)(()=>{b.current&&clearTimeout(b.current),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{x(null),v(null)},300)},[]),E=(0,n.useCallback)(()=>{k.current&&clearTimeout(k.current),l()},[l]),_=(0,n.useCallback)(()=>{C(),a()},[C,a]);if(!e||!r)return null;let j=e.split("/").pop()?.replace(/\.md$/i,"")||e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:p,onMouseEnter:l,onMouseLeave:()=>{a(),C()},className:"fixed bg-[var(--bg-surface)] border border-[var(--border-default)] rounded-lg shadow-xl w-[min(480px,30vw)] max-h-[min(420px,30vh)] overflow-y-auto",style:{left:h?.x??r.x,top:h?.y??r.y,zIndex:50+s},children:[(0,t.jsx)("div",{className:"sticky top-0 bg-[var(--bg-surface)] border-b border-[var(--border-default)] px-3 py-2 flex items-center gap-2",children:(0,t.jsxs)("button",{onClick:()=>i(e),className:"text-xs font-medium text-[var(--brand-primary)] hover:underline truncate flex items-center gap-1",children:[j,(0,t.jsx)(om,{size:10})]})}),(0,t.jsx)("div",{className:"p-3",children:d?(0,t.jsx)("div",{className:"text-xs text-[var(--text-muted)]",children:"読み込み中..."}):u?(0,t.jsx)("div",{className:"text-[11px]",children:(0,t.jsx)(oi,{fileRefs:o,currentPath:e,onNavigate:i,onPreviewShow:S,onPreviewHide:C,children:u})}):(0,t.jsx)("div",{className:"text-xs text-[var(--text-muted)]",children:"プレビューを表示できません"})})]}),(0,t.jsx)(og,{path:g,position:y,onNavigate:i,onMouseEnter:E,onMouseLeave:_,fileRefs:o,depth:s+1})]})}var ox=e.i(77871);let oy=s("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),ov="markshelf:linkGraphDepth",ob="markshelf:linkGraphExclude",ok="markshelf:linkGraphZoom",ow=[{value:1,label:"1階層"},{value:2,label:"2階層"},{value:3,label:"3階層"},{value:1/0,label:"全階層"}];function oS({currentPath:e,folders:r,onNavigate:i,onPreviewShow:l,onPreviewHide:a}){let o=(0,n.useRef)(null),s=(0,n.useRef)(null),u=(0,n.useRef)(null),[c,d]=(0,n.useState)(!0),[f,p]=(0,n.useState)(!1),[h,m]=(0,n.useState)(!1),[g,x]=(0,n.useState)(1),[y,v]=(0,n.useState)([]),[b,k]=(0,n.useState)(!1),w=of();(0,n.useEffect)(()=>{let e=localStorage.getItem(ov);if(null===e)return;let t="all"===e?1/0:Number(e);(Number.isFinite(t)||t===1/0)&&x(t)},[]),(0,n.useEffect)(()=>{let e=localStorage.getItem(ob);if(e)try{let t=JSON.parse(e);Array.isArray(t)&&v(t.filter(e=>"string"==typeof e))}catch{}},[]),(0,n.useEffect)(()=>{if(!b)return;let e=e=>{u.current&&!u.current.contains(e.target)&&k(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[b]);let S=(0,n.useMemo)(()=>{let t=y.map(e=>e+"/"),n=y.some(t=>e===t||e.startsWith(t+"/"));return r=>!n&&r!==e&&t.some(e=>r.startsWith(e))},[y,e]),C=(0,n.useRef)(i),E=(0,n.useRef)(l),_=(0,n.useRef)(a);return(0,n.useEffect)(()=>{C.current=i,E.current=l,_.current=a}),(0,n.useEffect)(()=>{let t=!1;return d(!0),p(!1),m(!1),fetch(on("/api/graph")).then(e=>e.json()).then(n=>{if(t||!o.current)return;let r=n.nodes.filter(e=>!S(e.id)),i=n.edges.filter(e=>!S(e.source)&&!S(e.target)),l=new Map;for(let e of i)(l.get(e.source)??l.set(e.source,[]).get(e.source)).push(e.target),(l.get(e.target)??l.set(e.target,[]).get(e.target)).push(e.source);let a=new Set([e]),u=[[e,0]];for(;u.length>0;){let[e,t]=u.shift();if(!(t>=g))for(let n of l.get(e)??[])a.has(n)||(a.add(n),u.push([n,t+1]))}let c=r.filter(e=>a.has(e.id)),f=i.filter(e=>a.has(e.source)&&a.has(e.target)),h=new Set;for(let e of f)h.add(e.target);let x=c.map(e=>e.id).filter(e=>!h.has(e));if(0===c.length){p(!0),d(!1);return}s.current?.destroy();let y=(0,ox.default)({container:o.current,elements:[...c.map(t=>({data:{id:t.id,label:t.label,isCurrent:t.id===e}})),...f.map((e,t)=>({data:{id:`e${t}`,source:e.source,target:e.target}}))],style:[{selector:"node",style:{label:"data(label)","text-valign":"bottom","text-halign":"center","font-size":"11px","font-family":"var(--font-sans)",color:"#4a5060","text-margin-y":6,"background-color":"#e8f0fe","border-width":2,"border-color":"#3b7ddb",width:28,height:28,"text-max-width":"180px","text-wrap":"ellipsis",cursor:"pointer"}},{selector:"node[?isCurrent]",style:{"background-color":"#2563eb","border-color":"#1d4ed8",color:"#1a1d23","font-weight":"bold",width:36,height:36}},{selector:"edge",style:{width:1.5,"line-color":"#c8ccd3","target-arrow-color":"#c8ccd3","target-arrow-shape":"triangle","curve-style":"bezier","arrow-scale":.8}},{selector:"node:active",style:{"overlay-opacity":0}}],layout:{name:"breadthfirst",animate:!1,padding:50,spacingFactor:1.2,directed:!0,grid:!1,roots:x.length>0?x:[e],transform:(e,t)=>({x:t.x,y:-t.y})},userZoomingEnabled:!0,userPanningEnabled:!0,boxSelectionEnabled:!1,autoungrabify:!1});requestAnimationFrame(()=>{y.resize();let e=Number(localStorage.getItem(ok));Number.isFinite(e)&&e>0?y.zoom({level:e,renderedPosition:{x:o.current.clientWidth/2,y:o.current.clientHeight/2}}):(y.fit(void 0,50),y.zoom()>.9&&y.zoom({level:.9,renderedPosition:{x:o.current.clientWidth/2,y:o.current.clientHeight/2}})),y.center(y.nodes("[?isCurrent]")),m(!0)});let v=null;y.on("zoom",()=>{v&&clearTimeout(v),v=setTimeout(()=>{localStorage.setItem(ok,String(y.zoom()))},200)}),y.on("mouseover","node",e=>{let t=e.target;t.data("isCurrent")||t.style({"background-color":"#dbeafe","border-color":"#2563eb",color:"#1a1d23"}),o.current.style.cursor="pointer";let n=t.id();if(E.current&&o.current){let e=t.renderedBoundingBox(),r=o.current.getBoundingClientRect(),i=r.left+e.x1,l=r.top+e.y1,a={left:i,top:l,right:r.left+e.x2,bottom:r.top+e.y2,width:e.w,height:e.h,x:i,y:l,toJSON:()=>({})};E.current(n,a)}}),y.on("mouseout","node",e=>{let t=e.target;t.data("isCurrent")||t.style({"background-color":"#e8f0fe","border-color":"#3b7ddb",color:"#4a5060"}),o.current.style.cursor="default",_.current?.()}),y.on("tap","node",t=>{let n=t.target.id();n!==e&&C.current(n)}),s.current=y,d(!1)}).catch(()=>{t||(p(!0),d(!1))}),()=>{t=!0,s.current?.destroy(),s.current=null}},[e,g,S,w]),(0,t.jsxs)("div",{className:"h-full flex flex-col relative",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-2 shrink-0",children:[(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] mr-1",children:"表示範囲"}),ow.map(e=>{let n=g===e.value;return(0,t.jsx)("button",{onClick:()=>{var t;x(t=e.value),localStorage.setItem(ov,t===1/0?"all":String(t))},className:`px-2 py-0.5 rounded-md text-[11px] font-medium transition-colors ${n?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,children:e.label},e.label)}),(0,t.jsxs)("div",{className:"ml-auto relative",ref:u,children:[(0,t.jsxs)("button",{onClick:()=>k(e=>!e),className:`flex items-center gap-1 px-2 py-0.5 rounded-md text-[11px] font-medium transition-colors ${y.length>0?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,title:"フォルダを除外",children:[(0,t.jsx)(oy,{size:11}),"除外",y.length>0&&(0,t.jsxs)("span",{className:"ml-0.5",children:["(",y.length,")"]})]}),b&&(0,t.jsx)("div",{className:"absolute right-0 top-full mt-1 w-56 max-h-72 overflow-y-auto bg-[var(--bg-surface)] border border-[var(--border-default)] rounded-md shadow-lg z-20 py-1",children:0===r.length?(0,t.jsx)("div",{className:"px-3 py-2 text-[11px] text-[var(--text-muted)]",children:"フォルダがありません"}):r.map(e=>{let n=y.includes(e.path);return(0,t.jsxs)("label",{className:"flex items-center gap-2 px-3 py-1 text-[12px] cursor-pointer hover:bg-[var(--bg-muted)]",style:{paddingLeft:`${12+12*e.depth}px`},children:[(0,t.jsx)("input",{type:"checkbox",checked:n,onChange:()=>{var t;return t=e.path,void v(e=>{let n=e.includes(t)?e.filter(e=>e!==t):[...e,t];return localStorage.setItem(ob,JSON.stringify(n)),n})},className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate text-[var(--text-secondary)]",children:e.displayName})]},e.path)})})]})]}),(c||f)&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center text-[13px] text-[var(--text-muted)] z-10 bg-[var(--bg-surface)]",children:c?"グラフを構築中...":"このドキュメントへのリンクはありません"}),(0,t.jsx)("div",{ref:o,className:"flex-1 min-h-0 transition-opacity duration-150",style:{opacity:+!!h}})]})}let oC=s("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),oE=s("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),o_=s("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),oj=s("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function oA({filePath:e,fileRefs:r,folders:i,onNavigate:l,onGoBack:a,onGoForward:o,canGoBack:s,canGoForward:u}){let[c,d]=(0,n.useState)(null),[p,h]=(0,n.useState)("content"),[m,g]=(0,n.useState)([]),[x,y]=(0,n.useState)(()=>{{let e=localStorage.getItem("markshelf:tocWidth");return e&&Number(e)||176}}),v=(0,n.useRef)(null),b=(0,n.useRef)(null),[k,w]=(0,n.useState)(null),[S,C]=(0,n.useState)(null),E=(0,n.useRef)(null),_=(0,n.useRef)(null),j=of();(0,n.useEffect)(()=>{d(null),g([]),E.current&&clearTimeout(E.current),_.current&&clearTimeout(_.current),w(null),C(null)},[e]),(0,n.useEffect)(()=>{fetch(on(`/api/file?path=${encodeURIComponent(e)}`)).then(e=>e.json()).then(e=>d(e.content??null)).catch(()=>d(null))},[e,j]);let A=(0,n.useCallback)((e,t)=>{_.current&&clearTimeout(_.current),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{w(e),C({x:t.left,y:t.bottom+4})},200)},[]),D=(0,n.useCallback)(()=>{E.current&&clearTimeout(E.current),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{w(null),C(null)},300)},[]),L=(0,n.useCallback)(()=>{_.current&&clearTimeout(_.current)},[]),T=(0,n.useCallback)(()=>{D()},[D]),N=(0,n.useCallback)(e=>{e.preventDefault(),document.body.style.userSelect="none",document.body.style.cursor="col-resize";let t=b.current?.parentElement,n=e=>{if(!t)return;let n=Math.max(120,Math.min(400,t.getBoundingClientRect().right-e.clientX));y(n),localStorage.setItem("markshelf:tocWidth",String(n))},r=()=>{document.body.style.userSelect="",document.body.style.cursor="",document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",r)},[]),M=e.split("/").pop()?.replace(/\.md$/i,"")||e;return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"border-b border-[var(--border-default)] px-4 py-2.5 shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[s&&(0,t.jsx)("button",{onClick:a,className:"shrink-0 p-0.5 rounded hover:bg-[var(--bg-muted)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",title:"戻る",children:(0,t.jsx)(o_,{size:14})}),u&&(0,t.jsx)("button",{onClick:o,className:"shrink-0 p-0.5 rounded hover:bg-[var(--bg-muted)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",title:"進む",children:(0,t.jsx)(oj,{size:14})}),(0,t.jsx)("h2",{className:"font-semibold text-[14px] leading-snug truncate text-[var(--text-primary)]",children:M})]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsxs)("button",{onClick:()=>h("content"),className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[12px] font-medium transition-colors ${"content"===p?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,children:[(0,t.jsx)(f,{size:12}),"内容"]}),(0,t.jsxs)("button",{onClick:()=>h("history"),className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[12px] font-medium transition-colors ${"history"===p?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,children:[(0,t.jsx)(oC,{size:12}),"変更履歴"]}),(0,t.jsxs)("button",{onClick:()=>h("links"),className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[12px] font-medium transition-colors ${"links"===p?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,children:[(0,t.jsx)(oE,{size:12}),"リンク"]})]})]}),"content"===p?null!==c?(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",ref:v,children:(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)(oi,{onHeadingsExtracted:g,fileRefs:r,currentPath:e,onNavigate:e=>{h("content"),l?.(e)},onPreviewShow:A,onPreviewHide:D,children:c})})}),m.length>0&&(0,t.jsxs)("div",{className:"flex shrink-0",ref:b,children:[(0,t.jsx)("div",{className:"w-1 hover:bg-[var(--brand-primary)] bg-[var(--border-default)] cursor-col-resize shrink-0 transition-colors duration-150",onMouseDown:N}),(0,t.jsx)("div",{className:"overflow-y-auto border-l border-[var(--border-default)]",style:{width:x},children:(0,t.jsx)(oh,{headings:m,scrollContainer:v.current})})]})]}):(0,t.jsx)("div",{className:"flex-1 p-4 text-[var(--text-muted)] text-sm",children:"読み込み中..."}):"history"===p?(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",ref:v,children:(0,t.jsx)(op,{filePath:e})}):(0,t.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,t.jsx)(oS,{currentPath:e,folders:i??[],onNavigate:e=>l?.(e),onPreviewShow:A,onPreviewHide:D})}),(0,t.jsx)(og,{path:k,position:S,onNavigate:e=>{w(null),C(null),h("content"),l?.(e)},onMouseEnter:L,onMouseLeave:T,fileRefs:r})]})}let oD=s("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),oL=s("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function oT({onSelect:e}){let[r,i]=(0,n.useState)(""),[l,a]=(0,n.useState)([]),[o,s]=(0,n.useState)(!1),[u,c]=(0,n.useState)(!1),d=(0,n.useRef)(null),f=(0,n.useRef)(null),p=(0,n.useRef)(null),h=(0,n.useCallback)(e=>{if(!e.trim()){a([]),c(!1);return}s(!0),fetch(on(`/api/search?q=${encodeURIComponent(e.trim())}`)).then(e=>e.json()).then(e=>{a(e.results??[]),c(!0)}).catch(()=>a([])).finally(()=>s(!1))},[]);return(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&(c(!1),f.current?.blur())},t=e=>{p.current&&!p.current.contains(e.target)&&c(!1)};return window.addEventListener("keydown",e),document.addEventListener("mousedown",t),()=>{window.removeEventListener("keydown",e),document.removeEventListener("mousedown",t)}},[]),(0,t.jsxs)("div",{ref:p,className:"relative px-4 pt-4 pb-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(oD,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-[var(--text-muted)]"}),(0,t.jsx)("input",{ref:f,type:"text",value:r,onChange:e=>{var t;i(t=e.target.value),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>h(t),300)},onFocus:()=>{l.length>0&&c(!0)},placeholder:"ドキュメントを検索...",className:"w-full pl-8 pr-8 py-1.5 text-[12px] leading-normal rounded-md border border-[var(--border-default)] bg-[var(--bg-surface)] text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:ring-1 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)] transition-shadow"}),r&&(0,t.jsx)("button",{onClick:()=>{i(""),a([]),c(!1),f.current?.focus()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:(0,t.jsx)(oL,{size:14})})]}),u&&(0,t.jsx)("div",{className:"absolute left-4 right-4 top-full mt-1 z-40 bg-[var(--bg-surface)] border border-[var(--border-default)] rounded-lg shadow-lg max-h-80 overflow-y-auto",children:o?(0,t.jsx)("div",{className:"p-3 text-xs text-[var(--text-muted)] text-center",children:"検索中..."}):0===l.length?(0,t.jsx)("div",{className:"p-3 text-xs text-[var(--text-muted)] text-center",children:"該当するドキュメントが見つかりません"}):l.map(n=>(0,t.jsxs)("button",{onClick:()=>{e(n.path),c(!1)},className:"w-full text-left px-3 py-2 hover:bg-[var(--bg-muted)] border-b border-[var(--border-default)] last:border-b-0 transition-colors",children:[(0,t.jsx)("div",{className:"text-[12px] font-medium text-[var(--text-primary)] truncate leading-snug",children:n.displayName}),(0,t.jsx)("div",{className:"text-[10px] text-[var(--text-muted)] font-[var(--font-mono)] truncate mb-1 leading-normal",children:n.path}),n.matches.slice(0,2).map(e=>(0,t.jsxs)("div",{className:"text-[10px] text-[var(--text-secondary)] truncate leading-relaxed",children:[(0,t.jsxs)("span",{className:"text-[var(--text-muted)] mr-1",children:["L",e.line]}),(0,t.jsx)(oN,{text:e.text,query:r})]},e.line))]},n.path))})]})}function oN({text:e,query:n}){if(!n.trim())return(0,t.jsx)(t.Fragment,{children:e});let r=e.toLowerCase().indexOf(n.toLowerCase());if(-1===r)return(0,t.jsx)(t.Fragment,{children:e});let i=e.slice(0,r),l=e.slice(r,r+n.length),a=e.slice(r+n.length);return(0,t.jsxs)(t.Fragment,{children:[i,(0,t.jsx)("span",{className:"bg-yellow-200 text-yellow-900 rounded px-0.5",children:l}),a]})}let oM=s("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);function oz({onNavigate:e,onClose:r}){let[i,l]=(0,n.useState)([]),[a,o]=(0,n.useState)(!0),[s,d]=(0,n.useState)(null),[p,h]=(0,n.useState)(null),m=of();(0,n.useEffect)(()=>{o(!0),fetch(on("/api/timeline")).then(e=>e.json()).then(e=>{l(e.entries??[]),o(!1)}).catch(()=>o(!1))},[m]),(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r]);let g=new Map;for(let e of i){let t=new Date(e.date).toLocaleDateString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit"}),n=g.get(t)??[];n.push(e),g.set(t,n)}return(0,t.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-sm",onClick:r,children:(0,t.jsxs)("div",{className:"bg-[var(--bg-surface)] rounded-lg shadow-2xl w-[90vw] max-w-4xl h-[85vh] flex flex-col overflow-hidden border border-[var(--border-default)]",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-5 py-3 border-b border-[var(--border-default)] shrink-0",children:[(0,t.jsx)(oM,{size:14,className:"text-[var(--brand-primary)]"}),(0,t.jsx)("h2",{className:"font-semibold text-[14px] text-[var(--text-primary)]",children:"変更タイムライン"}),(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)]",children:"リポジトリ全体の変更履歴"}),(0,t.jsx)("button",{onClick:r,className:"ml-auto p-1 rounded hover:bg-[var(--bg-muted)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",title:"閉じる (Esc)",children:(0,t.jsx)(oL,{size:16})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:a?(0,t.jsx)("div",{className:"h-full flex items-center justify-center text-[13px] text-[var(--text-muted)]",children:"タイムラインを読み込み中..."}):0===i.length?(0,t.jsx)("div",{className:"h-full flex items-center justify-center text-[13px] text-[var(--text-muted)]",children:"変更履歴がありません"}):Array.from(g.entries()).map(([n,r])=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"sticky top-0 z-10 bg-[var(--bg-base)] border-b border-[var(--border-default)] px-4 py-1.5",children:(0,t.jsx)("span",{className:"text-[11px] font-medium text-[var(--text-muted)] tracking-wide",children:n})}),r.map(n=>{let r=s===n.hash;return(0,t.jsxs)("div",{className:"border-b border-[var(--border-default)]",children:[(0,t.jsx)("button",{onClick:()=>d(r?null:n.hash),className:"w-full text-left px-4 py-2.5 hover:bg-[var(--bg-hover)] transition-colors",children:(0,t.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,t.jsx)(ol,{size:13,className:"text-[var(--text-muted)] mt-0.5 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-[var(--font-mono)] text-[var(--brand-primary)] leading-none",children:n.hashShort}),(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] leading-none",children:new Date(n.date).toLocaleTimeString("ja-JP",{hour:"2-digit",minute:"2-digit"})}),n.author&&(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] leading-none",children:n.author})]}),(0,t.jsx)("p",{className:"text-[12px] text-[var(--text-secondary)] mt-1 leading-snug line-clamp-2",children:n.message}),(0,t.jsx)("div",{className:"flex items-center gap-1 mt-1.5",children:(0,t.jsxs)("span",{className:"text-[10px] text-[var(--text-muted)]",children:[n.files.length,"件のドキュメント変更"]})})]}),(0,t.jsx)("span",{className:"text-[var(--text-muted)] shrink-0 mt-0.5",children:r?(0,t.jsx)(u,{size:13}):(0,t.jsx)(c,{size:13})})]})}),r&&(0,t.jsx)("div",{className:"px-4 pb-3",children:(0,t.jsx)("div",{className:"space-y-1",children:n.files.map(r=>{let i=(r.split("/").pop()||r).replace(/^\d+[_\-.\s]/,"").replace(/\.md$/i,""),l=p?.hash===n.hash&&p?.file===r;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-1 px-2 rounded hover:bg-[var(--bg-muted)] group",children:[(0,t.jsx)("button",{onClick:()=>h(l?null:{hash:n.hash,file:r}),className:"shrink-0 text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:l?(0,t.jsx)(u,{size:12}):(0,t.jsx)(c,{size:12})}),(0,t.jsx)(f,{size:12,className:"shrink-0",style:{color:"var(--file-border)"}}),(0,t.jsx)("button",{onClick:()=>e(r),className:"text-[11px] text-[var(--text-secondary)] hover:text-[var(--brand-primary)] truncate text-left",title:r,children:i}),(0,t.jsx)("span",{className:"text-[10px] text-[var(--text-muted)] truncate ml-auto opacity-0 group-hover:opacity-100 transition-opacity",children:r})]}),l&&(0,t.jsx)("div",{className:"ml-6 mt-1 mb-2",children:(0,t.jsx)(oa,{filePath:r,hash:n.hash})})]},r)})})})]},n.hash)})]},n))})]})})}let oI="file";e.s(["default",0,function(){let[e,r]=(0,n.useState)([]),[i,l]=(0,n.useState)(""),[a,o]=(0,n.useState)(null),[s,u]=(0,n.useState)(260),[c,d]=(0,n.useState)(!1),[f,p]=(0,n.useState)([]),[m,g]=(0,n.useState)([]);(0,n.useEffect)(()=>{let e,t=(e=new URL(window.location.href).searchParams.get(oI))?decodeURIComponent(e):null;t&&o(t)},[]),(0,n.useEffect)(()=>{let e=new URL(window.location.href);a?e.searchParams.set(oI,a):e.searchParams.delete(oI);let t=e.pathname+(e.search?e.search:"")+e.hash;t!==window.location.pathname+window.location.search+window.location.hash&&window.history.replaceState(null,"",t)},[a]);let x=(0,n.useCallback)(e=>{a&&e!==a&&(p(e=>[...e,a]),g([])),o(e)},[a]),y=(0,n.useCallback)(()=>{if(0===f.length)return;let e=f[f.length-1];a&&g(e=>[...e,a]),p(e=>e.slice(0,-1)),o(e)},[f,a]),v=(0,n.useCallback)(()=>{if(0===m.length)return;let e=m[m.length-1];a&&p(e=>[...e,a]),g(e=>e.slice(0,-1)),o(e)},[m,a]),b=f.length>0,k=m.length>0,w=of();(0,n.useEffect)(()=>{fetch(on("/api/tree")).then(e=>e.json()).then(e=>{r(e.tree??[]),l(e.root??"")})},[w]),(0,n.useEffect)(()=>{let e=localStorage.getItem("markshelf:treeWidth");e&&u(Number(e)||260)},[]);let S=(0,n.useMemo)(()=>(function e(t){let n=[];for(let r of t)"file"===r.type&&n.push({path:r.path,displayName:r.displayName}),"folder"===r.type&&(r.hasReadme&&n.push({path:r.path+"/README.md",displayName:r.displayName}),r.children&&n.push(...e(r.children)));return n})(e),[e]),C=(0,n.useMemo)(()=>{let t=[];return!function e(n,r){for(let i of n)"folder"===i.type&&(t.push({path:i.path,displayName:i.displayName,depth:r}),i.children&&e(i.children,r+1))}(e,0),t},[e]),E=(0,n.useCallback)(e=>{e.preventDefault(),document.body.style.userSelect="none",document.body.style.cursor="col-resize";let t=e=>{let t=Math.max(180,Math.min(.4*window.innerWidth,e.clientX));u(t),localStorage.setItem("markshelf:treeWidth",String(t))},n=()=>{document.body.style.userSelect="",document.body.style.cursor="",document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)},[]);return(0,t.jsxs)("div",{className:"h-screen flex flex-col",children:[(0,t.jsxs)("header",{className:"h-11 border-b border-[var(--border-default)] bg-[var(--bg-surface)] flex items-center px-5 shrink-0 gap-3",children:[(0,t.jsxs)("span",{className:"font-semibold text-[15px] tracking-tight leading-none",children:["Mark",(0,t.jsx)("span",{className:"text-[var(--brand-primary)]",children:"Shelf"})]}),i&&(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] font-[var(--font-mono)] truncate leading-none",children:i}),(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsxs)("button",{onClick:()=>d(!c),className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[12px] font-medium transition-colors ${c?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,children:[(0,t.jsx)(oM,{size:12}),"タイムライン"]})})]}),(0,t.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"overflow-hidden flex flex-col shrink-0",style:{width:s},children:[(0,t.jsx)(oT,{onSelect:x}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,t.jsx)(h,{entries:e,selectedPath:a,onSelect:x})})]}),(0,t.jsx)("div",{className:"w-1.5 hover:bg-[var(--brand-primary)] bg-[var(--border-default)] cursor-col-resize shrink-0 transition-colors duration-150",onMouseDown:E}),(0,t.jsx)("div",{className:"flex-1 border-l border-[var(--border-default)] bg-[var(--bg-surface)] overflow-hidden flex flex-col",children:a?(0,t.jsx)(oA,{filePath:a,fileRefs:S,folders:C,onNavigate:x,onGoBack:y,onGoForward:v,canGoBack:b,canGoForward:k}):(0,t.jsx)("div",{className:"p-6 text-[var(--text-muted)] text-sm flex items-center justify-center h-full",children:"ファイルをクリックして内容を表示"})})]}),c&&(0,t.jsx)(oz,{onNavigate:e=>{x(e),d(!1)},onClose:()=>d(!1)})]})}],52683)}]);
|
|
11
|
+
</iframe>`},"putIntoIFrame"),aR=(0,r2.__name)((e,t,n,r,i)=>{let l=e.append("div");l.attr("id",n),r&&l.attr("style",r);let a=l.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&a.attr("xmlns:xlink",i),a.append("g"),e},"appendDivSvgG");function aF(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,r2.__name)(aF,"sandboxedIframe");var aO=(0,r2.__name)((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},"removeExistingElements"),aB=(0,r2.__name)(async function(e,t,n){let r,i;ah();let l=aL(t);t=l.code;let a=(0,r1.getConfig)();r2.log.debug(a),t.length>(a?.maxTextSize??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let o="#"+e,s="i"+e,u="#"+s,c="d"+e,d="#"+c,f=(0,r2.__name)(()=>{let e=h?u:d,t=(0,r6.select)(e).node();t&&"remove"in t&&t.remove()},"removeTempElements"),p=(0,r6.select)("body"),h="sandbox"===a.securityLevel,m="loose"===a.securityLevel,g=a.fontFamily;if(void 0!==n){if(n&&(n.innerHTML=""),h){let e=aF((0,r6.select)(n),s);(p=(0,r6.select)(e.nodes()[0].contentDocument.body)).node().style.margin=0}else p=(0,r6.select)(n);aR(p,e,c,`font-family: ${g}`,"http://www.w3.org/1999/xlink")}else{if(aO(document,e,c,s),h){let e=aF((0,r6.select)("body"),s);(p=(0,r6.select)(e.nodes()[0].contentDocument.body)).node().style.margin=0}else p=(0,r6.select)("body");aR(p,e,c)}try{r=await ay.fromText(t,{title:l.title})}catch(e){if(a.suppressErrorRendering)throw f(),e;r=await ay.fromText("error"),i=e}let x=p.select(d).node(),y=r.type,v=x.firstChild,b=v.firstChild,k=az(a,y,r.renderer.getClasses?.(t,r),o),w=document.createElement("style");w.innerHTML=k,v.insertBefore(w,b);try{await r.renderer.draw(t,e,"11.14.0",r)}catch(n){throw a.suppressErrorRendering?f():lv.draw(t,e,"11.14.0"),n}a$(y,p.select(`${d} svg`),r.db.getAccTitle?.(),r.db.getAccDescription?.()),p.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let S=p.select(d).node().innerHTML;if(r2.log.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),S=aI(S,h,(0,r1.evaluate)(a.arrowMarkerAbsolute)),h?S=aP(S,p.select(d+" svg").node()):m||(S=iw.default.sanitize(S,{ADD_TAGS:aA,ADD_ATTR:aD,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),ab(),i)throw i;return f(),{diagramType:y,svg:S,bindFunctions:r.db.bindFunctions}},"render");function aH(e={}){let t=(0,r1.assignWithDepth_default)({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),(0,r1.saveConfigFromInitialize)(t),t?.theme&&t.theme in r1.themes_default?t.themeVariables=r1.themes_default[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=r1.themes_default.default.getThemeVariables(t.themeVariables));let n="object"==typeof t?(0,r1.setSiteConfig)(t):(0,r1.getSiteConfig)();(0,r2.setLogLevel)(n.logLevel),ah()}(0,r2.__name)(aH,"initialize");var aU=(0,r2.__name)((e,t={})=>{let{code:n}=a_(e);return ay.fromText(n,t)},"getDiagramFromText");function a$(e,t,n,r){ag(t,e),ax(t,n,r,t.attr("id"))}(0,r2.__name)(a$,"addA11yInfo");var aq=Object.freeze({render:aB,parse:aT,getDiagramFromText:aU,initialize:aH,getConfig:r1.getConfig,setConfig:r1.setConfig,getSiteConfig:r1.getSiteConfig,updateSiteConfig:r1.updateSiteConfig,reset:(0,r2.__name)(()=>{(0,r1.reset)()},"reset"),globalReset:(0,r2.__name)(()=>{(0,r1.reset)(r1.defaultConfig)},"globalReset"),defaultConfig:r1.defaultConfig});(0,r2.setLogLevel)((0,r1.getConfig)().logLevel),(0,r1.reset)((0,r1.getConfig)());var aV=(0,r2.__name)((e,t,n)=>{r2.log.warn(e),(0,r0.isDetailedError)(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),aW=(0,r2.__name)(async function(e={querySelector:".mermaid"}){try{await aJ(e)}catch(t){if((0,r0.isDetailedError)(t)&&r2.log.error(t.str),a3.parseError&&a3.parseError(t),!e.suppressErrors)throw r2.log.error("Use the suppressErrors option to suppress these errors"),t}},"run"),aJ=(0,r2.__name)(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:".mermaid"}){let r,i,l=aq.getConfig();if(r2.log.debug(`${!e?"No ":""}Callback function found`),n)r=n;else if(t)r=document.querySelectorAll(t);else throw Error("Nodes and querySelector are both undefined");r2.log.debug(`Found ${r.length} diagrams`),l?.startOnLoad!==void 0&&(r2.log.debug("Start On Load: "+l?.startOnLoad),aq.updateSiteConfig({startOnLoad:l?.startOnLoad}));let a=new r0.utils_default.InitIDGenerator(l.deterministicIds,l.deterministicIDSeed),o=[];for(let t of Array.from(r)){if(r2.log.info("Rendering diagram: "+t.id),t.getAttribute("data-processed"))continue;t.setAttribute("data-processed","true");let n=`mermaid-${a.next()}`;i=t.innerHTML,i=(0,r4.dedent)(r0.utils_default.entityDecode(i)).trim().replace(/<br\s*\/?>/gi,"<br/>");let r=r0.utils_default.detectInit(i);r&&r2.log.debug("Detected early reinit: ",r);try{let{svg:r,bindFunctions:l}=await a4(n,i,t);t.innerHTML=r,e&&await e(n),l&&l(t)}catch(e){aV(e,o,a3.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),aK=(0,r2.__name)(function(e){aq.initialize(e)},"initialize"),aQ=(0,r2.__name)(async function(e,t,n){r2.log.warn("mermaid.init is deprecated. Please use run instead."),e&&aK(e);let r={postRenderCallback:n,querySelector:".mermaid"};"string"==typeof t?r.querySelector=t:t&&(t instanceof HTMLElement?r.nodes=[t]:r.nodes=t),await aW(r)},"init"),aZ=(0,r2.__name)(async(e,{lazyLoad:t=!0}={})=>{ah(),(0,r1.registerLazyLoadedDiagrams)(...e),!1===t&&await am()},"registerExternalDiagrams"),aG=(0,r2.__name)(function(){if(a3.startOnLoad){let{startOnLoad:e}=aq.getConfig();e&&a3.run().catch(e=>r2.log.error("Mermaid failed to initialize",e))}},"contentLoaded");"u">typeof document&&window.addEventListener("load",aG,!1);var aX=(0,r2.__name)(function(e){a3.parseError=e},"setParseErrorHandler"),aY=[],a0=!1,a1=(0,r2.__name)(async()=>{if(!a0){for(a0=!0;aY.length>0;){let e=aY.shift();if(e)try{await e()}catch(e){r2.log.error("Error executing queue",e)}}a0=!1}},"executeQueue"),a2=(0,r2.__name)(async(e,t)=>new Promise((n,r)=>{let i=(0,r2.__name)(()=>new Promise((i,l)=>{aq.parse(e,t).then(e=>{i(e),n(e)},e=>{r2.log.error("Error parsing",e),a3.parseError?.(e),l(e),r(e)})}),"performCall");aY.push(i),a1().catch(r)}),"parse"),a4=(0,r2.__name)((e,t,n)=>new Promise((r,i)=>{let l=(0,r2.__name)(()=>new Promise((l,a)=>{aq.render(e,t,n).then(e=>{l(e),r(e)},e=>{r2.log.error("Error parsing",e),a3.parseError?.(e),a(e),i(e)})}),"performCall");aY.push(l),a1().catch(i)}),"render"),a6=(0,r2.__name)(()=>Object.keys(r1.detectors).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),a3={startOnLoad:!0,mermaidAPI:aq,parse:a2,render:a4,init:aQ,run:aW,registerExternalDiagrams:aZ,registerLayoutLoaders:rX.registerLayoutLoaders,initialize:aK,parseError:void 0,contentLoaded:aG,setParseErrorHandler:aX,detectType:r1.detectType,registerIconPacks:rY.registerIconPacks,getRegisteredDiagramsMetadata:a6};let a5=!1,a9=0;function a8({code:e}){let r=(0,n.useRef)(null),[i,l]=(0,n.useState)(null),[a,o]=(0,n.useState)(null),s=(0,n.useRef)(`mermaid-${++a9}`);return((0,n.useEffect)(()=>{let t=!1;return a5||(a5=!0,a3.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",fontFamily:"system-ui, sans-serif"})),(async()=>{try{let{svg:n}=await a3.render(s.current,e);t||(l(n),o(null))}catch(n){t||(o(n instanceof Error?n.message:"Mermaid render error"),l(null));let e=document.getElementById("d"+s.current);e?.remove()}})(),()=>{t=!0}},[e]),a)?(0,t.jsxs)("div",{className:"border border-red-200 bg-red-50 rounded p-3 text-xs text-red-700",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Mermaid エラー"}),(0,t.jsx)("pre",{className:"whitespace-pre-wrap",children:e})]}):i?(0,t.jsx)("div",{ref:r,className:"my-2 overflow-x-auto",dangerouslySetInnerHTML:{__html:i}}):(0,t.jsx)("div",{className:"text-xs text-[var(--text-muted)] py-2",children:"図を描画中..."})}var a7=e.i(47167);let oe=a7.default.env.NEXT_PUBLIC_BASE_PATH?.trim(),ot=oe&&"/"!==oe&&""!==oe?oe.replace(/\/$/,""):"";function on(e){return e.startsWith("/")?ot+e:e}function or(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s-]/gu,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim()}function oi({children:e,onHeadingsExtracted:r,fileRefs:i,currentPath:l,onNavigate:a,onPreviewShow:o,onPreviewHide:s}){let u=(0,n.useMemo)(()=>(function(e){let t=[],n=new Map,r=/^(#{1,4})\s+(.+)$/,i=/^[ \t]*(`{3,}|~{3,})/,l=null;for(let a of e.split("\n")){let e=i.exec(a);if(e){let t=e[1][0];if(null===l){l=t;continue}if(e[1].startsWith(l)){l=null;continue}}if(null!==l)continue;let o=r.exec(a);if(!o)continue;let s=o[1].length,u=o[2].replace(/[#*_`[\]]/g,"").trim(),c=or(u)||"heading",d=n.get(c)??0;n.set(c,d+1);let f=0===d?c:`${c}-${d}`;t.push({id:f,text:u,level:s})}return t})(e),[e]),c=(0,n.useMemo)(()=>{let e=new Map;for(let t of u){let n=e.get(t.text)??[];n.push(t.id),e.set(t.text,n)}return e},[u]),d=(0,n.useMemo)(()=>new Map,[u]);(0,n.useEffect)(()=>{r?.(u)},[u,r]);let f=(0,n.useMemo)(()=>{if(!i||0===i.length)return null;let e=new Map;for(let t of i.filter(e=>e.displayName.length>2&&e.path!==l).sort((e,t)=>t.displayName.length-e.displayName.length))e.set(t.displayName,t.path);return e},[i,l]),p=(0,n.useMemo)(()=>{if(!f||0===f.size)return null;let e=Array.from(f.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return RegExp(`(${e.join("|")})`,"g")},[f]),h=(0,n.useMemo)(()=>new Set((i??[]).map(e=>e.path)),[i]);function m(e){return function(n){let r=function(e){let t=c.get(e);if(!t)return or(e)||"heading";let n=d.get(e)??0;return d.set(e,n+1),t[n%t.length]}("string"==typeof n.children?n.children:function e(t){return"string"==typeof t?t:"number"==typeof t?String(t):Array.isArray(t)?t.map(e).join(""):t&&"object"==typeof t&&"props"in t?e(t.props.children):""}(n.children)),i={...n,id:r};switch(e){case 1:return(0,t.jsx)("h1",{...i});case 2:return(0,t.jsx)("h2",{...i});case 3:return(0,t.jsx)("h3",{...i});default:return(0,t.jsx)("h4",{...i})}}}let g={h1:m(1),h2:m(2),h3:m(3),h4:m(4),code:({className:e,children:n,...r})=>{if(/language-mermaid/.exec(e||"")){let e=String(n).replace(/\n$/,"");return(0,t.jsx)(a8,{code:e})}return(0,t.jsx)("code",{className:e,...r,children:n})},pre:({children:e})=>e&&"object"==typeof e&&"type"in e&&e.type===a8?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsx)("pre",{children:e}),a:({href:e,children:n,...r})=>{let i=null;if(e?.startsWith("autolink:")?i=e.slice(9):e&&(i=function(e){let t,n=e.split("#")[0].split("?")[0].trim();if(!n||/^[a-z][a-z0-9+.-]*:/i.test(n)||n.startsWith("//"))return null;try{t=decodeURI(n)}catch{t=n}let r=l&&l.includes("/")?l.slice(0,l.lastIndexOf("/")):"",i=(t.startsWith("/")?t.slice(1):r?r+"/"+t:t).split("/"),a=[];for(let e of i)if(""!==e&&"."!==e){if(".."===e){a.pop();continue}a.push(e)}let o=a.join("/");return o?h.has(o)?o:h.has(o+"/README.md")?o+"/README.md":!/\.md$/i.test(o)&&h.has(o+".md")?o+".md":null:null}(e)),i){let e=i;return(0,t.jsx)("span",{className:"text-[var(--brand-primary)] font-medium cursor-pointer hover:underline transition-colors",onClick:t=>{t.preventDefault(),s?.(),a?.(e)},onMouseEnter:t=>{let n=t.target.getBoundingClientRect();o?.(e,n)},onMouseLeave:()=>s?.(),children:n})}return(0,t.jsx)("a",{href:e,...r,children:n})},img:({src:e,alt:n,...r})=>{if("string"!=typeof e)return(0,t.jsx)("img",{src:e,alt:n,...r});let i=function(e){let t,n=e.split("#")[0].split("?")[0].trim();if(!n||/^[a-z][a-z0-9+.-]*:/i.test(n)||n.startsWith("//"))return null;try{t=decodeURI(n)}catch{t=n}let r=l&&l.includes("/")?l.slice(0,l.lastIndexOf("/")):"",i=(t.startsWith("/")?t.slice(1):r?r+"/"+t:t).split("/"),a=[];for(let e of i)if(""!==e&&"."!==e){if(".."===e){a.pop();continue}a.push(e)}return a.join("/")||null}(e);if(!i)return(0,t.jsx)("img",{src:e,alt:n,...r});let a=on(`/api/asset?path=${encodeURIComponent(i)}`);return(0,t.jsx)("img",{src:a,alt:n,...r})},p:({children:e,...n})=>(0,t.jsx)("p",{...n,children:x(e)}),li:({children:e,...n})=>(0,t.jsx)("li",{...n,children:x(e)}),td:({children:e,...n})=>(0,t.jsx)("td",{...n,children:x(e)})};function x(e){return p&&f?"string"==typeof e?y(e):Array.isArray(e)?e.map((e,n)=>"string"==typeof e?(0,t.jsx)("span",{children:y(e)},n):e):e:e}function y(e){let n;if(!p||!f)return e;let r=[],i=0;for(p.lastIndex=0;null!==(n=p.exec(e));){let l=n[0],u=f.get(l);u&&(n.index>i&&r.push(e.slice(i,n.index)),r.push((0,t.jsx)("span",{className:"text-[var(--brand-primary)] border-b border-dashed border-[var(--brand-primary)] cursor-pointer hover:bg-blue-50 transition-colors",onClick:e=>{e.preventDefault(),s?.(),a?.(u)},onMouseEnter:e=>{let t=e.target.getBoundingClientRect();o?.(u,t)},onMouseLeave:()=>s?.(),children:l},`${n.index}-${l}`)),i=n.index+l.length)}return i<e.length&&r.push(e.slice(i)),0===r.length?e:r}return(0,t.jsx)("div",{className:"prose prose-sm max-w-none prose-headings:font-semibold prose-headings:tracking-tight prose-headings:text-[var(--text-primary)] prose-h1:text-lg prose-h1:leading-snug prose-h1:mb-4 prose-h2:text-[15px] prose-h2:leading-snug prose-h2:border-b prose-h2:border-[var(--border-default)] prose-h2:pb-2 prose-h2:mt-8 prose-h2:mb-3 prose-h3:text-[13px] prose-h3:leading-snug prose-h3:mt-6 prose-h3:mb-2 prose-p:text-[var(--text-secondary)] prose-p:text-[13px] prose-p:leading-[1.75] prose-li:text-[var(--text-secondary)] prose-li:text-[13px] prose-li:leading-[1.75] prose-strong:text-[var(--text-primary)] prose-strong:font-semibold prose-a:text-[var(--brand-primary)] prose-a:font-medium prose-a:no-underline hover:prose-a:underline prose-code:text-xs prose-code:text-[var(--text-primary)] prose-code:bg-[var(--bg-muted)] prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none prose-pre:bg-[var(--bg-muted)] prose-pre:text-xs prose-pre:text-[var(--text-primary)] prose-table:text-[12px] prose-th:bg-[var(--bg-muted)] prose-th:text-[var(--text-primary)] prose-th:font-semibold prose-th:px-3 prose-th:py-1.5 prose-th:text-left prose-td:px-3 prose-td:py-1.5 prose-td:border-[var(--border-default)] prose-td:text-[var(--text-secondary)] prose-hr:border-[var(--border-default)] prose-blockquote:border-l-[var(--brand-primary)] prose-blockquote:text-[var(--text-muted)] prose-blockquote:not-italic prose-img:rounded-lg ",children:(0,t.jsx)(nF,{remarkPlugins:[rQ],components:g,children:e})})}let ol=s("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);function oa({filePath:e,hash:r}){let[i,l]=(0,n.useState)(null);return((0,n.useEffect)(()=>{l(null),fetch(on(`/api/diff?path=${encodeURIComponent(e)}&hash=${r}`)).then(e=>e.json()).then(e=>l(e.diff)).catch(()=>l("(差分を取得できませんでした)"))},[e,r]),null===i)?(0,t.jsx)("div",{className:"text-[12px] text-[var(--text-muted)] py-2",children:"差分を読み込み中..."}):(0,t.jsx)("pre",{className:"text-[11px] font-[var(--font-mono)] bg-[var(--bg-muted)] rounded-lg p-3 overflow-x-auto leading-[1.7] border border-[var(--border-default)]",children:i.split("\n").filter(e=>!e.startsWith("diff --git")&&!e.startsWith("index ")&&!e.startsWith("new file")&&!e.startsWith("deleted file")&&!e.startsWith("similarity")&&!e.startsWith("rename ")&&!e.startsWith("old mode")&&!e.startsWith("new mode")).map((e,n)=>{let r="var(--text-secondary)",i="transparent";return e.startsWith("+")&&!e.startsWith("+++")?(r="var(--add-color)",i="var(--add-bg)"):e.startsWith("-")&&!e.startsWith("---")?(r="var(--del-color)",i="var(--del-bg)"):e.startsWith("@@")&&(r="var(--brand-primary)"),(0,t.jsx)("div",{style:{color:r,backgroundColor:i},className:"px-1 -mx-1 rounded-sm",children:e},n)})})}let oo=0,os=new Set,ou=null,oc=null;function od(){for(let e of(oo++,os))e(oo)}function of(){let[e,t]=(0,n.useState)(oo);return(0,n.useEffect)(()=>{!function(){if(!ou){try{ou=new EventSource(on("/api/watch"))}catch{return}ou.addEventListener("change",()=>{oc&&clearTimeout(oc),oc=setTimeout(od,150)})}}();let e=e=>t(e);return os.add(e),()=>{os.delete(e)}},[]),e}function op({filePath:e}){let[r,i]=(0,n.useState)([]),[l,a]=(0,n.useState)(!0),[o,s]=(0,n.useState)(null),d=of();return((0,n.useEffect)(()=>{a(!0),s(null),fetch(on(`/api/history?path=${encodeURIComponent(e)}`)).then(e=>e.json()).then(e=>{i(e),a(!1)}).catch(()=>a(!1))},[e,d]),l)?(0,t.jsx)("div",{className:"p-4 text-[var(--text-muted)] text-[13px]",children:"読み込み中..."}):0===r.length?(0,t.jsx)("div",{className:"p-4 text-[var(--text-muted)] text-[13px]",children:"変更履歴がありません(git 管理外の可能性)"}):(0,t.jsx)("div",{className:"divide-y divide-[var(--border-default)]",children:r.map(n=>{let r=o===n.hash;return(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{onClick:()=>s(r?null:n.hash),className:"w-full text-left px-4 py-3 hover:bg-[var(--bg-hover)] transition-colors",children:(0,t.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,t.jsx)(ol,{size:13,className:"text-[var(--text-muted)] mt-0.5 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-[var(--font-mono)] text-[var(--brand-primary)] leading-none",children:n.hashShort}),(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] leading-none",children:new Date(n.date).toLocaleString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}),n.author&&(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] leading-none",children:n.author})]}),(0,t.jsx)("p",{className:"text-[12px] text-[var(--text-secondary)] mt-1 leading-snug line-clamp-2",children:n.message})]}),(0,t.jsx)("span",{className:"text-[var(--text-muted)] shrink-0 mt-0.5",children:r?(0,t.jsx)(u,{size:13}):(0,t.jsx)(c,{size:13})})]})}),r&&(0,t.jsx)("div",{className:"px-4 pb-3",children:(0,t.jsx)(oa,{filePath:e,hash:n.hash})})]},n.hash)})})}function oh({headings:e,scrollContainer:r}){let[i,l]=(0,n.useState)(null),a=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!r||0===e.length)return;a.current?.disconnect();let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&l(t.target.id)},{root:r,rootMargin:"0px 0px -70% 0px",threshold:.1});for(let n of(a.current=t,e)){let e=document.getElementById(n.id);e&&t.observe(e)}return()=>t.disconnect()},[e,r]);let o=(0,n.useCallback)(e=>{let t=document.getElementById(e);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),l(e))},[]);return 0===e.length?null:(0,t.jsxs)("nav",{className:"py-3 px-2 space-y-px",children:[(0,t.jsx)("div",{className:"text-[10px] font-medium text-[var(--text-muted)] tracking-wider uppercase px-1.5 mb-1.5",children:"目次"}),e.map(e=>(0,t.jsx)("button",{onClick:()=>o(e.id),className:`block w-full text-left text-[11px] leading-relaxed py-0.5 truncate transition-colors rounded px-1.5 ${i===e.id?"text-[var(--brand-primary)] font-medium bg-blue-50":"text-[var(--text-muted)] hover:text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"}`,style:{paddingLeft:`${(e.level-1)*10+6}px`},title:e.text,children:e.text},e.id))]})}let om=s("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);function og({path:e,position:r,onNavigate:i,onMouseEnter:l,onMouseLeave:a,fileRefs:o,depth:s=0}){let[u,c]=(0,n.useState)(null),[d,f]=(0,n.useState)(!1),p=(0,n.useRef)(null),[h,m]=(0,n.useState)(null),[g,x]=(0,n.useState)(null),[y,v]=(0,n.useState)(null),b=(0,n.useRef)(null),k=(0,n.useRef)(null),w=of();(0,n.useEffect)(()=>{if(b.current&&clearTimeout(b.current),k.current&&clearTimeout(k.current),!e){c(null),x(null),v(null);return}f(!0),c(null),x(null),v(null),fetch(on(`/api/file?path=${encodeURIComponent(e)}`)).then(e=>e.json()).then(e=>c(e.content??null)).catch(()=>c(null)).finally(()=>f(!1))},[e,w]),(0,n.useEffect)(()=>{if(!r||!p.current)return void m(r);let e=p.current.getBoundingClientRect(),t=window.innerWidth,n=window.innerHeight,{x:i,y:l}=r;i+e.width>t-16&&(i=t-e.width-16),i<16&&(i=16),l+e.height>n-16&&(l=r.y-e.height-8),m({x:i,y:l})},[r,u]);let S=(0,n.useCallback)((e,t)=>{s>=3||(k.current&&clearTimeout(k.current),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{x(e),v({x:t.right+8,y:t.top})},200))},[s]),C=(0,n.useCallback)(()=>{b.current&&clearTimeout(b.current),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{x(null),v(null)},300)},[]),E=(0,n.useCallback)(()=>{k.current&&clearTimeout(k.current),l()},[l]),_=(0,n.useCallback)(()=>{C(),a()},[C,a]);if(!e||!r)return null;let j=e.split("/").pop()?.replace(/\.md$/i,"")||e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:p,onMouseEnter:l,onMouseLeave:()=>{a(),C()},className:"fixed bg-[var(--bg-surface)] border border-[var(--border-default)] rounded-lg shadow-xl w-[min(480px,30vw)] max-h-[min(420px,30vh)] overflow-y-auto",style:{left:h?.x??r.x,top:h?.y??r.y,zIndex:50+s},children:[(0,t.jsx)("div",{className:"sticky top-0 bg-[var(--bg-surface)] border-b border-[var(--border-default)] px-3 py-2 flex items-center gap-2",children:(0,t.jsxs)("button",{onClick:()=>i(e),className:"text-xs font-medium text-[var(--brand-primary)] hover:underline truncate flex items-center gap-1",children:[j,(0,t.jsx)(om,{size:10})]})}),(0,t.jsx)("div",{className:"p-3",children:d?(0,t.jsx)("div",{className:"text-xs text-[var(--text-muted)]",children:"読み込み中..."}):u?(0,t.jsx)("div",{className:"text-[11px]",children:(0,t.jsx)(oi,{fileRefs:o,currentPath:e,onNavigate:i,onPreviewShow:S,onPreviewHide:C,children:u})}):(0,t.jsx)("div",{className:"text-xs text-[var(--text-muted)]",children:"プレビューを表示できません"})})]}),(0,t.jsx)(og,{path:g,position:y,onNavigate:i,onMouseEnter:E,onMouseLeave:_,fileRefs:o,depth:s+1})]})}var ox=e.i(77871);let oy=s("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),ov="markshelf:linkGraphDepth",ob="markshelf:linkGraphExclude",ok="markshelf:linkGraphZoom",ow=[{value:1,label:"1階層"},{value:2,label:"2階層"},{value:3,label:"3階層"},{value:1/0,label:"全階層"}];function oS({currentPath:e,folders:r,onNavigate:i,onPreviewShow:l,onPreviewHide:a}){let o=(0,n.useRef)(null),s=(0,n.useRef)(null),u=(0,n.useRef)(null),[c,d]=(0,n.useState)(!0),[f,p]=(0,n.useState)(!1),[h,m]=(0,n.useState)(!1),[g,x]=(0,n.useState)(1),[y,v]=(0,n.useState)([]),[b,k]=(0,n.useState)(!1),w=of();(0,n.useEffect)(()=>{let e=localStorage.getItem(ov);if(null===e)return;let t="all"===e?1/0:Number(e);(Number.isFinite(t)||t===1/0)&&x(t)},[]),(0,n.useEffect)(()=>{let e=localStorage.getItem(ob);if(e)try{let t=JSON.parse(e);Array.isArray(t)&&v(t.filter(e=>"string"==typeof e))}catch{}},[]),(0,n.useEffect)(()=>{if(0===r.length)return;let e=new Set(r.map(e=>e.path));v(t=>{let n=t.filter(t=>e.has(t));return n.length===t.length?t:(localStorage.setItem(ob,JSON.stringify(n)),n)})},[r]),(0,n.useEffect)(()=>{if(!b)return;let e=e=>{u.current&&!u.current.contains(e.target)&&k(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[b]);let S=(0,n.useMemo)(()=>{let t=y.map(e=>e+"/"),n=y.some(t=>e===t||e.startsWith(t+"/"));return r=>!n&&r!==e&&t.some(e=>r.startsWith(e))},[y,e]),C=(0,n.useRef)(i),E=(0,n.useRef)(l),_=(0,n.useRef)(a);return(0,n.useEffect)(()=>{C.current=i,E.current=l,_.current=a}),(0,n.useEffect)(()=>{let t=!1;return d(!0),p(!1),m(!1),fetch(on("/api/graph")).then(e=>e.json()).then(n=>{if(t||!o.current)return;let r=n.nodes.filter(e=>!S(e.id)),i=n.edges.filter(e=>!S(e.source)&&!S(e.target)),l=new Map;for(let e of i)(l.get(e.source)??l.set(e.source,[]).get(e.source)).push(e.target),(l.get(e.target)??l.set(e.target,[]).get(e.target)).push(e.source);let a=new Set([e]),u=[[e,0]];for(;u.length>0;){let[e,t]=u.shift();if(!(t>=g))for(let n of l.get(e)??[])a.has(n)||(a.add(n),u.push([n,t+1]))}let c=r.filter(e=>a.has(e.id)),f=i.filter(e=>a.has(e.source)&&a.has(e.target)),h=new Set;for(let e of f)h.add(e.target);let x=c.map(e=>e.id).filter(e=>!h.has(e));if(0===c.length){p(!0),d(!1);return}s.current?.destroy();let y=(0,ox.default)({container:o.current,elements:[...c.map(t=>({data:{id:t.id,label:t.label,isCurrent:t.id===e}})),...f.map((e,t)=>({data:{id:`e${t}`,source:e.source,target:e.target}}))],style:[{selector:"node",style:{label:"data(label)","text-valign":"bottom","text-halign":"center","font-size":"11px","font-family":"var(--font-sans)",color:"#4a5060","text-margin-y":6,"background-color":"#e8f0fe","border-width":2,"border-color":"#3b7ddb",width:28,height:28,"text-max-width":"180px","text-wrap":"ellipsis",cursor:"pointer"}},{selector:"node[?isCurrent]",style:{"background-color":"#2563eb","border-color":"#1d4ed8",color:"#1a1d23","font-weight":"bold",width:36,height:36}},{selector:"edge",style:{width:1.5,"line-color":"#c8ccd3","target-arrow-color":"#c8ccd3","target-arrow-shape":"triangle","curve-style":"bezier","arrow-scale":.8}},{selector:"node:active",style:{"overlay-opacity":0}}],layout:{name:"breadthfirst",animate:!1,padding:50,spacingFactor:1.2,directed:!0,grid:!1,roots:x.length>0?x:[e],transform:(e,t)=>({x:t.x,y:-t.y})},userZoomingEnabled:!0,userPanningEnabled:!0,boxSelectionEnabled:!1,autoungrabify:!1});requestAnimationFrame(()=>{y.resize();let e=Number(localStorage.getItem(ok));Number.isFinite(e)&&e>0?y.zoom({level:e,renderedPosition:{x:o.current.clientWidth/2,y:o.current.clientHeight/2}}):(y.fit(void 0,50),y.zoom()>.9&&y.zoom({level:.9,renderedPosition:{x:o.current.clientWidth/2,y:o.current.clientHeight/2}})),y.center(y.nodes("[?isCurrent]")),m(!0)});let v=null;y.on("zoom",()=>{v&&clearTimeout(v),v=setTimeout(()=>{localStorage.setItem(ok,String(y.zoom()))},200)}),y.on("mouseover","node",e=>{let t=e.target;t.data("isCurrent")||t.style({"background-color":"#dbeafe","border-color":"#2563eb",color:"#1a1d23"}),o.current.style.cursor="pointer";let n=t.id();if(E.current&&o.current){let e=t.renderedBoundingBox(),r=o.current.getBoundingClientRect(),i=r.left+e.x1,l=r.top+e.y1,a={left:i,top:l,right:r.left+e.x2,bottom:r.top+e.y2,width:e.w,height:e.h,x:i,y:l,toJSON:()=>({})};E.current(n,a)}}),y.on("mouseout","node",e=>{let t=e.target;t.data("isCurrent")||t.style({"background-color":"#e8f0fe","border-color":"#3b7ddb",color:"#4a5060"}),o.current.style.cursor="default",_.current?.()}),y.on("tap","node",t=>{let n=t.target.id();n!==e&&C.current(n)}),s.current=y,d(!1)}).catch(()=>{t||(p(!0),d(!1))}),()=>{t=!0,s.current?.destroy(),s.current=null}},[e,g,S,w]),(0,t.jsxs)("div",{className:"h-full flex flex-col relative",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-2 shrink-0",children:[(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] mr-1",children:"表示範囲"}),ow.map(e=>{let n=g===e.value;return(0,t.jsx)("button",{onClick:()=>{var t;x(t=e.value),localStorage.setItem(ov,t===1/0?"all":String(t))},className:`px-2 py-0.5 rounded-md text-[11px] font-medium transition-colors ${n?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,children:e.label},e.label)}),(0,t.jsxs)("div",{className:"ml-auto relative",ref:u,children:[(0,t.jsxs)("button",{onClick:()=>k(e=>!e),className:`flex items-center gap-1 px-2 py-0.5 rounded-md text-[11px] font-medium transition-colors ${y.length>0?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,title:"フォルダを除外",children:[(0,t.jsx)(oy,{size:11}),"除外",y.length>0&&(0,t.jsxs)("span",{className:"ml-0.5",children:["(",y.length,")"]})]}),b&&(0,t.jsx)("div",{className:"absolute right-0 top-full mt-1 w-56 max-h-72 overflow-y-auto bg-[var(--bg-surface)] border border-[var(--border-default)] rounded-md shadow-lg z-20 py-1",children:0===r.length?(0,t.jsx)("div",{className:"px-3 py-2 text-[11px] text-[var(--text-muted)]",children:"フォルダがありません"}):r.map(e=>{let n=y.includes(e.path);return(0,t.jsxs)("label",{className:"flex items-center gap-2 px-3 py-1 text-[12px] cursor-pointer hover:bg-[var(--bg-muted)]",style:{paddingLeft:`${12+12*e.depth}px`},children:[(0,t.jsx)("input",{type:"checkbox",checked:n,onChange:()=>{var t;return t=e.path,void v(e=>{let n=e.includes(t)?e.filter(e=>e!==t):[...e,t];return localStorage.setItem(ob,JSON.stringify(n)),n})},className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate text-[var(--text-secondary)]",children:e.displayName})]},e.path)})})]})]}),(c||f)&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center text-[13px] text-[var(--text-muted)] z-10 bg-[var(--bg-surface)]",children:c?"グラフを構築中...":"このドキュメントへのリンクはありません"}),(0,t.jsx)("div",{ref:o,className:"flex-1 min-h-0 transition-opacity duration-150",style:{opacity:+!!h}})]})}let oC=s("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),oE=s("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),o_=s("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),oj=s("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function oA({filePath:e,fileRefs:r,folders:i,onNavigate:l,onGoBack:a,onGoForward:o,canGoBack:s,canGoForward:u}){let[c,d]=(0,n.useState)(null),[p,h]=(0,n.useState)("content"),[m,g]=(0,n.useState)([]),[x,y]=(0,n.useState)(()=>{{let e=localStorage.getItem("markshelf:tocWidth");return e&&Number(e)||176}}),v=(0,n.useRef)(null),b=(0,n.useRef)(null),[k,w]=(0,n.useState)(null),[S,C]=(0,n.useState)(null),E=(0,n.useRef)(null),_=(0,n.useRef)(null),j=of();(0,n.useEffect)(()=>{d(null),g([]),E.current&&clearTimeout(E.current),_.current&&clearTimeout(_.current),w(null),C(null)},[e]),(0,n.useEffect)(()=>{fetch(on(`/api/file?path=${encodeURIComponent(e)}`)).then(e=>e.json()).then(e=>d(e.content??null)).catch(()=>d(null))},[e,j]);let A=(0,n.useCallback)((e,t)=>{_.current&&clearTimeout(_.current),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{w(e),C({x:t.left,y:t.bottom+4})},200)},[]),D=(0,n.useCallback)(()=>{E.current&&clearTimeout(E.current),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{w(null),C(null)},300)},[]),L=(0,n.useCallback)(()=>{_.current&&clearTimeout(_.current)},[]),T=(0,n.useCallback)(()=>{D()},[D]),N=(0,n.useCallback)(e=>{e.preventDefault(),document.body.style.userSelect="none",document.body.style.cursor="col-resize";let t=b.current?.parentElement,n=e=>{if(!t)return;let n=Math.max(120,Math.min(400,t.getBoundingClientRect().right-e.clientX));y(n),localStorage.setItem("markshelf:tocWidth",String(n))},r=()=>{document.body.style.userSelect="",document.body.style.cursor="",document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",r)},[]),M=e.split("/").pop()?.replace(/\.md$/i,"")||e;return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"border-b border-[var(--border-default)] px-4 py-2.5 shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[s&&(0,t.jsx)("button",{onClick:a,className:"shrink-0 p-0.5 rounded hover:bg-[var(--bg-muted)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",title:"戻る",children:(0,t.jsx)(o_,{size:14})}),u&&(0,t.jsx)("button",{onClick:o,className:"shrink-0 p-0.5 rounded hover:bg-[var(--bg-muted)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",title:"進む",children:(0,t.jsx)(oj,{size:14})}),(0,t.jsx)("h2",{className:"font-semibold text-[14px] leading-snug truncate text-[var(--text-primary)]",children:M})]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsxs)("button",{onClick:()=>h("content"),className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[12px] font-medium transition-colors ${"content"===p?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,children:[(0,t.jsx)(f,{size:12}),"内容"]}),(0,t.jsxs)("button",{onClick:()=>h("history"),className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[12px] font-medium transition-colors ${"history"===p?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,children:[(0,t.jsx)(oC,{size:12}),"変更履歴"]}),(0,t.jsxs)("button",{onClick:()=>h("links"),className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[12px] font-medium transition-colors ${"links"===p?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,children:[(0,t.jsx)(oE,{size:12}),"リンク"]})]})]}),"content"===p?null!==c?(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",ref:v,children:(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)(oi,{onHeadingsExtracted:g,fileRefs:r,currentPath:e,onNavigate:e=>{h("content"),l?.(e)},onPreviewShow:A,onPreviewHide:D,children:c})})}),m.length>0&&(0,t.jsxs)("div",{className:"flex shrink-0",ref:b,children:[(0,t.jsx)("div",{className:"w-1 hover:bg-[var(--brand-primary)] bg-[var(--border-default)] cursor-col-resize shrink-0 transition-colors duration-150",onMouseDown:N}),(0,t.jsx)("div",{className:"overflow-y-auto border-l border-[var(--border-default)]",style:{width:x},children:(0,t.jsx)(oh,{headings:m,scrollContainer:v.current})})]})]}):(0,t.jsx)("div",{className:"flex-1 p-4 text-[var(--text-muted)] text-sm",children:"読み込み中..."}):"history"===p?(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",ref:v,children:(0,t.jsx)(op,{filePath:e})}):(0,t.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,t.jsx)(oS,{currentPath:e,folders:i??[],onNavigate:e=>l?.(e),onPreviewShow:A,onPreviewHide:D})}),(0,t.jsx)(og,{path:k,position:S,onNavigate:e=>{w(null),C(null),h("content"),l?.(e)},onMouseEnter:L,onMouseLeave:T,fileRefs:r})]})}let oD=s("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),oL=s("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function oT({onSelect:e}){let[r,i]=(0,n.useState)(""),[l,a]=(0,n.useState)([]),[o,s]=(0,n.useState)(!1),[u,c]=(0,n.useState)(!1),d=(0,n.useRef)(null),f=(0,n.useRef)(null),p=(0,n.useRef)(null),h=(0,n.useCallback)(e=>{if(!e.trim()){a([]),c(!1);return}s(!0),fetch(on(`/api/search?q=${encodeURIComponent(e.trim())}`)).then(e=>e.json()).then(e=>{a(e.results??[]),c(!0)}).catch(()=>a([])).finally(()=>s(!1))},[]);return(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&(c(!1),f.current?.blur())},t=e=>{p.current&&!p.current.contains(e.target)&&c(!1)};return window.addEventListener("keydown",e),document.addEventListener("mousedown",t),()=>{window.removeEventListener("keydown",e),document.removeEventListener("mousedown",t)}},[]),(0,t.jsxs)("div",{ref:p,className:"relative px-4 pt-4 pb-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(oD,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-[var(--text-muted)]"}),(0,t.jsx)("input",{ref:f,type:"text",value:r,onChange:e=>{var t;i(t=e.target.value),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>h(t),300)},onFocus:()=>{l.length>0&&c(!0)},placeholder:"ドキュメントを検索...",className:"w-full pl-8 pr-8 py-1.5 text-[12px] leading-normal rounded-md border border-[var(--border-default)] bg-[var(--bg-surface)] text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:ring-1 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)] transition-shadow"}),r&&(0,t.jsx)("button",{onClick:()=>{i(""),a([]),c(!1),f.current?.focus()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:(0,t.jsx)(oL,{size:14})})]}),u&&(0,t.jsx)("div",{className:"absolute left-4 right-4 top-full mt-1 z-40 bg-[var(--bg-surface)] border border-[var(--border-default)] rounded-lg shadow-lg max-h-80 overflow-y-auto",children:o?(0,t.jsx)("div",{className:"p-3 text-xs text-[var(--text-muted)] text-center",children:"検索中..."}):0===l.length?(0,t.jsx)("div",{className:"p-3 text-xs text-[var(--text-muted)] text-center",children:"該当するドキュメントが見つかりません"}):l.map(n=>(0,t.jsxs)("button",{onClick:()=>{e(n.path),c(!1)},className:"w-full text-left px-3 py-2 hover:bg-[var(--bg-muted)] border-b border-[var(--border-default)] last:border-b-0 transition-colors",children:[(0,t.jsx)("div",{className:"text-[12px] font-medium text-[var(--text-primary)] truncate leading-snug",children:n.displayName}),(0,t.jsx)("div",{className:"text-[10px] text-[var(--text-muted)] font-[var(--font-mono)] truncate mb-1 leading-normal",children:n.path}),n.matches.slice(0,2).map(e=>(0,t.jsxs)("div",{className:"text-[10px] text-[var(--text-secondary)] truncate leading-relaxed",children:[(0,t.jsxs)("span",{className:"text-[var(--text-muted)] mr-1",children:["L",e.line]}),(0,t.jsx)(oN,{text:e.text,query:r})]},e.line))]},n.path))})]})}function oN({text:e,query:n}){if(!n.trim())return(0,t.jsx)(t.Fragment,{children:e});let r=e.toLowerCase().indexOf(n.toLowerCase());if(-1===r)return(0,t.jsx)(t.Fragment,{children:e});let i=e.slice(0,r),l=e.slice(r,r+n.length),a=e.slice(r+n.length);return(0,t.jsxs)(t.Fragment,{children:[i,(0,t.jsx)("span",{className:"bg-yellow-200 text-yellow-900 rounded px-0.5",children:l}),a]})}let oM=s("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);function oz({onNavigate:e,onClose:r}){let[i,l]=(0,n.useState)([]),[a,o]=(0,n.useState)(!0),[s,d]=(0,n.useState)(null),[p,h]=(0,n.useState)(null),m=of();(0,n.useEffect)(()=>{o(!0),fetch(on("/api/timeline")).then(e=>e.json()).then(e=>{l(e.entries??[]),o(!1)}).catch(()=>o(!1))},[m]),(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r]);let g=new Map;for(let e of i){let t=new Date(e.date).toLocaleDateString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit"}),n=g.get(t)??[];n.push(e),g.set(t,n)}return(0,t.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-sm",onClick:r,children:(0,t.jsxs)("div",{className:"bg-[var(--bg-surface)] rounded-lg shadow-2xl w-[90vw] max-w-4xl h-[85vh] flex flex-col overflow-hidden border border-[var(--border-default)]",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-5 py-3 border-b border-[var(--border-default)] shrink-0",children:[(0,t.jsx)(oM,{size:14,className:"text-[var(--brand-primary)]"}),(0,t.jsx)("h2",{className:"font-semibold text-[14px] text-[var(--text-primary)]",children:"変更タイムライン"}),(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)]",children:"リポジトリ全体の変更履歴"}),(0,t.jsx)("button",{onClick:r,className:"ml-auto p-1 rounded hover:bg-[var(--bg-muted)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",title:"閉じる (Esc)",children:(0,t.jsx)(oL,{size:16})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:a?(0,t.jsx)("div",{className:"h-full flex items-center justify-center text-[13px] text-[var(--text-muted)]",children:"タイムラインを読み込み中..."}):0===i.length?(0,t.jsx)("div",{className:"h-full flex items-center justify-center text-[13px] text-[var(--text-muted)]",children:"変更履歴がありません"}):Array.from(g.entries()).map(([n,r])=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"sticky top-0 z-10 bg-[var(--bg-base)] border-b border-[var(--border-default)] px-4 py-1.5",children:(0,t.jsx)("span",{className:"text-[11px] font-medium text-[var(--text-muted)] tracking-wide",children:n})}),r.map(n=>{let r=s===n.hash;return(0,t.jsxs)("div",{className:"border-b border-[var(--border-default)]",children:[(0,t.jsx)("button",{onClick:()=>d(r?null:n.hash),className:"w-full text-left px-4 py-2.5 hover:bg-[var(--bg-hover)] transition-colors",children:(0,t.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,t.jsx)(ol,{size:13,className:"text-[var(--text-muted)] mt-0.5 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-[var(--font-mono)] text-[var(--brand-primary)] leading-none",children:n.hashShort}),(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] leading-none",children:new Date(n.date).toLocaleTimeString("ja-JP",{hour:"2-digit",minute:"2-digit"})}),n.author&&(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] leading-none",children:n.author})]}),(0,t.jsx)("p",{className:"text-[12px] text-[var(--text-secondary)] mt-1 leading-snug line-clamp-2",children:n.message}),(0,t.jsx)("div",{className:"flex items-center gap-1 mt-1.5",children:(0,t.jsxs)("span",{className:"text-[10px] text-[var(--text-muted)]",children:[n.files.length,"件のドキュメント変更"]})})]}),(0,t.jsx)("span",{className:"text-[var(--text-muted)] shrink-0 mt-0.5",children:r?(0,t.jsx)(u,{size:13}):(0,t.jsx)(c,{size:13})})]})}),r&&(0,t.jsx)("div",{className:"px-4 pb-3",children:(0,t.jsx)("div",{className:"space-y-1",children:n.files.map(r=>{let i=(r.split("/").pop()||r).replace(/^\d+[_\-.\s]/,"").replace(/\.md$/i,""),l=p?.hash===n.hash&&p?.file===r;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-1 px-2 rounded hover:bg-[var(--bg-muted)] group",children:[(0,t.jsx)("button",{onClick:()=>h(l?null:{hash:n.hash,file:r}),className:"shrink-0 text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:l?(0,t.jsx)(u,{size:12}):(0,t.jsx)(c,{size:12})}),(0,t.jsx)(f,{size:12,className:"shrink-0",style:{color:"var(--file-border)"}}),(0,t.jsx)("button",{onClick:()=>e(r),className:"text-[11px] text-[var(--text-secondary)] hover:text-[var(--brand-primary)] truncate text-left",title:r,children:i}),(0,t.jsx)("span",{className:"text-[10px] text-[var(--text-muted)] truncate ml-auto opacity-0 group-hover:opacity-100 transition-opacity",children:r})]}),l&&(0,t.jsx)("div",{className:"ml-6 mt-1 mb-2",children:(0,t.jsx)(oa,{filePath:r,hash:n.hash})})]},r)})})})]},n.hash)})]},n))})]})})}let oI="file";e.s(["default",0,function(){let[e,r]=(0,n.useState)([]),[i,l]=(0,n.useState)(""),[a,o]=(0,n.useState)(null),[s,u]=(0,n.useState)(260),[c,d]=(0,n.useState)(!1),[f,p]=(0,n.useState)([]),[m,g]=(0,n.useState)([]);(0,n.useEffect)(()=>{let e,t=(e=new URL(window.location.href).searchParams.get(oI))?decodeURIComponent(e):null;t&&o(t)},[]),(0,n.useEffect)(()=>{let e=new URL(window.location.href);a?e.searchParams.set(oI,a):e.searchParams.delete(oI);let t=e.pathname+(e.search?e.search:"")+e.hash;t!==window.location.pathname+window.location.search+window.location.hash&&window.history.replaceState(null,"",t)},[a]);let x=(0,n.useCallback)(e=>{a&&e!==a&&(p(e=>[...e,a]),g([])),o(e)},[a]),y=(0,n.useCallback)(()=>{if(0===f.length)return;let e=f[f.length-1];a&&g(e=>[...e,a]),p(e=>e.slice(0,-1)),o(e)},[f,a]),v=(0,n.useCallback)(()=>{if(0===m.length)return;let e=m[m.length-1];a&&p(e=>[...e,a]),g(e=>e.slice(0,-1)),o(e)},[m,a]),b=f.length>0,k=m.length>0,w=of();(0,n.useEffect)(()=>{fetch(on("/api/tree")).then(e=>e.json()).then(e=>{r(e.tree??[]),l(e.root??"")})},[w]),(0,n.useEffect)(()=>{let e=localStorage.getItem("markshelf:treeWidth");e&&u(Number(e)||260)},[]);let S=(0,n.useMemo)(()=>(function e(t){let n=[];for(let r of t)"file"===r.type&&n.push({path:r.path,displayName:r.displayName}),"folder"===r.type&&(r.hasReadme&&n.push({path:r.path+"/README.md",displayName:r.displayName}),r.children&&n.push(...e(r.children)));return n})(e),[e]),C=(0,n.useMemo)(()=>{let t=[];return!function e(n,r){for(let i of n)"folder"===i.type&&(t.push({path:i.path,displayName:i.displayName,depth:r}),i.children&&e(i.children,r+1))}(e,0),t},[e]),E=(0,n.useCallback)(e=>{e.preventDefault(),document.body.style.userSelect="none",document.body.style.cursor="col-resize";let t=e=>{let t=Math.max(180,Math.min(.4*window.innerWidth,e.clientX));u(t),localStorage.setItem("markshelf:treeWidth",String(t))},n=()=>{document.body.style.userSelect="",document.body.style.cursor="",document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)},[]);return(0,t.jsxs)("div",{className:"h-screen flex flex-col",children:[(0,t.jsxs)("header",{className:"h-11 border-b border-[var(--border-default)] bg-[var(--bg-surface)] flex items-center px-5 shrink-0 gap-3",children:[(0,t.jsxs)("span",{className:"font-semibold text-[15px] tracking-tight leading-none",children:["Mark",(0,t.jsx)("span",{className:"text-[var(--brand-primary)]",children:"Shelf"})]}),i&&(0,t.jsx)("span",{className:"text-[11px] text-[var(--text-muted)] font-[var(--font-mono)] truncate leading-none",children:i}),(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsxs)("button",{onClick:()=>d(!c),className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[12px] font-medium transition-colors ${c?"bg-[var(--brand-primary)] text-white":"text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"}`,children:[(0,t.jsx)(oM,{size:12}),"タイムライン"]})})]}),(0,t.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"overflow-hidden flex flex-col shrink-0",style:{width:s},children:[(0,t.jsx)(oT,{onSelect:x}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,t.jsx)(h,{entries:e,selectedPath:a,onSelect:x})})]}),(0,t.jsx)("div",{className:"w-1.5 hover:bg-[var(--brand-primary)] bg-[var(--border-default)] cursor-col-resize shrink-0 transition-colors duration-150",onMouseDown:E}),(0,t.jsx)("div",{className:"flex-1 border-l border-[var(--border-default)] bg-[var(--bg-surface)] overflow-hidden flex flex-col",children:a?(0,t.jsx)(oA,{filePath:a,fileRefs:S,folders:C,onNavigate:x,onGoBack:y,onGoForward:v,canGoBack:b,canGoForward:k}):(0,t.jsx)("div",{className:"p-6 text-[var(--text-muted)] text-sm flex items-center justify-center h-full",children:"ファイルをクリックして内容を表示"})})]}),c&&(0,t.jsx)(oz,{onNavigate:e=>{x(e),d(!1)},onClose:()=>d(!1)})]})}],52683)}]);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# リリース手順
|
|
2
|
+
|
|
3
|
+
## 概要
|
|
4
|
+
|
|
5
|
+
git タグ `v*.*.*` を push すると、GitHub Actions が以下を同時配布します:
|
|
6
|
+
|
|
7
|
+
- **npm**: `markshelf@<version>`(provenance バッジ付き)
|
|
8
|
+
- **ghcr**: `<version>`, `<major>.<minor>`, `<major>`, `latest`
|
|
9
|
+
|
|
10
|
+
`master` への push では `latest` は更新されません(`master`, `sha-xxxx` タグだけが更新)。`latest` の更新は **タグ push 時のみ** です。
|
|
11
|
+
|
|
12
|
+
## 前提(一度だけ)
|
|
13
|
+
|
|
14
|
+
1. [npmjs.com](https://www.npmjs.com/) の Account Settings → Access Tokens → "Generate New Token" → **Automation** タイプでトークン生成
|
|
15
|
+
2. GitHub のリポジトリ Settings → Secrets and variables → Actions → New repository secret
|
|
16
|
+
- Name: `NPM_TOKEN`
|
|
17
|
+
- Secret: 生成したトークン
|
|
18
|
+
|
|
19
|
+
## 通常リリース
|
|
20
|
+
|
|
21
|
+
1. `master` が出したいバージョンの状態になっているか確認
|
|
22
|
+
2. バージョンを上げる:
|
|
23
|
+
```bash
|
|
24
|
+
npm version patch # 0.2.0 → 0.2.1
|
|
25
|
+
```
|
|
26
|
+
`npm version` は package.json の更新・コミット・`vX.Y.Z` タグ作成を一発で行う
|
|
27
|
+
3. コミットとタグを push:
|
|
28
|
+
```bash
|
|
29
|
+
git push --follow-tags
|
|
30
|
+
```
|
|
31
|
+
4. GitHub Actions の `Publish npm package` と `Publish Docker image` が両方緑になることを確認
|
|
32
|
+
|
|
33
|
+
## バージョンの選び方
|
|
34
|
+
|
|
35
|
+
| コマンド | 用途 | 例 |
|
|
36
|
+
|---------|------|---|
|
|
37
|
+
| `npm version patch` | バグ修正のみ | 0.2.0 → 0.2.1 |
|
|
38
|
+
| `npm version minor` | 後方互換のある機能追加 | 0.2.0 → 0.3.0 |
|
|
39
|
+
| `npm version major` | 破壊的変更 | 0.2.0 → 1.0.0 |
|
|
40
|
+
|
|
41
|
+
## トラブルシュート
|
|
42
|
+
|
|
43
|
+
- **`Publish npm package` が "version does not match" で落ちる**
|
|
44
|
+
git タグと `package.json` の version がずれている。`npm version` を使えば原理的に起きないが、手動で `git tag` した時に起きうる。
|
|
45
|
+
- **ghcr の `latest` が更新されない**
|
|
46
|
+
master push では `latest` は更新されない仕様([.github/workflows/docker-publish.yml:48](.github/workflows/docker-publish.yml#L48))。`v*.*.*` 形式の git タグを push しているか確認。
|
|
47
|
+
- **npm publish が 401/403 で失敗**
|
|
48
|
+
`NPM_TOKEN` secret が未設定か、トークンの有効期限切れ・権限不足。Automation タイプで再発行する。
|
|
49
|
+
- **ghcr push が失敗**
|
|
50
|
+
`GITHUB_TOKEN` の `packages: write` 権限が必要。[.github/workflows/docker-publish.yml:18](.github/workflows/docker-publish.yml#L18) で付与済み。
|
|
51
|
+
|
|
52
|
+
## 関連ファイル
|
|
53
|
+
|
|
54
|
+
- [.github/workflows/npm-publish.yml](.github/workflows/npm-publish.yml) — npm 配布
|
|
55
|
+
- [.github/workflows/docker-publish.yml](.github/workflows/docker-publish.yml) — Docker イメージ配布
|
|
56
|
+
- [package.json](package.json) — `version` フィールドが配布バージョンの源
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# `@img/sharp-libvips-linux-x64`
|
|
2
|
+
|
|
3
|
+
Prebuilt libvips and dependencies for use with sharp on Linux (glibc) x64.
|
|
4
|
+
|
|
5
|
+
## Licensing
|
|
6
|
+
|
|
7
|
+
This software contains third-party libraries
|
|
8
|
+
used under the terms of the following licences:
|
|
9
|
+
|
|
10
|
+
| Library | Used under the terms of |
|
|
11
|
+
|---------------|-----------------------------------------------------------------------------------------------------------|
|
|
12
|
+
| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) |
|
|
13
|
+
| cairo | Mozilla Public License 2.0 |
|
|
14
|
+
| cgif | MIT Licence |
|
|
15
|
+
| expat | MIT Licence |
|
|
16
|
+
| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) |
|
|
17
|
+
| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) |
|
|
18
|
+
| fribidi | LGPLv3 |
|
|
19
|
+
| glib | LGPLv3 |
|
|
20
|
+
| harfbuzz | MIT Licence |
|
|
21
|
+
| highway | Apache-2.0 License, BSD 3-Clause |
|
|
22
|
+
| lcms | MIT Licence |
|
|
23
|
+
| libarchive | BSD 2-Clause |
|
|
24
|
+
| libexif | LGPLv3 |
|
|
25
|
+
| libffi | MIT Licence |
|
|
26
|
+
| libheif | LGPLv3 |
|
|
27
|
+
| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) |
|
|
28
|
+
| libnsgif | MIT Licence |
|
|
29
|
+
| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) |
|
|
30
|
+
| librsvg | LGPLv3 |
|
|
31
|
+
| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) |
|
|
32
|
+
| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) |
|
|
33
|
+
| libvips | LGPLv3 |
|
|
34
|
+
| libwebp | New BSD License |
|
|
35
|
+
| libxml2 | MIT Licence |
|
|
36
|
+
| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) |
|
|
37
|
+
| pango | LGPLv3 |
|
|
38
|
+
| pixman | MIT Licence |
|
|
39
|
+
| proxy-libintl | LGPLv3 |
|
|
40
|
+
| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) |
|
|
41
|
+
|
|
42
|
+
Use of libraries under the terms of the LGPLv3 is via the
|
|
43
|
+
"any later version" clause of the LGPLv2 or LGPLv2.1.
|
|
44
|
+
|
|
45
|
+
Please report any errors or omissions via
|
|
46
|
+
https://github.com/lovell/sharp-libvips/issues/new
|
package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/* glibconfig.h
|
|
2
|
+
*
|
|
3
|
+
* This is a generated file. Please modify 'glibconfig.h.in'
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#ifndef __GLIBCONFIG_H__
|
|
7
|
+
#define __GLIBCONFIG_H__
|
|
8
|
+
|
|
9
|
+
#include <glib/gmacros.h>
|
|
10
|
+
|
|
11
|
+
#include <limits.h>
|
|
12
|
+
#include <float.h>
|
|
13
|
+
#define GLIB_HAVE_ALLOCA_H
|
|
14
|
+
|
|
15
|
+
#define GLIB_STATIC_COMPILATION 1
|
|
16
|
+
#define GOBJECT_STATIC_COMPILATION 1
|
|
17
|
+
#define GIO_STATIC_COMPILATION 1
|
|
18
|
+
#define GMODULE_STATIC_COMPILATION 1
|
|
19
|
+
#define GI_STATIC_COMPILATION 1
|
|
20
|
+
#define G_INTL_STATIC_COMPILATION 1
|
|
21
|
+
#define FFI_STATIC_BUILD 1
|
|
22
|
+
|
|
23
|
+
/* Specifies that GLib's g_print*() functions wrap the
|
|
24
|
+
* system printf functions. This is useful to know, for example,
|
|
25
|
+
* when using glibc's register_printf_function().
|
|
26
|
+
*/
|
|
27
|
+
#define GLIB_USING_SYSTEM_PRINTF
|
|
28
|
+
|
|
29
|
+
G_BEGIN_DECLS
|
|
30
|
+
|
|
31
|
+
#define G_MINFLOAT FLT_MIN
|
|
32
|
+
#define G_MAXFLOAT FLT_MAX
|
|
33
|
+
#define G_MINDOUBLE DBL_MIN
|
|
34
|
+
#define G_MAXDOUBLE DBL_MAX
|
|
35
|
+
#define G_MINSHORT SHRT_MIN
|
|
36
|
+
#define G_MAXSHORT SHRT_MAX
|
|
37
|
+
#define G_MAXUSHORT USHRT_MAX
|
|
38
|
+
#define G_MININT INT_MIN
|
|
39
|
+
#define G_MAXINT INT_MAX
|
|
40
|
+
#define G_MAXUINT UINT_MAX
|
|
41
|
+
#define G_MINLONG LONG_MIN
|
|
42
|
+
#define G_MAXLONG LONG_MAX
|
|
43
|
+
#define G_MAXULONG ULONG_MAX
|
|
44
|
+
|
|
45
|
+
typedef signed char gint8;
|
|
46
|
+
typedef unsigned char guint8;
|
|
47
|
+
|
|
48
|
+
typedef signed short gint16;
|
|
49
|
+
typedef unsigned short guint16;
|
|
50
|
+
|
|
51
|
+
#define G_GINT16_MODIFIER "h"
|
|
52
|
+
#define G_GINT16_FORMAT "hi"
|
|
53
|
+
#define G_GUINT16_FORMAT "hu"
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
typedef signed int gint32;
|
|
57
|
+
typedef unsigned int guint32;
|
|
58
|
+
|
|
59
|
+
#define G_GINT32_MODIFIER ""
|
|
60
|
+
#define G_GINT32_FORMAT "i"
|
|
61
|
+
#define G_GUINT32_FORMAT "u"
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
#define G_HAVE_GINT64 1 /* deprecated, always true */
|
|
65
|
+
|
|
66
|
+
typedef signed long gint64;
|
|
67
|
+
typedef unsigned long guint64;
|
|
68
|
+
|
|
69
|
+
#define G_GINT64_CONSTANT(val) (val##L)
|
|
70
|
+
#define G_GUINT64_CONSTANT(val) (val##UL)
|
|
71
|
+
|
|
72
|
+
#define G_GINT64_MODIFIER "l"
|
|
73
|
+
#define G_GINT64_FORMAT "li"
|
|
74
|
+
#define G_GUINT64_FORMAT "lu"
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
#define GLIB_SIZEOF_VOID_P 8
|
|
78
|
+
#define GLIB_SIZEOF_LONG 8
|
|
79
|
+
#define GLIB_SIZEOF_SIZE_T 8
|
|
80
|
+
#define GLIB_SIZEOF_SSIZE_T 8
|
|
81
|
+
|
|
82
|
+
typedef signed long gssize;
|
|
83
|
+
typedef unsigned long gsize;
|
|
84
|
+
#define G_GSIZE_MODIFIER "l"
|
|
85
|
+
#define G_GSSIZE_MODIFIER "l"
|
|
86
|
+
#define G_GSIZE_FORMAT "lu"
|
|
87
|
+
#define G_GSSIZE_FORMAT "li"
|
|
88
|
+
|
|
89
|
+
#define G_MAXSIZE G_MAXULONG
|
|
90
|
+
#define G_MINSSIZE G_MINLONG
|
|
91
|
+
#define G_MAXSSIZE G_MAXLONG
|
|
92
|
+
|
|
93
|
+
typedef gint64 goffset;
|
|
94
|
+
#define G_MINOFFSET G_MININT64
|
|
95
|
+
#define G_MAXOFFSET G_MAXINT64
|
|
96
|
+
|
|
97
|
+
#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER
|
|
98
|
+
#define G_GOFFSET_FORMAT G_GINT64_FORMAT
|
|
99
|
+
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
|
|
100
|
+
|
|
101
|
+
#define G_POLLFD_FORMAT "%d"
|
|
102
|
+
|
|
103
|
+
#define GPOINTER_TO_INT(p) ((gint) (glong) (p))
|
|
104
|
+
#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p))
|
|
105
|
+
|
|
106
|
+
#define GINT_TO_POINTER(i) ((gpointer) (glong) (i))
|
|
107
|
+
#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))
|
|
108
|
+
|
|
109
|
+
typedef signed long gintptr;
|
|
110
|
+
typedef unsigned long guintptr;
|
|
111
|
+
|
|
112
|
+
#define G_GINTPTR_MODIFIER "l"
|
|
113
|
+
#define G_GINTPTR_FORMAT "li"
|
|
114
|
+
#define G_GUINTPTR_FORMAT "lu"
|
|
115
|
+
|
|
116
|
+
#define GLIB_MAJOR_VERSION 2
|
|
117
|
+
#define GLIB_MINOR_VERSION 86
|
|
118
|
+
#define GLIB_MICRO_VERSION 1
|
|
119
|
+
|
|
120
|
+
#define G_OS_UNIX
|
|
121
|
+
|
|
122
|
+
#define G_VA_COPY va_copy
|
|
123
|
+
|
|
124
|
+
#define G_VA_COPY_AS_ARRAY 1
|
|
125
|
+
|
|
126
|
+
#define G_HAVE_ISO_VARARGS 1
|
|
127
|
+
|
|
128
|
+
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
|
|
129
|
+
* is passed ISO vararg support is turned off, and there is no work
|
|
130
|
+
* around to turn it on, so we unconditionally turn it off.
|
|
131
|
+
*/
|
|
132
|
+
#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
|
|
133
|
+
# undef G_HAVE_ISO_VARARGS
|
|
134
|
+
#endif
|
|
135
|
+
|
|
136
|
+
#define G_HAVE_GROWING_STACK 0
|
|
137
|
+
|
|
138
|
+
#ifndef _MSC_VER
|
|
139
|
+
# define G_HAVE_GNUC_VARARGS 1
|
|
140
|
+
#endif
|
|
141
|
+
|
|
142
|
+
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
|
143
|
+
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
|
144
|
+
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
|
145
|
+
#define G_GNUC_INTERNAL __hidden
|
|
146
|
+
#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
|
|
147
|
+
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
|
148
|
+
#else
|
|
149
|
+
#define G_GNUC_INTERNAL
|
|
150
|
+
#endif
|
|
151
|
+
|
|
152
|
+
#define G_THREADS_ENABLED
|
|
153
|
+
#define G_THREADS_IMPL_POSIX
|
|
154
|
+
|
|
155
|
+
#define G_ATOMIC_LOCK_FREE
|
|
156
|
+
|
|
157
|
+
#define GINT16_TO_LE(val) ((gint16) (val))
|
|
158
|
+
#define GUINT16_TO_LE(val) ((guint16) (val))
|
|
159
|
+
#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
|
|
160
|
+
#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
|
|
161
|
+
|
|
162
|
+
#define GINT32_TO_LE(val) ((gint32) (val))
|
|
163
|
+
#define GUINT32_TO_LE(val) ((guint32) (val))
|
|
164
|
+
#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
|
|
165
|
+
#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
|
|
166
|
+
|
|
167
|
+
#define GINT64_TO_LE(val) ((gint64) (val))
|
|
168
|
+
#define GUINT64_TO_LE(val) ((guint64) (val))
|
|
169
|
+
#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
|
|
170
|
+
#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
|
|
171
|
+
|
|
172
|
+
#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val))
|
|
173
|
+
#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val))
|
|
174
|
+
#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val))
|
|
175
|
+
#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val))
|
|
176
|
+
#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val))
|
|
177
|
+
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
|
|
178
|
+
#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val))
|
|
179
|
+
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
|
|
180
|
+
#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
|
|
181
|
+
#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
|
|
182
|
+
#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
|
|
183
|
+
#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
|
|
184
|
+
#define G_BYTE_ORDER G_LITTLE_ENDIAN
|
|
185
|
+
|
|
186
|
+
#define GLIB_SYSDEF_POLLIN =1
|
|
187
|
+
#define GLIB_SYSDEF_POLLOUT =4
|
|
188
|
+
#define GLIB_SYSDEF_POLLPRI =2
|
|
189
|
+
#define GLIB_SYSDEF_POLLHUP =16
|
|
190
|
+
#define GLIB_SYSDEF_POLLERR =8
|
|
191
|
+
#define GLIB_SYSDEF_POLLNVAL =32
|
|
192
|
+
|
|
193
|
+
/* No way to disable deprecation warnings for macros, so only emit deprecation
|
|
194
|
+
* warnings on platforms where usage of this macro is broken */
|
|
195
|
+
#if defined(__APPLE__) || defined(_MSC_VER) || defined(__CYGWIN__)
|
|
196
|
+
#define G_MODULE_SUFFIX "so" GLIB_DEPRECATED_MACRO_IN_2_76
|
|
197
|
+
#else
|
|
198
|
+
#define G_MODULE_SUFFIX "so"
|
|
199
|
+
#endif
|
|
200
|
+
|
|
201
|
+
typedef int GPid;
|
|
202
|
+
#define G_PID_FORMAT "i"
|
|
203
|
+
|
|
204
|
+
#define GLIB_SYSDEF_AF_UNIX 1
|
|
205
|
+
#define GLIB_SYSDEF_AF_INET 2
|
|
206
|
+
#define GLIB_SYSDEF_AF_INET6 10
|
|
207
|
+
|
|
208
|
+
#define GLIB_SYSDEF_MSG_OOB 1
|
|
209
|
+
#define GLIB_SYSDEF_MSG_PEEK 2
|
|
210
|
+
#define GLIB_SYSDEF_MSG_DONTROUTE 4
|
|
211
|
+
|
|
212
|
+
#define G_DIR_SEPARATOR '/'
|
|
213
|
+
#define G_DIR_SEPARATOR_S "/"
|
|
214
|
+
#define G_SEARCHPATH_SEPARATOR ':'
|
|
215
|
+
#define G_SEARCHPATH_SEPARATOR_S ":"
|
|
216
|
+
|
|
217
|
+
#undef G_HAVE_FREE_SIZED
|
|
218
|
+
|
|
219
|
+
G_END_DECLS
|
|
220
|
+
|
|
221
|
+
#endif /* __GLIBCONFIG_H__ */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = __dirname;
|