1"use strict";(self.webpackChunknote_taker_ui=self.webpackChunknote_taker_ui||[]).push([[4177],{853:(e,t,s)=>{s.d(t,{A:()=>r});s(5043);var o=s(1045),n=s(9842),a=s(1329),i=(s(2109),s(579));const l=()=>(0,i.jsx)("p",{className:"shared-notebook-page__print",children:(0,i.jsx)("button",{type:"button",onClick:()=>window.print(),children:"Print this note"})});function r(e){let{snapshot:t,onAsk:s=null}=e;return t?(0,i.jsxs)("div",{className:"shared-notebook-page__inner",children:[(0,i.jsx)(o.N_,{to:"/",className:"shared-notebook-page__home",children:"Noeis"}),(0,i.jsx)(n.A,{snapshot:t,onAsk:s}),(0,i.jsx)("p",{className:"shared-notebook-page__colophon",children:a.XK}),(0,i.jsx)(l,{})]}):null}},1329:(e,t,s)=>{s.d(t,{QG:()=>d,TM:()=>u,W1:()=>l,XK:()=>i,bg:()=>b,cU:()=>c,hb:()=>h,pL:()=>n,vQ:()=>a,wl:()=>p,yI:()=>r});var o=s(7051);const n="Anyone with the link can read the version you share. Later private edits stay in the workshop. Your Library stays private.",a="Copies already taken stay with their holders. This link will go unanswered.",i="This is the version that was published. Later private edits do not change it. Ordinary copy of the visible text is allowed.",l="This stays with the author. It is not published.",r="Anyone with the link can read this collection of published notes. Later private edits stay in the workshop. Your Library stays private.",c="Copies already taken stay with their holders. This link will go unanswered.",d="This is the collected version that was published. Later private edits do not change it. Ordinary copy of the visible text is allowed.",h="Share at least two notes first.",u="Not available at a public address.",p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.A)({title:"Who gets to experiment, and who pays?",ownerDisplayName:"Athan",publishedAt:"2026-09-12T12:00:00.000Z",blocks:[{id:"h1",type:"heading",level:2,text:"The exception first"},{id:"q1",type:"quote",text:"Two hours a week cannot sustain this.",source:{title:"A letter on time",href:"https://example.com/letter",access:"open"}},{id:"p1",type:"paragraph",text:"The rule assumed spare hours. The exception arrives first."},{id:"c1",type:"concept",text:"Room to be wrong"}]},e)},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=p(),s=p({title:"Whose downside?",publishedAt:"2026-09-13T12:00:00.000Z",blocks:[{id:"h2",type:"heading",level:2,text:"The cost"},{id:"p2",type:"paragraph",text:"The cost lands on someone who did not choose the experiment."}]});return(0,o.A)({title:"Who pays?",introduction:"Two finished notes, one question.",ownerDisplayName:"Athan",publishedAt:"2026-09-13T18:00:00.000Z",contents:[{title:t.title,ideas:["The exception first"]},{title:s.title,ideas:["The cost"]}],sources:[{title:"A letter on time",href:"https://example.com/letter"}],pieces:[t,s]},e)}},2109:()=>{},4177:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var o=s(5043),n=s(1045),a=s(5886),i=s(853),l=s(5230),r=(s(2109),s(579));const c=()=>{const{slug:e=""}=(0,n.g)(),[t,s]=(0,o.useState)(null),[c,d]=(0,o.useState)("");(0,o.useEffect)((()=>{let t=!1;return d(""),s(null),(0,a.bK)(e).then((e=>{t||s(e)})).catch((()=>{t||d("This note is not published.")})),()=>{t=!0}}),[e]);const h=t?"".concat(t.title," \xb7 Noeis"):"Noeis",u=t?(e=>{const t=((null===e||void 0===e?void 0:e.blocks)||[]).find((e=>String((null===e||void 0===e?void 0:e.text)||"").trim()));return String((null===t||void 0===t?void 0:t.text)||(null===e||void 0===e?void 0:e.title)||"").slice(0,220)})(t):"This note is not published.";return(0,l.A)({title:h,description:u,canonicalPath:"/share/notebooks/".concat(e),robots:"noindex,nofollow"}),c?(0,r.jsxs)("main",{className:"shared-notebook-page",children:[(0,r.jsx)("p",{className:"shared-notebook-page__quiet",children:c}),(0,r.jsx)(n.N_,{to:"/",className:"shared-notebook-page__home",children:"Noeis"})]}):t?(0,r.jsx)("main",{className:"shared-notebook-page","data-testid":"shared-notebook",children:(0,r.jsx)(i.A,{snapshot:t,onAsk:(t,s)=>(0,a.AD)(e,{blockId:t.id,text:s})})}):(0,r.jsx)("main",{className:"shared-notebook-page",children:(0,r.jsx)("p",{className:"shared-notebook-page__quiet",role:"status",children:"Opening\u2026"})})}},9842:(e,t,s)=>{s.d(t,{A:()=>k});var o=s(5043),n=s(146),a=s(1329),i=(s(2109),s(579));const l=e=>
1String(e||"").trim(),r=(e,t)=>{if("withheld"===t)return"";const s=l(e);if(!s)return"";try{const e=new URL(s);return"http:"!==e.protocol&&"https:"!==e.protocol?"":(e.hash="",e.toString())}catch(o){return""}},c=e=>{if(!e)return"";const t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})},d=e=>{let{source:t}=e;if((null===t||void 0===t||!t.title)&&(null===t||void 0===t||!t.href))return null;const s=r(t.href,t.access);return s?(0,i.jsx)("cite",{className:"notebook-essay__source",children:(0,i.jsx)("a",{href:s,rel:"noopener noreferrer",children:t.title||s})}):(0,i.jsxs)("cite",{className:"notebook-essay__source",children:[t.title?"".concat(t.title,". "):"",a.TM]})},h=e=>{let{clip:t}=e;const s=(0,n.j)(),a=(0,o.useRef)(null),[l,r]=(0,o.useState)(!1),[c,d]=(0,o.useState)(!1);(0,o.useEffect)((()=>{if(!l||s)return;const e=window.setTimeout((()=>r(!1)),2200);return()=>window.clearTimeout(e)}),[l,s]),(0,o.useEffect)((()=>{var e,t;c&&(null===(e=a.current)||void 0===e||e.focus(),null===(t=a.current)||void 0===t||t.select())}),[c]);return(0,i.jsxs)("div",{className:"notebook-essay__copy",children:[(0,i.jsx)("button",{type:"button",onClick:async()=>{try{var e;if(null===(e=navigator.clipboard)||void 0===e||!e.writeText)throw new Error("no clipboard");await navigator.clipboard.writeText(t),r(!0),d(!1)}catch(s){r(!1),d(!0)}},children:l?"Copied.":"Copy with source"}),c?(0,i.jsx)("textarea",{ref:a,className:"notebook-essay__clip",readOnly:!0,value:t,"aria-label":"Quotation with source",rows:3,onFocus:e=>e.target.select()}):null]})},u=e=>"concept"===e?"Concept":"question"===e?"Question":"wiki"===e?"Wiki":"",p=e=>{let{block:t,onAsk:s}=e;const r=(0,n.j)(),c=(0,o.useRef)(null),[d,h]=(0,o.useState)(!1),[u,p]=(0,o.useState)(""),[b,k]=(0,o.useState)(!1),[x,y]=(0,o.useState)(""),[m,_]=(0,o.useState)(!1);if((0,o.useEffect)((()=>{var e;d&&!r&&(null===(e=c.current)||void 0===e||e.focus())}),[d,r]),m)return(0,i.jsx)("p",{className:"notebook-essay__ask-receipt",role:"status",children:"Sent to the author. It stays off this page."});return(0,i.jsx)("div",{className:"notebook-essay__ask","data-testid":"notebook-ask-".concat(t.id),children:d?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("label",{className:"notebook-essay__ask-label",htmlFor:"notebook-ask-field-".concat(t.id),children:"Your question"}),(0,i.jsx)("textarea",{id:"notebook-ask-field-".concat(t.id),ref:c,className:"notebook-essay__ask-field",value:u,maxLength:400,rows:3,onChange:e=>p(e.target.value)}),(0,i.jsx)("p",{className:"notebook-essay__ask-hint",children:a.W1}),x?(0,i.jsx)("p",{className:"notebook-essay__ask-error",role:"status",children:x}):null,(0,i.jsxs)("div",{className:"notebook-essay__ask-actions",children:[(0,i.jsx)("button",{type:"button",onClick:async()=>{const e=l(u);if(e&&!b){k(!0),y("");try{await s(t,e),_(!0),h(!1),p("")}catch(o){y("That question did not send.")}finally{k(!1)}}},disabled:b||!l(u),children:b?"Sending\u2026":"Send to the author"}),(0,i.jsx)("button",{type:"button",onClick:()=>{h(!1),y("")},disabled:b,children:"Cancel"})]})]}):(0,i.jsx)("button",{type:"button",onClick:()=>h(!0),children:"Leave a question"})})},b=e=>{let{block:t,onAsk:s,nested:o=!1}=e;const n=null===t||void 0===t?void 0:t.type,a=s&&(e=>{const t=null===e||void 0===e?void 0:e.type;return Boolean(l(null===e||void 0===e?void 0:e.id)&&l(null===e||void 0===e?void 0:e.text)&&("paragraph"===t||"quote"===t||"bullet"===t))})(t)?(0,i.jsx)(p,{block:t,onAsk:s}):null;if("heading"===n){const e=Math.min(Math.max(Number(t.level)||2,2),4),s=Math.min(e+(o?1:0),4),n="h".concat(s);return(0,i.jsx)(n,{className:"notebook-essay__heading",children:t.text})}if("bullet"===n)return(0,i.jsxs)("div",{className:"notebook-essay__passage",children:[(0,i.jsx)("p",{className:"notebook-essay__bullet",style:{"--indent":String(t.indent||0)},children:t.text}),a]});if("quote"===n){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=l(e.text);if(!t)return"";const s=e.source||{},o=l(s.title),n=r(s.href,s.access);return o||n?['"'.concat(t,'"'),o&&"\u2014 ".concat(o),n].filter(
1Boolean).join("\n"):""}(t);return(0,i.jsxs)("blockquote",{className:"notebook-essay__quote",children:[t.text?(0,i.jsx)("p",{children:t.text}):null,(0,i.jsx)(d,{source:t.source}),e?(0,i.jsx)(h,{clip:e}):null,a]})}return"article"===n?(0,i.jsx)("p",{className:"notebook-essay__article",children:(0,i.jsx)(d,{source:t.source||{title:t.text,href:"",access:"withheld"}})}):"concept"===n||"question"===n||"wiki"===n?(0,i.jsxs)("p",{className:"notebook-essay__name",children:[(0,i.jsx)("span",{className:"notebook-essay__name-kind",children:u(n)}),t.text]}):"code"===n?(0,i.jsx)("pre",{className:"notebook-essay__code",children:(0,i.jsx)("code",{children:t.text})}):"divider"===n?(0,i.jsx)("hr",{className:"notebook-essay__rule"}):null!==t&&void 0!==t&&t.text?(0,i.jsxs)("div",{className:"notebook-essay__passage",children:[(0,i.jsx)("p",{className:"notebook-essay__prose",children:t.text}),a]}):null};function k(e){let{snapshot:t,compact:s=!1,onAsk:o=null,chapter:n=!1}=e;if(!t)return null;const a=c(t.publishedAt),l=c(t.revisedAt),r=Boolean(l&&l!==a),d=String(t.correction||"").trim(),h=n?"h2":"h1",u=n?a||"":t.ownerDisplayName?a?"Shared by ".concat(t.ownerDisplayName," \xb7 ").concat(a):"Shared by ".concat(t.ownerDisplayName):a,p=Array.isArray(t.blocks)?t.blocks:[],k=s||n?null:o;return(0,i.jsxs)("article",{className:["notebook-essay",s?"is-compact":"",n?"is-chapter":""].filter(Boolean).join(" "),"data-testid":"notebook-essay",children:[(0,i.jsxs)("header",{className:"notebook-essay__header",children:[n?null:(0,i.jsx)("p",{className:"notebook-essay__eyebrow",children:"Shared note"}),(0,i.jsx)(h,{className:"notebook-essay__title",children:t.title||"Untitled"}),u?(0,i.jsx)("p",{className:"notebook-essay__by",children:u}):null,r?(0,i.jsxs)("p",{className:"notebook-essay__revised",children:["Updated ",l]}):null,d?(0,i.jsx)("p",{className:"notebook-essay__correction",children:d}):null]}),(0,i.jsx)("div",{className:"notebook-essay__body",children:p.map(((e,t)=>(0,i.jsx)(b,{block:e,onAsk:k,nested:n},e.id||"".concat(e.type,"-").concat(t))))})]})}}}]); 2//# sourceMappingURL=4177.21a2e094.chunk.js.map
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.