ryugi-artifacts 1.110.1 → 1.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AppIcon.icns +0 -0
- package/dist/cli.cjs +181 -170
- package/dist/document-engine.cjs +1 -1
- package/dist/viewer/{AgentDock-6un7g6EW.js → AgentDock-CZaxDERb.js} +1 -1
- package/dist/viewer/ArtboardLayout-C3Ss-hn2.js +14 -0
- package/dist/viewer/{ArtifactList-CguprV5S.js → ArtifactList-B9unMdTt.js} +2 -2
- package/dist/viewer/{ArtifactModal-BthavXPQ.js → ArtifactModal-BF3VCQrn.js} +1 -1
- package/dist/viewer/{BottomSheet-BFmMmz0e.js → BottomSheet-BXZOuVNc.js} +1 -1
- package/dist/viewer/{Canvas-BQvfuFH9.js → Canvas-BntAtrrl.js} +1 -1
- package/dist/viewer/{CommentPopover-wKdHWvEk.js → CommentPopover-Bz-n8fg7.js} +1 -1
- package/dist/viewer/{DocumentExportMenu-DXQAge-h.js → DocumentExportMenu-CLRK1Ky_.js} +1 -1
- package/dist/viewer/DocumentLayout-vsbT5z81.js +2 -0
- package/dist/viewer/DocumentPage-DNj9oj7M.js +3 -0
- package/dist/viewer/{DraggablePanel-WnQa4WqJ.js → DraggablePanel-Har0XBPA.js} +1 -1
- package/dist/viewer/{DropdownMenu-C-RgiXH5.js → DropdownMenu-kekzP-8G.js} +1 -1
- package/dist/viewer/{GroupVerdict-BhUpCp5w.js → GroupVerdict-BwbdTRuT.js} +1 -1
- package/dist/viewer/{HtmlLayout-Ykt8uvx5.js → HtmlLayout-dpJ9HV_0.js} +1 -1
- package/dist/viewer/{Input-C1Nrx6NW.js → Input-CzWr3g-b.js} +1 -1
- package/dist/viewer/MenuSubmenuTrigger-Bs1vXxvY.js +1 -0
- package/dist/viewer/{PhoneArtboardBar-BMkMYKEH.js → PhoneArtboardBar-C01O25EC.js} +1 -1
- package/dist/viewer/{Popover-cB2rLdue.js → Popover-C1YBmb-2.js} +1 -1
- package/dist/viewer/{PreviewArtifactLayout-H6NV96nq.js → PreviewArtifactLayout-C4VI6-9T.js} +1 -1
- package/dist/viewer/PreviewLayout-xD0Z_tmg.js +2 -0
- package/dist/viewer/{ReportLayout-gDr83HaK.js → ReportLayout-DXrPENap.js} +2 -2
- package/dist/viewer/{RyugiMark-BxkKQ5lq.js → RyugiMark-DwxNpu7F.js} +1 -1
- package/dist/viewer/{Segmented-Beqk813u.js → Segmented-CWXUvn4X.js} +1 -1
- package/dist/viewer/SelectScrollUpArrow-D-BmvfPQ.js +1 -0
- package/dist/viewer/SlidesLayout-C2E2F1H_.js +12 -0
- package/dist/viewer/{SnapshotDocument-B2cxzqyH.js → SnapshotDocument-Durl-bz6.js} +1 -1
- package/dist/viewer/{SplitFrame-Czb4TISP.js → SplitFrame-A5XDZjkX.js} +1 -1
- package/dist/viewer/{StoryboardLayout-C1AqDRge.js → StoryboardLayout-q0Y-ClTs.js} +1 -1
- package/dist/viewer/{StoryboardRender-0BHiMypp.js → StoryboardRender-D_kaBqbU.js} +1 -1
- package/dist/viewer/{ThreadView-C7soHy8_.js → ThreadView-CnIdU5U-.js} +1 -1
- package/dist/viewer/{Tooltip-B0Ehf6Z5.js → Tooltip-B8QkSyOl.js} +1 -1
- package/dist/viewer/{VerifyLayout-9xD_W0-c.js → VerifyLayout-D8nYcWZD.js} +1 -1
- package/dist/viewer/{VirtualizedEditor-uWe43zaI-DT4GAFpm.js → VirtualizedEditor-uWe43zaI-HVAUW7qP.js} +1 -1
- package/dist/viewer/{VirtualizedRenderer-C_d95FXi-ealkku86.js → VirtualizedRenderer-C_d95FXi-DYPyj5qG.js} +1 -1
- package/dist/viewer/{WarningsBadge-BbJdjQpt.js → WarningsBadge-DduhqdgA.js} +1 -1
- package/dist/viewer/WhiteboardEditor-cZ32fLqJ-DFINbnX4.js +22 -0
- package/dist/viewer/{WhiteboardLayout-C-RLaui_.js → WhiteboardLayout-DMKFNvhq.js} +1 -1
- package/dist/viewer/{WritingCursor-oPoIsKUb.js → WritingCursor-BcNalU7B.js} +1 -1
- package/dist/viewer/{agentLook-D4riQJ8C.js → agentLook-DaeWwrww.js} +1 -1
- package/dist/viewer/{artifact-list-CpPtgMEK.js → artifact-list-g9gKeH-0.js} +1 -1
- package/dist/viewer/{auto-publish-DVEHOTT5.js → auto-publish-D52kzDvW.js} +1 -1
- package/dist/viewer/{channel-CVsrQP9s.js → channel-D6yS6vSs.js} +3 -3
- package/dist/viewer/{crop-encode-hNMFMj6m.js → crop-encode-ChXJHdHh.js} +1 -1
- package/dist/viewer/dist-3bQWg0ym.js +1 -0
- package/dist/viewer/{dist-CWG86Qx7.js → dist-BIELIQDr.js} +1 -1
- package/dist/viewer/{dist-CKyjD35S.js → dist-BPSArMrD.js} +1 -1
- package/dist/viewer/{dist-CRi3Ep6t.js → dist-BT9JOLgU.js} +1 -1
- package/dist/viewer/{dist-E38Xe3MQ.js → dist-BhEkI0Ns.js} +1 -1
- package/dist/viewer/{dist-H8MUbNB6.js → dist-BtvjAYhV.js} +1 -1
- package/dist/viewer/{dist-Dc7UOYbo.js → dist-BxE5jTb_.js} +1 -1
- package/dist/viewer/{dist-DHHkE5Pc.js → dist-CLkuPABZ.js} +1 -1
- package/dist/viewer/{dist-CNxdwhOg.js → dist-CNPLQub0.js} +1 -1
- package/dist/viewer/{dist-DmKVt1TO.js → dist-CSaRC5P6.js} +1 -1
- package/dist/viewer/{dist-BHWbRf2s.js → dist-ChRPJ84w.js} +1 -1
- package/dist/viewer/{dist-DXt-rGJU.js → dist-Cug-g5Sy.js} +1 -1
- package/dist/viewer/{dist-CAMOMDy7.js → dist-DAIpjsMy.js} +1 -1
- package/dist/viewer/{dist-Bqxw-VPi.js → dist-DC_okTp4.js} +1 -1
- package/dist/viewer/{dist-DuQFs8bS.js → dist-DMYNVdSS.js} +1 -1
- package/dist/viewer/{dist-CLk1Bth7.js → dist-DmN7Qr_b.js} +1 -1
- package/dist/viewer/{dist-CQ22WAIU.js → dist-DoSxy_0Z.js} +1 -1
- package/dist/viewer/{dist-CIggNRs9.js → dist-F4cSX7EU.js} +1 -1
- package/dist/viewer/{dist-Dk6bIGuf.js → dist-GvfKNZGx.js} +1 -1
- package/dist/viewer/{dist-DN1H79Ip.js → dist-TwYO5Xdf.js} +1 -1
- package/dist/viewer/{dist--v3nH0C2.js → dist-ezs7BFRb.js} +1 -1
- package/dist/viewer/{dist-B0ILD5bC.js → dist-jZpbR7vZ.js} +1 -1
- package/dist/viewer/{dist-BVmgdxIk.js → dist-oooC3WGx.js} +1 -1
- package/dist/viewer/{dist-CyGunPGS.js → dist-tFrYHwbL.js} +1 -1
- package/dist/viewer/{editor-B_dmAT7r.js → editor-p4kHebXo.js} +256 -254
- package/dist/viewer/{fit-Dy3EIsBE.js → fit-Ok-QBwLI.js} +1 -1
- package/dist/viewer/{icons-BurfZgbO.js → icons-C2Xnbqrp.js} +1 -1
- package/dist/viewer/{imperative-Cgz8hoz-.js → imperative-Ceakuv3Q.js} +1 -1
- package/dist/viewer/index.html +13 -12
- package/dist/viewer/index.js +2 -2
- package/dist/viewer/index4.css +1 -1
- package/dist/viewer/index5.css +16 -0
- package/dist/viewer/is-html-element-DvgHo_1h.js +1 -0
- package/dist/viewer/{local-DXaScWD4.js → local-cRjV2uVw.js} +1 -1
- package/dist/viewer/{local-split-host--Swu-YgH.js → local-split-host-DUdjFbxZ.js} +1 -1
- package/dist/viewer/plugin-_bGVeqI0-CsUbBVez.js +2 -0
- package/dist/viewer/preview.html +3 -3
- package/dist/viewer/preview.js +1 -1
- package/dist/viewer/{printDocument-CC2oNEVO.js → printDocument-iDndVXNS.js} +1 -1
- package/dist/viewer/{ref-B-yJaA1I.js → ref-zGKSYjU7.js} +1 -1
- package/dist/viewer/{route-McOpomU2.js → route-DCXI9Pag.js} +2 -2
- package/dist/viewer/{route-messages-CVVJCGbw.js → route-messages-D6kcIEEz.js} +1 -1
- package/dist/viewer/{settings-CiU-sro0.js → settings-zZx1Ojd9.js} +1 -1
- package/dist/viewer/snap-CfRCnk-l.js +1 -0
- package/dist/viewer/split-DiDvaPmh.js +2 -0
- package/dist/viewer/{stable-D0V-nxn7.js → stable-BcrXxRbN.js} +1 -1
- package/dist/viewer/{styles-B6PpuJxT.js → styles-ClUymw7N.js} +1 -1
- package/dist/viewer/{transport-Cs-vGiPz.js → transport-i4_BWg6B.js} +1 -1
- package/dist/viewer/url-B9EKllj2.js +29 -0
- package/dist/viewer/{useArtifactFeed-CeKgpdgq.js → useArtifactFeed-BpzJAdxF.js} +1 -1
- package/dist/viewer/{useArtifactSocket-Dp2OBZFo.js → useArtifactSocket-_mvi0Q37.js} +1 -1
- package/dist/viewer/{useLayerZIndex-DzJy6vhi.js → useLayerZIndex-jAjmZ3ZM.js} +1 -1
- package/dist/viewer/{useStoryboardData-C7PSl2I4.js → useStoryboardData-k6hMC-4h.js} +1 -1
- package/dist/viewer/{view-BQdRX9O6.js → view-fKu6_aTo.js} +1 -1
- package/dist/viewer/{viewport-CFJHn_Y6-Cz8ocWMP.js → viewport-CFJHn_Y6-tExUXDWg.js} +1 -1
- package/package.json +3 -2
- package/dist/viewer/ArtboardLayout-DcLjfTW5.js +0 -14
- package/dist/viewer/DocumentLayout-DPB6Byav.js +0 -2
- package/dist/viewer/DocumentPage-BStsS6oE.js +0 -3
- package/dist/viewer/MenuSubmenuTrigger-C3Y6EJ1a.js +0 -1
- package/dist/viewer/PreviewLayout-CFXMPAXR.js +0 -2
- package/dist/viewer/SelectScrollUpArrow-DuDh2HJ_.js +0 -1
- package/dist/viewer/SlidesLayout-CWZjcfO3.js +0 -12
- package/dist/viewer/WhiteboardEditor-cZ32fLqJ-BfKRGbqm.js +0 -22
- package/dist/viewer/dist-DiSjof8e.js +0 -1
- package/dist/viewer/plugin-_bGVeqI0-CTywTig9.js +0 -2
- package/dist/viewer/snap-Dxg6-ulS.js +0 -1
- package/dist/viewer/split-Dnd6CUMX.js +0 -2
- package/dist/viewer/url-BO9cF4cS.js +0 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./printDocument-
|
|
2
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{T as t,_ as n,k as r,y as i}from"./route-McOpomU2.js";import{t as a}from"./react-DlmbjZJV.js";import{C as o,Dr as s,Rt as c,T as l,_ as u,_r as d,a as f,b as p,c as m,d as h,f as g,gr as _,p as v,w as y,x as b}from"./url-BO9cF4cS.js";import{t as x}from"./jsx-runtime-LKYXHABd.js";import{En as S}from"./useLayerZIndex-DzJy6vhi.js";import{Dt as C}from"./MotionConfigContext-HC2vqcJO.js";import{Gt as w,Jr as T,_i as E,bn as D,gn as O,ir as k,ni as A,pa as ee,sa as te,wn as ne,xr as j,zr as re}from"./WhiteboardEditor-cZ32fLqJ-BfKRGbqm.js";import{$ as M,C as ie,F as ae,G as oe,H as se,I as ce,J as le,K as N,L as ue,M as P,N as de,O as fe,Ot as F,P as pe,Q as I,R as me,U as he,W as ge,X as _e,Y as ve,Z as ye,at as be,b as xe,ct as Se,dt as Ce,et as we,ft as Te,gt as Ee,ht as L,it as De,j as Oe,mt as R,nt as ke,ot as Ae,pt as je,rt as z,st as Me,tt as Ne,ut as Pe,v as Fe,z as Ie}from"./editor-B_dmAT7r.js";import{o as Le}from"./ThreadView-C7soHy8_.js";import{r as Re}from"./agentLook-D4riQJ8C.js";import{n as ze}from"./plugin-_bGVeqI0-CTywTig9.js";import{n as Be,t as Ve}from"./comments-DUAz1Q9X.js";import{n as He}from"./useMedia-CFebB4XU.js";import{a as B,i as Ue,t as We}from"./motion-Cy65kd7X.js";import{t as Ge}from"./embed-src-CmyqZplg.js";import{n as Ke}from"./preference-oNdcNeml.js";import{a as V,n as qe,o as Je,r as H,t as Ye}from"./ref-B-yJaA1I.js";import{c as Xe,i as Ze,l as Qe,u as $e}from"./route-messages-CVVJCGbw.js";var et={name:`corner-down-right`,size:24,node:[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]};et.node;var tt=C(et),U=e(a(),1);function nt(e,t,n){let r=(0,U.useMemo)(()=>p(),[]),[i,a]=(0,U.useState)(!1),s=(0,U.useRef)(t);s.current=t;let c=(0,U.useRef)(n);c.current=n,(0,U.useEffect)(()=>{if(r)return b((e,t)=>{e.kind===`chrome`&&a(e.hosted),e.kind===`history`&&s.current(e.action),t===window.parent&&e.kind===`document-export`&&e.format===`pdf`&&c.current?.()})},[r]);let{activity:l,comments:u,history:d,historyOpen:f,documentExport:m}=e;return(0,U.useEffect)(()=>{r&&o({kind:`header`,activity:l,comments:u,history:d,historyOpen:f,documentExport:m})},[r,l,u,d,f,m]),r&&i}var W=e(r(),1),G=x(),rt=`svg[role="img"] text[font-family*="Excalifont"] { font-family: ${O}; }`;function it(){let e=Ke();return(0,G.jsx)(G.Fragment,{children:e&&(0,W.createPortal)((0,G.jsx)(`style`,{"data-diagram-font-style":!0,children:rt}),document.head)})}var K=(e,t,n,r)=>e.find(e=>t<e.bottom+r&&t+n+r>e.top);function at(e,t,n,r){for(let i=K(e,t,n,r);i;)t=i.bottom+r,i=K(e,t,n,r);return t}function ot(e,t,n,r){for(let i=K(e,t,n,r);i;)t=i.top-r-n,i=K(e,t,n,r);return t}function st(e,t,n,r,i){let a=e.top-i-t.height;if(a<0||K(r,a,t.height,i))return null;let o=t.anchorTop-a,s=[],c=a;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t.top+t.height+i<=c)break;let a=c-i-t.height;if(t.fixed||a<0||K(r,a,t.height,i))return null;o+=t.top-a,s.push([e,a]),c=a}return{cost:o,moves:s,top:a}}function ct(e,t,n,r=[]){let i=[...e].sort((e,t)=>e.anchorTop-t.anchorTop),a=n?i.findIndex(e=>e.id===n):-1,o=Math.max(a,0),s=[],c=-1/0;for(let e=o;e<i.length;e++){let n=i[e],o=Math.max(n.anchorTop,c),l=K(r,o,n.height,t);if(l){let e=at(r,o,n.height,t),i=st(l,n,s,r,t);if(i&&i.cost<=e-n.anchorTop){for(let[e,t]of i.moves)s[e].top=t;o=i.top}else o=e}s.push({id:n.id,top:o,height:n.height,fixed:e===a}),c=o+n.height+t}let l={};for(let e of s)l[e.id]=e.top;if(a>0){let e=l[i[a].id];for(let n=a-1;n>=0;n--){let a=i[n],o=Math.min(a.anchorTop,e-t-a.height),s=K(r,o,a.height,t);if(s){let n=ot(r,o,a.height,t),i=s.bottom+t;o=i+a.height+t<=e&&!K(r,i,a.height,t)&&Math.abs(i-a.anchorTop)<Math.abs(a.anchorTop-n)?i:n}l[a.id]=o,e=o}}return l}function lt(e,t,n){let r=Math.max(e.x,t.x-n),i=(r+t.x)/2,a=r>e.x?` H${r}`:``;return`M${e.x} ${e.y}${a} C${i} ${e.y} ${i} ${t.y} ${t.x} ${t.y}`}var ut=8,dt=3,ft=18;function pt(e){let t=e.right+ut;return{left:t,right:t+dt,top:e.top,bottom:e.bottom}}function mt(e){return{x:e.right,y:e.top+Math.min(ft,(e.bottom-e.top)/2)}}function ht(e,t,n,r){return{left:Math.max(t.left,Math.min(e.left,t.right-n)),top:e.bottom+r}}var gt=10;function _t(e,t,n,r,i){let a=Math.max(t.left,Math.min(e.left,t.right-n)),o=e.bottom+gt;return i.top+o+r<=i.height-i.reserved-8?{left:a,top:o,placement:`below`}:{left:a,top:e.top-r-gt,placement:`above`}}var q=e=>e.kind===`element`?[]:e.blocks??(e.kind===`block`?[{id:e.threadId,element:e.element}]:[]),J=e=>e.kind===`text`?e.ranges??[e.range]:[],vt=4;function yt(e){return[...J(e).flatMap(e=>[...e.getClientRects()]),...q(e).map(e=>pt(e.element.getBoundingClientRect()))].sort((e,t)=>e.top-t.top||e.left-t.left)}function bt(e){if(e.kind===`element`)return e.node.isConnected?se(e.node):null;let t=yt(e).at(-1);return t?e.kind===`text`?{x:t.right,y:t.bottom}:mt(t):null}function xt(e,t,n){let r=document.createRange(),i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),a=0,o=!1;for(let e=i.nextNode();e;e=i.nextNode()){let i=a+e.length;if(!o&&t<=i&&(r.setStart(e,t-a),o=!0),o&&n<=i)return r.setEnd(e,n-a),r;a=i}return r.selectNodeContents(e),r}function St(e,t,n,r=0){let[i,a]=(0,U.useState)([]);return(0,U.useEffect)(()=>{if(!e||!n)return;let r=()=>{let r=e.getEditorState().read(()=>{let e=new Map;for(let t of j().getChildren()){let n=A(t,F);n&&e.set(n,t.getKey())}return e}),i=n.getBoundingClientRect().top-n.scrollTop,o=[];for(let n of t){let t=Ve(n.anchor).flatMap(t=>{let n=r.get(t),i=n?e.getElementByKey(n):null;return i?[{id:t,element:i}]:[]}),a=t[0]?.element;if(!a)continue;if(n.anchor.diagram){let e=he(a,n.id);if(e){let t=e.getBoundingClientRect(),r=n.anchor.diagram.kind===`edge`?se(e).y:t.top;o.push({threadId:n.id,top:r-i,kind:`element`,node:e})}else o.push({threadId:n.id,top:a.getBoundingClientRect().top-i,kind:`block`,element:a,blocks:t});continue}if(n.anchor.textRanges){let e=new Map(n.anchor.textRanges.map(e=>[e.blockId,e])),r=[],s=[],c;for(let n of t){let t=e.get(n.id),a=t?oe(n.element.textContent??``,t.quote,t.start):`block`;if(a===`block`)s.push(n),c??=n.element.getBoundingClientRect().top-i;else{let e=xt(n.element,a.start,a.end);r.push(e);let t=e.getClientRects()[0]??n.element.getBoundingClientRect();c??=t.top-i}}r.length?o.push({threadId:n.id,top:c,kind:`text`,range:r[0],ranges:r,blocks:s}):o.push({threadId:n.id,top:c,kind:`block`,element:a,blocks:s});continue}let s=n.anchor.blockIds?`block`:oe(a.textContent??``,n.anchor.quote);if(s===`block`){o.push({threadId:n.id,top:a.getBoundingClientRect().top-i,kind:`block`,element:a,blocks:t});continue}let c=xt(a,s.start,s.end),l=c.getClientRects()[0]??a.getBoundingClientRect();o.push({threadId:n.id,top:l.top-i,kind:`text`,range:c})}a(o)};r();let i=0,o=()=>{cancelAnimationFrame(i),i=requestAnimationFrame(r)},s=e.registerUpdateListener(o),c=new ResizeObserver(o);c.observe(n);let l=e.getRootElement();return l&&c.observe(l),()=>{cancelAnimationFrame(i),s(),c.disconnect()}},[e,t,n,r]),i}function Ct(e,t,n){(0,U.useEffect)(()=>{if(typeof CSS>`u`||!(`highlights`in CSS))return;let r=N(t,n),i=e.filter(e=>r.has(e.threadId)&&e.threadId!==n).flatMap(J),a=e.filter(e=>e.threadId===n).flatMap(J);return CSS.highlights.set(`ryugi-comment`,new Highlight(...i)),CSS.highlights.set(`ryugi-comment-active`,new Highlight(...a)),()=>{CSS.highlights.delete(`ryugi-comment`),CSS.highlights.delete(`ryugi-comment-active`)}},[e,t,n])}function wt(e,t){(0,U.useEffect)(()=>{if(t?.length){for(let e of t)e.setAttribute(`data-comment-draft`,``);return()=>{for(let e of t)e.removeAttribute(`data-comment-draft`)}}if(e&&typeof CSS<`u`&&`highlights`in CSS)return CSS.highlights.set(`ryugi-comment-draft`,new Highlight(e)),()=>{CSS.highlights.delete(`ryugi-comment-draft`)}},[e,t])}function Tt(e,t,n){for(let r of e){if(r.kind===`element`)continue;let e=r.kind===`block`||q(r).length?vt:0;for(let i of yt(r))if(t>=i.left-e&&t<=i.right+e&&n>=i.top&&n<=i.bottom)return r.threadId}return null}var Et=e=>Math.max(0,Math.min(window.scrollY+e.getBoundingClientRect().top-100,document.documentElement.scrollHeight-window.innerHeight));function Dt(e){window.scrollTo({top:Et(e),behavior:`instant`})}function Y(e,t){let n=Et(e);if(B())return window.scrollTo({top:n,behavior:`instant`}),t?.(),()=>{};let r=()=>{window.removeEventListener(`wheel`,i),window.removeEventListener(`touchmove`,i)},i=()=>{a.stop(),r()},a=c({keyframes:[window.scrollY+1,n],type:`spring`,stiffness:1e3,damping:250,onUpdate:e=>window.scrollTo({top:e,behavior:`instant`}),onComplete:()=>{r(),t?.()}});return window.addEventListener(`wheel`,i,{passive:!0}),window.addEventListener(`touchmove`,i,{passive:!0}),i}var X=12,Ot=40,kt=18;function At({id:e,onHeight:t,children:n}){let r=(0,U.useRef)(null);return(0,U.useLayoutEffect)(()=>{let n=r.current;if(!n)return;let i=new ResizeObserver(()=>t(e,n.offsetHeight));return i.observe(n),t(e,n.offsetHeight),()=>i.disconnect()},[e,t]),(0,G.jsx)(`div`,{ref:r,children:n})}function jt({narrow:e,threads:t,anchors:n,blocked:r,activeId:a,actions:o,onActivate:s,railRef:c,agent:l}){let[u,d]=(0,U.useState)({}),[f,p]=(0,U.useState)(0),m=(0,U.useCallback)((e,t)=>p(t),[]),[h,g]=(0,U.useState)([]),_=(0,U.useRef)(null),v=(0,U.useRef)(new Map).current,y=(0,U.useRef)((e,t)=>d(n=>n[e]===t?n:{...n,[e]:t})).current,b=(0,U.useCallback)(e=>{_.current=e,c(e)},[c]),x=new Map(n.map(e=>[e.threadId,e.top])),S=t.filter(e=>x.has(e.id)),C=t.filter(e=>!x.has(e.id)&&!e.messages.every(e=>e.deleted)),w=S.map(e=>({id:e.id,anchorTop:x.get(e.id),height:u[e.id]??120})),T=ct(w,X,a??void 0,r),E=Math.max(0,...w.map(e=>(T[e.id]??0)+e.height)),D=at(r??[],E+X,f,X),O=JSON.stringify(T);(0,U.useLayoutEffect)(()=>{let r=_.current;if(e||!r)return g([]);let i=r.getBoundingClientRect(),o=N(t,a),s=[];for(let e of n){let t=T[e.threadId],n=bt(e);if(t===void 0||!n||!o.has(e.threadId))continue;let r={x:n.x-i.left,y:n.y-i.top};s.push({id:e.threadId,d:lt(r,{x:0,y:t+kt},Ot)})}g(s)},[e,n,t,a,O]),(0,U.useEffect)(()=>{let t=a?v.get(a):void 0;if(e||!t)return;let n=!1,r=()=>{},i=t.getAnimations({subtree:!0}).map(e=>e.finished.catch(()=>void 0));return Promise.all(i).then(()=>{!n&&Ie(t.getBoundingClientRect(),window.innerHeight)&&(r=Y(t))}),()=>{n=!0,r()}},[a,e,v]);let k=e=>(0,G.jsx)(ue,{actions:o,active:e.id===a,agent:l,thread:e,onActivate:()=>s(e.id)});return e?(0,G.jsxs)(`div`,{"aria-label":i(`document.commentsLabel`),ref:b,role:`region`,className:`x78zum5 xdt5ytf x1v2ro7d xh8yej3 x7ep2pv xvueqy4`,children:[[...S].sort((e,t)=>x.get(e.id)-x.get(t.id)).map(e=>(0,G.jsx)(`div`,{children:k(e)},e.id)),C.length>0?(0,G.jsx)(`div`,{className:`xqui205 x1e56ztr xddlp02 xqfszdh x1j6dyjg`,children:i(`document.originalDeleted`)}):null,C.map(e=>(0,G.jsx)(`div`,{children:k(e)},e.id))]}):(0,G.jsxs)(`aside`,{"aria-label":i(`document.commentsLabel`),ref:b,className:`x1n2onr6 xh8yej3 x2lah0s`,style:{minHeight:E},children:[(0,G.jsx)(`svg`,{className:`x10l6tqk x13vifvy xu96u03 x1i1rx1s xjm9jq1 x1rea2x4 x47corl`,children:h.map(e=>(0,G.jsx)(`path`,{d:e.d,fill:`none`,stroke:e.id===a?Re.warningStrong:`currentColor`,strokeDasharray:e.id===a?void 0:`3 3`,strokeOpacity:e.id===a?1:.25},e.id))}),S.map(e=>(0,G.jsx)(`div`,{ref:t=>{t?v.set(e.id,t):v.delete(e.id)},className:`x10l6tqk xu96u03 xh8yej3 xhtitgo x14h5d43 xx6bhzk`,style:{top:T[e.id]},children:(0,G.jsx)(At,{id:e.id,onHeight:y,children:k(e)})},e.id)),C.length>0?(0,G.jsx)(`div`,{style:{position:`absolute`,top:D,left:0,width:`100%`,zIndex:2},children:(0,G.jsxs)(At,{id:`orphaned`,onHeight:m,children:[(0,G.jsx)(`div`,{className:`xqui205 x1e56ztr xddlp02 xqfszdh x1j6dyjg`,children:i(`document.originalDeleted`)}),C.map(e=>(0,G.jsx)(`div`,{style:{marginBottom:X},children:k(e)},e.id))]})}):null]})}function Mt({container:e,anchors:t,threads:n,activeId:r}){let[i,a]=(0,U.useState)([]);return(0,U.useLayoutEffect)(()=>{if(!e)return a([]);let i=e.getBoundingClientRect(),o=N(n,r),s=[];for(let e of t)if(o.has(e.threadId))for(let t of q(e)){let n=pt(t.element.getBoundingClientRect());s.push({id:e.threadId,key:`${e.threadId}:${t.id}`,left:n.left-i.left,top:n.top-i.top,width:n.right-n.left,height:n.bottom-n.top})}a(s)},[e,t,n,r]),i.map(e=>(0,G.jsx)(`div`,{"data-comment-block":e.id,...{0:{className:`x10l6tqk x1cum3z5 x47corl x1f2496h x15406qy xx6bhzk`},1:{className:`x10l6tqk x1cum3z5 x47corl x15406qy xx6bhzk x5hs8br`}}[e.id===r|0],style:{left:e.left,top:e.top,width:e.width,height:e.height}},e.key))}var Nt=/^#([\w-]{4,64})$/,Pt=/^#ryugi-host=/,Ft=e=>Nt.exec(e)?.[1]??null;function Z(e=window){if(e.parent===e||!e.parent)return e;try{return e.parent.location.href,e.parent}catch{return e}}var It=(e=Z())=>Ft(e.location.hash);function Lt(e,t=Z()){let{hash:n,pathname:r,search:i}=t.location;if(Pt.test(n))return;let a=e?`#${e}`:``;n!==a&&t.history.replaceState(t.history.state,``,`${r}${i}${a}`)}function Rt(e,t){let n=new URL(e);return n.hash=t,n.toString()}var zt=new Set([`h2`,`h3`]),Bt=160;function Vt(e){let t=document.createRange();t.selectNodeContents(e);let n=t.getClientRects?.(),r=n&&n.length>0?n.item(n.length-1):null,i=e.getBoundingClientRect();return r&&r.width>0?r:i}function Ht(e,t){e.getEditorState().read(()=>{for(let n of t){let t=k(n),r=e.getElementByKey(n);if(!ne(t)||!r)continue;let i=zt.has(t.getTag())?A(t,F):``;i?r.id=i:r.removeAttribute(`id`)}})}function Ut({editor:e,shareBase:t}){let[n,r]=(0,U.useState)(null),[a,o]=(0,U.useState)(!1),c=(0,U.useRef)(void 0);if((0,U.useEffect)(()=>{if(e.hasNodes([D]))return e.registerMutationListener(D,t=>Ht(e,[...t].filter(([,e])=>e!==`destroyed`).map(([e])=>e)))},[e]),(0,U.useEffect)(()=>{let t=()=>clearTimeout(c.current),n=()=>{t(),c.current=setTimeout(()=>r(null),Bt)},i=i=>{let a=i.target;if(a?.closest?.(`[data-heading-link]`))return t();let s=e.getRootElement(),c=a?.closest?.(`h2[id], h3[id]`);if(!s||!c||!s.contains(c))return n();t();let l=Vt(c);o(!1),r({id:c.id,left:l.right+window.scrollX+6,top:l.top+window.scrollY+(l.height-24)/2})};return document.addEventListener(`pointerover`,i),()=>{t(),document.removeEventListener(`pointerover`,i)}},[e]),!n)return null;let l=()=>{let e=Rt(t||Z().location.href,n.id);navigator.clipboard?.writeText(e),Lt(n.id),o(!0)},u=i(a?`document.headingLinkCopied`:`document.copyHeadingLink`);return(0,W.createPortal)((0,G.jsx)(`button`,{"aria-label":u,"data-heading-link":``,style:{left:n.left,top:n.top},title:u,type:`button`,onClick:l,onPointerDown:e=>e.preventDefault(),...{0:{className:`x10l6tqk xoegz02 xrvj5dj x1ku5rj1 xvy4d1p xxk0z11 x1717udv xc342km x1kogg8i xjbqb8w xj0l527 xddlp02 x157umkc x1in2gmu x1ypdohk x1de99jn xaatb59 x1y3gkto x1uczgqu x60py1w`},1:{className:`x10l6tqk xoegz02 xrvj5dj x1ku5rj1 xvy4d1p xxk0z11 x1717udv xc342km x1kogg8i xjbqb8w xj0l527 x1ypdohk x1de99jn xaatb59 x1y3gkto x1uczgqu x60py1w x1cge3fn`}}[!!a|0],children:a?(0,G.jsx)(s,{"aria-hidden":`true`,size:14}):(0,G.jsx)(d,{"aria-hidden":`true`,size:14})}),document.body)}var Wt=620,Gt=class extends U.Component{state={leaving:null,shown:null};static getDerivedStateFromProps(e,t){return e.history?.immersive?t.shown===e.history?null:{shown:e.history}:t.shown?{shown:null,leaving:t.shown}:null}host=null;paper=null;viewport=null;shell=null;entry=null;slide=null;exitTimer=null;getSnapshotBeforeUpdate(){return{rect:this.paper?.getBoundingClientRect()??null,x:window.scrollX,y:window.scrollY}}animate(e,t){if(!this.paper||!e||B()||typeof this.paper.animate!=`function`)return;this.slide?.cancel();let n=t??this.paper.getBoundingClientRect(),r=Math.max(56,e.top),i=parseFloat(getComputedStyle(this.paper).borderLeftWidth)||0,a=t?0:i,o=t?i:0;this.slide=this.paper.animate([{left:e.left-a+`px`,top:r-a+`px`,width:e.width+a*2+`px`,height:Math.min(e.height,window.innerHeight-r)+a+`px`},{left:n.left-o+`px`,top:n.top-o+`px`,width:n.width+o*2+`px`,height:n.height+o+`px`}],{duration:Wt,easing:We,fill:t?`forwards`:`none`}),this.slide.finished.catch(()=>{})}unlock=()=>{if(this.exitTimer&&clearTimeout(this.exitTimer),this.exitTimer=null,this.slide?.cancel(),this.slide=null,this.host&&(this.host.style.height=``),this.entry){let e=this.entry;document.documentElement.style.overflow=e.overflow,document.documentElement.style.scrollbarGutter=e.gutter,window.scrollTo(e.x,e.y)}this.entry=null};componentDidUpdate(e,t,n){let r=!!this.props.history?.immersive,i=!!e.history?.immersive;if(r&&!i)this.exitTimer&&clearTimeout(this.exitTimer),this.exitTimer=null,this.state.leaving&&this.setState({leaving:null}),this.entry||(this.entry={...n,focus:document.activeElement,overflow:document.documentElement.style.overflow,gutter:document.documentElement.style.scrollbarGutter,offset:Math.max(0,56-(n.rect?.top??56))},this.host&&(this.host.style.height=(n.rect?.height??0)+`px`)),n.rect&&this.shell?.style.setProperty(`--history-reading-width`,n.rect.width+`px`),document.documentElement.style.scrollbarGutter=`stable`,document.documentElement.style.overflow=`hidden`,this.viewport&&(this.viewport.scrollTop=this.entry.offset),this.animate(n.rect),this.shell?.querySelector(`[data-history-exit]`)?.focus({preventScroll:!0});else if(!r&&i&&this.entry){let e=this.entry;this.viewport&&(this.viewport.scrollTop=e.offset),window.scrollTo(e.x,e.y),e.focus?.focus({preventScroll:!0});let t=e.rect;t&&this.animate(n.rect,{left:t.left,top:Math.max(56,t.top),width:t.width,height:Math.min(t.height,window.innerHeight-Math.max(56,t.top))});let r=()=>{this.setState({leaving:null},()=>{this.unlock(),e.focus?.focus({preventScroll:!0})})};B()?r():this.exitTimer=setTimeout(r,Wt)}else!r&&!this.state.leaving&&(!e.history&&this.props.history&&(this.entry={...n,focus:null,overflow:document.documentElement.style.overflow,gutter:document.documentElement.style.scrollbarGutter,offset:0}),e.history&&!this.props.history&&this.entry&&(window.scrollTo(this.entry.x,this.entry.y),this.entry=null))}componentWillUnmount(){this.unlock()}trap=e=>{if(!this.props.history?.immersive||e.key!==`Tab`)return;let t=[...this.shell?.querySelectorAll(`button:not(:disabled),a[href],summary,[tabindex="0"]`)??[]].filter(e=>!e.closest(`[hidden],[aria-hidden="true"],[inert]`)),n=t[0],r=t.at(-1);e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())};render(){let{history:e,children:t}=this.props,n=e?.immersive?e:this.state.leaving,r=!!n,a=!!e?.ready;return(0,G.jsx)(`div`,{className:`history-body`,ref:e=>{this.host=e},children:(0,G.jsxs)(`div`,{"aria-label":e?.immersive?i(`history.title`):void 0,"aria-modal":e?.immersive?!0:void 0,className:`history-space-shell`,"data-immersive":r?``:void 0,"data-open":e?.immersive?``:void 0,inert:!(!this.state.leaving||e),role:e?.immersive?`dialog`:void 0,ref:e=>{this.shell=e},onKeyDown:this.trap,children:[n?.space,(0,G.jsx)(`div`,{className:`history-space-paper`,ref:e=>{this.paper=e},children:(0,G.jsxs)(`div`,{className:`history-space-scroll`,tabIndex:r?0:void 0,ref:e=>{this.viewport=e},children:[(0,G.jsx)(`div`,{className:`history-body-comparison`,"data-ready":a,hidden:!a,children:e?.content}),(0,G.jsx)(`div`,{hidden:a,children:t})]})})]})})}};function Kt({history:e,children:t}){let[n,r]=(0,U.useState)({current:e,panel:e?.panel??null});return n.current!==e&&r({current:e,panel:e?.panel??n.panel}),(0,U.useEffect)(()=>{if(e)return;let t=setTimeout(()=>{r(e=>e.current?e:{...e,panel:null})},B()?0:280);return()=>clearTimeout(t)},[e]),(0,G.jsx)(`div`,{className:`history-rail`,"data-moving":e||n.panel?``:void 0,"data-open":e?``:void 0,children:(0,G.jsxs)(`div`,{className:`history-rail-track`,children:[(0,G.jsx)(`div`,{"aria-hidden":e?!0:void 0,className:`history-rail-comments`,inert:!!e,children:t}),(0,G.jsx)(`div`,{"aria-hidden":!e||void 0,className:`history-rail-panel`,inert:!e,children:e?.panel??n.panel})]})})}var qt=(0,U.createContext)(!1),Jt=3e3;function Yt(e,t){let n=e.getRootElement()?.closest(`.history-body`)?.querySelector(`.history-body-comparison[data-ready="true"]`);if(n)return[...n.querySelectorAll(`[data-history-block-id]`)].find(e=>e.dataset.historyBlockId===t)?.querySelector(`.history-current :is(h1, h2, h3, h4, h5, h6)`)??null;let r=e.getEditorState().read(()=>j().getChildren().find(e=>A(e,F)===t)?.getKey());return r?e.getElementByKey(r):null}function Xt(e,t){let n=(0,U.useContext)(qt)?null:e,[r]=(0,U.useState)(It),i=(0,U.useRef)(r),a=(0,U.useRef)(r),o=(0,U.useRef)(void 0),s=(0,U.useRef)(null),c=(0,U.useRef)(null),l=(0,U.useCallback)(e=>{s.current=e,Lt(e)},[]),u=(0,U.useCallback)(e=>{let t=n&&Yt(n,e);return t?(o.current?.(),o.current=Y(t,()=>{i.current===e&&!a.current&&(i.current=null)}),!0):!1},[n]),d=(0,U.useCallback)(e=>{let t=n&&Yt(n,e);return t?(o.current?.(),Dt(t),i.current===e&&!a.current&&(i.current=null),!0):!1},[n]),f=(0,U.useCallback)(e=>{let t={lock:i.current,pending:a.current};i.current=e,a.current=null,u(e)?l(e):(i.current=t.lock,a.current=t.pending)},[u,l]);return(0,U.useEffect)(()=>{if(!n)return;let e=()=>{if(n.getRootElement()?.closest(`.history-space-shell[data-immersive]`))return;let e=a.current;e&&(a.current=null,v()?i.current===e&&(i.current=null):d(e)?c.current={blockId:e,until:Date.now()+Jt}:a.current=e)};e();let t=()=>{i.current=null,a.current=null,c.current=null},r=new ResizeObserver(()=>{if(n.getRootElement()?.closest(`.history-space-shell[data-immersive]`))return;let e=c.current;e&&(Date.now()>e.until?c.current=null:d(e.blockId))}),l=n.registerRootListener(e=>{r.disconnect(),e&&r.observe(e)}),u=Z(),f=()=>{let t=It();t&&t!==s.current&&!Qe(u.history.state)&&(i.current=t,a.current=t,e())},p=n.registerUpdateListener(e);return window.addEventListener(`wheel`,t,{passive:!0}),window.addEventListener(`touchmove`,t,{passive:!0}),window.addEventListener(`keydown`,t),u.addEventListener(`hashchange`,f),()=>{p(),l(),r.disconnect(),o.current?.(),window.removeEventListener(`wheel`,t),window.removeEventListener(`touchmove`,t),window.removeEventListener(`keydown`,t),u.removeEventListener(`hashchange`,f)}},[n,d]),(0,U.useEffect)(()=>{if(n){if(i.current){if(a.current||t!==i.current)return;i.current=null}else l(t)}},[t,n,l]),{scrollTo:f}}function Zt({editor:e}){return Xt(e,null),null}var Qt={h2:0,h3:1};function $t(){let e=[],t=null,n=null;for(let r of j().getChildren()){let i=ne(r)?r.getTag():void 0,a=A(r,F);if(i===`h1`){t={key:r.getKey(),blockId:a,text:r.getTextContent()},n=null;continue}let o=i===void 0?void 0:Qt[i];o!==void 0&&(n={key:r.getKey(),blockId:a,text:r.getTextContent(),depth:o,part:t,blocks:[]},e.push(n)),a&&n?.blocks.push(a)}return e}function en(e,t){let n=new Map;for(let t of e)for(let e of t.blocks)n.set(e,t.blockId);let r=new Set;for(let e of t)if(e.status===`open`)for(let t of Ve(e.anchor)){let e=n.get(t);e&&r.add(e)}return r}function tn(e){let t=new Set(e.map(e=>e.part?.key??null)).size>1,n=[],r;for(let i of e){let e=n.at(-1),a=i.part!==r;i.depth===0||!e||a?n.push({head:i,children:[],index:n.length,partStart:t&&a?i.part:null}):e.children.push(i),r=i.part}return n}var Q={toc:{kVAEAm:`x7wzq59`,kY2c9j:`x1w0boku`,k87sOh:`xossvpg`,kSGwAc:`x1y8v6su`,keoZOQ:`x1tfhste`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kskxy:`x1r4ahda`,k7Eaqz:`xeuugli`,kMv6JI:`xqfszdh`,kGuDYH:`x1ct8sxb`,kMwMTN:`x1bo0w0s`,$$css:!0},rail:{kzqmXN:`x1td3qas`,$$css:!0},list:{kAzted:`x2lwn1j`,kORKVm:`x1odjw0f`,kacamN:`x1e4zzel`,k5wCbM:`x1rohswg`,k8WAf4:`xj8oexa`,$$css:!0},item:{kVAEAm:`x1n2onr6`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x167g77z`,kzqmXN:`xh8yej3`,kZKoxP:`xlrawln`,kmVPX3:`x1717udv`,kMzoRj:`xc342km`,kaIpWk:`x1kogg8i`,kWkggS:`xjbqb8w`,kkrTdU:`x1ypdohk`,kMeerF:`x1de99jn`,k3XXqK:`xaatb59`,kInvED:`x1g40iwv`,kjBf7l:`x1uczgqu x60py1w`,$$css:!0},tick:{kmuXW:`x2lah0s`,kzqmXN:`xsmyaan`,kZKoxP:`x36qwtl`,keTefX:`xdwrcjd`,kaIpWk:`x1nj7uno`,kWkggS:`x174nbcu`,kmkexE:`x10iii20`,$$css:!0},tickH2:{kzqmXN:`xw4jnvo`,keTefX:`x1lziwak`,kWkggS:`xxwmxtg`,$$css:!0},tickActive:{kzqmXN:`xw4jnvo`,keTefX:`x1lziwak`,kWkggS:`x15az74h`,$$css:!0},tickDot:{keTefX:`x165d6jo`,$$css:!0},part:{kB7OPa:`x9f619`,kZKoxP:`x10w6t97`,kVQacm:`xb3r6kr`,kLKAdn:`xyinxu5`,kGuDYH:`x1j6dyjg`,k63SB2:`x1s688f`,kLWn49:`x1wfe3co`,kb6lSQ:`x16q24ku`,kMwMTN:`xddlp02`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,kmkexE:`x1un5det`,$$css:!0},partFirst:{kZKoxP:`xxk0z11`,kLKAdn:`x1yrsyyn`,$$css:!0},row:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x17d4w8g`,kzqmXN:`xh8yej3`,kZKoxP:`xlrawln`,kmVPX3:`x1717udv`,kMzoRj:`xc342km`,kaIpWk:`x12oqio5`,kWkggS:`xjbqb8w`,kMwMTN:`x1bo0w0s xytdrwj`,kVVagm:`xln7xf2`,k9WMMc:`x1yc453h`,kkrTdU:`x1ypdohk`,kmkexE:`x137m0jx x413zg9`,kMeerF:`x1de99jn`,k3XXqK:`xaatb59`,kInvED:`x1g40iwv`,kjBf7l:`x1uczgqu x60py1w`,$$css:!0},rowNested:{kZCmMZ:`x1onr9mi`,kGuDYH:`xfifm61`,kMwMTN:`xddlp02 xytdrwj`,$$css:!0},rowCurrent:{kZKoxP:`x1fgtraw`,kGuDYH:`x2ouz8m`,k63SB2:`x1s688f`,kMwMTN:`xo2rkog xytdrwj`,$$css:!0},rowActive:{k63SB2:`x1s688f`,kMwMTN:`x1cge3fn x157umkc`,$$css:!0},rowText:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},count:{kmuXW:`x2lah0s`,kGuDYH:`x1j6dyjg`,k63SB2:`xo1l8bm`,kMwMTN:`xc7n51q`,kcqcaj:`xss6m8b`,$$css:!0},fold:{k1xSpc:`xrvj5dj`,k9llMU:`xihq33y`,k33iCy:`xlshs6z`,kSiTet:`xg01cxk`,kmkexE:`x1u0be13 x9kvfbb`,$$css:!0},foldOpen:{k9llMU:`x1tu4anv`,k33iCy:`xnpuxes`,kSiTet:`x1hc1fzr`,kmkexE:`xjgrksx x9kvfbb`,$$css:!0},foldRows:{kAzted:`x2lwn1j`,kVQacm:`xb3r6kr`,k3aq6I:`x1bvilyr`,kmkexE:`x1pagzdl x9kvfbb`,$$css:!0},foldRowsOpen:{k3aq6I:`x1c071of`,kmkexE:`x94wcrn x9kvfbb`,$$css:!0},fadeNear:{kSiTet:`xiiclqw`,$$css:!0},fadeMid:{kSiTet:`xf9vgkq`,$$css:!0},fadeFar:{kSiTet:`x197sbye`,$$css:!0},dot:{kmuXW:`x2lah0s`,kzqmXN:`x1ftt334`,kZKoxP:`x1ycjhwn`,kaIpWk:`x16rqkct`,kWkggS:`xzkukvh`,$$css:!0},card:{kVAEAm:`x10l6tqk`,kY2c9j:`x1w0boku`,k87sOh:`xn0lweg`,kbCHJM:`x6f9vd5`,kzqmXN:`x1hfn5x7`,kskxy:`x1r4ahda`,kORKVm:`x1odjw0f`,kB7OPa:`x9f619`,k8WAf4:`x1vvogim`,kg3NbH:`xaope02`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`xgcsv5v`,kaIpWk:`x1q4ynmn`,kWkggS:`x12ilycc`,kGVxlE:`x1d5q07e`,$$css:!0}},nn=120,rn=200,an=150,on=new Set;function sn(e,t){let[n,r]=(0,U.useState)({key:null,reading:!1});return(0,U.useEffect)(()=>{if(!e)return;let n=()=>{if(e.getRootElement()?.closest(`.history-space-shell[data-immersive]`))return;let n=t[0]?.key??null,i=!1;for(let r of t){let t=r.blockId?Yt(e,r.blockId):e.getElementByKey(r.key);t&&t.getBoundingClientRect().top<nn&&(n=r.key,i=!0)}r(e=>e.key===n&&e.reading===i?e:{key:n,reading:i})};return n(),window.addEventListener(`scroll`,n,{passive:!0}),()=>window.removeEventListener(`scroll`,n)},[e,t]),n}function cn(e,t,n){(0,U.useEffect)(()=>{let n=()=>{let n=e.current,r=t.current;if(!n||!r)return;let i=n.getBoundingClientRect(),a=r.getBoundingClientRect();(a.top<i.top||a.bottom>i.bottom)&&(n.scrollTop=Math.max(0,n.scrollTop+a.top-i.top-(n.clientHeight-a.height)/2))};return n(),window.addEventListener(`scroll`,n,{passive:!0}),window.addEventListener(`resize`,n),()=>{window.removeEventListener(`scroll`,n),window.removeEventListener(`resize`,n)}},n)}function ln({editor:e,threads:t=[],variant:r=`column`}){let[a,o]=(0,U.useState)([]),[s,c]=(0,U.useState)(!1),[l,u]=(0,U.useState)(on),d=(0,U.useRef)(void 0),f=(0,U.useRef)(void 0),p=(0,U.useRef)(null),m=(0,U.useRef)(null);(0,U.useEffect)(()=>{if(!e)return;let t=()=>o(e.getEditorState().read($t));return t(),e.registerUpdateListener(t)},[e]);let h=sn(e,a),g=a.find(e=>e.key===h.key),{scrollTo:_}=Xt(e,h.reading&&g?.blockId?g.blockId:null),v=(0,U.useMemo)(()=>en(a,t),[a,t]),y=(0,U.useMemo)(()=>tn(a),[a]);cn(p,m,[h.key,a]),(0,U.useEffect)(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]);let b=y.find(e=>e.head.key===h.key||e.children.some(e=>e.key===h.key)),x=b?.head.key??null,[S,C]=(0,U.useState)(x),w=e=>u(t=>t.has(e)?t:new Set(t).add(e));S!==x&&(C(x),s&&S&&w(S));let T=()=>{clearTimeout(d.current),c(!0)},E=()=>{clearTimeout(d.current),clearTimeout(f.current),d.current=setTimeout(()=>{c(!1),u(on)},rn)},D=e=>{clearTimeout(f.current),f.current=setTimeout(()=>w(e),an)},O=t=>{if(t.blockId)return _(t.blockId);let n=e?.getElementByKey(t.key);n&&Y(n)};if(r===`hidden`)return null;if(a.length===0)return(0,G.jsx)(`nav`,{"data-variant":r,...n(Q.toc)});let k=r===`rail`,A=e=>y.map(t=>{let{head:r,children:i}=t,a=t===b,o=a||l.has(r.key),c=b?Math.abs(t.index-b.index):0,u=e!==`column`||s||c===0?null:c===1?Q.fadeNear:c<=3?Q.fadeMid:Q.fadeFar,d=(t,r,i,o,s=!1)=>{let c=t.key===h.key,l=e===`card`,d=o?(0,G.jsx)(`span`,{"data-commented":``,...n(Q.dot,e===`ticks`&&Q.tickDot)}):null;return(0,G.jsxs)(`button`,{"aria-current":c&&!l?`location`:void 0,"aria-label":t.text,ref:c&&!l?m:void 0,tabIndex:l?-1:void 0,type:`button`,onClick:()=>O(t),onFocus:s?()=>w(t.key):void 0,onPointerEnter:s?()=>D(t.key):void 0,onPointerLeave:s?()=>clearTimeout(f.current):void 0,...n(e===`ticks`?Q.item:Q.row,e!==`ticks`&&r&&Q.rowNested,!r&&a&&Q.rowCurrent,e!==`ticks`&&c&&Q.rowActive,!r&&u),children:[e===`ticks`?(0,G.jsx)(`span`,{...n(Q.tick,!r&&Q.tickH2,c&&Q.tickActive)}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{...n(Q.rowText),children:t.text}),i>0?(0,G.jsx)(`span`,{...n(Q.count),children:i}):null]}),d]},t.key)},p=!o&&i.some(e=>v.has(e.blockId));return(0,G.jsxs)(U.Fragment,{children:[t.partStart?(0,G.jsx)(`div`,{"aria-hidden":e===`ticks`||void 0,...n(Q.part,t.index===0&&Q.partFirst,u),children:e===`ticks`?null:t.partStart.text}):null,d(r,!1,o?0:i.length,v.has(r.blockId)||p,i.length>0),i.length>0?(0,G.jsx)(`div`,{inert:!o,...n(Q.fold,o&&Q.foldOpen),children:(0,G.jsx)(`div`,{...n(Q.foldRows,o&&Q.foldRowsOpen),children:i.map(e=>d(e,!0,0,v.has(e.blockId)))})}):null]},r.key)});return(0,G.jsxs)(`nav`,{"aria-label":i(`document.toc`),"data-expanded":s?`true`:`false`,"data-variant":r,onFocus:T,onPointerEnter:T,onPointerLeave:E,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||E()},...n(Q.toc,k&&Q.rail),children:[(0,G.jsx)(`div`,{"data-toc-list":``,ref:p,...n(Q.list),children:A(k?`ticks`:`column`)}),k&&s?(0,G.jsx)(`div`,{"data-toc-card":``,ref:e=>{e&&p.current&&(e.scrollTop=p.current.scrollTop)},...n(Q.card),children:A(`card`)}):null]})}var un=`.rich-table-scrollable-wrapper, .ryugi-mermaid-preview`;function dn(e,t){let n=e.getBoundingClientRect().right;return[...e.querySelectorAll(un)].map(e=>e.getBoundingClientRect()).filter(e=>e.right>n+1).map(e=>({top:e.top-t,bottom:e.bottom-t}))}var fn=(e,t)=>e.length===t.length&&e.every((e,n)=>e.top===t[n].top&&e.bottom===t[n].bottom);function pn(e,t){let[n,r]=(0,U.useState)([]);return(0,U.useEffect)(()=>{let n=e?.getRootElement();if(!e||!t||!n)return;let i=()=>{let e=t.getBoundingClientRect().top-t.scrollTop,i=dn(n,e);r(e=>fn(e,i)?e:i)};i();let a=0,o=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(i)},s=e.registerUpdateListener(o),c=new ResizeObserver(o);return c.observe(t),c.observe(n),()=>{cancelAnimationFrame(a),s(),c.disconnect()}},[e,t]),n}var mn=56,hn=40;function gn(e,t,n){return n>=e.top&&n<=Math.max(e.bottom,e.top+hn)&&t<=e.right+mn}function _n(e){return Math.max(e.getBoundingClientRect().right,...[...e.querySelectorAll(un)].map(e=>e.getBoundingClientRect().right))}function vn(e,t){let n=e.getRootElement(),r=t instanceof Element?t:null;for(;r&&r.parentElement!==n;)r=r.parentElement;return n&&r instanceof HTMLElement?r:null}function yn(e,t){let n=vn(e,t);return n?bn(e,n):null}function bn(e,t){return e.read(()=>{for(let n of j().getChildren())if(e.getElementByKey(n.getKey())===t)return A(n,F)||null;return null})}function xn(e,t,n){let[r,i]=(0,U.useState)(null);return(0,U.useEffect)(()=>{if(!e||!t||!n){i(null);return}let r=0,a=null,o=e=>{e?.element!==a?.element&&(a=e,i(e))},s=()=>{cancelAnimationFrame(r),o(null)},c=t=>{if(cancelAnimationFrame(r),t.pointerType!==`mouse`&&t.pointerType!==`pen`||t.buttons!==0)return o(null);let{target:n,clientX:i,clientY:s}=t;r=requestAnimationFrame(()=>{let t=vn(e,n);if(t){if(t===a?.element)return;let n=bn(e,t);return o(n?{id:n,element:t}:null)}if(a){let{top:e,bottom:t}=a.element.getBoundingClientRect();if(gn({top:e,bottom:t,right:_n(a.element)},i,s))return}o(null)})};return document.addEventListener(`pointermove`,c),document.addEventListener(`scroll`,s,!0),document.documentElement.addEventListener(`pointerleave`,s),()=>{cancelAnimationFrame(r),document.removeEventListener(`pointermove`,c),document.removeEventListener(`scroll`,s,!0),document.documentElement.removeEventListener(`pointerleave`,s)}},[e,t,n]),(0,U.useMemo)(()=>{if(!r||!t||!n||!r.element.isConnected)return null;let e=r.element.getBoundingClientRect(),i=t.getBoundingClientRect(),a=document.createRange();return a.selectNodeContents(r.element),{kind:`block`,blockId:r.id,quote:``,elements:[r.element],range:a,left:e.left-i.left,right:_n(r.element)-i.left,top:e.top-i.top,bottom:e.bottom-i.top}},[r,t,n])}var Sn=80,Cn=240,wn=e=>{let t=/matrix\(([^)]+)\)/.exec(getComputedStyle(e).transform);return t?Number(t[1].split(`,`)[4]):0};function Tn(e,t){let n=t.offsetLeft,r=null,i=()=>{let i=n-t.offsetLeft;if(n=t.offsetLeft,!i||B()||!r&&Math.abs(i)<Sn)return;let a=i+(r?wn(t):0),o={duration:Cn,easing:We};if(r)r.cancel();else for(let n of e.children)n!==t&&Ue(n,[{opacity:0},{opacity:1}],o);let s=t.animate([{transform:`translateX(${a}px)`},{transform:`none`}],o);r=s,s.finished.then(()=>{r===s&&(r=null)},()=>void 0)},a=new ResizeObserver(i);return a.observe(e),{settle:i,stop:()=>a.disconnect()}}function En({editor:e,threads:t,actions:n,agent:r,diagram:i,onMain:a,overlay:o,history:s,shareBase:c,children:l}){let[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(null),[m,h]=(0,U.useState)(null),[g,_]=(0,U.useState)(null),v=(0,U.useCallback)(e=>{_(e),a?.(e)},[a]),y=(0,U.useRef)(null);(0,U.useEffect)(()=>{if(!g||!m)return;let e=Tn(g,m);return y.current=e,()=>{y.current=null,e.stop()}},[g,m]);let b=He(`(max-width: 1100px)`),x=!He(`(max-width: 1480px)`),S=b?`hidden`:x?`column`:`rail`,[C,w]=(0,U.useState)(0),T=St(e,t,u,C),E=(0,U.useMemo)(()=>i&&e&&!s?{threads:t,activeId:f,draft:i.draft,pick:i.pick,readOnly:i.readOnly,blockAction:i.blockAction,viewer:{actions:n,agent:r,create:i.create,drafts:i.drafts},activate:p,marked:()=>w(e=>e+1),blockIdOf:t=>yn(e,t)}:null,[i,e,s,t,f,n,r]),D=pn(e,b||s?null:u);return Ct(T,t,f),(0,U.useLayoutEffect)(()=>y.current?.settle(),[S]),(0,G.jsxs)(`main`,{ref:v,...{0:{className:`x1n2onr6 xrvj5dj xc94fvo xl56j7k xwaa2ar x13zrc24 x1ffnkcp x4l9tsp`},2:{className:`x1n2onr6 xrvj5dj xl56j7k xwaa2ar x13zrc24 x1ffnkcp x4l9tsp xoiau2f`},1:{className:`x1n2onr6 xc94fvo xl56j7k xwaa2ar x13zrc24 x1ffnkcp x78zum5 xdt5ytf x1qjc9v5 x17qtykl`},3:{className:`x1n2onr6 xl56j7k xwaa2ar x13zrc24 x1ffnkcp xoiau2f x78zum5 xdt5ytf x1qjc9v5 x17qtykl`}}[(S===`rail`)<<1|!!b],children:[(0,G.jsx)(`div`,{className:`history-space-toc`,inert:!!s?.immersive,children:(0,G.jsx)(ln,{editor:e,threads:t,variant:S})}),e?(0,G.jsx)(Ut,{editor:e,shareBase:c}):null,(0,G.jsxs)(`article`,{ref:h,className:`x1n2onr6 x1vjfegm xh8yej3 xrgej4m xeuugli`,style:b?{marginInline:`auto`}:s?void 0:{"--ryugi-table-bleed":`368px`},onClick:e=>p(Tt(T,e.clientX,e.clientY)),children:[(0,G.jsx)(it,{}),(0,G.jsx)(ce,{value:E,children:(0,G.jsx)(Gt,{history:s,children:l})}),s?null:(0,G.jsx)(Mt,{activeId:f,anchors:T,container:m,threads:t})]}),(0,G.jsx)(`div`,{className:`x1n2onr6`,className:`history-space-comments ${{className:`x1n2onr6`}.className??``}`,inert:!!s?.immersive,children:(0,G.jsx)(Kt,{history:s?.immersive?null:s,children:(0,G.jsx)(jt,{actions:n,activeId:f,agent:r,anchors:T,blocked:D,narrow:b,railRef:d,threads:t,onActivate:p})})}),m&&o&&!s?o(m):null]})}function Dn({left:e,top:t,quote:n,wholeBlock:r,initial:a,restored:o,leaving:s,onChange:c,onSubmit:l,onCancel:u,ref:d}){return(0,G.jsx)(`div`,{ref:d,...{0:{className:`x10l6tqk x1u8a7rm xj6ak53 xowlrko xllfotl xatqbsq x1u6ievf`},1:{className:`x10l6tqk x1u8a7rm xj6ak53 x1u6ievf xxp0q0x x12l1aco xn0cd8s x47corl`}}[!!s|0],style:{left:e,top:t},children:(0,G.jsxs)(me,{active:!0,children:[(0,G.jsxs)(`div`,{className:`x78zum5 x1pha0wt x167g77z xz9dl7a x1hr3lfm xqfszdh x1j6dyjg`,children:[(0,G.jsx)(`span`,{className:`x98rzlu xeuugli xb3r6kr xuxw1ft xlyipyv xddlp02`,children:r?n:`“${n}”`}),o?(0,G.jsx)(`span`,{className:`x2lah0s x7zghnd`,children:i(`document.draftRestored`)}):null]}),(0,G.jsx)(Le,{autoFocus:!0,initial:a,placeholder:i(`document.draftPlaceholder`),onCancel:u,onChange:c,onSubmit:l})]})})}function On(e){let t=(0,U.useMemo)(Oe,[]),[n,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(!1),o=(0,U.useRef)(``),s=(0,U.useRef)(0),c=(0,U.useRef)(null),l=(0,U.useRef)(null);wt(i?null:n?.target.range??null,i?void 0:n?.target.elements);let u=(0,U.useCallback)(n=>{window.clearTimeout(s.current);let i=t.take(P(n.blockId,n.quote,n.blockIds,n.textRanges,n.diagram));o.current=i,a(!1),r({target:n,initial:i}),window.getSelection()?.removeAllRanges(),e()},[t,e]),d=(0,U.useCallback)(e=>{n&&(t.save(P(n.target.blockId,n.target.quote,n.target.blockIds,n.target.textRanges,n.target.diagram),e?o.current:``),a(!0),s.current=window.setTimeout(()=>{r(null),a(!1)},120))},[n,t]);return(0,U.useEffect)(()=>{if(!n||i)return;let e=e=>{let t=e.target;c.current?.contains(t)||l.current?.contains(t)||d(!0)};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[n,i,d]),(0,U.useEffect)(()=>()=>window.clearTimeout(s.current),[]),{drafts:t,draft:n,leaving:i,restored:!!n?.initial,open:u,close:d,onText:e=>{o.current=e},panelRef:c,toolbarRef:l}}var kn=46;function An(e,t){return Math.min(e+8,window.innerWidth-(t.offsetParent?.getBoundingClientRect().left??0)-40)}function jn({article:e,editor:t,enabled:n,onComment:r}){let i=xn(t,e.closest(`main`),n);return i?(0,G.jsx)(de,{left:An(i.right,e),top:i.top,onComment:()=>r(i)}):null}function Mn({blockId:e,element:t,node:n,host:r}){let i=r.closest(`main`);if(!i)return null;let a=n.getBoundingClientRect(),o=i.getBoundingClientRect(),s=document.createRange();return s.setStart(r,0),{blockId:e,quote:t.label,diagram:t.target,range:s,left:a.left-o.left,right:a.right-o.left,top:a.top-o.top,bottom:a.bottom-o.top}}function Nn(e){return{left:e.offsetLeft,right:Math.min(e.offsetLeft+e.offsetWidth,window.innerWidth-16)}}function Pn({editor:e,threads:t,actions:n,agent:r,canComment:i,canCommentDiagram:a=i,selection:o,clearSelection:s,resolveSelection:c,onCreate:l,onMain:u,onToolbar:d,history:f,shareBase:p,children:m}){let h=On(s),{draft:g,open:_}=h,[v,y]=(0,U.useState)(null),[b,x]=(0,U.useState)(0);(0,U.useLayoutEffect)(()=>{if(!v||f)return;let t=()=>{let t=v.querySelector(`.ryugi-editor-toolbar`);t?x(t.getBoundingClientRect().height):e?.isEditable()||x(0)};t();let n=new MutationObserver(t);return n.observe(v,{childList:!0}),()=>n.disconnect()},[v,f,e]),(0,U.useEffect)(()=>{if(!v||!d)return;let e=()=>d(v.querySelector(`.ryugi-editor-toolbar, .history-bar`)!==null);e();let t=new MutationObserver(e);return t.observe(v,{childList:!0}),()=>{t.disconnect(),d(!1)}},[v,d]);let S=h.leaving?null:g?.target??null,{drafts:C}=h,w=(0,U.useMemo)(()=>({draft:S,drafts:C,readOnly:!a,blockAction:i,pick:e=>{let t=Mn(e);t&&_(t)},create:(e,t)=>l({...e,range:document.createRange(),left:0,right:0,top:0,bottom:0},t)}),[i,a,S,C,_,l]),T=(0,U.useCallback)(()=>{let e=window.getSelection();navigator.clipboard?.writeText(e?.toString()??``),e?.removeAllRanges(),s()},[s]),E=(0,U.useMemo)(()=>({toolbarSlot:v,selectionActions:g?null:(0,G.jsx)(pe,{onCopy:T,onComment:i?()=>{let e=c();e&&_(e)}:void 0})}),[v,g,i,c,_,T]);return(0,G.jsxs)(Ee,{value:E,children:[(0,G.jsx)(`div`,{className:`ryugi-editor-toolbar-slot`,ref:y,children:b>0?(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`history-toolbar-space`,style:{height:b}}):null}),(0,G.jsx)(En,{actions:n,agent:r,diagram:w,editor:e,history:f,shareBase:p,threads:t,overlay:t=>(0,G.jsxs)(G.Fragment,{children:[o&&!g&&o.kind===`block`&&i?(0,G.jsx)(de,{left:An(o.right,t),ref:h.toolbarRef,top:o.top,onComment:()=>h.open(o)}):null,(0,G.jsx)(jn,{article:t,editor:e,enabled:i&&!g&&!o,onComment:h.open}),o&&!g&&o.kind===`nested`?(0,G.jsx)(ae,{left:o.left,ref:h.toolbarRef,top:Math.max(o.top-kn,0),children:(0,G.jsx)(pe,{onComment:i?()=>h.open(o):void 0,onCopy:T})}):null,g?(0,G.jsx)(Dn,{ref:h.panelRef,...ht(g.target,Nn(t),340,8),initial:g.initial,leaving:h.leaving,quote:ge(g.target),restored:h.restored,wholeBlock:g.target.kind===`block`,onCancel:()=>h.close(!0),onChange:h.onText,onSubmit:e=>l(g.target,e).then(e=>(e&&h.close(!1),e))},P(g.target.blockId,g.target.quote,g.target.blockIds,g.target.textRanges,g.target.diagram)):null]}),onMain:u,children:m})]})}function Fn(e){let t=ee(e);return t._headless=!0,[`registerDecoratorListener`,`registerRootListener`,`registerMutationListener`,`getRootElement`,`setRootElement`,`getElementByKey`,`focus`,`blur`].forEach(e=>{t[e]=()=>{(function(e,...t){throw function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e,...t)})(439,e)}}),t}function In({text:e}){let t=(0,U.useRef)(null),n=(0,U.useRef)(null);return(0,U.useEffect)(()=>{let r=t.current;if(!r)return;let i=r.parentNode;if(!i)return;let a=n.current;return!a||a.parentNode!==i?(a=document.createComment(e),i.insertBefore(a,r),n.current=a):a.data!==e&&(a.data=e),()=>{n.current?.parentNode&&n.current.parentNode.removeChild(n.current),n.current=null}},[e]),(0,G.jsx)(`template`,{suppressHydrationWarning:!0,"data-rich-comment-anchor":``,ref:t})}var $=e=>`${R[e]} ${L[e]}`,Ln={h1:$(`headingH1`),h2:$(`headingH2`),h3:$(`headingH3`),h4:$(`headingH4`),h5:$(`headingH5`),h6:$(`headingH6`)};function Rn(e){return e.toLowerCase().trim().replaceAll(/[^\s\w\u3000-\u9FFF\uAC00-\uD7AF\uFF00-\uFFEF-]/g,``).replaceAll(/[\s_]+/g,`-`).replaceAll(/^-+|-+$/g,``)}function zn(e){return e.type===`comment`?``:e.text?e.text:e.children?e.children.map(zn).join(``):``}var Bn=/^["'«‘“‹「『"']/,Vn=/["'»’”›」』"']$/;function Hn(e,t,n,r,i,a){switch(e.type){case`root`:return(0,G.jsx)(G.Fragment,{children:n});case`paragraph`:{let r=e.format?{textAlign:e.format}:void 0;return(0,G.jsx)(`p`,{className:$(`paragraph`),style:r,children:n??(0,G.jsx)(`br`,{})},t)}case`heading`:{let o=e.tag,s=Rn(i||zn(e)),c=a??s;if(a===void 0&&s){let e=r.get(s);e===void 0?r.set(s,1):(c=`${s}-${e}`,r.set(s,e+1))}return(0,G.jsxs)(o,{className:Ln[o],id:c||void 0,children:[c&&(0,G.jsx)(`a`,{className:$(`headingAnchor`),href:`#${c}`,tabIndex:0,children:(0,G.jsx)(_,{"aria-hidden":!0,size:14,strokeWidth:2})}),n]},t)}case`rich-quote`:case`quote`:{let r=(i||zn(e)).trim(),a=Bn.test(r),o=Vn.test(r),s=e.attribution;return(0,G.jsxs)(`blockquote`,{className:$(`quote`),"data-no-close-quote":o?``:void 0,"data-no-open-quote":a?``:void 0,children:[n,s&&(0,G.jsxs)(`footer`,{className:$(`quoteAttribution`),children:[`— `,s]})]},t)}case`list`:{let r=e.listType===`number`?`ol`:`ul`,i=e.listType===`number`?$(`listOl`):e.listType===`check`?`${$(`checklist`)} ${$(`listUl`)}`:$(`listUl`);return(0,G.jsx)(r,{className:i,start:e.start===1?void 0:e.start,children:n},t)}case`listitem`:{let r=e.checked!==void 0,i=e.children?.some(e=>e.type===`list`),a=typeof e.value==`number`&&e.value>1?e.value:void 0,o;return o=i?$(`listNestedItem`):r?e.checked?`${$(`listItem`)} ${$(`listItemChecked`)}`:`${$(`listItem`)} ${$(`listItemUnchecked`)}`:$(`listItem`),(0,G.jsx)(`li`,{className:o,value:a,children:n},t)}case`link`:return(0,G.jsxs)(`a`,{className:$(`link`),href:e.url,rel:e.rel||`noopener`,target:e.target||`_blank`,children:[(0,G.jsx)(le,{href:e.url}),n]},t);case`autolink`:return(0,G.jsxs)(`a`,{className:$(`link`),href:e.url,rel:`noopener`,target:`_blank`,children:[(0,G.jsx)(le,{href:e.url}),n]},t);case`horizontalrule`:return(0,G.jsx)(`hr`,{className:$(`hr`)},t);case`table`:return(0,G.jsx)(`div`,{className:$(`tableScrollableWrapper`),children:(0,G.jsx)(`table`,{className:$(`table`),children:n})},t);case`tablerow`:return(0,G.jsx)(`tr`,{children:n},t);case`tablecell`:{let r=e.headerState?`th`:`td`,i=e.headerState?$(`tableCellHeader`):$(`tableCell`);return(0,G.jsx)(r,{className:i,colSpan:e.colSpan>1?e.colSpan:void 0,children:n},t)}case`details`:{let r=e.summary||``;return(0,G.jsxs)(`details`,{className:`${I.details} ${M.details}`,open:e.open||void 0,children:[(0,G.jsxs)(`summary`,{className:`${I.summary} ${M.summary}`,children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`${I.chevron} ${M.chevron}`,children:(0,G.jsx)(`svg`,{fill:`none`,height:`20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,viewBox:`0 0 20 20`,width:`20`,children:(0,G.jsx)(`path`,{d:`M8 6L12 10L8 14`})})}),(0,G.jsx)(`span`,{className:`${I.summaryText} ${M.summaryText}`,children:r})]}),(0,G.jsx)(`div`,{className:`${I.content} ${M.content}`,children:n})]},t)}case`spoiler`:return(0,G.jsx)(`span`,{className:$(`spoiler`),role:`button`,tabIndex:0,children:n},t);case`tag`:return(0,G.jsx)(`span`,{className:$(`tag`),style:{backgroundColor:De(e.text)},children:e.text},t);case`comment`:return(0,G.jsx)(In,{text:e.text??``},t);case`ruby`:return(0,U.createElement)(Te,{key:t,rendererKey:`Ruby`,defaultRenderer:fe,props:{reading:e.reading??``,children:n}});case`code`:return(0,G.jsx)(`pre`,{className:`rich-code-block`,children:(0,G.jsx)(`code`,{children:n})},t);case`code-highlight`:return(0,G.jsx)(`span`,{children:e.text},t);case`linebreak`:return(0,G.jsx)(`br`,{},t);case`tab`:return(0,G.jsx)(`span`,{children:` `},t);default:return null}}var Un=e=>`${R[e]} ${L[e]}`,Wn=[[1,`textBold`],[2,`textItalic`],[4,`textStrikethrough`],[8,`textUnderline`],[16,`textCode`],[32,`textSubscript`],[64,`textSuperscript`],[128,`textHighlight`]];function Gn(e){let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e===-1)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();if(!r||!i)continue;let a=r.replaceAll(/-([a-z])/g,(e,t)=>t.toUpperCase());t[a]=i}return t}function Kn(e,t){let n=e.text,r=e.format||0;for(let[e,i]of Wn)r&e&&(n=(0,G.jsx)(`span`,{className:Un(i),children:n},`${t}-${e}`));return e.style&&(n=(0,G.jsx)(`span`,{style:Gn(e.style),children:n},t)),n}function qn(e,t=!1){let n=[],r=t?e.findIndex(e=>e.type===`paragraph`):-1,i=e=>e.type===`image`&&typeof e.layout==`string`&&e.layout.startsWith(`float-`);for(let t=0;t<e.length;t++){let a=[t];if(t===r&&t+1<e.length&&a.push(++t),i(e[t]))for(;++t<e.length;){a.push(t);let n=e[t];if(!i(n)&&![`paragraph`,`list`,`quote`,`rich-quote`,`comment`].includes(n.type))break}n.push(a)}let a=[];for(let t of n)a.length&&t.every(t=>e[t].type===`comment`)||a.at(-1)?.every(t=>e[t].type===`comment`)?a.at(-1).push(...t):a.push(t);return a}function Jn(e){let t={},n=new Set,r={},i=1;function a(e){if(e.type===`footnote`&&e.identifier){let t=e.identifier;n.has(t)||(n.add(t),r[t]=i++)}if(e.type===`footnote-section`&&e.definitions&&Object.assign(t,e.definitions),e.children)for(let t of e.children)a(t);if(e.root&&a(e.root),e.content&&typeof e.content==`object`&&e.content.root&&a(e.content),e.cells&&Array.isArray(e.cells))for(let t of e.cells)t&&t.root&&a(t)}a(e);for(let e of n)e in t||(t[e]=``);return{definitions:t,displayNumberMap:r}}var Yn=e=>`${R.alert} ${L.alert} rich-alert-${e}`;function Xn(e,t,n){switch(e.type){case`alert-quote`:return(0,U.createElement)(`div`,{key:t,className:Yn(e.alertType)},n);case`banner`:return(0,U.createElement)(`div`,{key:t,className:`rich-banner rich-banner-${e.bannerType}`},n);case`grid-container`:return(0,U.createElement)(`div`,{key:t,className:`${we.container} ${Ne.container}`},n);default:return(0,U.isValidElement)(n)?(0,U.cloneElement)(n,{key:t}):n}}function Zn(e,t,n){return(0,U.isValidElement)(e)&&typeof e.type==`string`?(0,U.cloneElement)(e,{"data-block-id":t}):(0,G.jsx)(`div`,{className:`rich-block-anchor`,"data-block-id":t,children:e},`${n}-block-anchor`)}function Qn(e,t,n,r){return t?(r.blockAnchor??Zn)(e,t,n):e}function $n(e,t,n,r,i,a,o){let s=o.recycleKeys?i:e.getKey?e.getKey():i,c=o.headingIds?.get(e.getKey?.()),{builtinNodeOverrides:l}=o;if(typeof e.decorate==`function`){let r=null;try{r=e.decorate(t,n)}catch{}if(r!=null){let t=e.exportJSON?e.exportJSON():{},n=l?.[t.type];return Qn(n?n(t,s,[r],()=>Xn(t,s,r)):Xn(t,s,r),a,s,o)}}let u=e.exportJSON?e.exportJSON():{};if(u.type===`text`){let e=l?.text;return e?e(u,s,null,()=>Kn(u,s)):Kn(u,s)}let d=typeof e.getChildren==`function`?e.getChildren():[];Array.isArray(u.children)&&u.children.length===0&&d.length>0&&(u.children=d.map(e=>({type:typeof e.getType==`function`?e.getType():e.__type})));let f=null;d.length>0&&(f=d.map((e,i)=>$n(e,t,n,r,`${s}-${i}`,void 0,o)));let p=e.getTextContent?e.getTextContent():void 0,m=l?.[u.type];return Qn(m?m(u,s,f,()=>Hn(u,s,f,r,p,c)):Hn(u,s,f,r,p,c),a,s,o)}function er(e,t,n,r){let i=Fn({nodes:t,theme:z,editable:!1,onError:e=>{console.error(`[RichRenderer]`,e)}}),a={namespace:`ssr`,theme:z},o=ve(e),s=i.parseEditorState(o);i.setEditorState(s);let c=Jn(o),l=o.root?.children,u=new Map,d=new Map,f=new Map,p=s.read(()=>{let e=new Map,t=(n,r,i)=>{if(f.set(n.getKey(),i),n.getType()===`heading`){let t=Rn(n.getTextContent()),i=e.get(t)??0,a=t?`${t}${i?`-${i}`:``}`:``;e.set(t,i+1),u.set(n.getKey(),a),a&&d.set(a,r)}te(n)&&n.getChildren().forEach((e,n)=>t(e,r,`${i}.${n}`))},n=j().getChildren();return n.forEach((e,n)=>t(e,n,`${n}:0`)),n}),m=new Set,h=p.map((e,t)=>{let n=l?.[t]??{type:e.getType(),version:1},r=n.$?.blockId??`renderer-${t}`;for(;m.has(r);)r=`${r}:${t}`;return m.add(r),{id:r,data:n,index:t,pool:`${n.type}:${n.type===`dynamic`?n.url:n.tag??``}`}}),g=qn(h.map(e=>e.data),r),_=new Map,v=g.map((e,t)=>{let n=e.map(e=>(_.set(e,t),h[e])),r=n[0];return{blocks:n,id:r.id,data:n.length===1?r.data:{type:`flow-group`,version:1,children:n.map(e=>e.data)},pool:n.length===1?r.pool:`flow-group`}});for(let[e,t]of d)d.set(e,_.get(t));let y=(e,t)=>s.read(()=>{let r=v[e];return r?(0,G.jsx)(U.Fragment,{children:r.blocks.map((e,r)=>$n(p[e.index],i,a,new Map,t===void 0?`ssr-${e.index}`:`recycler-${t}-${r}`,l?.[e.index]?.$?.blockId,{...n,headingIds:u,recycleKeys:t!==void 0}))},t===void 0?r.id:`recycler-${t}`):null}),b;return{document:{editor:i,rows:v,headingRows:d,render:y,renderAll:()=>b??=(0,G.jsx)(G.Fragment,{children:v.map((e,t)=>y(t))}),nodePath:e=>e?f.get(e)??e:`0`},footnoteData:c,renderNestedContent:e=>{let r=Fn({nodes:t,theme:z,editable:!1,onError:e=>{console.error(`[RichRenderer:nested]`,e)}}),i={namespace:`ssr-nested`,theme:z},a=ve(e),o=r.parseEditorState(a);r.setEditorState(o);let s=null,c=a.root?.children;return o.read(()=>{let e=j(),t=new Map,a=e.getChildren().map((e,a)=>$n(e,r,i,t,`nested-${a}`,c?.[a]?.$?.blockId,n));s=(0,G.jsx)(G.Fragment,{children:a})}),s}}}function tr({document:e}){return e.renderAll()}function nr({value:e,variant:t=`article`,theme:n,className:r,style:i,as:a=`div`,nested:o=!1,rendererConfig:s,extraNodes:c,builtinNodeOverrides:l,blockAnchor:u,surface:d,virtualization:f}){let p=je(t),m=be(),{document:h,footnoteData:g,renderNestedContent:_}=(0,U.useMemo)(()=>er(e,c?[...ye,...c]:ye,{blockAnchor:u,builtinNodeOverrides:l},t===`note`),[u,l,c,e,t]),{scrollContainer:v,overscan:y,estimateBlockHeight:b,preserveCapacity:x}=typeof f==`object`?f:{},S=!!f,C=f===!1,T=(0,U.useMemo)(()=>C?tr:S?ze({scrollContainer:v,overscan:y,estimateBlockHeight:b,preserveCapacity:x}):d??tr,[d,S,C,v,y,b,x]),E=[`rich-content`,p,r].filter(Boolean).join(` `),D=typeof a==`string`?{suppressHydrationWarning:!0,className:E,"data-rich-nested":o?`true`:void 0,"data-theme":n}:{},O=n??`light`;return(0,G.jsx)(w,{className:p,theme:O,children:(0,G.jsx)(_e,{colorScheme:O,children:(0,G.jsx)(Ce,{config:s,mode:`renderer`,variant:t,children:(0,G.jsx)(Se,{definitions:g.definitions,displayNumberMap:g.displayNumberMap,children:(0,G.jsx)(ke,{value:m??_,children:(0,G.jsx)(a,{...D,style:i,children:(0,G.jsx)(T,{document:h})})})})})})})}function rr({error:e,onDismiss:t}){return e?(0,W.createPortal)((0,G.jsxs)(`div`,{role:`alert`,className:`xixxii4 xy58vm5 xvf9o5y xvueqy4 xeq5yr9 x27kpxv x11uqc5h x78zum5 x6s0dn4 x1v2ro7d x10dr8xq x1hr3lfm xur7f20 xmkeg23 x1y0btm7 xgcsv5v x1rozbrz xo2rkog xqfszdh x4z9k3i x1pzk2i8`,children:[(0,G.jsx)(`span`,{children:i(`documentExport.failed`)}),(0,G.jsx)(`button`,{"aria-label":i(`common.close`),type:`button`,onClick:t,className:`xrvj5dj x1ku5rj1 xjbqb8w x1bo0w0s xc342km xgd8bvy x1fgtraw x1717udv x1ypdohk x2lah0s`,children:(0,G.jsx)(S,{size:16})})]}),document.body):null}var ir={[Ae]:ie,[Me]:xe,[Pe]:Fe},ar={claude:`Claude Code`,codex:`Codex`},or=e=>String(e).padStart(2,`0`);function sr(e){let t=new Date(e);return`${t.getMonth()+1}/${t.getDate()} ${or(t.getHours())}:${or(t.getMinutes())}`}function cr({prompt:e,empty:t,theme:n}){let r=(0,U.useRef)(null),[a,o]=(0,U.useState)(!1),[s,c]=(0,U.useState)(!1);return(0,U.useLayoutEffect)(()=>{let e=r.current;e&&!a&&c(e.scrollHeight>e.clientHeight+1)},[a,e]),(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`aside`,{"aria-label":i(`document.promptLabel`),"data-ryugi-no-comment":``,"data-task-prompt":``,className:`x8o32fp x1onr9mi xyumdvf x1t7ytsu x1awn4rw x1hx0egp`,children:[(0,G.jsxs)(`p`,{className:`x78zum5 x6s0dn4 x17d4w8g x1ghz6dp xddlp02 x1qt5hsa xd4r4e8`,children:[(0,G.jsx)(tt,{"aria-hidden":`true`,size:12}),i(`document.promptMeta`,{time:sr(e.at),agent:ar[e.harness]??e.harness})]}),(0,G.jsx)(`div`,{"data-task-prompt-body":``,ref:r,...{0:{className:`x1gslohp x1bo0w0s xif65rj x11m8ghp xb3r6kr`},1:{className:`x1gslohp x1bo0w0s xif65rj x11m8ghp xb3r6kr x1n19c2o`}}[!a|0],children:(0,G.jsx)(nr,{rendererConfig:ir,theme:n,value:e.state,variant:`comment`})}),(s||a)&&(0,G.jsx)(`button`,{"aria-expanded":a,type:`button`,onClick:()=>o(e=>!e),className:`x1gslohp x1717udv xc342km xjbqb8w xddlp02 x12rs2w1 xjb2p0i xfifm61 x1bvjpef xrys4gj x1ypdohk`,children:i(a?`document.promptCollapse`:`document.promptExpand`)})]}),t&&(0,G.jsx)(`p`,{className:`x103tiuj xddlp02 x2ouz8m`,children:i(`document.promptEmpty`)})]})}var lr=[`wheel`,`touchmove`,`keydown`,`pointerdown`];function ur(e){return e.getEditorState().read(()=>j().getChildren().map(e=>({id:A(e,F),key:e.getKey()}))).flatMap(({id:t,key:n})=>{let r=t?e.getElementByKey(n):null;return r?[{id:t,element:r}]:[]})}function dr(e,t){if(t.kind!==`document`)return!1;let n=ur(e).find(({id:e})=>e===t.blockId);if(!n)return!1;let r=n.element.getBoundingClientRect().top-t.top;return r!==0&&window.scrollBy({top:r,behavior:`instant`}),!0}function fr(e){(0,U.useEffect)(()=>{if(!e)return;let t=g({read(){let t=null;for(let{id:n,element:r}of ur(e)){let{top:e,bottom:i}=r.getBoundingClientRect();if(!(i<=0)){if(e>=0&&e<window.innerHeight)return{kind:`document`,blockId:n,top:e};if(t??={kind:`document`,blockId:n,top:e},e>=0)break}}return t},apply:t=>dr(e,t)}),n=()=>{let t=v();t&&dr(e,t)};n();let r=e.registerUpdateListener(n);for(let e of lr)window.addEventListener(e,h,{passive:!0});return()=>{t(),r();for(let e of lr)window.removeEventListener(e,h)}},[e])}var pr=e=>`${V(e)}:${qe(e)}`;async function mr(e,t){let n=new Map;for(let t of Je(e))Ye(t)&&n.set(pr(t),t);let r=await Promise.all([...n].map(async([e,n])=>[e,await t(n).catch(()=>void 0)])),i={};for(let[e,t]of r)t&&(i[e]=t);return i}function hr(e){let t=structuredClone({...e,comments:e.comments??Be()}),n=t=>{if(!t||t.startsWith(`#`))return t;try{return new URL(t,e.contentBase||e.sourceUrl).href}catch{return t}},r=e=>{if(!e||typeof e!=`object`)return;let t=e;if(typeof t.type==`string`){for(let e of[`src`,`poster`,`favicon`,`image`])typeof t[e]==`string`&&(t[e]=n(t[e]));if((t.type===`link`||t.type===`autolink`||t.type===`link-card`)&&typeof t.url==`string`&&(t.url=n(t.url)),t.type===`excalidraw`&&typeof t.snapshot==`string`){let[e=``,...r]=t.snapshot.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./printDocument-iDndVXNS.js","./rolldown-runtime-XKyaHtl9.js","./react-DlmbjZJV.js","./route-DCXI9Pag.js","./bem-vbke-3KC.js","./jsx-runtime-LKYXHABd.js","./types-BCsOeYI6.js","./index2.css","./shims-s-YVfIlz.js","./editor-p4kHebXo.js","./url-B9EKllj2.js","./useLayerZIndex-jAjmZ3ZM.js","./MotionConfigContext-HC2vqcJO.js","./is-html-element-DvgHo_1h.js","./WhiteboardEditor-cZ32fLqJ-DFINbnX4.js","./Popover-C1YBmb-2.js","./chevron-right-xNdXLJg6.js","./stringifyLocale-D0juOOnH.js","./code-DnmQyGiF.js","./SelectScrollUpArrow-D-BmvfPQ.js","./zoom-out-DsmGFv1v.js","./text-align-start-CRhecbJR.js","./ruler-CYb0HZGT.js","./maximize-2-Bc0lXBg6.js","./mouse-pointer-2-B-OF_fcG.js","./undo-2-B-JiyKIl.js","./plus-DZJ2BVkK.js","./MenuSubmenuTrigger-Bs1vXxvY.js","./index3.css","./Tooltip-B8QkSyOl.js","./pen-tool-BfwjhXQW.js","./underline-CT_nGhA9.js","./external-link-D382oEvK.js","./table-2-D90vZ04E.js","./message-square-Yl8PoPy_.js","./presentation-DXrcAbwM.js","./ThreadView-CnIdU5U-.js","./stable-BcrXxRbN.js","./comments-DUAz1Q9X.js","./icons-C2Xnbqrp.js","./index5.css","./search-DTrfkTpJ.js","./sliders-horizontal-CuS3-UwA.js","./upload-DffL3XsM.js","./video-DKoRqEZW.js","./agentLook-DaeWwrww.js","./DotGrid-DKKr_PyM.js","./rounds-BLj-tfMG.js","./useMedia-CFebB4XU.js","./BottomSheet-BXZOuVNc.js","./motion-Cy65kd7X.js","./preference-oNdcNeml.js","./ref-zGKSYjU7.js","./useSandboxFrame-CJmSnwgG.js","./index4.css","./dist-3bQWg0ym.js","./katex-DuZJ-tFh.js","./ArtifactModal-BF3VCQrn.js","./SplitFrame-A5XDZjkX.js","./clapperboard-BfpJ7tpa.js","./embed-src-CmyqZplg.js","./ArtifactModal-BU_PR8k8.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{T as t,_ as n,k as r,y as i}from"./route-DCXI9Pag.js";import{t as a}from"./react-DlmbjZJV.js";import{C as o,Er as s,Lt as c,T as l,_ as u,a as d,b as f,c as p,d as m,f as h,gr as g,hr as _,p as v,w as y,x as b}from"./url-B9EKllj2.js";import{t as x}from"./jsx-runtime-LKYXHABd.js";import{En as S}from"./useLayerZIndex-jAjmZ3ZM.js";import{Dt as C}from"./MotionConfigContext-HC2vqcJO.js";import{Gt as w,Jr as T,_i as E,bn as D,gn as O,ir as k,ni as A,pa as ee,sa as te,wn as ne,xr as j,zr as re}from"./WhiteboardEditor-cZ32fLqJ-DFINbnX4.js";import{$ as M,C as ie,F as ae,G as oe,H as se,I as ce,J as le,K as N,L as ue,M as P,N as de,O as fe,Ot as F,P as pe,Q as I,R as me,U as he,W as ge,X as _e,Y as ve,Z as ye,at as be,b as xe,ct as Se,dt as Ce,et as we,ft as Te,gt as Ee,ht as L,it as De,j as Oe,mt as R,nt as ke,ot as Ae,pt as je,rt as z,st as Me,tt as Ne,ut as Pe,v as Fe,z as Ie}from"./editor-p4kHebXo.js";import{o as Le}from"./ThreadView-CnIdU5U-.js";import{r as Re}from"./agentLook-DaeWwrww.js";import{n as ze}from"./plugin-_bGVeqI0-CsUbBVez.js";import{n as Be,t as Ve}from"./comments-DUAz1Q9X.js";import{n as He}from"./useMedia-CFebB4XU.js";import{a as B,i as Ue,t as We}from"./motion-Cy65kd7X.js";import{t as Ge}from"./embed-src-CmyqZplg.js";import{n as Ke}from"./preference-oNdcNeml.js";import{a as V,n as qe,o as Je,r as H,t as Ye}from"./ref-zGKSYjU7.js";import{c as Xe,i as Ze,l as Qe,u as $e}from"./route-messages-D6kcIEEz.js";var et={name:`corner-down-right`,size:24,node:[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]};et.node;var tt=C(et),U=e(a(),1);function nt(e,t,n){let r=(0,U.useMemo)(()=>f(),[]),[i,a]=(0,U.useState)(!1),s=(0,U.useRef)(t);s.current=t;let c=(0,U.useRef)(n);c.current=n,(0,U.useEffect)(()=>{if(r)return b((e,t)=>{e.kind===`chrome`&&a(e.hosted),e.kind===`history`&&s.current(e.action),t===window.parent&&e.kind===`document-export`&&e.format===`pdf`&&c.current?.()})},[r]);let{activity:l,comments:u,history:d,historyOpen:p,documentExport:m}=e;return(0,U.useEffect)(()=>{r&&o({kind:`header`,activity:l,comments:u,history:d,historyOpen:p,documentExport:m})},[r,l,u,d,p,m]),r&&i}var W=e(r(),1),G=x(),rt=`svg[role="img"] text[font-family*="Excalifont"] { font-family: ${O}; }`;function it(){let e=Ke();return(0,G.jsx)(G.Fragment,{children:e&&(0,W.createPortal)((0,G.jsx)(`style`,{"data-diagram-font-style":!0,children:rt}),document.head)})}var K=(e,t,n,r)=>e.find(e=>t<e.bottom+r&&t+n+r>e.top);function at(e,t,n,r){for(let i=K(e,t,n,r);i;)t=i.bottom+r,i=K(e,t,n,r);return t}function ot(e,t,n,r){for(let i=K(e,t,n,r);i;)t=i.top-r-n,i=K(e,t,n,r);return t}function st(e,t,n,r,i){let a=e.top-i-t.height;if(a<0||K(r,a,t.height,i))return null;let o=t.anchorTop-a,s=[],c=a;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t.top+t.height+i<=c)break;let a=c-i-t.height;if(t.fixed||a<0||K(r,a,t.height,i))return null;o+=t.top-a,s.push([e,a]),c=a}return{cost:o,moves:s,top:a}}function ct(e,t,n,r=[]){let i=[...e].sort((e,t)=>e.anchorTop-t.anchorTop),a=n?i.findIndex(e=>e.id===n):-1,o=Math.max(a,0),s=[],c=-1/0;for(let e=o;e<i.length;e++){let n=i[e],o=Math.max(n.anchorTop,c),l=K(r,o,n.height,t);if(l){let e=at(r,o,n.height,t),i=st(l,n,s,r,t);if(i&&i.cost<=e-n.anchorTop){for(let[e,t]of i.moves)s[e].top=t;o=i.top}else o=e}s.push({id:n.id,top:o,height:n.height,fixed:e===a}),c=o+n.height+t}let l={};for(let e of s)l[e.id]=e.top;if(a>0){let e=l[i[a].id];for(let n=a-1;n>=0;n--){let a=i[n],o=Math.min(a.anchorTop,e-t-a.height),s=K(r,o,a.height,t);if(s){let n=ot(r,o,a.height,t),i=s.bottom+t;o=i+a.height+t<=e&&!K(r,i,a.height,t)&&Math.abs(i-a.anchorTop)<Math.abs(a.anchorTop-n)?i:n}l[a.id]=o,e=o}}return l}function lt(e,t,n){let r=Math.max(e.x,t.x-n),i=(r+t.x)/2,a=r>e.x?` H${r}`:``;return`M${e.x} ${e.y}${a} C${i} ${e.y} ${i} ${t.y} ${t.x} ${t.y}`}var ut=8,dt=3,ft=18;function pt(e){let t=e.right+ut;return{left:t,right:t+dt,top:e.top,bottom:e.bottom}}function mt(e){return{x:e.right,y:e.top+Math.min(ft,(e.bottom-e.top)/2)}}function ht(e,t,n,r){return{left:Math.max(t.left,Math.min(e.left,t.right-n)),top:e.bottom+r}}var gt=10;function _t(e,t,n,r,i){let a=Math.max(t.left,Math.min(e.left,t.right-n)),o=e.bottom+gt;return i.top+o+r<=i.height-i.reserved-8?{left:a,top:o,placement:`below`}:{left:a,top:e.top-r-gt,placement:`above`}}var q=e=>e.kind===`element`?[]:e.blocks??(e.kind===`block`?[{id:e.threadId,element:e.element}]:[]),J=e=>e.kind===`text`?e.ranges??[e.range]:[],vt=4;function yt(e){return[...J(e).flatMap(e=>[...e.getClientRects()]),...q(e).map(e=>pt(e.element.getBoundingClientRect()))].sort((e,t)=>e.top-t.top||e.left-t.left)}function bt(e){if(e.kind===`element`)return e.node.isConnected?se(e.node):null;let t=yt(e).at(-1);return t?e.kind===`text`?{x:t.right,y:t.bottom}:mt(t):null}function xt(e,t,n){let r=document.createRange(),i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),a=0,o=!1;for(let e=i.nextNode();e;e=i.nextNode()){let i=a+e.length;if(!o&&t<=i&&(r.setStart(e,t-a),o=!0),o&&n<=i)return r.setEnd(e,n-a),r;a=i}return r.selectNodeContents(e),r}function St(e,t,n,r=0){let[i,a]=(0,U.useState)([]);return(0,U.useEffect)(()=>{if(!e||!n)return;let r=()=>{let r=e.getEditorState().read(()=>{let e=new Map;for(let t of j().getChildren()){let n=A(t,F);n&&e.set(n,t.getKey())}return e}),i=n.getBoundingClientRect().top-n.scrollTop,o=[];for(let n of t){let t=Ve(n.anchor).flatMap(t=>{let n=r.get(t),i=n?e.getElementByKey(n):null;return i?[{id:t,element:i}]:[]}),a=t[0]?.element;if(!a)continue;if(n.anchor.diagram){let e=he(a,n.id);if(e){let t=e.getBoundingClientRect(),r=n.anchor.diagram.kind===`edge`?se(e).y:t.top;o.push({threadId:n.id,top:r-i,kind:`element`,node:e})}else o.push({threadId:n.id,top:a.getBoundingClientRect().top-i,kind:`block`,element:a,blocks:t});continue}if(n.anchor.textRanges){let e=new Map(n.anchor.textRanges.map(e=>[e.blockId,e])),r=[],s=[],c;for(let n of t){let t=e.get(n.id),a=t?oe(n.element.textContent??``,t.quote,t.start):`block`;if(a===`block`)s.push(n),c??=n.element.getBoundingClientRect().top-i;else{let e=xt(n.element,a.start,a.end);r.push(e);let t=e.getClientRects()[0]??n.element.getBoundingClientRect();c??=t.top-i}}r.length?o.push({threadId:n.id,top:c,kind:`text`,range:r[0],ranges:r,blocks:s}):o.push({threadId:n.id,top:c,kind:`block`,element:a,blocks:s});continue}let s=n.anchor.blockIds?`block`:oe(a.textContent??``,n.anchor.quote);if(s===`block`){o.push({threadId:n.id,top:a.getBoundingClientRect().top-i,kind:`block`,element:a,blocks:t});continue}let c=xt(a,s.start,s.end),l=c.getClientRects()[0]??a.getBoundingClientRect();o.push({threadId:n.id,top:l.top-i,kind:`text`,range:c})}a(o)};r();let i=0,o=()=>{cancelAnimationFrame(i),i=requestAnimationFrame(r)},s=e.registerUpdateListener(o),c=new ResizeObserver(o);c.observe(n);let l=e.getRootElement();return l&&c.observe(l),()=>{cancelAnimationFrame(i),s(),c.disconnect()}},[e,t,n,r]),i}function Ct(e,t,n){(0,U.useEffect)(()=>{if(typeof CSS>`u`||!(`highlights`in CSS))return;let r=N(t,n),i=e.filter(e=>r.has(e.threadId)&&e.threadId!==n).flatMap(J),a=e.filter(e=>e.threadId===n).flatMap(J);return CSS.highlights.set(`ryugi-comment`,new Highlight(...i)),CSS.highlights.set(`ryugi-comment-active`,new Highlight(...a)),()=>{CSS.highlights.delete(`ryugi-comment`),CSS.highlights.delete(`ryugi-comment-active`)}},[e,t,n])}function wt(e,t){(0,U.useEffect)(()=>{if(t?.length){for(let e of t)e.setAttribute(`data-comment-draft`,``);return()=>{for(let e of t)e.removeAttribute(`data-comment-draft`)}}if(e&&typeof CSS<`u`&&`highlights`in CSS)return CSS.highlights.set(`ryugi-comment-draft`,new Highlight(e)),()=>{CSS.highlights.delete(`ryugi-comment-draft`)}},[e,t])}function Tt(e,t,n){for(let r of e){if(r.kind===`element`)continue;let e=r.kind===`block`||q(r).length?vt:0;for(let i of yt(r))if(t>=i.left-e&&t<=i.right+e&&n>=i.top&&n<=i.bottom)return r.threadId}return null}var Et=e=>Math.max(0,Math.min(window.scrollY+e.getBoundingClientRect().top-100,document.documentElement.scrollHeight-window.innerHeight));function Dt(e){window.scrollTo({top:Et(e),behavior:`instant`})}function Y(e,t){let n=Et(e);if(B())return window.scrollTo({top:n,behavior:`instant`}),t?.(),()=>{};let r=()=>{window.removeEventListener(`wheel`,i),window.removeEventListener(`touchmove`,i)},i=()=>{a.stop(),r()},a=c({keyframes:[window.scrollY+1,n],type:`spring`,stiffness:1e3,damping:250,onUpdate:e=>window.scrollTo({top:e,behavior:`instant`}),onComplete:()=>{r(),t?.()}});return window.addEventListener(`wheel`,i,{passive:!0}),window.addEventListener(`touchmove`,i,{passive:!0}),i}var X=12,Ot=40,kt=18;function At({id:e,onHeight:t,children:n}){let r=(0,U.useRef)(null);return(0,U.useLayoutEffect)(()=>{let n=r.current;if(!n)return;let i=new ResizeObserver(()=>t(e,n.offsetHeight));return i.observe(n),t(e,n.offsetHeight),()=>i.disconnect()},[e,t]),(0,G.jsx)(`div`,{ref:r,children:n})}function jt({narrow:e,threads:t,anchors:n,blocked:r,activeId:a,actions:o,onActivate:s,railRef:c,agent:l}){let[u,d]=(0,U.useState)({}),[f,p]=(0,U.useState)(0),m=(0,U.useCallback)((e,t)=>p(t),[]),[h,g]=(0,U.useState)([]),_=(0,U.useRef)(null),v=(0,U.useRef)(new Map).current,y=(0,U.useRef)((e,t)=>d(n=>n[e]===t?n:{...n,[e]:t})).current,b=(0,U.useCallback)(e=>{_.current=e,c(e)},[c]),x=new Map(n.map(e=>[e.threadId,e.top])),S=t.filter(e=>x.has(e.id)),C=t.filter(e=>!x.has(e.id)&&!e.messages.every(e=>e.deleted)),w=S.map(e=>({id:e.id,anchorTop:x.get(e.id),height:u[e.id]??120})),T=ct(w,X,a??void 0,r),E=Math.max(0,...w.map(e=>(T[e.id]??0)+e.height)),D=at(r??[],E+X,f,X),O=JSON.stringify(T);(0,U.useLayoutEffect)(()=>{let r=_.current;if(e||!r)return g([]);let i=r.getBoundingClientRect(),o=N(t,a),s=[];for(let e of n){let t=T[e.threadId],n=bt(e);if(t===void 0||!n||!o.has(e.threadId))continue;let r={x:n.x-i.left,y:n.y-i.top};s.push({id:e.threadId,d:lt(r,{x:0,y:t+kt},Ot)})}g(s)},[e,n,t,a,O]),(0,U.useEffect)(()=>{let t=a?v.get(a):void 0;if(e||!t)return;let n=!1,r=()=>{},i=t.getAnimations({subtree:!0}).map(e=>e.finished.catch(()=>void 0));return Promise.all(i).then(()=>{!n&&Ie(t.getBoundingClientRect(),window.innerHeight)&&(r=Y(t))}),()=>{n=!0,r()}},[a,e,v]);let k=e=>(0,G.jsx)(ue,{actions:o,active:e.id===a,agent:l,thread:e,onActivate:()=>s(e.id)});return e?(0,G.jsxs)(`div`,{"aria-label":i(`document.commentsLabel`),ref:b,role:`region`,className:`x78zum5 xdt5ytf x1v2ro7d xh8yej3 x7ep2pv xvueqy4`,children:[[...S].sort((e,t)=>x.get(e.id)-x.get(t.id)).map(e=>(0,G.jsx)(`div`,{children:k(e)},e.id)),C.length>0?(0,G.jsx)(`div`,{className:`xqui205 x1e56ztr xddlp02 xqfszdh x1j6dyjg`,children:i(`document.originalDeleted`)}):null,C.map(e=>(0,G.jsx)(`div`,{children:k(e)},e.id))]}):(0,G.jsxs)(`aside`,{"aria-label":i(`document.commentsLabel`),ref:b,className:`x1n2onr6 xh8yej3 x2lah0s`,style:{minHeight:E},children:[(0,G.jsx)(`svg`,{className:`x10l6tqk x13vifvy xu96u03 x1i1rx1s xjm9jq1 x1rea2x4 x47corl`,children:h.map(e=>(0,G.jsx)(`path`,{d:e.d,fill:`none`,stroke:e.id===a?Re.warningStrong:`currentColor`,strokeDasharray:e.id===a?void 0:`3 3`,strokeOpacity:e.id===a?1:.25},e.id))}),S.map(e=>(0,G.jsx)(`div`,{ref:t=>{t?v.set(e.id,t):v.delete(e.id)},className:`x10l6tqk xu96u03 xh8yej3 xhtitgo x14h5d43 xx6bhzk`,style:{top:T[e.id]},children:(0,G.jsx)(At,{id:e.id,onHeight:y,children:k(e)})},e.id)),C.length>0?(0,G.jsx)(`div`,{style:{position:`absolute`,top:D,left:0,width:`100%`,zIndex:2},children:(0,G.jsxs)(At,{id:`orphaned`,onHeight:m,children:[(0,G.jsx)(`div`,{className:`xqui205 x1e56ztr xddlp02 xqfszdh x1j6dyjg`,children:i(`document.originalDeleted`)}),C.map(e=>(0,G.jsx)(`div`,{style:{marginBottom:X},children:k(e)},e.id))]})}):null]})}function Mt({container:e,anchors:t,threads:n,activeId:r}){let[i,a]=(0,U.useState)([]);return(0,U.useLayoutEffect)(()=>{if(!e)return a([]);let i=e.getBoundingClientRect(),o=N(n,r),s=[];for(let e of t)if(o.has(e.threadId))for(let t of q(e)){let n=pt(t.element.getBoundingClientRect());s.push({id:e.threadId,key:`${e.threadId}:${t.id}`,left:n.left-i.left,top:n.top-i.top,width:n.right-n.left,height:n.bottom-n.top})}a(s)},[e,t,n,r]),i.map(e=>(0,G.jsx)(`div`,{"data-comment-block":e.id,...{0:{className:`x10l6tqk x1cum3z5 x47corl x1f2496h x15406qy xx6bhzk`},1:{className:`x10l6tqk x1cum3z5 x47corl x15406qy xx6bhzk x5hs8br`}}[e.id===r|0],style:{left:e.left,top:e.top,width:e.width,height:e.height}},e.key))}var Nt=/^#([\w-]{4,64})$/,Pt=/^#ryugi-host=/,Ft=e=>Nt.exec(e)?.[1]??null;function Z(e=window){if(e.parent===e||!e.parent)return e;try{return e.parent.location.href,e.parent}catch{return e}}var It=(e=Z())=>Ft(e.location.hash);function Lt(e,t=Z()){let{hash:n,pathname:r,search:i}=t.location;if(Pt.test(n))return;let a=e?`#${e}`:``;n!==a&&t.history.replaceState(t.history.state,``,`${r}${i}${a}`)}function Rt(e,t){let n=new URL(e);return n.hash=t,n.toString()}var zt=new Set([`h2`,`h3`]),Bt=160;function Vt(e){let t=document.createRange();t.selectNodeContents(e);let n=t.getClientRects?.(),r=n&&n.length>0?n.item(n.length-1):null,i=e.getBoundingClientRect();return r&&r.width>0?r:i}function Ht(e,t){e.getEditorState().read(()=>{for(let n of t){let t=k(n),r=e.getElementByKey(n);if(!ne(t)||!r)continue;let i=zt.has(t.getTag())?A(t,F):``;i?r.id=i:r.removeAttribute(`id`)}})}function Ut({editor:e,shareBase:t}){let[n,r]=(0,U.useState)(null),[a,o]=(0,U.useState)(!1),c=(0,U.useRef)(void 0);if((0,U.useEffect)(()=>{if(e.hasNodes([D]))return e.registerMutationListener(D,t=>Ht(e,[...t].filter(([,e])=>e!==`destroyed`).map(([e])=>e)))},[e]),(0,U.useEffect)(()=>{let t=()=>clearTimeout(c.current),n=()=>{t(),c.current=setTimeout(()=>r(null),Bt)},i=i=>{let a=i.target;if(a?.closest?.(`[data-heading-link]`))return t();let s=e.getRootElement(),c=a?.closest?.(`h2[id], h3[id]`);if(!s||!c||!s.contains(c))return n();t();let l=Vt(c);o(!1),r({id:c.id,left:l.right+window.scrollX+6,top:l.top+window.scrollY+(l.height-24)/2})};return document.addEventListener(`pointerover`,i),()=>{t(),document.removeEventListener(`pointerover`,i)}},[e]),!n)return null;let l=()=>{let e=Rt(t||Z().location.href,n.id);navigator.clipboard?.writeText(e),Lt(n.id),o(!0)},u=i(a?`document.headingLinkCopied`:`document.copyHeadingLink`);return(0,W.createPortal)((0,G.jsx)(`button`,{"aria-label":u,"data-heading-link":``,style:{left:n.left,top:n.top},title:u,type:`button`,onClick:l,onPointerDown:e=>e.preventDefault(),...{0:{className:`x10l6tqk xoegz02 xrvj5dj x1ku5rj1 xvy4d1p xxk0z11 x1717udv xc342km x1kogg8i xjbqb8w xj0l527 xddlp02 x157umkc x1in2gmu x1ypdohk x1de99jn xaatb59 x1y3gkto x1uczgqu x60py1w`},1:{className:`x10l6tqk xoegz02 xrvj5dj x1ku5rj1 xvy4d1p xxk0z11 x1717udv xc342km x1kogg8i xjbqb8w xj0l527 x1ypdohk x1de99jn xaatb59 x1y3gkto x1uczgqu x60py1w x1cge3fn`}}[!!a|0],children:a?(0,G.jsx)(s,{"aria-hidden":`true`,size:14}):(0,G.jsx)(g,{"aria-hidden":`true`,size:14})}),document.body)}var Wt=620,Gt=class extends U.Component{state={leaving:null,shown:null};static getDerivedStateFromProps(e,t){return e.history?.immersive?t.shown===e.history?null:{shown:e.history}:t.shown?{shown:null,leaving:t.shown}:null}host=null;paper=null;viewport=null;shell=null;entry=null;slide=null;exitTimer=null;getSnapshotBeforeUpdate(){return{rect:this.paper?.getBoundingClientRect()??null,x:window.scrollX,y:window.scrollY}}animate(e,t){if(!this.paper||!e||B()||typeof this.paper.animate!=`function`)return;this.slide?.cancel();let n=t??this.paper.getBoundingClientRect(),r=Math.max(56,e.top),i=parseFloat(getComputedStyle(this.paper).borderLeftWidth)||0,a=t?0:i,o=t?i:0;this.slide=this.paper.animate([{left:e.left-a+`px`,top:r-a+`px`,width:e.width+a*2+`px`,height:Math.min(e.height,window.innerHeight-r)+a+`px`},{left:n.left-o+`px`,top:n.top-o+`px`,width:n.width+o*2+`px`,height:n.height+o+`px`}],{duration:Wt,easing:We,fill:t?`forwards`:`none`}),this.slide.finished.catch(()=>{})}unlock=()=>{if(this.exitTimer&&clearTimeout(this.exitTimer),this.exitTimer=null,this.slide?.cancel(),this.slide=null,this.host&&(this.host.style.height=``),this.entry){let e=this.entry;document.documentElement.style.overflow=e.overflow,document.documentElement.style.scrollbarGutter=e.gutter,window.scrollTo(e.x,e.y)}this.entry=null};componentDidUpdate(e,t,n){let r=!!this.props.history?.immersive,i=!!e.history?.immersive;if(r&&!i)this.exitTimer&&clearTimeout(this.exitTimer),this.exitTimer=null,this.state.leaving&&this.setState({leaving:null}),this.entry||(this.entry={...n,focus:document.activeElement,overflow:document.documentElement.style.overflow,gutter:document.documentElement.style.scrollbarGutter,offset:Math.max(0,56-(n.rect?.top??56))},this.host&&(this.host.style.height=(n.rect?.height??0)+`px`)),n.rect&&this.shell?.style.setProperty(`--history-reading-width`,n.rect.width+`px`),document.documentElement.style.scrollbarGutter=`stable`,document.documentElement.style.overflow=`hidden`,this.viewport&&(this.viewport.scrollTop=this.entry.offset),this.animate(n.rect),this.shell?.querySelector(`[data-history-exit]`)?.focus({preventScroll:!0});else if(!r&&i&&this.entry){let e=this.entry;this.viewport&&(this.viewport.scrollTop=e.offset),window.scrollTo(e.x,e.y),e.focus?.focus({preventScroll:!0});let t=e.rect;t&&this.animate(n.rect,{left:t.left,top:Math.max(56,t.top),width:t.width,height:Math.min(t.height,window.innerHeight-Math.max(56,t.top))});let r=()=>{this.setState({leaving:null},()=>{this.unlock(),e.focus?.focus({preventScroll:!0})})};B()?r():this.exitTimer=setTimeout(r,Wt)}else!r&&!this.state.leaving&&(!e.history&&this.props.history&&(this.entry={...n,focus:null,overflow:document.documentElement.style.overflow,gutter:document.documentElement.style.scrollbarGutter,offset:0}),e.history&&!this.props.history&&this.entry&&(window.scrollTo(this.entry.x,this.entry.y),this.entry=null))}componentWillUnmount(){this.unlock()}trap=e=>{if(!this.props.history?.immersive||e.key!==`Tab`)return;let t=[...this.shell?.querySelectorAll(`button:not(:disabled),a[href],summary,[tabindex="0"]`)??[]].filter(e=>!e.closest(`[hidden],[aria-hidden="true"],[inert]`)),n=t[0],r=t.at(-1);e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())};render(){let{history:e,children:t}=this.props,n=e?.immersive?e:this.state.leaving,r=!!n,a=!!e?.ready;return(0,G.jsx)(`div`,{className:`history-body`,ref:e=>{this.host=e},children:(0,G.jsxs)(`div`,{"aria-label":e?.immersive?i(`history.title`):void 0,"aria-modal":e?.immersive?!0:void 0,className:`history-space-shell`,"data-immersive":r?``:void 0,"data-open":e?.immersive?``:void 0,inert:!(!this.state.leaving||e),role:e?.immersive?`dialog`:void 0,ref:e=>{this.shell=e},onKeyDown:this.trap,children:[n?.space,(0,G.jsx)(`div`,{className:`history-space-paper`,ref:e=>{this.paper=e},children:(0,G.jsxs)(`div`,{className:`history-space-scroll`,tabIndex:r?0:void 0,ref:e=>{this.viewport=e},children:[(0,G.jsx)(`div`,{className:`history-body-comparison`,"data-ready":a,hidden:!a,children:e?.content}),(0,G.jsx)(`div`,{hidden:a,children:t})]})})]})})}};function Kt({history:e,children:t}){let[n,r]=(0,U.useState)({current:e,panel:e?.panel??null});return n.current!==e&&r({current:e,panel:e?.panel??n.panel}),(0,U.useEffect)(()=>{if(e)return;let t=setTimeout(()=>{r(e=>e.current?e:{...e,panel:null})},B()?0:280);return()=>clearTimeout(t)},[e]),(0,G.jsx)(`div`,{className:`history-rail`,"data-moving":e||n.panel?``:void 0,"data-open":e?``:void 0,children:(0,G.jsxs)(`div`,{className:`history-rail-track`,children:[(0,G.jsx)(`div`,{"aria-hidden":e?!0:void 0,className:`history-rail-comments`,inert:!!e,children:t}),(0,G.jsx)(`div`,{"aria-hidden":!e||void 0,className:`history-rail-panel`,inert:!e,children:e?.panel??n.panel})]})})}var qt=(0,U.createContext)(!1),Jt=3e3;function Yt(e,t){let n=e.getRootElement()?.closest(`.history-body`)?.querySelector(`.history-body-comparison[data-ready="true"]`);if(n)return[...n.querySelectorAll(`[data-history-block-id]`)].find(e=>e.dataset.historyBlockId===t)?.querySelector(`.history-current :is(h1, h2, h3, h4, h5, h6)`)??null;let r=e.getEditorState().read(()=>j().getChildren().find(e=>A(e,F)===t)?.getKey());return r?e.getElementByKey(r):null}function Xt(e,t){let n=(0,U.useContext)(qt)?null:e,[r]=(0,U.useState)(It),i=(0,U.useRef)(r),a=(0,U.useRef)(r),o=(0,U.useRef)(void 0),s=(0,U.useRef)(null),c=(0,U.useRef)(null),l=(0,U.useCallback)(e=>{s.current=e,Lt(e)},[]),u=(0,U.useCallback)(e=>{let t=n&&Yt(n,e);return t?(o.current?.(),o.current=Y(t,()=>{i.current===e&&!a.current&&(i.current=null)}),!0):!1},[n]),d=(0,U.useCallback)(e=>{let t=n&&Yt(n,e);return t?(o.current?.(),Dt(t),i.current===e&&!a.current&&(i.current=null),!0):!1},[n]),f=(0,U.useCallback)(e=>{let t={lock:i.current,pending:a.current};i.current=e,a.current=null,u(e)?l(e):(i.current=t.lock,a.current=t.pending)},[u,l]);return(0,U.useEffect)(()=>{if(!n)return;let e=()=>{if(n.getRootElement()?.closest(`.history-space-shell[data-immersive]`))return;let e=a.current;e&&(a.current=null,v()?i.current===e&&(i.current=null):d(e)?c.current={blockId:e,until:Date.now()+Jt}:a.current=e)};e();let t=()=>{i.current=null,a.current=null,c.current=null},r=new ResizeObserver(()=>{if(n.getRootElement()?.closest(`.history-space-shell[data-immersive]`))return;let e=c.current;e&&(Date.now()>e.until?c.current=null:d(e.blockId))}),l=n.registerRootListener(e=>{r.disconnect(),e&&r.observe(e)}),u=Z(),f=()=>{let t=It();t&&t!==s.current&&!Qe(u.history.state)&&(i.current=t,a.current=t,e())},p=n.registerUpdateListener(e);return window.addEventListener(`wheel`,t,{passive:!0}),window.addEventListener(`touchmove`,t,{passive:!0}),window.addEventListener(`keydown`,t),u.addEventListener(`hashchange`,f),()=>{p(),l(),r.disconnect(),o.current?.(),window.removeEventListener(`wheel`,t),window.removeEventListener(`touchmove`,t),window.removeEventListener(`keydown`,t),u.removeEventListener(`hashchange`,f)}},[n,d]),(0,U.useEffect)(()=>{if(n){if(i.current){if(a.current||t!==i.current)return;i.current=null}else l(t)}},[t,n,l]),{scrollTo:f}}function Zt({editor:e}){return Xt(e,null),null}var Qt={h2:0,h3:1};function $t(){let e=[],t=null,n=null;for(let r of j().getChildren()){let i=ne(r)?r.getTag():void 0,a=A(r,F);if(i===`h1`){t={key:r.getKey(),blockId:a,text:r.getTextContent()},n=null;continue}let o=i===void 0?void 0:Qt[i];o!==void 0&&(n={key:r.getKey(),blockId:a,text:r.getTextContent(),depth:o,part:t,blocks:[]},e.push(n)),a&&n?.blocks.push(a)}return e}function en(e,t){let n=new Map;for(let t of e)for(let e of t.blocks)n.set(e,t.blockId);let r=new Set;for(let e of t)if(e.status===`open`)for(let t of Ve(e.anchor)){let e=n.get(t);e&&r.add(e)}return r}function tn(e){let t=new Set(e.map(e=>e.part?.key??null)).size>1,n=[],r;for(let i of e){let e=n.at(-1),a=i.part!==r;i.depth===0||!e||a?n.push({head:i,children:[],index:n.length,partStart:t&&a?i.part:null}):e.children.push(i),r=i.part}return n}var Q={toc:{kVAEAm:`x7wzq59`,kY2c9j:`x1w0boku`,k87sOh:`xossvpg`,kSGwAc:`x1y8v6su`,keoZOQ:`x1tfhste`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kskxy:`x1r4ahda`,k7Eaqz:`xeuugli`,kMv6JI:`xqfszdh`,kGuDYH:`x1ct8sxb`,kMwMTN:`x1bo0w0s`,$$css:!0},rail:{kzqmXN:`x1td3qas`,$$css:!0},list:{kAzted:`x2lwn1j`,kORKVm:`x1odjw0f`,kacamN:`x1e4zzel`,k5wCbM:`x1rohswg`,k8WAf4:`xj8oexa`,$$css:!0},item:{kVAEAm:`x1n2onr6`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x167g77z`,kzqmXN:`xh8yej3`,kZKoxP:`xlrawln`,kmVPX3:`x1717udv`,kMzoRj:`xc342km`,kaIpWk:`x1kogg8i`,kWkggS:`xjbqb8w`,kkrTdU:`x1ypdohk`,kMeerF:`x1de99jn`,k3XXqK:`xaatb59`,kInvED:`x1g40iwv`,kjBf7l:`x1uczgqu x60py1w`,$$css:!0},tick:{kmuXW:`x2lah0s`,kzqmXN:`xsmyaan`,kZKoxP:`x36qwtl`,keTefX:`xdwrcjd`,kaIpWk:`x1nj7uno`,kWkggS:`x174nbcu`,kmkexE:`x10iii20`,$$css:!0},tickH2:{kzqmXN:`xw4jnvo`,keTefX:`x1lziwak`,kWkggS:`xxwmxtg`,$$css:!0},tickActive:{kzqmXN:`xw4jnvo`,keTefX:`x1lziwak`,kWkggS:`x15az74h`,$$css:!0},tickDot:{keTefX:`x165d6jo`,$$css:!0},part:{kB7OPa:`x9f619`,kZKoxP:`x10w6t97`,kVQacm:`xb3r6kr`,kLKAdn:`xyinxu5`,kGuDYH:`x1j6dyjg`,k63SB2:`x1s688f`,kLWn49:`x1wfe3co`,kb6lSQ:`x16q24ku`,kMwMTN:`xddlp02`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,kmkexE:`x1un5det`,$$css:!0},partFirst:{kZKoxP:`xxk0z11`,kLKAdn:`x1yrsyyn`,$$css:!0},row:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x17d4w8g`,kzqmXN:`xh8yej3`,kZKoxP:`xlrawln`,kmVPX3:`x1717udv`,kMzoRj:`xc342km`,kaIpWk:`x12oqio5`,kWkggS:`xjbqb8w`,kMwMTN:`x1bo0w0s xytdrwj`,kVVagm:`xln7xf2`,k9WMMc:`x1yc453h`,kkrTdU:`x1ypdohk`,kmkexE:`x137m0jx x413zg9`,kMeerF:`x1de99jn`,k3XXqK:`xaatb59`,kInvED:`x1g40iwv`,kjBf7l:`x1uczgqu x60py1w`,$$css:!0},rowNested:{kZCmMZ:`x1onr9mi`,kGuDYH:`xfifm61`,kMwMTN:`xddlp02 xytdrwj`,$$css:!0},rowCurrent:{kZKoxP:`x1fgtraw`,kGuDYH:`x2ouz8m`,k63SB2:`x1s688f`,kMwMTN:`xo2rkog xytdrwj`,$$css:!0},rowActive:{k63SB2:`x1s688f`,kMwMTN:`x1cge3fn x157umkc`,$$css:!0},rowText:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},count:{kmuXW:`x2lah0s`,kGuDYH:`x1j6dyjg`,k63SB2:`xo1l8bm`,kMwMTN:`xc7n51q`,kcqcaj:`xss6m8b`,$$css:!0},fold:{k1xSpc:`xrvj5dj`,k9llMU:`xihq33y`,k33iCy:`xlshs6z`,kSiTet:`xg01cxk`,kmkexE:`x1u0be13 x9kvfbb`,$$css:!0},foldOpen:{k9llMU:`x1tu4anv`,k33iCy:`xnpuxes`,kSiTet:`x1hc1fzr`,kmkexE:`xjgrksx x9kvfbb`,$$css:!0},foldRows:{kAzted:`x2lwn1j`,kVQacm:`xb3r6kr`,k3aq6I:`x1bvilyr`,kmkexE:`x1pagzdl x9kvfbb`,$$css:!0},foldRowsOpen:{k3aq6I:`x1c071of`,kmkexE:`x94wcrn x9kvfbb`,$$css:!0},fadeNear:{kSiTet:`xiiclqw`,$$css:!0},fadeMid:{kSiTet:`xf9vgkq`,$$css:!0},fadeFar:{kSiTet:`x197sbye`,$$css:!0},dot:{kmuXW:`x2lah0s`,kzqmXN:`x1ftt334`,kZKoxP:`x1ycjhwn`,kaIpWk:`x16rqkct`,kWkggS:`xzkukvh`,$$css:!0},card:{kVAEAm:`x10l6tqk`,kY2c9j:`x1w0boku`,k87sOh:`xn0lweg`,kbCHJM:`x6f9vd5`,kzqmXN:`x1hfn5x7`,kskxy:`x1r4ahda`,kORKVm:`x1odjw0f`,kB7OPa:`x9f619`,k8WAf4:`x1vvogim`,kg3NbH:`xaope02`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`xgcsv5v`,kaIpWk:`x1q4ynmn`,kWkggS:`x12ilycc`,kGVxlE:`x1d5q07e`,$$css:!0}},nn=120,rn=200,an=150,on=new Set;function sn(e,t){let[n,r]=(0,U.useState)({key:null,reading:!1});return(0,U.useEffect)(()=>{if(!e)return;let n=()=>{if(e.getRootElement()?.closest(`.history-space-shell[data-immersive]`))return;let n=t[0]?.key??null,i=!1;for(let r of t){let t=r.blockId?Yt(e,r.blockId):e.getElementByKey(r.key);t&&t.getBoundingClientRect().top<nn&&(n=r.key,i=!0)}r(e=>e.key===n&&e.reading===i?e:{key:n,reading:i})};return n(),window.addEventListener(`scroll`,n,{passive:!0}),()=>window.removeEventListener(`scroll`,n)},[e,t]),n}function cn(e,t,n){(0,U.useEffect)(()=>{let n=()=>{let n=e.current,r=t.current;if(!n||!r)return;let i=n.getBoundingClientRect(),a=r.getBoundingClientRect();(a.top<i.top||a.bottom>i.bottom)&&(n.scrollTop=Math.max(0,n.scrollTop+a.top-i.top-(n.clientHeight-a.height)/2))};return n(),window.addEventListener(`scroll`,n,{passive:!0}),window.addEventListener(`resize`,n),()=>{window.removeEventListener(`scroll`,n),window.removeEventListener(`resize`,n)}},n)}function ln({editor:e,threads:t=[],variant:r=`column`}){let[a,o]=(0,U.useState)([]),[s,c]=(0,U.useState)(!1),[l,u]=(0,U.useState)(on),d=(0,U.useRef)(void 0),f=(0,U.useRef)(void 0),p=(0,U.useRef)(null),m=(0,U.useRef)(null);(0,U.useEffect)(()=>{if(!e)return;let t=()=>o(e.getEditorState().read($t));return t(),e.registerUpdateListener(t)},[e]);let h=sn(e,a),g=a.find(e=>e.key===h.key),{scrollTo:_}=Xt(e,h.reading&&g?.blockId?g.blockId:null),v=(0,U.useMemo)(()=>en(a,t),[a,t]),y=(0,U.useMemo)(()=>tn(a),[a]);cn(p,m,[h.key,a]),(0,U.useEffect)(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]);let b=y.find(e=>e.head.key===h.key||e.children.some(e=>e.key===h.key)),x=b?.head.key??null,[S,C]=(0,U.useState)(x),w=e=>u(t=>t.has(e)?t:new Set(t).add(e));S!==x&&(C(x),s&&S&&w(S));let T=()=>{clearTimeout(d.current),c(!0)},E=()=>{clearTimeout(d.current),clearTimeout(f.current),d.current=setTimeout(()=>{c(!1),u(on)},rn)},D=e=>{clearTimeout(f.current),f.current=setTimeout(()=>w(e),an)},O=t=>{if(t.blockId)return _(t.blockId);let n=e?.getElementByKey(t.key);n&&Y(n)};if(r===`hidden`)return null;if(a.length===0)return(0,G.jsx)(`nav`,{"data-variant":r,...n(Q.toc)});let k=r===`rail`,A=e=>y.map(t=>{let{head:r,children:i}=t,a=t===b,o=a||l.has(r.key),c=b?Math.abs(t.index-b.index):0,u=e!==`column`||s||c===0?null:c===1?Q.fadeNear:c<=3?Q.fadeMid:Q.fadeFar,d=(t,r,i,o,s=!1)=>{let c=t.key===h.key,l=e===`card`,d=o?(0,G.jsx)(`span`,{"data-commented":``,...n(Q.dot,e===`ticks`&&Q.tickDot)}):null;return(0,G.jsxs)(`button`,{"aria-current":c&&!l?`location`:void 0,"aria-label":t.text,ref:c&&!l?m:void 0,tabIndex:l?-1:void 0,type:`button`,onClick:()=>O(t),onFocus:s?()=>w(t.key):void 0,onPointerEnter:s?()=>D(t.key):void 0,onPointerLeave:s?()=>clearTimeout(f.current):void 0,...n(e===`ticks`?Q.item:Q.row,e!==`ticks`&&r&&Q.rowNested,!r&&a&&Q.rowCurrent,e!==`ticks`&&c&&Q.rowActive,!r&&u),children:[e===`ticks`?(0,G.jsx)(`span`,{...n(Q.tick,!r&&Q.tickH2,c&&Q.tickActive)}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{...n(Q.rowText),children:t.text}),i>0?(0,G.jsx)(`span`,{...n(Q.count),children:i}):null]}),d]},t.key)},p=!o&&i.some(e=>v.has(e.blockId));return(0,G.jsxs)(U.Fragment,{children:[t.partStart?(0,G.jsx)(`div`,{"aria-hidden":e===`ticks`||void 0,...n(Q.part,t.index===0&&Q.partFirst,u),children:e===`ticks`?null:t.partStart.text}):null,d(r,!1,o?0:i.length,v.has(r.blockId)||p,i.length>0),i.length>0?(0,G.jsx)(`div`,{inert:!o,...n(Q.fold,o&&Q.foldOpen),children:(0,G.jsx)(`div`,{...n(Q.foldRows,o&&Q.foldRowsOpen),children:i.map(e=>d(e,!0,0,v.has(e.blockId)))})}):null]},r.key)});return(0,G.jsxs)(`nav`,{"aria-label":i(`document.toc`),"data-expanded":s?`true`:`false`,"data-variant":r,onFocus:T,onPointerEnter:T,onPointerLeave:E,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||E()},...n(Q.toc,k&&Q.rail),children:[(0,G.jsx)(`div`,{"data-toc-list":``,ref:p,...n(Q.list),children:A(k?`ticks`:`column`)}),k&&s?(0,G.jsx)(`div`,{"data-toc-card":``,ref:e=>{e&&p.current&&(e.scrollTop=p.current.scrollTop)},...n(Q.card),children:A(`card`)}):null]})}var un=`.rich-table-scrollable-wrapper, .ryugi-mermaid-preview`;function dn(e,t){let n=e.getBoundingClientRect().right;return[...e.querySelectorAll(un)].map(e=>e.getBoundingClientRect()).filter(e=>e.right>n+1).map(e=>({top:e.top-t,bottom:e.bottom-t}))}var fn=(e,t)=>e.length===t.length&&e.every((e,n)=>e.top===t[n].top&&e.bottom===t[n].bottom);function pn(e,t){let[n,r]=(0,U.useState)([]);return(0,U.useEffect)(()=>{let n=e?.getRootElement();if(!e||!t||!n)return;let i=()=>{let e=t.getBoundingClientRect().top-t.scrollTop,i=dn(n,e);r(e=>fn(e,i)?e:i)};i();let a=0,o=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(i)},s=e.registerUpdateListener(o),c=new ResizeObserver(o);return c.observe(t),c.observe(n),()=>{cancelAnimationFrame(a),s(),c.disconnect()}},[e,t]),n}var mn=56,hn=40;function gn(e,t,n){return n>=e.top&&n<=Math.max(e.bottom,e.top+hn)&&t<=e.right+mn}function _n(e){return Math.max(e.getBoundingClientRect().right,...[...e.querySelectorAll(un)].map(e=>e.getBoundingClientRect().right))}function vn(e,t){let n=e.getRootElement(),r=t instanceof Element?t:null;for(;r&&r.parentElement!==n;)r=r.parentElement;return n&&r instanceof HTMLElement?r:null}function yn(e,t){let n=vn(e,t);return n?bn(e,n):null}function bn(e,t){return e.read(()=>{for(let n of j().getChildren())if(e.getElementByKey(n.getKey())===t)return A(n,F)||null;return null})}function xn(e,t,n){let[r,i]=(0,U.useState)(null);return(0,U.useEffect)(()=>{if(!e||!t||!n){i(null);return}let r=0,a=null,o=e=>{e?.element!==a?.element&&(a=e,i(e))},s=()=>{cancelAnimationFrame(r),o(null)},c=t=>{if(cancelAnimationFrame(r),t.pointerType!==`mouse`&&t.pointerType!==`pen`||t.buttons!==0)return o(null);let{target:n,clientX:i,clientY:s}=t;r=requestAnimationFrame(()=>{let t=vn(e,n);if(t){if(t===a?.element)return;let n=bn(e,t);return o(n?{id:n,element:t}:null)}if(a){let{top:e,bottom:t}=a.element.getBoundingClientRect();if(gn({top:e,bottom:t,right:_n(a.element)},i,s))return}o(null)})};return document.addEventListener(`pointermove`,c),document.addEventListener(`scroll`,s,!0),document.documentElement.addEventListener(`pointerleave`,s),()=>{cancelAnimationFrame(r),document.removeEventListener(`pointermove`,c),document.removeEventListener(`scroll`,s,!0),document.documentElement.removeEventListener(`pointerleave`,s)}},[e,t,n]),(0,U.useMemo)(()=>{if(!r||!t||!n||!r.element.isConnected)return null;let e=r.element.getBoundingClientRect(),i=t.getBoundingClientRect(),a=document.createRange();return a.selectNodeContents(r.element),{kind:`block`,blockId:r.id,quote:``,elements:[r.element],range:a,left:e.left-i.left,right:_n(r.element)-i.left,top:e.top-i.top,bottom:e.bottom-i.top}},[r,t,n])}var Sn=80,Cn=240,wn=e=>{let t=/matrix\(([^)]+)\)/.exec(getComputedStyle(e).transform);return t?Number(t[1].split(`,`)[4]):0};function Tn(e,t){let n=t.offsetLeft,r=null,i=()=>{let i=n-t.offsetLeft;if(n=t.offsetLeft,!i||B()||!r&&Math.abs(i)<Sn)return;let a=i+(r?wn(t):0),o={duration:Cn,easing:We};if(r)r.cancel();else for(let n of e.children)n!==t&&Ue(n,[{opacity:0},{opacity:1}],o);let s=t.animate([{transform:`translateX(${a}px)`},{transform:`none`}],o);r=s,s.finished.then(()=>{r===s&&(r=null)},()=>void 0)},a=new ResizeObserver(i);return a.observe(e),{settle:i,stop:()=>a.disconnect()}}function En({editor:e,threads:t,actions:n,agent:r,diagram:i,onMain:a,overlay:o,history:s,shareBase:c,children:l}){let[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(null),[m,h]=(0,U.useState)(null),[g,_]=(0,U.useState)(null),v=(0,U.useCallback)(e=>{_(e),a?.(e)},[a]),y=(0,U.useRef)(null);(0,U.useEffect)(()=>{if(!g||!m)return;let e=Tn(g,m);return y.current=e,()=>{y.current=null,e.stop()}},[g,m]);let b=He(`(max-width: 1100px)`),x=!He(`(max-width: 1480px)`),S=b?`hidden`:x?`column`:`rail`,[C,w]=(0,U.useState)(0),T=St(e,t,u,C),E=(0,U.useMemo)(()=>i&&e&&!s?{threads:t,activeId:f,draft:i.draft,pick:i.pick,readOnly:i.readOnly,blockAction:i.blockAction,viewer:{actions:n,agent:r,create:i.create,drafts:i.drafts},activate:p,marked:()=>w(e=>e+1),blockIdOf:t=>yn(e,t)}:null,[i,e,s,t,f,n,r]),D=pn(e,b||s?null:u);return Ct(T,t,f),(0,U.useLayoutEffect)(()=>y.current?.settle(),[S]),(0,G.jsxs)(`main`,{ref:v,...{0:{className:`x1n2onr6 xrvj5dj xc94fvo xl56j7k xwaa2ar x13zrc24 x1ffnkcp x4l9tsp`},2:{className:`x1n2onr6 xrvj5dj xl56j7k xwaa2ar x13zrc24 x1ffnkcp x4l9tsp xoiau2f`},1:{className:`x1n2onr6 xc94fvo xl56j7k xwaa2ar x13zrc24 x1ffnkcp x78zum5 xdt5ytf x1qjc9v5 x17qtykl`},3:{className:`x1n2onr6 xl56j7k xwaa2ar x13zrc24 x1ffnkcp xoiau2f x78zum5 xdt5ytf x1qjc9v5 x17qtykl`}}[(S===`rail`)<<1|!!b],children:[(0,G.jsx)(`div`,{className:`history-space-toc`,inert:!!s?.immersive,children:(0,G.jsx)(ln,{editor:e,threads:t,variant:S})}),e?(0,G.jsx)(Ut,{editor:e,shareBase:c}):null,(0,G.jsxs)(`article`,{ref:h,className:`x1n2onr6 x1vjfegm xh8yej3 xrgej4m xeuugli`,style:b?{marginInline:`auto`}:s?void 0:{"--ryugi-table-bleed":`368px`},onClick:e=>p(Tt(T,e.clientX,e.clientY)),children:[(0,G.jsx)(it,{}),(0,G.jsx)(ce,{value:E,children:(0,G.jsx)(Gt,{history:s,children:l})}),s?null:(0,G.jsx)(Mt,{activeId:f,anchors:T,container:m,threads:t})]}),(0,G.jsx)(`div`,{className:`x1n2onr6`,className:`history-space-comments ${{className:`x1n2onr6`}.className??``}`,inert:!!s?.immersive,children:(0,G.jsx)(Kt,{history:s?.immersive?null:s,children:(0,G.jsx)(jt,{actions:n,activeId:f,agent:r,anchors:T,blocked:D,narrow:b,railRef:d,threads:t,onActivate:p})})}),m&&o&&!s?o(m):null]})}function Dn({left:e,top:t,quote:n,wholeBlock:r,initial:a,restored:o,leaving:s,onChange:c,onSubmit:l,onCancel:u,ref:d}){return(0,G.jsx)(`div`,{ref:d,...{0:{className:`x10l6tqk x1u8a7rm xj6ak53 xowlrko xllfotl xatqbsq x1u6ievf`},1:{className:`x10l6tqk x1u8a7rm xj6ak53 x1u6ievf xxp0q0x x12l1aco xn0cd8s x47corl`}}[!!s|0],style:{left:e,top:t},children:(0,G.jsxs)(me,{active:!0,children:[(0,G.jsxs)(`div`,{className:`x78zum5 x1pha0wt x167g77z xz9dl7a x1hr3lfm xqfszdh x1j6dyjg`,children:[(0,G.jsx)(`span`,{className:`x98rzlu xeuugli xb3r6kr xuxw1ft xlyipyv xddlp02`,children:r?n:`“${n}”`}),o?(0,G.jsx)(`span`,{className:`x2lah0s x7zghnd`,children:i(`document.draftRestored`)}):null]}),(0,G.jsx)(Le,{autoFocus:!0,initial:a,placeholder:i(`document.draftPlaceholder`),onCancel:u,onChange:c,onSubmit:l})]})})}function On(e){let t=(0,U.useMemo)(Oe,[]),[n,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(!1),o=(0,U.useRef)(``),s=(0,U.useRef)(0),c=(0,U.useRef)(null),l=(0,U.useRef)(null);wt(i?null:n?.target.range??null,i?void 0:n?.target.elements);let u=(0,U.useCallback)(n=>{window.clearTimeout(s.current);let i=t.take(P(n.blockId,n.quote,n.blockIds,n.textRanges,n.diagram));o.current=i,a(!1),r({target:n,initial:i}),window.getSelection()?.removeAllRanges(),e()},[t,e]),d=(0,U.useCallback)(e=>{n&&(t.save(P(n.target.blockId,n.target.quote,n.target.blockIds,n.target.textRanges,n.target.diagram),e?o.current:``),a(!0),s.current=window.setTimeout(()=>{r(null),a(!1)},120))},[n,t]);return(0,U.useEffect)(()=>{if(!n||i)return;let e=e=>{let t=e.target;c.current?.contains(t)||l.current?.contains(t)||d(!0)};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[n,i,d]),(0,U.useEffect)(()=>()=>window.clearTimeout(s.current),[]),{drafts:t,draft:n,leaving:i,restored:!!n?.initial,open:u,close:d,onText:e=>{o.current=e},panelRef:c,toolbarRef:l}}var kn=46;function An(e,t){return Math.min(e+8,window.innerWidth-(t.offsetParent?.getBoundingClientRect().left??0)-40)}function jn({article:e,editor:t,enabled:n,onComment:r}){let i=xn(t,e.closest(`main`),n);return i?(0,G.jsx)(de,{left:An(i.right,e),top:i.top,onComment:()=>r(i)}):null}function Mn({blockId:e,element:t,node:n,host:r}){let i=r.closest(`main`);if(!i)return null;let a=n.getBoundingClientRect(),o=i.getBoundingClientRect(),s=document.createRange();return s.setStart(r,0),{blockId:e,quote:t.label,diagram:t.target,range:s,left:a.left-o.left,right:a.right-o.left,top:a.top-o.top,bottom:a.bottom-o.top}}function Nn(e){return{left:e.offsetLeft,right:Math.min(e.offsetLeft+e.offsetWidth,window.innerWidth-16)}}function Pn({editor:e,threads:t,actions:n,agent:r,canComment:i,canCommentDiagram:a=i,selection:o,clearSelection:s,resolveSelection:c,onCreate:l,onMain:u,onToolbar:d,history:f,shareBase:p,children:m}){let h=On(s),{draft:g,open:_}=h,[v,y]=(0,U.useState)(null),[b,x]=(0,U.useState)(0);(0,U.useLayoutEffect)(()=>{if(!v||f)return;let t=()=>{let t=v.querySelector(`.ryugi-editor-toolbar`);t?x(t.getBoundingClientRect().height):e?.isEditable()||x(0)};t();let n=new MutationObserver(t);return n.observe(v,{childList:!0}),()=>n.disconnect()},[v,f,e]),(0,U.useEffect)(()=>{if(!v||!d)return;let e=()=>d(v.querySelector(`.ryugi-editor-toolbar, .history-bar`)!==null);e();let t=new MutationObserver(e);return t.observe(v,{childList:!0}),()=>{t.disconnect(),d(!1)}},[v,d]);let S=h.leaving?null:g?.target??null,{drafts:C}=h,w=(0,U.useMemo)(()=>({draft:S,drafts:C,readOnly:!a,blockAction:i,pick:e=>{let t=Mn(e);t&&_(t)},create:(e,t)=>l({...e,range:document.createRange(),left:0,right:0,top:0,bottom:0},t)}),[i,a,S,C,_,l]),T=(0,U.useCallback)(()=>{let e=window.getSelection();navigator.clipboard?.writeText(e?.toString()??``),e?.removeAllRanges(),s()},[s]),E=(0,U.useMemo)(()=>({toolbarSlot:v,selectionActions:g?null:(0,G.jsx)(pe,{onCopy:T,onComment:i?()=>{let e=c();e&&_(e)}:void 0})}),[v,g,i,c,_,T]);return(0,G.jsxs)(Ee,{value:E,children:[(0,G.jsx)(`div`,{className:`ryugi-editor-toolbar-slot`,ref:y,children:b>0?(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`history-toolbar-space`,style:{height:b}}):null}),(0,G.jsx)(En,{actions:n,agent:r,diagram:w,editor:e,history:f,shareBase:p,threads:t,overlay:t=>(0,G.jsxs)(G.Fragment,{children:[o&&!g&&o.kind===`block`&&i?(0,G.jsx)(de,{left:An(o.right,t),ref:h.toolbarRef,top:o.top,onComment:()=>h.open(o)}):null,(0,G.jsx)(jn,{article:t,editor:e,enabled:i&&!g&&!o,onComment:h.open}),o&&!g&&o.kind===`nested`?(0,G.jsx)(ae,{left:o.left,ref:h.toolbarRef,top:Math.max(o.top-kn,0),children:(0,G.jsx)(pe,{onComment:i?()=>h.open(o):void 0,onCopy:T})}):null,g?(0,G.jsx)(Dn,{ref:h.panelRef,...ht(g.target,Nn(t),340,8),initial:g.initial,leaving:h.leaving,quote:ge(g.target),restored:h.restored,wholeBlock:g.target.kind===`block`,onCancel:()=>h.close(!0),onChange:h.onText,onSubmit:e=>l(g.target,e).then(e=>(e&&h.close(!1),e))},P(g.target.blockId,g.target.quote,g.target.blockIds,g.target.textRanges,g.target.diagram)):null]}),onMain:u,children:m})]})}function Fn(e){let t=ee(e);return t._headless=!0,[`registerDecoratorListener`,`registerRootListener`,`registerMutationListener`,`getRootElement`,`setRootElement`,`getElementByKey`,`focus`,`blur`].forEach(e=>{t[e]=()=>{(function(e,...t){throw function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);return n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(e,...t)})(439,e)}}),t}function In({text:e}){let t=(0,U.useRef)(null),n=(0,U.useRef)(null);return(0,U.useEffect)(()=>{let r=t.current;if(!r)return;let i=r.parentNode;if(!i)return;let a=n.current;return!a||a.parentNode!==i?(a=document.createComment(e),i.insertBefore(a,r),n.current=a):a.data!==e&&(a.data=e),()=>{n.current?.parentNode&&n.current.parentNode.removeChild(n.current),n.current=null}},[e]),(0,G.jsx)(`template`,{suppressHydrationWarning:!0,"data-rich-comment-anchor":``,ref:t})}var $=e=>`${R[e]} ${L[e]}`,Ln={h1:$(`headingH1`),h2:$(`headingH2`),h3:$(`headingH3`),h4:$(`headingH4`),h5:$(`headingH5`),h6:$(`headingH6`)};function Rn(e){return e.toLowerCase().trim().replaceAll(/[^\s\w\u3000-\u9FFF\uAC00-\uD7AF\uFF00-\uFFEF-]/g,``).replaceAll(/[\s_]+/g,`-`).replaceAll(/^-+|-+$/g,``)}function zn(e){return e.type===`comment`?``:e.text?e.text:e.children?e.children.map(zn).join(``):``}var Bn=/^["'«‘“‹「『"']/,Vn=/["'»’”›」』"']$/;function Hn(e,t,n,r,i,a){switch(e.type){case`root`:return(0,G.jsx)(G.Fragment,{children:n});case`paragraph`:{let r=e.format?{textAlign:e.format}:void 0;return(0,G.jsx)(`p`,{className:$(`paragraph`),style:r,children:n??(0,G.jsx)(`br`,{})},t)}case`heading`:{let o=e.tag,s=Rn(i||zn(e)),c=a??s;if(a===void 0&&s){let e=r.get(s);e===void 0?r.set(s,1):(c=`${s}-${e}`,r.set(s,e+1))}return(0,G.jsxs)(o,{className:Ln[o],id:c||void 0,children:[c&&(0,G.jsx)(`a`,{className:$(`headingAnchor`),href:`#${c}`,tabIndex:0,children:(0,G.jsx)(_,{"aria-hidden":!0,size:14,strokeWidth:2})}),n]},t)}case`rich-quote`:case`quote`:{let r=(i||zn(e)).trim(),a=Bn.test(r),o=Vn.test(r),s=e.attribution;return(0,G.jsxs)(`blockquote`,{className:$(`quote`),"data-no-close-quote":o?``:void 0,"data-no-open-quote":a?``:void 0,children:[n,s&&(0,G.jsxs)(`footer`,{className:$(`quoteAttribution`),children:[`— `,s]})]},t)}case`list`:{let r=e.listType===`number`?`ol`:`ul`,i=e.listType===`number`?$(`listOl`):e.listType===`check`?`${$(`checklist`)} ${$(`listUl`)}`:$(`listUl`);return(0,G.jsx)(r,{className:i,start:e.start===1?void 0:e.start,children:n},t)}case`listitem`:{let r=e.checked!==void 0,i=e.children?.some(e=>e.type===`list`),a=typeof e.value==`number`&&e.value>1?e.value:void 0,o;return o=i?$(`listNestedItem`):r?e.checked?`${$(`listItem`)} ${$(`listItemChecked`)}`:`${$(`listItem`)} ${$(`listItemUnchecked`)}`:$(`listItem`),(0,G.jsx)(`li`,{className:o,value:a,children:n},t)}case`link`:return(0,G.jsxs)(`a`,{className:$(`link`),href:e.url,rel:e.rel||`noopener`,target:e.target||`_blank`,children:[(0,G.jsx)(le,{href:e.url}),n]},t);case`autolink`:return(0,G.jsxs)(`a`,{className:$(`link`),href:e.url,rel:`noopener`,target:`_blank`,children:[(0,G.jsx)(le,{href:e.url}),n]},t);case`horizontalrule`:return(0,G.jsx)(`hr`,{className:$(`hr`)},t);case`table`:return(0,G.jsx)(`div`,{className:$(`tableScrollableWrapper`),children:(0,G.jsx)(`table`,{className:$(`table`),children:n})},t);case`tablerow`:return(0,G.jsx)(`tr`,{children:n},t);case`tablecell`:{let r=e.headerState?`th`:`td`,i=e.headerState?$(`tableCellHeader`):$(`tableCell`);return(0,G.jsx)(r,{className:i,colSpan:e.colSpan>1?e.colSpan:void 0,children:n},t)}case`details`:{let r=e.summary||``;return(0,G.jsxs)(`details`,{className:`${I.details} ${M.details}`,open:e.open||void 0,children:[(0,G.jsxs)(`summary`,{className:`${I.summary} ${M.summary}`,children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`${I.chevron} ${M.chevron}`,children:(0,G.jsx)(`svg`,{fill:`none`,height:`20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,viewBox:`0 0 20 20`,width:`20`,children:(0,G.jsx)(`path`,{d:`M8 6L12 10L8 14`})})}),(0,G.jsx)(`span`,{className:`${I.summaryText} ${M.summaryText}`,children:r})]}),(0,G.jsx)(`div`,{className:`${I.content} ${M.content}`,children:n})]},t)}case`spoiler`:return(0,G.jsx)(`span`,{className:$(`spoiler`),role:`button`,tabIndex:0,children:n},t);case`tag`:return(0,G.jsx)(`span`,{className:$(`tag`),style:{backgroundColor:De(e.text)},children:e.text},t);case`comment`:return(0,G.jsx)(In,{text:e.text??``},t);case`ruby`:return(0,U.createElement)(Te,{key:t,rendererKey:`Ruby`,defaultRenderer:fe,props:{reading:e.reading??``,children:n}});case`code`:return(0,G.jsx)(`pre`,{className:`rich-code-block`,children:(0,G.jsx)(`code`,{children:n})},t);case`code-highlight`:return(0,G.jsx)(`span`,{children:e.text},t);case`linebreak`:return(0,G.jsx)(`br`,{},t);case`tab`:return(0,G.jsx)(`span`,{children:` `},t);default:return null}}var Un=e=>`${R[e]} ${L[e]}`,Wn=[[1,`textBold`],[2,`textItalic`],[4,`textStrikethrough`],[8,`textUnderline`],[16,`textCode`],[32,`textSubscript`],[64,`textSuperscript`],[128,`textHighlight`]];function Gn(e){let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e===-1)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();if(!r||!i)continue;let a=r.replaceAll(/-([a-z])/g,(e,t)=>t.toUpperCase());t[a]=i}return t}function Kn(e,t){let n=e.text,r=e.format||0;for(let[e,i]of Wn)r&e&&(n=(0,G.jsx)(`span`,{className:Un(i),children:n},`${t}-${e}`));return e.style&&(n=(0,G.jsx)(`span`,{style:Gn(e.style),children:n},t)),n}function qn(e,t=!1){let n=[],r=t?e.findIndex(e=>e.type===`paragraph`):-1,i=e=>e.type===`image`&&typeof e.layout==`string`&&e.layout.startsWith(`float-`);for(let t=0;t<e.length;t++){let a=[t];if(t===r&&t+1<e.length&&a.push(++t),i(e[t]))for(;++t<e.length;){a.push(t);let n=e[t];if(!i(n)&&![`paragraph`,`list`,`quote`,`rich-quote`,`comment`].includes(n.type))break}n.push(a)}let a=[];for(let t of n)a.length&&t.every(t=>e[t].type===`comment`)||a.at(-1)?.every(t=>e[t].type===`comment`)?a.at(-1).push(...t):a.push(t);return a}function Jn(e){let t={},n=new Set,r={},i=1;function a(e){if(e.type===`footnote`&&e.identifier){let t=e.identifier;n.has(t)||(n.add(t),r[t]=i++)}if(e.type===`footnote-section`&&e.definitions&&Object.assign(t,e.definitions),e.children)for(let t of e.children)a(t);if(e.root&&a(e.root),e.content&&typeof e.content==`object`&&e.content.root&&a(e.content),e.cells&&Array.isArray(e.cells))for(let t of e.cells)t&&t.root&&a(t)}a(e);for(let e of n)e in t||(t[e]=``);return{definitions:t,displayNumberMap:r}}var Yn=e=>`${R.alert} ${L.alert} rich-alert-${e}`;function Xn(e,t,n){switch(e.type){case`alert-quote`:return(0,U.createElement)(`div`,{key:t,className:Yn(e.alertType)},n);case`banner`:return(0,U.createElement)(`div`,{key:t,className:`rich-banner rich-banner-${e.bannerType}`},n);case`grid-container`:return(0,U.createElement)(`div`,{key:t,className:`${we.container} ${Ne.container}`},n);default:return(0,U.isValidElement)(n)?(0,U.cloneElement)(n,{key:t}):n}}function Zn(e,t,n){return(0,U.isValidElement)(e)&&typeof e.type==`string`?(0,U.cloneElement)(e,{"data-block-id":t}):(0,G.jsx)(`div`,{className:`rich-block-anchor`,"data-block-id":t,children:e},`${n}-block-anchor`)}function Qn(e,t,n,r){return t?(r.blockAnchor??Zn)(e,t,n):e}function $n(e,t,n,r,i,a,o){let s=o.recycleKeys?i:e.getKey?e.getKey():i,c=o.headingIds?.get(e.getKey?.()),{builtinNodeOverrides:l}=o;if(typeof e.decorate==`function`){let r=null;try{r=e.decorate(t,n)}catch{}if(r!=null){let t=e.exportJSON?e.exportJSON():{},n=l?.[t.type];return Qn(n?n(t,s,[r],()=>Xn(t,s,r)):Xn(t,s,r),a,s,o)}}let u=e.exportJSON?e.exportJSON():{};if(u.type===`text`){let e=l?.text;return e?e(u,s,null,()=>Kn(u,s)):Kn(u,s)}let d=typeof e.getChildren==`function`?e.getChildren():[];Array.isArray(u.children)&&u.children.length===0&&d.length>0&&(u.children=d.map(e=>({type:typeof e.getType==`function`?e.getType():e.__type})));let f=null;d.length>0&&(f=d.map((e,i)=>$n(e,t,n,r,`${s}-${i}`,void 0,o)));let p=e.getTextContent?e.getTextContent():void 0,m=l?.[u.type];return Qn(m?m(u,s,f,()=>Hn(u,s,f,r,p,c)):Hn(u,s,f,r,p,c),a,s,o)}function er(e,t,n,r){let i=Fn({nodes:t,theme:z,editable:!1,onError:e=>{console.error(`[RichRenderer]`,e)}}),a={namespace:`ssr`,theme:z},o=ve(e),s=i.parseEditorState(o);i.setEditorState(s);let c=Jn(o),l=o.root?.children,u=new Map,d=new Map,f=new Map,p=s.read(()=>{let e=new Map,t=(n,r,i)=>{if(f.set(n.getKey(),i),n.getType()===`heading`){let t=Rn(n.getTextContent()),i=e.get(t)??0,a=t?`${t}${i?`-${i}`:``}`:``;e.set(t,i+1),u.set(n.getKey(),a),a&&d.set(a,r)}te(n)&&n.getChildren().forEach((e,n)=>t(e,r,`${i}.${n}`))},n=j().getChildren();return n.forEach((e,n)=>t(e,n,`${n}:0`)),n}),m=new Set,h=p.map((e,t)=>{let n=l?.[t]??{type:e.getType(),version:1},r=n.$?.blockId??`renderer-${t}`;for(;m.has(r);)r=`${r}:${t}`;return m.add(r),{id:r,data:n,index:t,pool:`${n.type}:${n.type===`dynamic`?n.url:n.tag??``}`}}),g=qn(h.map(e=>e.data),r),_=new Map,v=g.map((e,t)=>{let n=e.map(e=>(_.set(e,t),h[e])),r=n[0];return{blocks:n,id:r.id,data:n.length===1?r.data:{type:`flow-group`,version:1,children:n.map(e=>e.data)},pool:n.length===1?r.pool:`flow-group`}});for(let[e,t]of d)d.set(e,_.get(t));let y=(e,t)=>s.read(()=>{let r=v[e];return r?(0,G.jsx)(U.Fragment,{children:r.blocks.map((e,r)=>$n(p[e.index],i,a,new Map,t===void 0?`ssr-${e.index}`:`recycler-${t}-${r}`,l?.[e.index]?.$?.blockId,{...n,headingIds:u,recycleKeys:t!==void 0}))},t===void 0?r.id:`recycler-${t}`):null}),b;return{document:{editor:i,rows:v,headingRows:d,render:y,renderAll:()=>b??=(0,G.jsx)(G.Fragment,{children:v.map((e,t)=>y(t))}),nodePath:e=>e?f.get(e)??e:`0`},footnoteData:c,renderNestedContent:e=>{let r=Fn({nodes:t,theme:z,editable:!1,onError:e=>{console.error(`[RichRenderer:nested]`,e)}}),i={namespace:`ssr-nested`,theme:z},a=ve(e),o=r.parseEditorState(a);r.setEditorState(o);let s=null,c=a.root?.children;return o.read(()=>{let e=j(),t=new Map,a=e.getChildren().map((e,a)=>$n(e,r,i,t,`nested-${a}`,c?.[a]?.$?.blockId,n));s=(0,G.jsx)(G.Fragment,{children:a})}),s}}}function tr({document:e}){return e.renderAll()}function nr({value:e,variant:t=`article`,theme:n,className:r,style:i,as:a=`div`,nested:o=!1,rendererConfig:s,extraNodes:c,builtinNodeOverrides:l,blockAnchor:u,surface:d,virtualization:f}){let p=je(t),m=be(),{document:h,footnoteData:g,renderNestedContent:_}=(0,U.useMemo)(()=>er(e,c?[...ye,...c]:ye,{blockAnchor:u,builtinNodeOverrides:l},t===`note`),[u,l,c,e,t]),{scrollContainer:v,overscan:y,estimateBlockHeight:b,preserveCapacity:x}=typeof f==`object`?f:{},S=!!f,C=f===!1,T=(0,U.useMemo)(()=>C?tr:S?ze({scrollContainer:v,overscan:y,estimateBlockHeight:b,preserveCapacity:x}):d??tr,[d,S,C,v,y,b,x]),E=[`rich-content`,p,r].filter(Boolean).join(` `),D=typeof a==`string`?{suppressHydrationWarning:!0,className:E,"data-rich-nested":o?`true`:void 0,"data-theme":n}:{},O=n??`light`;return(0,G.jsx)(w,{className:p,theme:O,children:(0,G.jsx)(_e,{colorScheme:O,children:(0,G.jsx)(Ce,{config:s,mode:`renderer`,variant:t,children:(0,G.jsx)(Se,{definitions:g.definitions,displayNumberMap:g.displayNumberMap,children:(0,G.jsx)(ke,{value:m??_,children:(0,G.jsx)(a,{...D,style:i,children:(0,G.jsx)(T,{document:h})})})})})})})}function rr({error:e,onDismiss:t}){return e?(0,W.createPortal)((0,G.jsxs)(`div`,{role:`alert`,className:`xixxii4 xy58vm5 xvf9o5y xvueqy4 xeq5yr9 x27kpxv x11uqc5h x78zum5 x6s0dn4 x1v2ro7d x10dr8xq x1hr3lfm xur7f20 xmkeg23 x1y0btm7 xgcsv5v x1rozbrz xo2rkog xqfszdh x4z9k3i x1pzk2i8`,children:[(0,G.jsx)(`span`,{children:i(`documentExport.failed`)}),(0,G.jsx)(`button`,{"aria-label":i(`common.close`),type:`button`,onClick:t,className:`xrvj5dj x1ku5rj1 xjbqb8w x1bo0w0s xc342km xgd8bvy x1fgtraw x1717udv x1ypdohk x2lah0s`,children:(0,G.jsx)(S,{size:16})})]}),document.body):null}var ir={[Ae]:ie,[Me]:xe,[Pe]:Fe},ar={claude:`Claude Code`,codex:`Codex`},or=e=>String(e).padStart(2,`0`);function sr(e){let t=new Date(e);return`${t.getMonth()+1}/${t.getDate()} ${or(t.getHours())}:${or(t.getMinutes())}`}function cr({prompt:e,empty:t,theme:n}){let r=(0,U.useRef)(null),[a,o]=(0,U.useState)(!1),[s,c]=(0,U.useState)(!1);return(0,U.useLayoutEffect)(()=>{let e=r.current;e&&!a&&c(e.scrollHeight>e.clientHeight+1)},[a,e]),(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`aside`,{"aria-label":i(`document.promptLabel`),"data-ryugi-no-comment":``,"data-task-prompt":``,className:`x8o32fp x1onr9mi xyumdvf x1t7ytsu x1awn4rw x1hx0egp`,children:[(0,G.jsxs)(`p`,{className:`x78zum5 x6s0dn4 x17d4w8g x1ghz6dp xddlp02 x1qt5hsa xd4r4e8`,children:[(0,G.jsx)(tt,{"aria-hidden":`true`,size:12}),i(`document.promptMeta`,{time:sr(e.at),agent:ar[e.harness]??e.harness})]}),(0,G.jsx)(`div`,{"data-task-prompt-body":``,ref:r,...{0:{className:`x1gslohp x1bo0w0s xif65rj x11m8ghp xb3r6kr`},1:{className:`x1gslohp x1bo0w0s xif65rj x11m8ghp xb3r6kr x1n19c2o`}}[!a|0],children:(0,G.jsx)(nr,{rendererConfig:ir,theme:n,value:e.state,variant:`comment`})}),(s||a)&&(0,G.jsx)(`button`,{"aria-expanded":a,type:`button`,onClick:()=>o(e=>!e),className:`x1gslohp x1717udv xc342km xjbqb8w xddlp02 x12rs2w1 xjb2p0i xfifm61 x1bvjpef xrys4gj x1ypdohk`,children:i(a?`document.promptCollapse`:`document.promptExpand`)})]}),t&&(0,G.jsx)(`p`,{className:`x103tiuj xddlp02 x2ouz8m`,children:i(`document.promptEmpty`)})]})}var lr=[`wheel`,`touchmove`,`keydown`,`pointerdown`];function ur(e){return e.getEditorState().read(()=>j().getChildren().map(e=>({id:A(e,F),key:e.getKey()}))).flatMap(({id:t,key:n})=>{let r=t?e.getElementByKey(n):null;return r?[{id:t,element:r}]:[]})}function dr(e,t){if(t.kind!==`document`)return!1;let n=ur(e).find(({id:e})=>e===t.blockId);if(!n)return!1;let r=n.element.getBoundingClientRect().top-t.top;return r!==0&&window.scrollBy({top:r,behavior:`instant`}),!0}function fr(e){(0,U.useEffect)(()=>{if(!e)return;let t=h({read(){let t=null;for(let{id:n,element:r}of ur(e)){let{top:e,bottom:i}=r.getBoundingClientRect();if(!(i<=0)){if(e>=0&&e<window.innerHeight)return{kind:`document`,blockId:n,top:e};if(t??={kind:`document`,blockId:n,top:e},e>=0)break}}return t},apply:t=>dr(e,t)}),n=()=>{let t=v();t&&dr(e,t)};n();let r=e.registerUpdateListener(n);for(let e of lr)window.addEventListener(e,m,{passive:!0});return()=>{t(),r();for(let e of lr)window.removeEventListener(e,m)}},[e])}var pr=e=>`${V(e)}:${qe(e)}`;async function mr(e,t){let n=new Map;for(let t of Je(e))Ye(t)&&n.set(pr(t),t);let r=await Promise.all([...n].map(async([e,n])=>[e,await t(n).catch(()=>void 0)])),i={};for(let[e,t]of r)t&&(i[e]=t);return i}function hr(e){let t=structuredClone({...e,comments:e.comments??Be()}),n=t=>{if(!t||t.startsWith(`#`))return t;try{return new URL(t,e.contentBase||e.sourceUrl).href}catch{return t}},r=e=>{if(!e||typeof e!=`object`)return;let t=e;if(typeof t.type==`string`){for(let e of[`src`,`poster`,`favicon`,`image`])typeof t[e]==`string`&&(t[e]=n(t[e]));if((t.type===`link`||t.type===`autolink`||t.type===`link-card`)&&typeof t.url==`string`&&(t.url=n(t.url)),t.type===`excalidraw`&&typeof t.snapshot==`string`){let[e=``,...r]=t.snapshot.split(`
|
|
3
3
|
`);!e.trimStart().startsWith(`{`)&&!e.startsWith(`ref:`)&&/(?:\.excalidraw(?:[?#]|$)|^https?:|^blob:)/.test(e)&&(t.snapshot=[n(e),...r].join(`
|
|
4
|
-
`))}}for(let e of Object.values(t))typeof e==`object`&&r(e)};return r(t.state),t}function gr(e,t){let n;if(t.cloudOrigin){if(!e.to)return;n=new URL(`/a/${encodeURIComponent(e.to)}`,t.cloudOrigin)}else{n=new URL(`/${H(e)}/${encodeURIComponent(V(e))}`,t.sourceUrl);let r=new URL(t.sourceUrl);n.searchParams.set(`at`,r.searchParams.get(`at`)??r.pathname)}for(let t of
|
|
4
|
+
`))}}for(let e of Object.values(t))typeof e==`object`&&r(e)};return r(t.state),t}function gr(e,t){let n;if(t.cloudOrigin){if(!e.to)return;n=new URL(`/a/${encodeURIComponent(e.to)}`,t.cloudOrigin)}else{n=new URL(`/${H(e)}/${encodeURIComponent(V(e))}`,t.sourceUrl);let r=new URL(t.sourceUrl);n.searchParams.set(`at`,r.searchParams.get(`at`)??r.pathname)}for(let t of p)e[t]&&n.searchParams.set(t,e[t]);return n.href}function _r(e){let[n,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(!1),o=(0,U.useRef)(e);o.current=e;let s=(0,U.useRef)(null),c=async()=>{let e=o.current;if(!e.editor||e.available===!1||s.current)return;let n=new AbortController;s.current=n,r(!0),a(!1);try{let r=e.editor.getEditorState().toJSON(),i=e.scenes?await mr(r,e.scenes.load):void 0;if(n.signal.aborted)return;let a=hr({state:r,...i?{embeds:i}:{},comments:e.comments,title:e.title,contentBase:e.contentBase,sourceUrl:location.href,cloudOrigin:y()??(e.cloud?location.origin:void 0)}),{printDocument:o}=await t(async()=>{let{printDocument:e}=await import(`./printDocument-iDndVXNS.js`);return{printDocument:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56]),import.meta.url);await o(a,{signal:n.signal})}catch(e){n.signal.aborted||(a(!0),console.warn(`Document export failed`,e))}finally{s.current===n&&(s.current=null),n.signal.aborted||r(!1)}},u=(0,U.useRef)(c);return u.current=c,(0,U.useEffect)(()=>{r(!1),a(!1);let t=t=>{l(t)&&t.data?.type===`ryugi:document-export`&&t.data.id===e.id&&t.data.format===`pdf`&&u.current()};return window.addEventListener(`message`,t),()=>{window.removeEventListener(`message`,t),s.current?.abort(),s.current=null}},[e.id]),{state:n?`preparing`:e.editor&&e.available!==!1?`ready`:null,error:i,dismiss:()=>a(!1),exportPdf:()=>void c()}}var vr=2400,yr=[{boxShadow:`inset 2px 0 0 #0d99ff`,backgroundColor:`rgb(13 153 255 / 0.13)`},{boxShadow:`inset 2px 0 0 transparent`,backgroundColor:`transparent`}];function br(e,t){let n=e.getEditorState().read(()=>j().getChildren().find(e=>A(e,F)===t)?.getKey());return n?e.getElementByKey(n):null}var xr=50,Sr=100;function Cr(e){let t=e.indexOf(`:`),n=e.slice(0,t),r=e.slice(t+1);return`[data-ref-chip="${n}"][data-ref-key="${r}"], [data-ref-to="${n}"][data-ref-key="${r}"]`}function wr(e){let t=0,n=setInterval(()=>{let r=document.querySelector(Cr(e));r&&Y(r),(r||++t>=xr)&&clearInterval(n)},Sr);return()=>clearInterval(n)}function Tr(e,t){let n=0,r=()=>{let r=br(e,t);return r&&(Y(r),r.animate(yr,{duration:vr,easing:`ease-out`})),!!r||++n>=xr};if(r())return()=>void 0;let i=setInterval(()=>{r()&&clearInterval(i)},Sr);return()=>clearInterval(i)}var Er=(e,t)=>H(e)===`document`&&(e.to===t||V(e)===t);function Dr(e,n,r,i,a){let s=!!r,[c,l]=(0,U.useState)(null),p=(0,U.useMemo)(()=>s&&f(),[s]),{role:m}=u(),h=(0,U.useRef)(()=>void 0);return(0,U.useEffect)(()=>{if(!s)return;let e=Z(),t=()=>{let t=Xe(e.history.state,n);t!==null&&(h.current(),window.scrollTo({top:t,behavior:`instant`}))};return e.addEventListener(`popstate`,t),()=>e.removeEventListener(`popstate`,t)},[s,n]),(0,U.useEffect)(()=>{if(!p)return;let t,n,r=b(r=>{if(r.kind===`active`&&l(r.key),r.kind===`reveal`&&(l(r.key),t?.(),t=wr(r.key)),r.kind===`focus`&&r.block&&e&&(n?.(),n=Tr(e,r.block)),r.kind!==`scroll-to`)return;l(r.key);let i=e&&br(e,r.blockId);i&&(Y(i),i.animate(yr,{duration:vr,easing:`ease-out`}))});return o({kind:`ready`}),()=>{r(),t?.(),n?.()}},[p,e]),(0,U.useMemo)(()=>s?{active:c,isSelf:e=>Er(e,n),useBoard:r,useScene:i,openEmbed:e=>{if(p)return o({kind:`embed-open`,target:e});let n=a?.refId(e);if(!a||!n)return;let r=Ge(a.frameSrc(`whiteboard`,n),e);t(async()=>{let{openArtifactModal:e}=await import(`./ArtifactModal-BF3VCQrn.js`);return{openArtifactModal:e}},__vite__mapDeps([57,1,10,3,4,2,5,6,7,11,12,13,58,30,59,18,35,60,61,40]),import.meta.url).then(({openArtifactModal:t})=>t({allow:a.frameAllow,src:r,title:e.label??V(e)}))},open:t=>{let r=H(t);if(Er(t,n)){let r=e&&t.block?br(e,t.block):null;if(!r||!t.block){window.scrollTo({top:0,behavior:`instant`});return}p&&m===`beside`?o({kind:`block-focus`,block:t.block}):$e(n,t.block,Z()),h.current(),h.current=Y(r),r.animate(yr,{duration:vr,easing:`ease-out`})}else p?o({kind:`ref-open`,target:t}):location.assign(`/document/${n}${d(location.search,Ze(V(t),r,t,`document`))}`)}}:null,[s,c,p,m,e,n,r,i,a])}function Or(e){let[t,n]=(0,U.useState)([]);return(0,U.useEffect)(()=>{if(!e)return;let t=()=>{let t=Je(e.getEditorState().toJSON());n(e=>JSON.stringify(e)===JSON.stringify(t)?e:t)};return t(),e.registerUpdateListener(t)},[e]),t}function kr(e,t){return j().getChildren().flatMap(n=>{let r=A(n,F),i=e.getElementByKey(n.getKey());if(!r||!i||!t.intersectsNode(i))return[];let a=document.createRange();if(a.selectNodeContents(i),t.compareBoundaryPoints(Range.START_TO_START,a)>0&&a.setStart(t.startContainer,t.startOffset),t.compareBoundaryPoints(Range.END_TO_END,a)<0&&a.setEnd(t.endContainer,t.endOffset),a.collapsed)return[];let o=a.toString();if(!o&&i.textContent)return[];let s=document.createRange();return s.selectNodeContents(i),s.setEnd(a.startContainer,a.startOffset),[{blockId:r,quote:o,start:s.toString().length}]})}var Ar=200;function jr(e,t){let n=(t instanceof Element?t:t?.parentElement)?.closest(`[contenteditable="true"]`);return!!(n&&n!==e&&e.contains(n))}function Mr(e,t){let n=e.read(()=>{let t=re();return T(t)?j().getChildren().flatMap(n=>{if(!t.has(n.getKey()))return[];let r=A(n,F),i=e.getElementByKey(n.getKey());return r&&i?[{id:r,element:i}]:[]}):[]});if(n.length){let e=n.map(e=>e.element),r=e.map(e=>e.getBoundingClientRect()),i=t.getBoundingClientRect(),a=document.createRange();return a.selectNodeContents(e[0]),{kind:`block`,blockId:n[0].id,...n.length>1?{blockIds:n.map(e=>e.id)}:{},quote:``,elements:e,range:a,left:Math.min(...r.map(e=>e.left))-i.left,right:Math.max(...r.map(e=>e.right))-i.left,top:r[0].top-i.top,bottom:r.at(-1).bottom-i.top}}let r=window.getSelection(),i=e.getRootElement();if(!r||r.isCollapsed||r.rangeCount===0||!i?.contains(r.anchorNode)||!i.contains(r.focusNode))return null;let a=r.toString().trim(),o=r.getRangeAt(0),s=e.read(()=>kr(e,o));if(!s.length||!a)return null;let c=jr(i,r.anchorNode)&&jr(i,r.focusNode),l=[...o.getClientRects()],u=l[0]??o.getBoundingClientRect(),d=l.at(-1)??u,f=t.getBoundingClientRect();return{blockId:s[0].blockId,...s.length>1?{blockIds:s.map(e=>e.blockId),textRanges:s}:c?{textRanges:s}:{},...c?{kind:`nested`}:{},quote:a.slice(0,500),left:u.left-f.left,bottom:d.bottom-f.top,top:u.top-f.top,right:Math.max(...l.map(e=>e.right),d.right)-f.left,range:o.cloneRange()}}function Nr(e,t){let[n,r]=(0,U.useState)(null);return(0,U.useEffect)(()=>{if(!e||!t)return;let n=0,i=()=>{clearTimeout(n),n=window.setTimeout(()=>r(Mr(e,t)),Ar)};document.addEventListener(`selectionchange`,i);let a=e.registerUpdateListener(i);window.addEventListener(`scroll`,i,!0),window.addEventListener(`resize`,i);let o=new ResizeObserver(i);return e.getRootElement()&&o.observe(e.getRootElement()),()=>{clearTimeout(n),document.removeEventListener(`selectionchange`,i),a(),window.removeEventListener(`scroll`,i,!0),window.removeEventListener(`resize`,i),o.disconnect()}},[e,t]),[n,(0,U.useCallback)(()=>{r(null),e?.read(()=>T(re()))&&e.update(()=>E(null))},[e]),(0,U.useCallback)(()=>e&&t?Mr(e,t):null,[e,t])]}function Pr(){let e=new Set;return{emit:t=>e.forEach(e=>e(t)),subscribe:t=>(e.add(t),()=>e.delete(t))}}export{Ct as C,nt as E,wt as S,it as T,qt as _,Or as a,Tt as b,gr as c,cr as d,rr as f,Zt as g,En as h,Dr as i,dr as l,Pn as m,Nr as n,_r as o,nr as p,kr as r,pr as s,Pr as t,fr as u,Gt as v,_t as w,St as x,Ut as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./route-
|
|
1
|
+
import{_ as e}from"./route-DCXI9Pag.js";import{t}from"./jsx-runtime-LKYXHABd.js";import{Dt as n}from"./MotionConfigContext-HC2vqcJO.js";var r={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]};r.node;var i=n(r),a=t(),o=184320,s=262144,c=80,l=e=>e?.trim().slice(0,c)||void 0,u={pin:{kVAEAm:`x10l6tqk`,kzqmXN:`xgd8bvy`,kZKoxP:`x1fgtraw`,kmVPX3:`x1717udv`,k1xSpc:`xrvj5dj`,kgQiWS:`x1ku5rj1`,kaIpWk:`x983p9h`,kMzoRj:`xdh2fpr`,ksu8eU:`x1y0btm7`,kVAM5u:`x1im9181`,kWkggS:`xudn41b`,kMwMTN:`x6l8oc8`,kMv6JI:`xqfszdh`,kGuDYH:`x1j6dyjg`,k63SB2:`x1s688f`,k3aq6I:`x105ttfm`,kfzvcC:`x67bb7w`,kkrTdU:`x1ypdohk`,kGVxlE:`x3oy991`,kY2c9j:`x1q8xho0`,$$css:!0},pinReplied:{kWkggS:`x1cjskoo`,$$css:!0},pinReject:{kWkggS:`x9e8z1k`,$$css:!0},pinResolved:{kWkggS:`x4xwj5a`,kMwMTN:`xcfla50`,$$css:!0},pinDetached:{kWkggS:`x184qs1t`,ksu8eU:`xbsl7fq`,kVAM5u:`x1b74vrs`,kMwMTN:`x16m9qdy`,$$css:!0},pinActive:{kMeerF:`x1s780dp`,k3XXqK:`xaatb59`,kjBf7l:`xr7sard`,$$css:!0}};function d({label:e,rect:t}){return(0,a.jsx)(`div`,{className:`x10l6tqk xvndefy x1y0btm7 x11cp7ww x1mzvsll x1sxf85j x47corl xhtitgo`,style:{left:t.x,top:t.y,width:t.w,height:t.h},children:e?(0,a.jsx)(`div`,{className:`x10l6tqk x1ojtbga x10hu2aj x1qx5ct2 xlkn9b3 x12oqio5 xudn41b x6l8oc8 x1b02387 x1j6dyjg xk50ysn x1fc57z9 xuxw1ft x1va8c73 xb3r6kr xlyipyv`,children:e}):null})}function f({active:t,ariaLabel:n,dataVerdict:r,detached:i,label:o,onClick:s,onMouseEnter:c,onMouseLeave:l,reject:d,replied:f,resolved:p,title:m,x:h,y:g}){return(0,a.jsx)(`button`,{"aria-label":n,"data-verdict":r,title:m,type:`button`,onClick:s,onMouseEnter:c,onMouseLeave:l,...e(u.pin,f&&u.pinReplied,d&&u.pinReject,p&&u.pinResolved,i&&u.pinDetached,t&&u.pinActive),style:{left:h,top:g},children:o})}function p({x:e,y:t}){return(0,a.jsx)(`span`,{className:`x10l6tqk xgd8bvy x1fgtraw x1717udv xrvj5dj x1ku5rj1 x983p9h xdh2fpr x1y0btm7 x1im9181 xudn41b x6l8oc8 xqfszdh x1j6dyjg x1s688f x105ttfm x67bb7w x1ypdohk x3oy991 x1q8xho0`,style:{left:e,top:t}})}function m({children:e,style:t}){return(0,a.jsx)(`div`,{className:`x10l6tqk x1cvmir6 x18b33ah xixl9f9 xmkeg23 x1y0btm7 x12xov25 x12ilycc xo2rkog x1d5q07e x67bb7w xt0e3qv x1hx0egp x1355qak`,style:t,children:e})}var h=1024,g=768;function _(e){let t=e.slice(e.indexOf(`,`)+1),n=t.endsWith(`==`)?2:+!!t.endsWith(`=`);return Math.floor(t.length*3/4)-n}function v(e){return async(t,n,r)=>{let i=document.createElement(`canvas`);i.width=Math.max(1,Math.round(t.sw*n)),i.height=Math.max(1,Math.round(t.sh*n));let a=i.getContext(`2d`);return a?(a.fillStyle=`#fff`,a.fillRect(0,0,i.width,i.height),e(a,t,i.width,i.height),i.toDataURL(`image/jpeg`,r)):null}}async function y(e,t,n=o){let r=Math.max(t.sw,t.sh);if(r<=0)return null;let i=Math.min(1,h/r),a=Math.min(g,r)/r,s=Math.max(i*.75,a),c=[[i,.85],[i,.7],...s<i?[[s,.7]]:[]];for(let[r,i]of c){let a=await e.encode(t,r,i);if(!a)return null;if(_(a)<=n)return a}return null}export{f as a,s as c,i as d,m as i,o as l,_ as n,p as o,y as r,d as s,v as t,l as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e}from"./editor-p4kHebXo.js";var t=[e];export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Bt as e,Ft as t,Gt as n,Ht as r,Mt as i,Qt as a,Ut as o,Zt as s}from"./editor-
|
|
1
|
+
import{Bt as e,Ft as t,Gt as n,Ht as r,Mt as i,Qt as a,Ut as o,Zt as s}from"./editor-p4kHebXo.js";import{r as c}from"./dist-ezs7BFRb.js";var l={__proto__:null,anyref:34,dataref:34,eqref:34,externref:34,i31ref:34,funcref:34,i8:34,i16:34,i32:34,i64:34,f32:34,f64:34},u=c.deserialize({version:14,states:`!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h`,stateData:`!P~O_OSPOSQOS~OTPOVROXROYROZROaQO~OSUO~P]OSXO~P]O`,goto:`xaPPPPPPbPbPPPhPPPrXROPTVQTOQVPTWTVXSOPTV`,nodeNames:`⚠ LineComment BlockComment Module ) ( App Identifier Type Keyword Number String`,maxTerm:17,nodeProps:[[`isolate`,-3,1,2,11,``],[`openedBy`,4,`(`],[`closedBy`,5,`)`],[`group`,-6,6,7,8,9,10,11,`Expression`]],skippedNodes:[0,1,2],repeatNodeCount:1,tokenData:"0o~R^XY}YZ}]^}pq}rs!Stu#pxy'Uyz(e{|(j}!O(j!Q!R(s!R![*p!]!^.^#T#o.{~!SO_~~!VVOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j<%lO!S~!qOZ~~!tRO;'S!S;'S;=`!};=`O!S~#QWOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j;=`<%l!S<%lO!S~#mP;=`<%l!S~#siqr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!Q![%b![!]%b!^!_%b!_!`%b!`!a%b!a!b%b!b!c%b!c!}%b#Q#R%b#R#S%b#S#T%b#T#o%b#p#q%b#r#s%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),o.add({App:r,BlockComment(e){return{from:e.from+2,to:e.to-2}}}),s({Keyword:a.keyword,Type:a.typeName,Number:a.number,String:a.string,Identifier:a.variableName,LineComment:a.lineComment,BlockComment:a.blockComment,"( )":a.paren})]}),languageData:{commentTokens:{line:`;;`,block:{open:`(;`,close:`;)`}},closeBrackets:{brackets:[`(`,`"`]}}});function f(){return new t(d)}export{f as wast};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ft as e,Gt as t,Ht as n,Mt as r,Qt as i,Rt as a,Ut as o,Zt as s}from"./editor-B_dmAT7r.js";import{r as c}from"./dist-DHHkE5Pc.js";import{n as l,r as u}from"./dist--v3nH0C2.js";var d=110,f=1,p=2,m=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function h(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function g(e){return e>=48&&e<=57}var _=new l((e,t)=>{if(e.next==40){let t=e.peek(-1);(h(t)||g(t)||t==95||t==45)&&e.acceptToken(p,1)}}),v=new l(e=>{if(m.indexOf(e.peek(-1))>-1){let{next:t}=e;(h(t)||t==95||t==35||t==46||t==91||t==58||t==45)&&e.acceptToken(d)}}),y=new l(e=>{if(m.indexOf(e.peek(-1))<0){let{next:t}=e;if(t==37&&(e.advance(),e.acceptToken(f)),h(t)){do e.advance();while(h(e.next));e.acceptToken(f)}}}),b=s({"import charset namespace keyframes media supports when":i.definitionKeyword,"from to selector":i.keyword,NamespaceName:i.namespace,KeyframeName:i.labelName,TagName:i.tagName,ClassName:i.className,PseudoClassName:i.constant(i.className),IdName:i.labelName,"FeatureName PropertyName PropertyVariable":i.propertyName,AttributeName:i.attributeName,NumberLiteral:i.number,KeywordQuery:i.keyword,UnaryQueryOp:i.operatorKeyword,"CallTag ValueName":i.atom,VariableName:i.variableName,"AtKeyword Interpolation":i.special(i.variableName),Callee:i.operatorKeyword,Unit:i.unit,"UniversalSelector NestingSelector":i.definitionOperator,MatchOp:i.compareOperator,"ChildOp SiblingOp, LogicOp":i.logicOperator,BinOp:i.arithmeticOperator,Important:i.modifier,"Comment LineComment":i.blockComment,ColorLiteral:i.color,"ParenthesizedContent StringLiteral":i.string,Escape:i.special(i.string),": ...":i.punctuation,"PseudoOp #":i.derefOperator,"; ,":i.separator,"( )":i.paren,"[ ]":i.squareBracket,"{ }":i.brace}),x={__proto__:null,lang:40,"nth-child":40,"nth-last-child":40,"nth-of-type":40,"nth-last-of-type":40,dir:40,"host-context":40,and:244,or:244,not:74,only:74,url:86,"url-prefix":86,domain:86,regexp:86,when:117,selector:142,from:172,to:174},S={__proto__:null,"@import":126,"@plugin":126,"@media":152,"@charset":156,"@namespace":160,"@keyframes":166,"@supports":178},C=u.deserialize({version:14,states:"@^O!gQWOOO!nQaO'#CeOOQP'#Cd'#CdO$RQWO'#CgO$xQaO'#EaO%cQWO'#CiO%kQWO'#DZO%pQWO'#D^O%uQaO'#DfOOQP'#Es'#EsO'YQWO'#DlO'yQWO'#DyO(QQWO'#D{O(xQWO'#D}O)TQWO'#EQO'bQWO'#EWO)YQ`O'#FTO)]Q`O'#FTO)hQ`O'#FTO)vQWO'#EYOOQO'#Er'#ErOOQO'#FV'#FVOOQO'#Ec'#EcO){QWO'#EqO*WQWO'#EqQOQWOOOOQP'#Ch'#ChOOQP,59R,59RO$RQWO,59RO*bQWO'#EdO+PQWO,58|O+_QWO,59TO%kQWO,59uO%pQWO,59xO*bQWO,59{O*bQWO,59}OOQO'#De'#DeO*bQWO,5:OO,bQpO'#E}O,iQWO'#DkOOQO,58|,58|O(QQWO,58|O,pQWO,5:{OOQO,5:{,5:{OOQT'#Cl'#ClO-UQeO,59TO.cQ[O,59TOOQP'#D]'#D]OOQP,59u,59uOOQO'#D_'#D_O.hQpO,59xOOQO'#EZ'#EZO.pQ`O,5;oOOQO,5;o,5;oO/OQWO,5:WO/VQWO,5:WOOQS'#Dn'#DnO/rQWO'#DsO/yQ!fO'#FRO0eQWO'#DtOOQS'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S%Y$U%[Q%d$_Q%e$bQ%q$rR%}%ZQzSQ!pbQ!|nQ%b$YR&Q%aQ#YvR%h$gR#g!XQ!_ZQ#e!WQ$x#mR&V%sW![Z!W#m%sQ!m_Q#j!ZQ#t!`Q$w#lR${#pVcOhwSgOwR!sh",nodeNames:`⚠ Unit ( Comment LineComment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName ) ArgList , PseudoClassName ArgList VariableName AtKeyword PropertyVariable ValueName ( ParenthesizedValue ColorLiteral NumberLiteral StringLiteral Escape Interpolation BinaryExpression BinOp LogicOp UnaryExpression UnaryQueryOp CallExpression ] SubscriptExpression [ CallLiteral CallTag ParenthesizedContent IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp InterpolatedSelector ; when } { Block ImportStatement import KeywordQuery FeatureQuery FeatureName BinaryQuery UnaryQuery ParenthesizedQuery SelectorQuery selector CallQuery ArgList SubscriptQuery MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList from to SupportsStatement supports DetachedRuleSet PropertyName Declaration Important Inclusion IdSelector ClassSelector Inclusion CallExpression`,maxTerm:133,nodeProps:[[`isolate`,-3,3,4,30,``],[`openedBy`,17,`(`,59,`{`],[`closedBy`,26,`)`,60,`}`]],propSources:[b],skippedNodes:[0,3,4],repeatNodeCount:10,tokenData:"!2q~R!ZOX$tX^%l^p$tpq%lqr)Ors-xst/ltu6Zuv$tvw8^wx:Uxy;syz<Uz{<Z{|<t|}BQ}!OBc!O!PDo!P!QFY!Q![Jw![!]Kr!]!^Ln!^!_MP!_!`M{!`!aNl!a!b$t!b!c! m!c!}!&R!}#O!'y#O#P$t#P#Q!([#Q#R!(m#R#T$t#T#o!&R#o#p!)S#p#q!(m#q#r!)e#r#s!)v#s#y$t#y#z%l#z$f$t$f$g%l$g#BY$t#BY#BZ%l#BZ$IS$t$IS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w!.wwx!+cxy!.wyz!/oz#O!.w#O#P!1^#P;'S!.w;'S;=`!2e<%lO!.w]!/rWOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W<%lO!/o]!0_RO;'S!/o;'S;=`!0h;=`O!/o]!0kXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!/o<%lO!/o]!1ZP;=`<%l!/om!1cU|`Oy!.wyz!/oz;'S!.w;'S;=`!1u;=`<%l!/o<%lO!.wm!1xXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!.w<%lO!/om!2hP;=`<%l!.w`!2nP;=`<%l$t",tokenizers:[v,y,_,0,1,2,3,4],topRules:{StyleSheet:[0,5]},specialized:[{term:116,get:e=>x[e]||-1},{term:23,get:e=>S[e]||-1}],tokenPrec:2180}),w=r.define({name:`less`,parser:C.configure({props:[t.add({Declaration:a()}),o.add({Block:n})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`},line:`//`},indentOnInput:/^\s*\}$/,wordChars:`@-`}}),T=c(e=>e.name==`VariableName`||e.name==`AtKeyword`);function E(){return new e(w,w.data.of({autocomplete:T}))}export{E as less};
|
|
1
|
+
import{Ft as e,Gt as t,Ht as n,Mt as r,Qt as i,Rt as a,Ut as o,Zt as s}from"./editor-p4kHebXo.js";import{r as c}from"./dist-CLkuPABZ.js";import{n as l,r as u}from"./dist-ezs7BFRb.js";var d=110,f=1,p=2,m=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function h(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function g(e){return e>=48&&e<=57}var _=new l((e,t)=>{if(e.next==40){let t=e.peek(-1);(h(t)||g(t)||t==95||t==45)&&e.acceptToken(p,1)}}),v=new l(e=>{if(m.indexOf(e.peek(-1))>-1){let{next:t}=e;(h(t)||t==95||t==35||t==46||t==91||t==58||t==45)&&e.acceptToken(d)}}),y=new l(e=>{if(m.indexOf(e.peek(-1))<0){let{next:t}=e;if(t==37&&(e.advance(),e.acceptToken(f)),h(t)){do e.advance();while(h(e.next));e.acceptToken(f)}}}),b=s({"import charset namespace keyframes media supports when":i.definitionKeyword,"from to selector":i.keyword,NamespaceName:i.namespace,KeyframeName:i.labelName,TagName:i.tagName,ClassName:i.className,PseudoClassName:i.constant(i.className),IdName:i.labelName,"FeatureName PropertyName PropertyVariable":i.propertyName,AttributeName:i.attributeName,NumberLiteral:i.number,KeywordQuery:i.keyword,UnaryQueryOp:i.operatorKeyword,"CallTag ValueName":i.atom,VariableName:i.variableName,"AtKeyword Interpolation":i.special(i.variableName),Callee:i.operatorKeyword,Unit:i.unit,"UniversalSelector NestingSelector":i.definitionOperator,MatchOp:i.compareOperator,"ChildOp SiblingOp, LogicOp":i.logicOperator,BinOp:i.arithmeticOperator,Important:i.modifier,"Comment LineComment":i.blockComment,ColorLiteral:i.color,"ParenthesizedContent StringLiteral":i.string,Escape:i.special(i.string),": ...":i.punctuation,"PseudoOp #":i.derefOperator,"; ,":i.separator,"( )":i.paren,"[ ]":i.squareBracket,"{ }":i.brace}),x={__proto__:null,lang:40,"nth-child":40,"nth-last-child":40,"nth-of-type":40,"nth-last-of-type":40,dir:40,"host-context":40,and:244,or:244,not:74,only:74,url:86,"url-prefix":86,domain:86,regexp:86,when:117,selector:142,from:172,to:174},S={__proto__:null,"@import":126,"@plugin":126,"@media":152,"@charset":156,"@namespace":160,"@keyframes":166,"@supports":178},C=u.deserialize({version:14,states:"@^O!gQWOOO!nQaO'#CeOOQP'#Cd'#CdO$RQWO'#CgO$xQaO'#EaO%cQWO'#CiO%kQWO'#DZO%pQWO'#D^O%uQaO'#DfOOQP'#Es'#EsO'YQWO'#DlO'yQWO'#DyO(QQWO'#D{O(xQWO'#D}O)TQWO'#EQO'bQWO'#EWO)YQ`O'#FTO)]Q`O'#FTO)hQ`O'#FTO)vQWO'#EYOOQO'#Er'#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|#[Q%c$]Q%z%VR&R%dc!^Z_!W!Z!`#l#m#p%sR#i!ZZ#n![!m#j#t${R!j]R!l^R$Q!lU`OhwQ!UWR$S!nVeOhwR$Z!qR$Y!qShOwR!thQnSS!yn%kR%k$kQ$d#UQ$m#`Y%f$d$m%g%t&TQ%g$eQ%t$uR&T%mQ%n$mR&U%nQ$h#YR%i$hQ$s#fR%r$sQ#q![R$|#qQ%W$PR%{%WQ!o`Q#c!UT$T!o#cQ%[$UR&O%[QiOR#ZwVfOhwUSOhwQ!wmQ#RrQ#SsQ#TuQ$k#^Q$}#rR%a$YR$l#^R$n#`Q!d[S#Uv$gQ#[yQ#f!XQ#u!bQ#|!gQ$U!qQ$]!{d$c#U#`$d$e$m$u%g%m%t&TQ$o#bQ$y#oQ%P#wQ%Q#yS%Y$U%[Q%d$_Q%e$bQ%q$rR%}%ZQzSQ!pbQ!|nQ%b$YR&Q%aQ#YvR%h$gR#g!XQ!_ZQ#e!WQ$x#mR&V%sW![Z!W#m%sQ!m_Q#j!ZQ#t!`Q$w#lR${#pVcOhwSgOwR!sh",nodeNames:`⚠ Unit ( Comment LineComment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName ) ArgList , PseudoClassName ArgList VariableName AtKeyword PropertyVariable ValueName ( ParenthesizedValue ColorLiteral NumberLiteral StringLiteral Escape Interpolation BinaryExpression BinOp LogicOp UnaryExpression UnaryQueryOp CallExpression ] SubscriptExpression [ CallLiteral CallTag ParenthesizedContent IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp InterpolatedSelector ; when } { Block ImportStatement import KeywordQuery FeatureQuery FeatureName BinaryQuery UnaryQuery ParenthesizedQuery SelectorQuery selector CallQuery ArgList SubscriptQuery MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList from to SupportsStatement supports DetachedRuleSet PropertyName Declaration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%TZr!*krs!+csy!*kyz!+vz#O!*k#O#P!-j#P;'S!*k;'S;=`!.q<%lO!*km!+jSo]|`Oy%Tz;'S%T;'S;=`%f<%lO%T]!+yWOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d<%lO!+v]!,hOo]]!,kRO;'S!+v;'S;=`!,t;=`O!+v]!,wXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!+v<%lO!+v]!-gP;=`<%l!+vm!-oU|`Oy!*kyz!+vz;'S!*k;'S;=`!.R;=`<%l!+v<%lO!*km!.UXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!*k<%lO!+vm!.tP;=`<%l!*km!.|Z|`OY!.wYZ%TZw!.wwx!+cxy!.wyz!/oz#O!.w#O#P!1^#P;'S!.w;'S;=`!2e<%lO!.w]!/rWOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W<%lO!/o]!0_RO;'S!/o;'S;=`!0h;=`O!/o]!0kXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!/o<%lO!/o]!1ZP;=`<%l!/om!1cU|`Oy!.wyz!/oz;'S!.w;'S;=`!1u;=`<%l!/o<%lO!.wm!1xXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!.w<%lO!/om!2hP;=`<%l!.w`!2nP;=`<%l$t",tokenizers:[v,y,_,0,1,2,3,4],topRules:{StyleSheet:[0,5]},specialized:[{term:116,get:e=>x[e]||-1},{term:23,get:e=>S[e]||-1}],tokenPrec:2180}),w=r.define({name:`less`,parser:C.configure({props:[t.add({Declaration:a()}),o.add({Block:n})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`},line:`//`},indentOnInput:/^\s*\}$/,wordChars:`@-`}}),T=c(e=>e.name==`VariableName`||e.name==`AtKeyword`);function E(){return new e(w,w.data.of({autocomplete:T}))}export{E as less};
|