Welcome to the Live docs! Keep this little window open while you work on the notebook, and you will get documentation of everything you type!
You can also type a query above.
Still stuck? Here are some tips.
',loading:!1}),d=e=>c(se((t=>e(t))));i.useEffect((()=>{s.loading||(null==t||/[^\s]/.test(t))&&s.searched_query!==t&&u(t)}),[t,s.loading,s.searched_query]),i.useLayoutEffect((()=>{e&&l.current&&(l.current.focus({preventScroll:!0}),l.current.select())}),[e]);let u=e=>{d((t=>{t.loading=!0,t.searched_query=e})),Promise.race([Nt.default.Promises.delay(2e3,!1),r.send("docs",{query:e.replace(/^\?/,"")},{notebook_id:o.notebook_id}).then((t=>"⌛"!==t.message.status&&("👍"===t.message.status?(d((n=>{n.shown_query=e,n.body=t.message.doc})),!0):void 0)))]).then((()=>{d((e=>{e.loading=!1}))}))},p=i.useMemo((()=>i.html`<${Is} body=${Mt(s.body)} sanitize_html=${a} sanitize_html_message=${!1} />`),[s.body,a]),m=!1===s.loading&&""!==s.searched_query&&s.searched_query!==s.shown_query;return i.html` +${s.shown_query}
+${n.map(((n,o)=>e.line-1-t<=o&&o<=e.line-1+t?i.html`<${xn} code=${n} i=${o} frameLine=${o===e.line-1} />`:null))}+
`},Sn=({code:e})=>{const t=i.useRef(null);return i.useLayoutEffect((()=>{if(t.current){const n=e.replaceAll(/([^():{},; ]*)::/g,"$1::");t.current.innerHTML=n}}),[t.current,e]),i.html`Syntax error
${n.current?null:o}
`},On=({msg:e,stacktrace:t,cell_id:n})=>{var o;let a=i.useContext(ye);const r={pattern:/.?/,display:e=>ce.default.dropRightWhile(e.split("\n"),(e=>""===e)).map((e=>i.html`<${Mn} value=${e} />`))},l=[{pattern:/syntax: extra token after end of expression/,display:e=>{const t=i.html`{e.preventDefault(),a.wrap_remote_cell(n,"begin")}} + >Wrap all code in a begin ... end block.`;if(e.includes("\n\nBoundaries: ")){const o=JSON.parse(e.split("\n\nBoundaries: ")[1]).map((e=>e-1)),r=i.html`+ {e.preventDefault(),a.split_remote_cell(n,o,!0)}} + >Split this cell into ${o.length} cells, or +
`;return i.html`Multiple expressions in one cell.
+How would you like to fix it?
+Multiple expressions in one cell.
+${t}
`},show_stacktrace:()=>!1},{pattern:/LoadError: cannot assign a value to variable workspace#\d+\..+ from module workspace#\d+/,display:()=>i.html`Tried to reevaluate an include
call, this is not supported. You might need to restart this notebook from the main menu.
+ For a workaround, use the alternative version of include
described here:
+ GH issue 115
+
In the future, include
will be deprecated, and this will be the default.
${e}
`))},{pattern:/Cyclic references among (.*)\./,display:e=>e.split("\n").map((e=>{const t=e.match(/Cyclic references among (.*)\./);if(t){let e=t[1].split(/, | and /).map((e=>i.html`${e}`));return i.html`Cyclic references among${" "}${Nn(e)}.
`}return i.html`${e}
`}))},{pattern:/Multiple definitions for (.*)/,display:e=>e.split("\n").map((e=>{const t=e.match(/Multiple definitions for (.*)/);if(t){let e=t[1].replace(/\.$/,"").split(/, | and /).map((e=>i.html`{const o=document.querySelector(`pluto-cell:not([id='${n}']) span[id='${encodeURI(e)}']`);t.preventDefault(),null==o||o.scrollIntoView()}}>${e}`));return i.html`Multiple definitions for${" "}${Nn(e)}.
`}return i.html`${e}
`}))},{pattern:/^syntax: (.*)$/,display:r.display,show_stacktrace:()=>!1},{pattern:/^\s*$/,display:()=>r.display("Error")},{pattern:/^UndefVarError: (.*) not defined/,display:e=>{const t=a.get_notebook(),o=Dn(t,n),r=e.match(/UndefVarError: (.*) not defined/);let l=((null==r?void 0:r[1])??"").replaceAll("`","");const s=Object.values((null==t?void 0:t.cell_dependencies)??{}).some((e=>Object.keys(e.downstream_cells_map).includes(l)));if(0===Object.keys(o).length||!s)return i.html`${e}
`;const c=Object.keys(o).map((e=>i.html`{t.preventDefault();const n=document.querySelector(`pluto-cell[id='${o[e]}']`);null==n||n.scrollIntoView()}}>${e}`));return i.html`Another cell defining ${Nn(c)} contains errors.
`},show_stacktrace:()=>{const e=Dn(a.get_notebook(),n);return 0===Object.keys(e).length}},{pattern:/^ArgumentError: Package (.*) not found in current path/,display:e=>{var t,n,o;const r=e.match(/^ArgumentError: Package (.*) not found in current path/),l=((null==r?void 0:r[1])??"").replaceAll("`",""),s=null===(t=a.get_notebook())||void 0===t||null===(n=t.nbpkg)||void 0===n||null===(o=n.terminal_outputs)||void 0===o?void 0:o[l];return i.html`The package ${l}.jl could not load because it failed to initialize.
+That's not nice! Things you could try:
+You might find useful information in the package installation log:
+ <${St} value=${s} />`},show_stacktrace:()=>!1},r],s=l.find((({pattern:t})=>t.test(e)))??r,[c,d]=i.useState(!1);i.useEffect((()=>{d(!1)}),[e,t,n]);const u=t.findIndex((e=>null!=gn(e.file))),p=!c&&-1!=u&&uHere is what happened, the most recent locations are first:
+${t}`;case"application/vnd.pluto.tree+object":return i.html`<${Fn} cell_id=${n} body=${t} persist_js_state=${o} sanitize_html=${a} />`;default:return Cs({mime:e,body:t,cell_id:n,persist_js_state:o,sanitize_html:a,last_run_timestamp:null})}},Pn=({on_click_more:e})=>{const[t,n]=i.useState(!1),o=i.useRef(null);return jn(o),i.html`
A new server was started - this notebook session is no longer running.
+Would you like to go back to the main menu?
+The statefile failed to download. Original error message:
+${t.toString()}
+ Launch parameters:
+${JSON.stringify(e,null,2)}
+