1import{vn as e}from"./Ib1jYPSS.js";import{r as t}from"./B5tEj6Uj.js";import{a as n}from"./5CncodWL.js";var r={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function i(e){return e.replace(/[&<>"']/g,e=>r[e])}function a(e){return/&(?:amp|lt|gt|quot|#39);/.test(e)}function o(e){return a(e)?e:i(e)}function s(e,t){let n=``,r=0,i=!1;for(let a=e.length-1;a>=0;a--){if(e[a]===`>`)i=!0;else if(e[a]===`<`){i=!1,n=e[a]+n;continue}if(i||r++,r<=t)n=e[a]+n;else{n=`...`+n;break}}return n}function c(e){let t=`\0markO\0`,n=`\0markC\0`;return i(e.replaceAll(`<mark>`,t).replaceAll(`</mark>`,n)).replaceAll(t,`<mark>`).replaceAll(n,`</mark>`)}function l(e,t,n,r,i){let a=i&&t.match(/[\p{L}\p{M}\p{N}_]+/gu)||[],c=a.length>0?Math.min(...a.map(e=>e.length)):t.length;function l(e,t=[]){e||=``;let n=``,r=0;t.forEach(t=>{if(t.length===2&&t[0]===t[1])return;let i=t[1]+1,a=i-t[0]>=c;n+=[o(e.substring(r,t[0])),a&&`<mark>`,o(e.substring(t[0],i)),a&&`</mark>`].filter(Boolean).join(``),r=i}),n+=o(e.substring(r));let i=n.indexOf(`<mark>`);return i!==-1&&(n=s(n,n.length-i)),n}if(e.matches?.length){for(let t of e.matches)if(!(n&&t.key!==n)&&!r?.includes(t.key))return l(t.value,t.indices)}}function u(){let n=e(!1),r=t();function i(e,t,n=[]){let i=[...new Set([...n.map(e=>e.title),...e.titles].filter(Boolean))],a=n.findLast(e=>e.icon)?.icon;return{prefix:i?.length?i.join(` > `)+` >`:void 0,label:e.id===t.path?t.title:e.title,suffix:e.content.replaceAll(`<`,`<`).replaceAll(`>`,`>`),to:e.id,icon:t.icon||a||(e.level>1?r.ui.icons.hash:r.ui.icons.file),level:e.level}}function a(e,t,n){let r=new Map;for(let e of t||[]){let t=e.id.split(`#`)[0]||e.id,n=r.get(t);n||(n=[],r.set(t,n)),n.push(e)}function a(e,t){return e.flatMap(e=>e.children?.length?a(e.children,[...t,e]):(e.path?r.get(e.path):void 0)?.map(n=>i(n,e,t))||[])}return a(e,n?[n]:[])}function o(e){return e.flatMap(e=>[{...e,suffix:e.description,description:void 0,icon:e.icon||r.ui.icons.file,children:void 0},...e.children?.map(t=>({...t,prefix:e.label?e.label+` >`:void 0,suffix:t.description,description:void 0,icon:t.icon||e.icon||r.ui.icons.file}))||[]])}function s(e,t,n=[]){for(let r of t||[]){if(r.path===e)return{link:r,ancestors:n};if(r.children?.length){let t=s(e,r.children,[...n,r]);if(t.link)return t}}return{}}function l(e,t){let n=new Map;return e.reduce((e,i)=>{let a=i.id.split(`#`)[0]??i.id,o=n.get(a);o||(o=s(a,t),n.set(a,o));let{link:l,ancestors:u=[]}=o;if(t?.length&&!l)return e;let d=u.length?u:l?[l]:[],f=[...new Set([...d.map(e=>e.title),...i.titles].filter(Boolean))],p=f.length?f.join(` > `)+` >`:void 0,m=u.findLast(e=>e.icon)?.icon;return e.push({label:i.title,labelHtml:i.snippets?.title?c(i.snippets.title):void 0,prefix:p,description:i.content.replaceAll(`<`,`<`).replaceAll(`>`,`>`),descriptionHtml:i.snippets?.content?c(i.snippets.content):void 0,to:i.id,icon:l?.icon||m||(i.level>1?r.ui.icons.hash:r.ui.icons.file),level:i.level}),e},[])}function u(e,t){return e?t:t?.filter(e=>e.level===1)}return{open:n,mapFile:i,mapNavigationItems:a,mapLinks:o,mapSearchResults:l,postFilter:u}}var d=n(u);export{l as n,d as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.