PageSourceSearch

https://reflect.app/_next/static/chunks/6538.94eda7c4886e5ced.js

js reflect.app collected 2026-09-24 08:53:14 UTC 12,741 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1100cd99-27be-4628-8e09-4d1f16f39327",e._sentryDebugIdIdentifier="sentry-dbid-1100cd99-27be-4628-8e09-4d1f16f39327")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6538],{46538:function(e,t,r){r.r(t),r.d(t,{NotesList:function(){return P}});var o=r(11527),n=r(72811),i=r(50959),s=r(45778),a=r(62107),l=r(95126),d=r(60386),c=r(46746),x=r(21096),u=r(56521),h=r(4814);let p=(0,n.Pi)(()=>{let{listView:e}=(0,a.dw)(),t=0===e.selectedNotes.length;return t?null:(0,o.jsxs)(c.v,{as:"div",className:"relative inline-block text-left",children:[(0,o.jsxs)(c.v.Button,{disabled:t,className:(0,h.Z)("inline-flex items-center justify-center whitespace-nowrap rounded-md bg-background px-3 py-1.5 text-2xs text-coolgray-400",t&&"pointer-events-none opacity-75"),children:[(0,o.jsxs)("span",{children:["Selected (",e.selectedNotes.length,")"]}),(0,o.jsx)(u.Z,{className:"-mr-1 ml-1 h-4 w-4","aria-hidden":"true"})]}),(0,o.jsx)(x.u,{as:i.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,o.jsx)(c.v.Items,{className:"absolute right-0 z-popover mt-2 origin-top-right divide-y divide-coolgray-100 overflow-x-hidden rounded-md bg-white shadow-lg outline-none ring-1 ring-coolgray-900/10 dark:divide-coolgray-800 dark:bg-dark-black-900",children:(0,o.jsx)(c.v.Item,{children:t=>{let{active:r}=t;return(0,o.jsx)("button",{onClick:()=>void e.deleteSelectedNotes(),className:(0,h.Z)(["block cursor-pointer whitespace-nowrap px-4 py-2 text-sm dark:text-near-white dark:hover:bg-coolgray-800",r?"bg-coolgray-100 text-coolgray-900 dark:bg-coolgray-800":"text-coolgray-700"]),children:e.selectedNotesAreTrashed?"Delete selected notes":"Trash selected notes"})}})})})]})});var g=r(7623),m=r(24673);let f=()=>{let e=(0,a.Pw)();return(0,o.jsxs)("button",{className:"inline-flex items-center space-x-2.5 rounded-md border border-coolgray-900/15 px-3 py-1.5 text-2xs font-semibold text-white transition-all duration-100 hover:brightness-110 active:brightness-95",style:{background:"linear-gradient(180deg, #6366F1 0%, #4F46E5 71.35%)",boxShadow:"0px 1px 2px rgba(17, 24, 39, 0.2), inset 0px 1px 1px rgba(255,255,255,0.2)"},onClick:()=>e.createAndEditNote(),children:[(0,o.jsx)("span",{className:"whitespace-nowrap",children:"New note"}),(0,o.jsx)("span",{className:"inline-flex items-center rounded bg-white/10 px-1 font-sans text-[10px] font-medium uppercase ring-[3px] ring-white/10",children:(0,o.jsx)(g.l,{shortcut:m.d?"mod+n":m.Zx?"ctrl+mod+n":"ctrl+alt+n",ghost:!0})})]})},y=(0,n.Pi)(e=>{let{note:t}=e,{listView:r}=(0,a.dw)(),n=r.isSelected(t);return(0,o.jsxs)("div",{onMouseDown:e=>r.selectOperation({note:t,toggle:e.metaKey,span:e.shiftKey}),onDoubleClick:()=>r.edit(t),className:(0,h.Z)("relative flex h-12 gap-4 py-3 pr-7 pl-12","text-2xs text-coolgray-500",{"shadow-border-b hover:bg-coolgray-50 dark:hover:bg-white/2":!n,"border-t border-b border-indigo-200 bg-indigo-100 hover:bg-indigo-100 dark:border-indigo-500/10 dark:bg-indigo-500/10 dark:text-near-white dark:hover:bg-indigo-500/10":n}),children:[(0,o.jsx)("div",{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),r.checkOperation({note:t,span:e.shiftKey})},className:(0,h.Z)("group flex flex-none items-center justify-center","absolute inset-y-0 left-0 w-12","opacity-0 hover:opacity-100",n&&"opacity-100"),children:(0,o.jsx)("div",{className:(0,h.Z)("h-2 w-2 rounded-full transition-transform duration-150 group-hover:scale-110",n?"bg-indigo-500":"ring-1 ring-indigo-600")})}),(0,o.jsx)("div",{onClick:e=>!e.shiftKey&&r.edit(t),className:(0,h.Z)("flex w-60 flex-none cursor-pointer items-center font-medium",{"text-primary dark:text-primary":n},{"text-coolgray-800 dark:text-near-white":!n}),children:(0,o.jsx)("span",{className:"truncate",children:t.title})}),(0,o.jsx)("div",{className:"flex flex-1 items-center overflow-hidden",children:(0,o.jsx)("div",{className:(0,h.Z)("truncate",{"text-indigo-500":n}),children:t.snippet})}),(0,o.jsx)("div",{className:"flex flex-shrink items-center justify-end text-right",children:t.tags.map(e=>"#".concat(e)).join(", ")}),(0,o.jsx)("div",{className:"flex w-20 flex-none items-center justify-end text-right",children:t.editedAtFormatted})]})}),b=e=>{let{children:t,className:r}=e;return(0,o.jsx)("div",{className:(0,h.Z)("relative z-0 inline-flex -space-x-px divide-x divide-coolgray-900/10 rounded-md border border-coolgray-900/16 shadow-app-input shadow-black/5 dark:divide-white/5 dark:border-white/10",r),children:t})},v=e=>{let{title:t,onClick:r,onMouseDown:n,position:i,selected:s,className:a,disabled:l=!1,children:d}=e;return(0,o.jsx)("button",{title:t,onClick:r,onMouseDown:n,className:(0,h.Z)("relative inline-flex cursor-pointer items-center space-x-1.5 whitespace-nowrap px-4 py-1.5 text-2xs font-medium hover:bg-coolgray-50 dark:hover:bg-inherit",s&&"text-primary dark:text-primary-dk",!s&&"bg-white text-coolgray-600 dark:bg-white/5 dark:text-near-white dark:hover:text-white","left"==i&&"rounded-l-md","right"==i&&"rounded-r-md","span"==i&&"rounded-l-md rounded-r-md",l&&"pointer-events-none opacity-75",a),disabled:l,children:d})},w=e=>{let{show:t,children:r}=e;return(0,o.jsx)(x.u,{show:t,enter:"transition ease-out duration-50",enterFrom:"transform opacity-0",enterTo:"transform opacity-100",leave:"transition ease-in duration-100",leaveFrom:"transform opacity-100",leaveTo:"transform opacity-0",children:r})};var j=r(47402),k=r(93941);let N=e=>{let{show:t,onDelete:r}=e;return(0,o.jsx)(x.u,{show:t,enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,o.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-end bg-white bg-opacity-80 px-2 dark:bg-dark-black-800 dark:bg-opacity-50",children:(0,o.jsx)("button",{onClick:r,className:(0,h.Z)("inline-flex items-center px-2 py-1","rounded-md border border-transparent shadow-sm","bg-indigo-600 text-xs font-medium leading-4 text-white hover:bg-indigo-500","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 focus-visible:ring-offset-4","ring-offset-bluegray-100 dark:ring-offset-dark-black-900","cursor-pointer space-x-1 transition duration-300 ease-in-out"),children:"Confirm delete?"})})})};var D=r(15767),C=r(44838),q=r(95058);class Z{dispose(){}get queryBuilder(){return this.noteStore.notesEditedDescQuery.where((0,q.$F)("tags",this.tag))}get query(){return this.adapter.query(this.queryBuilder)}get notesCount(){return this.query.count}setConfirmDelete(e){this.confirmDelete=e}onDelete(e){e.stopPropagation(),this.setConfirmDelete(!0),setTimeout(()=>this.setConfirmDelete(!1),5e3)}onClick(){this.noteStore.listView.setQuery("#".concat(this.tag))}onConfirmDelete(e){var t;e.stopPropagation(),null===(t=this.graph)||void 0===t||t.deleteTag(this.tag)}get graph(){return this.noteStore.graph}get adapter(){return this.noteStore.adapter}constructor(e,t){this.tag=e,this.noteStore=t,this.confirmDelete=!1,(0,C.makeObservable)(this)}}(0,D.gn)([C.observable],Z.prototype,"confirmDelete",void 0),(0,D.gn)([C.computed],Z.prototype,"queryBuilder",null),(0,D.gn)([C.computed],Z.prototype,"query",null),(0,D.gn)([C.action],Z.prototype,"setConfirmDelete",null);let S=(0,n.Pi)(e=>{let{tag:t}=e,r=(0,a.dw)(),n=(0,k.D)(()=>new Z(t,r),[t,r]);return(0,o.jsxs)("div",{onClick:()=>n.onClick(),className:(0,h.Z)(["relative block cursor-pointer px-4 py-2","flex flex-row items-center justify-between","text-sm text-coolgray-700 hover:bg-coolgray-50 hover:text-coolgray-900","dark:text-near-white dark:hover:bg-coolgray-800","transition-all duration-100"]),role:"menuitem",children:[(0,o.jsxs)("span",{className:"max-w-48 truncate",children:["#",t]}),(0,o.jsxs)("div",{className:"ml-4 flex flex-row items-center",children:[null!==n.notesCount&&(0,o.jsx)("span",{className:"inline-flex items-center rounded-full bg-coolgray-100 px-2.5 py-0.5 text-xs dar
1k:bg-coolgray-900 dark:text-white",title:"Count of notes with tag",children:n.notesCount}),(0,o.jsx)("span",{onClick:e=>n.onDelete(e),className:"ml-4 flex h-full",title:"Delete tag",children:(0,o.jsx)(j.Z,{width:12,height:12})})]}),(0,o.jsx)(N,{show:n.confirmDelete,onDelete:e=>n.onConfirmDelete(e)})]})}),F=[a._H,a.ps,a.mt],I=(0,n.Pi)(e=>{let{open:t}=e,r=(0,a.Fq)(),n=((null==r?void 0:r.tags)||[]).filter(e=>!F.includes(e)).sort((e,t)=>e.localeCompare(t));return(0,o.jsx)("div",{className:"absolute right-0 z-10 mt-1",children:(0,o.jsx)(w,{show:t,children:(0,o.jsxs)("div",{className:(0,h.Z)(["max-h-80 min-w-64 max-w-64 overflow-auto","rounded-md bg-white shadow-lg","dark:bg-coolgray-900","ring-1 ring-coolgray-900/10 dark:ring-coolgray-800","divide-y divide-coolgray-200 dark:divide-coolgray-600"]),role:"menu","aria-orientation":"vertical","aria-labelledby":"options-menu",children:[n.map(e=>(0,o.jsx)(S,{tag:e},e)),0===n.length&&(0,o.jsx)("div",{className:(0,h.Z)(["truncate px-4 py-2","text-sm"]),children:"No custom tags"})]})})})}),E=()=>{var e;let{listView:t}=(0,a.dw)(),[r,n]=(0,i.useState)(!1),s=e=>"#".concat(e),l=(0,i.useMemo)(()=>!!t.query&&![...F.map(s),a.iD].includes(t.query),[t.query]);return e=()=>n(!1),(0,i.useEffect)(()=>{let t=()=>{e()};return window.addEventListener("click",t,!1),function(){window.removeEventListener("click",t,!1)}},[]),(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsxs)(b,{children:[(0,o.jsx)(v,{selected:!t.query,position:"left",onMouseDown:()=>t.setQuery(""),children:"All"}),(0,o.jsx)(v,{selected:t.query===s(a.ps),onMouseDown:()=>t.setQuery(s(a.ps)),children:"Books"}),(0,o.jsx)(v,{selected:t.query===s(a.mt),onMouseDown:()=>t.setQuery(s(a.mt)),children:"Links"}),(0,o.jsx)(v,{selected:t.query===s(a._H),onMouseDown:()=>t.setQuery(s(a._H)),children:"People"}),(0,o.jsx)(v,{selected:t.query===a.iD,onMouseDown:()=>t.setQuery(a.iD),children:"Trash"}),(0,o.jsxs)(v,{position:"right",title:"See all tags",selected:r||l,onClick:e=>{e.stopPropagation(),n(!r)},children:["Custom",(0,o.jsx)(u.Z,{className:"ml-1 h-4 w-4"})]})]}),(0,o.jsx)(I,{open:r})]})},P=(0,n.Pi)(()=>{let{listView:e}=(0,a.dw)(),t=(0,a.Pw)().screenHasFocus(l.oK.NoteList),r=(0,i.useRef)(null),c=(0,i.useRef)([0,0]);return(0,i.useEffect)(()=>{if(t&&r.current){let[t]=c.current,o=Math.abs(e.scrollIndex-t)>20;r.current.scrollIntoView({index:e.scrollIndex,behavior:o?"auto":"smooth"})}},[t,e,e.scrollIndex,e.scrollIndexCounter]),(0,d.y)(["ArrowUp","shift+ArrowUp"],r=>{t&&(r.preventDefault(),e.selectDirection("up",{span:r.shiftKey}))}),(0,d.y)(["ArrowDown","shift+ArrowDown"],r=>{t&&(r.preventDefault(),e.selectDirection("down",{span:r.shiftKey}))}),(0,d.y)(["Enter","mod+Enter"],r=>{t&&(r.preventDefault(),e.editSelected())}),(0,o.jsxs)("div",{className:"flex flex-1 flex-col electron:pt-5 capacitor:pt-5",children:[(0,o.jsxs)("div",{className:"space-y-3 border-b border-coolgray-100 py-4 pl-4 pr-7 dark:border-gray-900 lg:flex lg:items-center lg:justify-between lg:space-y-0 lg:pl-12",children:[(0,o.jsx)("div",{className:"min-w-0 flex-1",children:(0,o.jsx)("h2",{className:"border-none bg-transparent p-0 text-2sm font-semibold text-coolgray-700 placeholder-coolgray-700 outline-none focus:ring-0 dark:text-near-white dark:placeholder-white",children:e.query||"Notes"})}),(0,o.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,o.jsx)(p,{}),(0,o.jsx)(E,{}),(0,o.jsx)(f,{})]})]}),(0,o.jsx)("div",{className:"relative flex flex-1 flex-col overflow-hidden",children:(0,o.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,o.jsxs)("div",{className:"flex flex-none gap-4 border-b border-coolgray-900/10 py-3 pl-12 pr-7 text-left text-2xs font-medium leading-none text-coolgray-500 shadow-sm dark:border-gray-900 dark:border-white/5 dark:text-near-white",style:{boxShadow:"0px 1px 2px rgba(0, 0, 0, 0.05)"},children:[(0,o.jsx)("div",{className:"w-60",children:"Subject"}),(0,o.jsx)("div",{className:"flex-1",children:"Snippet"}),(0,o.jsx)("div",{className:"text-right",children:"Tags"}),(0,o.jsx)("div",{className:"w-20 text-right",children:"Updated"})]}),(0,o.jsx)("div",{className:"flex-1",children:(0,o.jsx)(s.OO,{ref:r,width:"100%",height:"100%",data:e.notes.placeholders,fixedItemHeight:48,rangeChanged:e=>{let{startIndex:t,endIndex:r}=e;return c.current=[t,r]},itemContent:(e,t)=>
1(0,o.jsx)(n.Qj,{children:()=>t.value&&(0,o.jsx)(y,{note:t.value},t.id)})})})]})})]})})}}]);

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.