PageSourceSearch

https://kindredly.ai/js/noteAttachmentDId5R_kp.js

js kindredly.ai collected 2026-10-02 01:14:05 UTC 1,839 bytes, 1 lines download raw bytes

1import{C as f}from"./item-name.utilsBH3paGZr.js";const y="note.md",p=/^page(\d+)\.md$/i,L=/^page(\d+)_md$/i;function b(e){return`page${Number.isFinite(e)?Math.max(0,Math.floor(e)):0}.md`}const E=b(0);function g(e,n){if(typeof e!="string")return null;const t=e.trim().match(n);if(!t)return null;const o=Number.parseInt(t[1],10);return Number.isFinite(o)?Math.max(0,o):null}function s(e,n=!1){return{pageIndex:e,label:e===0?"Note content":`Page ${e+1}`,isLegacy:n}}function A(e){if(!e||typeof e!="object")return null;const n=g(e.filename,p);if(n!=null)return s(n);const t=g(e.id,L);return t!=null?s(t):(typeof e.filename=="string"?e.filename.trim().toLowerCase():"")===y||(typeof e.id=="string"?e.id.trim().toLowerCase():"")==="note_md"?s(0,!0):null}function M(e){return A(e)!=null}function F(e){return`page${Number.isFinite(e)?Math.max(0,Math.floor(e)):0}_md`}function N(e,n=0){var c;const t=(c=e==null?void 0:e.attachments)==null?void 0:c.entries;if(!Array.isArray(t)||t.length===0)return null;const o=b(n).toLowerCase(),l=F(n).toLowerCase(),u=t.find(r=>typeof(r==null?void 0:r.filename)=="string"&&r.filename.toLowerCase()===o);if(u)return u;const a=t.find(r=>typeof(r==null?void 0:r.id)=="string"&&r.id.toLowerCase()===l);if(a)return a;if(n===0){const r=y.toLowerCase(),d=t.find(i=>typeof(i==null?void 0:i.filename)=="string"&&i.filename.toLowerCase()===r);if(d)return d;const m=t.find(i=>typeof(i==null?void 0:i.id)=="string"&&i.id.toLowerCase()==="note_md");if(m)return m}return null}function _(e){const n=typeof e=="string"?e:String(e??""),t=f.str2abUTF(n);return{base64:f.ab2str(t),byteLength:t.byteLength}}function C(e){if(!e)return"";const n=f.str2ab(e);return f.ab2strUTF(n)}function P(e,n=2e3){const t=typeof e=="string"?e:String(e??"");return t.length<=n?t:t.slice(0,n)}export{E as P,P as c,C as d,_ as e,N as f,A as g,M as i};

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.