dorkos 0.82.0 → 0.87.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/README.md +11 -0
- package/dist/bin/cli.js +12725 -4763
- package/dist/client/assets/{AboutPage-WmtNTKyp.js → AboutPage-BSUaz4JJ.js} +1 -1
- package/dist/client/assets/{AppearancePage-D7ZHuThu.js → AppearancePage-CXOeapnY.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-wUJCR3vL.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-BnlmhnMf.js} +1 -1
- package/dist/client/assets/{BlintzCanvas-BXKUjnNQ.js → BlintzCanvas-CPvaejf6.js} +23 -23
- package/dist/client/assets/{CanvasCsvContent-BLAtnhdQ.js → CanvasCsvContent-BQMcLeXX.js} +1 -1
- package/dist/client/assets/CanvasFileContent-DZAWEzyp.js +2 -0
- package/dist/client/assets/CanvasModel3dContent-CU-0WLIz.js +2 -0
- package/dist/client/assets/{CodeMirrorDiff-Cpi43Atp.js → CodeMirrorDiff-B705Z174.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-CviERH82.js → CodeMirrorEditor-CnoVRaAX.js} +1 -1
- package/dist/client/assets/ConnectionAccessLists-CLulSQsd.js +1 -0
- package/dist/client/assets/ConnectionsPage-5Yc0-dNp.js +1 -0
- package/dist/client/assets/{ConventionPage-Coim_h2z.js → ConventionPage-CPTqeeNZ.js} +3 -3
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-lqp1rgj8.js → FloatingTanStackRouterDevtools-CqogiFob-C3cf2ADt.js} +1 -1
- package/dist/client/assets/HandlePage-CUJPQsdv.js +1 -0
- package/dist/client/assets/{LexicalField-DPe-aAXb.js → LexicalField-ClgIzBq7.js} +1 -1
- package/dist/client/assets/{ManagesPage-BZS2TdZL.js → ManagesPage-CKzcFzKR.js} +1 -1
- package/dist/client/assets/{Model3dViewer-qs0tZlVU.js → Model3dViewer-CVVsdftR.js} +1 -1
- package/dist/client/assets/NamePage-CYHYXhrs.js +1 -0
- package/dist/client/assets/{NotificationsPage-gmiItsT0.js → NotificationsPage-D3m6Jrm2.js} +1 -1
- package/dist/client/assets/PermissionsPage-CviWqCJ3.js +1 -0
- package/dist/client/assets/{PersonalityPopover-Dej6dI7y.js → PersonalityPopover-BN1CFq8D.js} +1 -1
- package/dist/client/assets/PhotoPage-ytqVZP3t.js +1 -0
- package/dist/client/assets/{RoomsPage-3_HuXajd.js → RoomsPage-CoZd-4Xe.js} +1 -1
- package/dist/client/assets/RunsOnPopover-91nKS6qj.js +1 -0
- package/dist/client/assets/SessionsPage-DDrQLNW-.js +6 -0
- package/dist/client/assets/SkillsPage-2H6QD77F.js +1 -0
- package/dist/client/assets/TasksPage-ocRUPiec.js +1 -0
- package/dist/client/assets/ToolsPage-q3wxIc3n.js +2 -0
- package/dist/client/assets/{TopologyGraph-C-BTnRXU.js → TopologyGraph-DeRqfLBW.js} +2 -2
- package/dist/client/assets/{agent-browser-DT3ABR4l.js → agent-browser-C7Q5muxI.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-CVFODbIg.js → highlighted-body-KPVGNVTW-CYowLe07.js} +1 -1
- package/dist/client/assets/{index-ClnyhFUL.js → index-1dt_mWBC.js} +1 -1
- package/dist/client/assets/{index-DiFG9bwF.js → index-34_CucI4.js} +1 -1
- package/dist/client/assets/{index-DGr90Ygi.js → index-6F4HxV-x.js} +1 -1
- package/dist/client/assets/{index-CgakJfik.js → index-B029XwR8.js} +1 -1
- package/dist/client/assets/index-B4TIVWAq.js +1668 -0
- package/dist/client/assets/index-BUcM96PD.css +1 -0
- package/dist/client/assets/{index-ClmokM0M.js → index-BX9en7bH.js} +1 -1
- package/dist/client/assets/{index-BZaMgVdg.js → index-BeqTVkgE.js} +1 -1
- package/dist/client/assets/index-BkFaL4dr.js +1 -0
- package/dist/client/assets/index-Bv_P5_tJ.js +1 -0
- package/dist/client/assets/{index-Dh-3NGE9.js → index-BwbRY8dK.js} +1 -1
- package/dist/client/assets/{index-B3P6TTvD.js → index-BzVyUKXW.js} +3 -3
- package/dist/client/assets/{index-B8oHvyN5.js → index-C0oow5Fn.js} +1 -1
- package/dist/client/assets/{index-DN8DYUEX.js → index-CCLVR1so.js} +1 -1
- package/dist/client/assets/{index-J8BMKg6y.js → index-CEw2JwVz.js} +1 -1
- package/dist/client/assets/{index-DIkpB_1y.js → index-CKHPMgwE.js} +1 -1
- package/dist/client/assets/{index-Dm6W0lml.js → index-CbxbAPgT.js} +1 -1
- package/dist/client/assets/{index-D_gnDrw3.js → index-Cm0G2vDh.js} +1 -1
- package/dist/client/assets/{index-DiFc1nSZ.js → index-CpZi173j.js} +1 -1
- package/dist/client/assets/index-CqfEH_t6.js +1 -0
- package/dist/client/assets/index-CuEwCZKH.js +17 -0
- package/dist/client/assets/{index-Cca_q1vW.js → index-CvQeke9n.js} +9 -9
- package/dist/client/assets/{index-BuU7EEtP.js → index-CxZB8Cqj.js} +1 -1
- package/dist/client/assets/{index-DjY4p5H5.js → index-D45q57-5.js} +1 -1
- package/dist/client/assets/{index-kzr7_3di.js → index-D8fmSjjO.js} +11 -11
- package/dist/client/assets/{index-W25uMuZA.js → index-DDagpuEn.js} +1 -1
- package/dist/client/assets/{index-DbsvSNI-.js → index-DT3ci-3h.js} +1 -1
- package/dist/client/assets/{index-nEQI8fB2.js → index-D_Pj9S7y.js} +1 -1
- package/dist/client/assets/{index-DF5k9E7k.js → index-Da-4WWcu.js} +1 -1
- package/dist/client/assets/{index-PrqHZbD1.js → index-DsRm4kZF.js} +1 -1
- package/dist/client/assets/{index-CaZw0EC7.js → index-GiEn7nQQ.js} +1 -1
- package/dist/client/assets/{index-ByCzVYkU.js → index-SGZRUhq4.js} +1 -1
- package/dist/client/assets/index-VLhj4QNP.js +1 -0
- package/dist/client/assets/index-otf5JgVx.js +1 -0
- package/dist/client/assets/{index-lciid4H8.js → index-qWahGPGi.js} +1 -1
- package/dist/client/assets/{index-BrgOWbRQ.js → index-sMuUIc_W.js} +2 -2
- package/dist/client/assets/{index-DgjZhEr3.js → index-snpaQsNQ.js} +1 -1
- package/dist/client/assets/room-files-source-C3tzeG6y.js +6 -0
- package/dist/client/assets/{soul-file-BHeAw6R9.js → soul-file-tc6-HkDy.js} +1 -1
- package/dist/client/assets/{use-personality-commit-DyJAMzzb.js → use-personality-commit-vpAu5T8A.js} +1 -1
- package/dist/client/index.html +6 -5
- package/dist/drizzle/0107_productive_peter_parker.sql +5 -0
- package/dist/drizzle/0108_magical_morph.sql +2 -0
- package/dist/drizzle/0109_aspiring_union_jack.sql +5 -0
- package/dist/drizzle/0110_ambiguous_wendigo.sql +1 -0
- package/dist/drizzle/0111_community_redaction_cursor.sql +11 -0
- package/dist/drizzle/0112_account_drop_issuer.sql +18 -0
- package/dist/drizzle/0113_room_departed_seats.sql +14 -0
- package/dist/drizzle/0114_schedule_account.sql +1 -0
- package/dist/drizzle/0115_furry_starjammers.sql +1 -0
- package/dist/drizzle/meta/0107_snapshot.json +8966 -0
- package/dist/drizzle/meta/0108_snapshot.json +8980 -0
- package/dist/drizzle/meta/0109_snapshot.json +8987 -0
- package/dist/drizzle/meta/0110_snapshot.json +8994 -0
- package/dist/drizzle/meta/0111_snapshot.json +9062 -0
- package/dist/drizzle/meta/0112_snapshot.json +9055 -0
- package/dist/drizzle/meta/0113_snapshot.json +9147 -0
- package/dist/drizzle/meta/0114_snapshot.json +9154 -0
- package/dist/drizzle/meta/0115_snapshot.json +9146 -0
- package/dist/drizzle/meta/_journal.json +63 -0
- package/dist/server/index.js +103645 -79264
- package/dist/server/index.js.map +2 -2
- package/package.json +7 -9
- package/dist/client/assets/CanvasFileContent-VogEwZeM.js +0 -2
- package/dist/client/assets/CanvasModel3dContent-DCTC7eOc.js +0 -2
- package/dist/client/assets/ConnectionAccessLists-Be1b30nn.js +0 -1
- package/dist/client/assets/ConnectionsPage-BVN7GiuC.js +0 -1
- package/dist/client/assets/HandlePage-DnzPN8N_.js +0 -1
- package/dist/client/assets/NamePage-DyWqRDIe.js +0 -1
- package/dist/client/assets/PhotoPage-GtCoB8dK.js +0 -1
- package/dist/client/assets/RunsOnPopover-DbSoBFaL.js +0 -1
- package/dist/client/assets/SessionsPage-Dc_lqBom.js +0 -6
- package/dist/client/assets/SkillsPage-C0qMUkgs.js +0 -1
- package/dist/client/assets/TasksPage-DvzTPDnw.js +0 -1
- package/dist/client/assets/ToolsPage-Cwc96TTa.js +0 -2
- package/dist/client/assets/index-BUxNND2H.js +0 -1
- package/dist/client/assets/index-C08DUVQ4.css +0 -1
- package/dist/client/assets/index-CGqPFWQw.js +0 -1
- package/dist/client/assets/index-CN1plkKF.js +0 -1
- package/dist/client/assets/index-CXWMnEDK.js +0 -1
- package/dist/client/assets/index-DDXrdlj0.js +0 -1648
- package/dist/client/assets/index-DEA1uIWn.js +0 -1
- package/dist/client/assets/index-PRwgIfzy.js +0 -7
- package/dist/client/assets/room-files-source-CSKgcbkn.js +0 -11
- package/dist/client/assets/use-mesh-update-BP_UXq60.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{dr as Ee,ad as xe,ae as Re,r as ve,ao as Se,ag as Ce,j,ds as Oe,aj as Te}from"./index-B4TIVWAq.js";var he={exports:{}};/* @license
|
|
2
2
|
Papa Parse
|
|
3
3
|
v5.7.0
|
|
4
4
|
https://github.com/mholt/PapaParse
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-CnoVRaAX.js","assets/index-B4TIVWAq.js","assets/index-BUcM96PD.css","assets/index-6F4HxV-x.js","assets/index-BzVyUKXW.js","assets/BlintzCanvas-CPvaejf6.js","assets/BlintzCanvas-GgiCXV7C.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{ad as A,ae as b,af as D,ag as B,r as n,j as t,ah as M,ai as Q,aj as q,B as y,ak as H,al as K,am as V,an as P}from"./index-B4TIVWAq.js";const $=n.lazy(()=>P(()=>import("./CodeMirrorEditor-CnoVRaAX.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeMirrorEditor}))),U=n.lazy(()=>P(()=>import("./BlintzCanvas-CPvaejf6.js"),__vite__mapDeps([5,1,2,4,6])).then(e=>({default:e.BlintzCanvas}))),Y=500;function _(e,i){return["canvas-file",e,i]}function G(e,i){return i==="markdown"||/\.(md|markdown|mdx)$/i.test(e)}function I(e){switch(e==null?void 0:e.code){case"NOT_FOUND":return"This file doesn’t exist.";case"NOT_A_FILE":return"This path is a directory, not a file.";case"TOO_LARGE":return"This file is too large to open here.";case"BINARY_FILE":return"This file isn’t text and can’t be shown in the editor.";default:return"This file couldn’t be loaded."}}function J(e){switch(e){case"saving":return"Saving…";case"saved":return"Saved";case"error":return"Couldn’t save";default:return null}}function Z({content:e,documentId:i}){const m=A(),o=b(r=>r.selectedCwd),C=b(r=>r.setDocumentEditing),a=b(r=>{var d;return((d=r.openDocuments.find(j=>j.id===i))==null?void 0:d.editing)??!1}),h=D(),{data:c,error:x,isLoading:T}=B({queryKey:_(o,e.sourcePath),enabled:o!==null,queryFn:()=>m.readFileContent(o,e.sourcePath),staleTime:3e4,retry:!1}),[u,v]=n.useState(null),p=r=>{v(r&&c?{pinnedHash:c.hash}:null)};if(o===null)return t.jsx(R,{children:"Open a session to view files."});if(T)return t.jsx(R,{children:"Loading file…"});if(x||!c)return t.jsx(R,{children:I(x)});const l=u!==null&&a,s=(l?u==null?void 0:u.pinnedHash:null)??c.hash;return t.jsx(W,{content:e,documentId:i,cwd:o,loaded:c.content,theme:h,isEditing:l,onEditingChange:p,setDocumentEditing:C},`${e.sourcePath}:${s}`)}function W({content:e,documentId:i,cwd:m,loaded:o,theme:C,isEditing:a,onEditingChange:h,setDocumentEditing:c}){const x=e.readOnly!==!0,T=G(e.sourcePath,e.language),u=M(),[v,p]=n.useState(o),l=Q({sourcePath:e.sourcePath,cwd:m,loadedContent:o}),s=n.useRef(null),r=n.useRef(v),d=n.useRef(l.save),j=n.useRef(h);n.useEffect(()=>{r.current=v,d.current=l.save,j.current=h});const k=n.useCallback(f=>{p(f),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{s.current=null,d.current(r.current)},Y)},[]),z=()=>{p(o),h(!0),c(i,!0)},O=async()=>{s.current&&(clearTimeout(s.current),s.current=null);const f=await d.current(r.current);if(f==="conflict"||f==="error")return;const g=l.getConfirmedBase();g.hash!==null&&g.content===r.current&&u.setQueryData(_(m,e.sourcePath),N=>N&&{...N,content:g.content,hash:g.hash}),h(!1),c(i,!1)},L=()=>{u.invalidateQueries({queryKey:_(m,e.sourcePath)})};n.useEffect(()=>{a||!s.current||(clearTimeout(s.current),s.current=null)},[a]),n.useEffect(()=>()=>{s.current&&(clearTimeout(s.current),d.current(r.current)),c(i,!1),j.current(!1)},[i,c]);const S=()=>{const f=l.adoptDisk();f!=null&&p(f)},F=()=>{l.overwrite(r.current)},w=J(l.status),E=a?v:o;return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsxs("div",{className:"sticky top-0 z-10 flex h-0 items-start justify-end gap-2 pr-2",children:[x&&w&&t.jsx("span",{className:q("mt-3 text-xs",l.status==="error"?"text-destructive":"text-muted-foreground"),"aria-live":"polite",children:w}),!a&&t.jsx(y,{type:"button",variant:"ghost",size:"icon-md",className:"text-muted-foreground hover:text-foreground mt-2",onClick:L,"aria-label":"Refresh from disk",children:t.jsx(H,{className:"size-4"})}),x&&t.jsx(y,{type:"button",variant:"ghost",size:"icon-md",className:"text-muted-foreground hover:text-foreground mt-2",onClick:a?()=>void O():z,"aria-label":a?"Finish editing":"Edit file",children:a?t.jsx(K,{className:"size-4"}):t.jsx(V,{className:"size-4"})})]}),l.status==="conflict"&&t.jsxs("div",{className:"bg-destructive/10 text-destructive mx-2 mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md px-3 py-2 text-sm",children:[t.jsx("span",{className:"flex-1",children:"This file changed on disk since you opened it."}),t.jsx(y,{type:"button",variant:"ghost",size:"sm",className:"h-7",onClick:S,children:"Reload"}),t.jsx(y,{type:"button",variant:"destructive",size:"sm",className:"h-7",onClick:F,children:"Overwrite"})]}),t.jsx("div",{className:"min-h-0 flex-1",children:t.jsx(n.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading editor…"}),children:T?t.jsx("div",{className:"px-2 pb-6",children:t.jsx(U,{value:E,editable:a,onChange:a?k:void 0})}):t.jsx($,{value:E,editable:a,filename:e.sourcePath,languageHint:e.language,theme:C,onChange:a?k:void 0})})})]})}function R({children:e}){return t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:e})})}export{Z as CanvasFileContent};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Model3dViewer-CVVsdftR.js","assets/index-B4TIVWAq.js","assets/index-BUcM96PD.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{ad as d,ae as u,r as l,ao as i,j as t,an as f}from"./index-B4TIVWAq.js";const c=l.lazy(()=>f(()=>import("./Model3dViewer-CVVsdftR.js"),__vite__mapDeps([0,1,2])).then(r=>({default:r.Model3dViewer})));function m(r){var s;const e=(s=r.split(".").pop())==null?void 0:s.toLowerCase();return e==="glb"||e==="gltf"?"gltf":e==="stl"?"stl":e==="obj"?"obj":e==="3mf"?"3mf":e==="ply"?"ply":e==="fbx"?"fbx":e==="dae"?"dae":null}function x({content:r}){const e=d(),s=u(a=>a.selectedCwd),n=l.useMemo(()=>i(r.src,a=>e.mediaUrl(s??"",a)),[r.src,e,s]),o=l.useMemo(()=>m(r.src),[r.src]);return n.url===null||o===null?t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:"This 3D model can’t be displayed here."})}):t.jsx("div",{className:"bg-muted/40 h-full w-full",children:t.jsx(l.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading 3D viewer…"}),children:t.jsx(c,{url:n.url,format:o,label:r.title??"Canvas 3D model"})})})}export{x as CanvasModel3dContent,m as formatOf};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{j as J,r as T}from"./index-DDXrdlj0.js";import{R as lt}from"./index-DGr90Ygi.js";import{o as Q,E as B,q as ne,C as Ge,S as G,r as Ne,u as Fe,v as st,w as H,x as M,V as ot,F as Ve,y as je,R as N,W as Y,G as oe,z as at,A as ft,B as Ie,H as dt,m as ht,n as ct}from"./index-B3P6TTvD.js";class v{constructor(e,n,l,i){this.fromA=e,this.toA=n,this.fromB=l,this.toB=i}offset(e,n=e){return new v(this.fromA+e,this.toA+e,this.fromB+n,this.toB+n)}}function y(t,e,n,l,i,r){if(t==l)return[];let s=fe(t,e,n,l,i,r),o=de(t,e+s,n,l,i+s,r);e+=s,n-=o,i+=s,r-=o;let f=n-e,h=r-i;if(!f||!h)return[new v(e,n,i,r)];if(f>h){let d=t.slice(e,n).indexOf(l.slice(i,r));if(d>-1)return[new v(e,e+d,i,i),new v(e+d+h,n,r,r)]}else if(h>f){let d=l.slice(i,r).indexOf(t.slice(e,n));if(d>-1)return[new v(e,e,i,i+d),new v(n,n,i+d+f,r)]}if(f==1||h==1)return[new v(e,n,i,r)];let a=He(t,e,n,l,i,r);if(a){let[d,c,u]=a;return y(t,e,d,l,i,c).concat(y(t,d+u,n,l,c+u,r))}return ut(t,e,n,l,i,r)}let I=1e9,U=0,ae=!1;function ut(t,e,n,l,i,r){let s=n-e,o=r-i;if(I<1e9&&Math.min(s,o)>I*16||U>0&&Date.now()>U)return Math.min(s,o)>I*64?[new v(e,n,i,r)]:ge(t,e,n,l,i,r);let f=Math.ceil((s+o)/2);ee.reset(f),te.reset(f);let h=(u,m)=>t.charCodeAt(e+u)==l.charCodeAt(i+m),a=(u,m)=>t.charCodeAt(n-u-1)==l.charCodeAt(r-m-1),d=(s-o)%2!=0?te:null,c=d?null:ee;for(let u=0;u<f;u++){if(u>I||U>0&&!(u&63)&&Date.now()>U)return ge(t,e,n,l,i,r);let m=ee.advance(u,s,o,f,d,!1,h)||te.advance(u,s,o,f,c,!0,a);if(m)return mt(t,e,n,e+m[0],l,i,r,i+m[1])}return[new v(e,n,i,r)]}class Ue{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let n=0;n<this.len;n++)this.vec[n]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,n,l,i,r,s,o){for(let f=-e+this.start;f<=e-this.end;f+=2){let h=i+f,a=f==-e||f!=e&&this.vec[h-1]<this.vec[h+1]?this.vec[h+1]:this.vec[h-1]+1,d=a-f;for(;a<n&&d<l&&o(a,d);)a++,d++;if(this.vec[h]=a,a>n)this.end+=2;else if(d>l)this.start+=2;else if(r){let c=i+(n-l)-f;if(c>=0&&c<this.len&&r.vec[c]!=-1)if(s){let u=r.vec[c];if(u>=n-a)return[u,i+u-c]}else{let u=n-r.vec[c];if(a>=u)return[a,d]}}}return null}}const ee=new Ue,te=new Ue;function mt(t,e,n,l,i,r,s,o){let f=!1;return!F(t,l)&&++l==n&&(f=!0),!F(i,o)&&++o==s&&(f=!0),f?[new v(e,n,r,s)]:y(t,e,l,i,r,o).concat(y(t,l,n,i,o,s))}function We(t,e){let n=1,l=Math.min(t,e);for(;n<l;)n=n<<1;return n}function fe(t,e,n,l,i,r){if(e==n||e==r||t.charCodeAt(e)!=l.charCodeAt(i))return 0;let s=We(n-e,r-i);for(let o=e,f=i;;){let h=o+s,a=f+s;if(h>n||a>r||t.slice(o,h)!=l.slice(f,a)){if(s==1)return o-e-(F(t,o)?0:1);s=s>>1}else{if(h==n||a==r)return h-e;o=h,f=a}}}function de(t,e,n,l,i,r){if(e==n||i==r||t.charCodeAt(n-1)!=l.charCodeAt(r-1))return 0;let s=We(n-e,r-i);for(let o=n,f=r;;){let h=o-s,a=f-s;if(h<e||a<i||t.slice(h,o)!=l.slice(a,f)){if(s==1)return n-o-(F(t,o)?0:1);s=s>>1}else{if(h==e||a==i)return n-h;o=h,f=a}}}function re(t,e,n,l,i,r,s,o){let f=l.slice(i,r),h=null;for(;;){if(h||s<o)return h;for(let a=e+s;;){F(t,a)||a++;let d=a+s;if(F(t,d)||(d+=d==a+1?1:-1),d>=n)break;let c=t.slice(a,d),u=-1;for(;(u=f.indexOf(c,u+1))!=-1;){let m=fe(t,d,n,l,i+u+c.length,r),p=de(t,e,a,l,i,i+u),g=c.length+m+p;(!h||h[2]<g)&&(h=[a-p,i+u-p,g])}a=d}if(o<0)return h;s=s>>1}}function He(t,e,n,l,i,r){let s=n-e,o=r-i;if(s<o){let f=He(l,i,r,t,e,n);return f&&[f[1],f[0],f[2]]}return s<4||o*2<s?null:re(t,e,n,l,i,r,Math.floor(s/4),-1)}function ge(t,e,n,l,i,r){ae=!0;let s=n-e,o=r-i,f;if(s<o){let c=re(l,i,r,t,e,n,Math.floor(s/6),50);f=c&&[c[1],c[0],c[2]]}else f=re(t,e,n,l,i,r,Math.floor(o/6),50);if(!f)return[new v(e,n,i,r)];let[h,a,d]=f;return y(t,e,h,l,i,a).concat(y(t,h+d,n,l,a+d,r))}function ze(t,e){for(let n=1;n<t.length;n++){let l=t[n-1],i=t[n];l.toA>i.fromA-e&&l.toB>i.fromB-e&&(t[n-1]=new v(l.fromA,i.toA,l.fromB,i.toB),t.splice(n--,1))}}function gt(t,e,n){for(;;){ze(n,1);let l=!1;for(let i=0;i<n.length;i++){let r=n[i],s,o;(s=fe(t,r.fromA,r.toA,e,r.fromB,r.toB))&&(r=n[i]=new v(r.fromA+s,r.toA,r.fromB+s,r.toB)),(o=de(t,r.fromA,r.toA,e,r.fromB,r.toB))&&(r=n[i]=new v(r.fromA,r.toA-o,r.fromB,r.toB-o));let f=r.toA-r.fromA,h=r.toB-r.fromB;if(f&&h)continue;let a=r.fromA-(i?n[i-1].toA:0),d=(i<n.length-1?n[i+1].fromA:t.length)-r.toA;if(!a||!d)continue;let c=f?t.slice(r.fromA,r.toA):e.slice(r.fromB,r.toB);a<=c.length&&t.slice(r.fromA-a,r.fromA)==c.slice(c.length-a)?(n[i]=new v(r.fromA-a,r.toA-a,r.fromB-a,r.toB-a),l=!0):d<=c.length&&t.slice(r.toA,r.toA+d)==c.slice(0,d)&&(n[i]=new v(r.fromA+d,r.toA+d,r.fromB+d,r.toB+d),l=!0)}if(!l)break}return n}function pt(t,e,n){for(let l=0,i=0;i<t.length;i++){let r=t[i],s=r.toA-r.fromA,o=r.toB-r.fromB;if(s&&o||s>3||o>3){let f=i==t.length-1?e.length:t[i+1].fromA,h=r.fromA-l,a=f-r.toA,d=Ce(e,r.fromA,h),c=pe(e,r.toA,a),u=r.fromA-d,m=c-r.toA;if((!s||!o)&&u&&m){let p=Math.max(s,o),[g,C,S]=s?[e,r.fromA,r.toA]:[n,r.fromB,r.toB];p>u&&e.slice(d,r.fromA)==g.slice(S-u,S)?(r=t[i]=new v(d,d+s,r.fromB-u,r.toB-u),d=r.fromA,c=pe(e,r.toA,f-r.toA)):p>m&&e.slice(r.toA,c)==g.slice(C,C+m)&&(r=t[i]=new v(c-s,c,r.fromB+m,r.toB+m),c=r.toA,d=Ce(e,r.fromA,r.fromA-l)),u=r.fromA-d,m=c-r.toA}if(u||m)r=t[i]=new v(r.fromA-u,r.toA+m,r.fromB-u,r.toB+m);else if(s){if(!o){let p=Ae(e,r.fromA,r.toA),g,C=p<0?-1:ve(e,r.toA,r.fromA);p>-1&&(g=p-r.fromA)<=a&&e.slice(r.fromA,p)==e.slice(r.toA,r.toA+g)?r=t[i]=r.offset(g):C>-1&&(g=r.toA-C)<=h&&e.slice(r.fromA-g,r.fromA)==e.slice(C,r.toA)&&(r=t[i]=r.offset(-g))}}else{let p=Ae(n,r.fromB,r.toB),g,C=p<0?-1:ve(n,r.toB,r.fromB);p>-1&&(g=p-r.fromB)<=a&&n.slice(r.fromB,p)==n.slice(r.toB,r.toB+g)?r=t[i]=r.offset(g):C>-1&&(g=r.toB-C)<=h&&n.slice(r.fromB-g,r.fromB)==n.slice(C,r.toB)&&(r=t[i]=r.offset(-g))}}l=r.toA}return ze(t,3),t}let E;try{E=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function Pe(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function qe(t,e){if(e==t.length)return 0;let n=t.charCodeAt(e);return n<192?Pe(n)?1:0:E?!Je(n)||e==t.length-1?E.test(String.fromCharCode(n))?1:0:E.test(t.slice(e,e+2))?2:0:0}function _e(t,e){if(!e)return 0;let n=t.charCodeAt(e-1);return n<192?Pe(n)?1:0:E?!Ke(n)||e==1?E.test(String.fromCharCode(n))?1:0:E.test(t.slice(e-2,e))?2:0:0}const $e=8;function pe(t,e,n){if(e==t.length||!_e(t,e))return e;for(let l=e,i=e+n,r=0;r<$e;r++){let s=qe(t,l);if(!s||l+s>i)return l;l+=s}return e}function Ce(t,e,n){if(!e||!qe(t,e))return e;for(let l=e,i=e-n,r=0;r<$e;r++){let s=_e(t,l);if(!s||l-s<i)return l;l-=s}return e}function ve(t,e,n){for(;e!=n;e--)if(t.charCodeAt(e-1)==10)return e;return-1}function Ae(t,e,n){for(;e!=n;e++)if(t.charCodeAt(e)==10)return e;return-1}const Je=t=>t>=55296&&t<=56319,Ke=t=>t>=56320&&t<=57343;function F(t,e){return!e||e==t.length||!Je(t.charCodeAt(e-1))||!Ke(t.charCodeAt(e))}function Ct(t,e,n){var l;let i=n==null?void 0:n.override;return i?i(t,e):(I=((l=n==null?void 0:n.scanLimit)!==null&&l!==void 0?l:1e9)>>1,U=n!=null&&n.timeout?Date.now()+n.timeout:0,ae=!1,gt(t,e,y(t,0,t.length,e,0,e.length)))}function Qe(){return!ae}function Ye(t,e,n){return pt(Ct(t,e,n),t,e)}const b=Ve.define({combine:t=>t[0]}),ie=G.define(),Ze=Ve.define(),k=H.define({create(t){return null},update(t,e){for(let n of e.effects)n.is(ie)&&(t=n.value);for(let n of e.state.facet(Ze))t=n(t,e);return t}});function vt(t){let e=t.field(k,!1);if(!e)return null;let n=t.facet(b);return{chunks:e,side:n?n.side:null}}class O{constructor(e,n,l,i,r,s=!0){this.changes=e,this.fromA=n,this.toA=l,this.fromB=i,this.toB=r,this.precise=s}offset(e,n){return e||n?new O(this.changes,this.fromA+e,this.toA+e,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,n,l){let i=Ye(e.toString(),n.toString(),l);return Xe(i,e,n,0,0,Qe())}static updateA(e,n,l,i,r){return be(Be(e,i,!0,l.length),e,n,l,r)}static updateB(e,n,l,i,r){return be(Be(e,i,!1,n.length),e,n,l,r)}}function xe(t,e,n,l){let i=n.lineAt(t),r=l.lineAt(e);return i.to==t&&r.to==e&&t<n.length&&e<l.length?[t+1,e+1]:[i.from,r.from]}function we(t,e,n,l){let i=n.lineAt(t),r=l.lineAt(e);return i.from==t&&r.from==e?[t,e]:[i.to+1,r.to+1]}function Xe(t,e,n,l,i,r){let s=[];for(let o=0;o<t.length;o++){let f=t[o],[h,a]=xe(f.fromA+l,f.fromB+i,e,n),[d,c]=we(f.toA+l,f.toB+i,e,n),u=[f.offset(-h+l,-a+i)];for(;o<t.length-1;){let m=t[o+1],[p,g]=xe(m.fromA+l,m.fromB+i,e,n);if(p>d+1&&g>c+1)break;u.push(m.offset(-h+l,-a+i)),[d,c]=we(m.toA+l,m.toB+i,e,n),o++}s.push(new O(u,h,Math.max(h,d),a,Math.max(a,c),r))}return s}const z=1e3;function ke(t,e,n,l){let i=0,r=t.length;for(;;){if(i==r){let a=0,d=0;i&&({toA:a,toB:d}=t[i-1]);let c=e-(n?a:d);return[a+c,d+c]}let s=i+r>>1,o=t[s],[f,h]=n?[o.fromA,o.toA]:[o.fromB,o.toB];if(f>e)r=s;else if(h<=e)i=s+1;else return l?[o.fromA,o.fromB]:[o.toA,o.toB]}}function Be(t,e,n,l){let i=[];return e.iterChangedRanges((r,s,o,f)=>{let h=0,a=n?e.length:l,d=0,c=n?l:e.length;r>z&&([h,d]=ke(t,r-z,n,!0)),s<e.length-z&&([a,c]=ke(t,s+z,n,!1));let u=f-o-(s-r),m,[p,g]=n?[u,0]:[0,u];i.length&&(m=i[i.length-1]).toA>=h?i[i.length-1]={fromA:m.fromA,fromB:m.fromB,toA:a,toB:c,diffA:m.diffA+p,diffB:m.diffB+g}:i.push({fromA:h,toA:a,fromB:d,toB:c,diffA:p,diffB:g})}),i}function be(t,e,n,l,i){if(!t.length)return e;let r=[];for(let s=0,o=0,f=0,h=0;;s++){let a=s==t.length?null:t[s],d=a?a.fromA+o:n.length,c=a?a.fromB+f:l.length;for(;h<e.length;){let g=e[h];if(a&&(g.toA+o>d||g.toB+f>c))break;r.push(g.offset(o,f)),h++}if(!a)break;let u=a.toA+o+a.diffA,m=a.toB+f+a.diffB,p=Ye(n.sliceString(d,u),l.sliceString(c,m),i);for(let g of Xe(p,n,l,d,c,Qe()))r.push(g);for(o+=a.diffA,f+=a.diffB;h<e.length;){let g=e[h];if(g.fromA+o>u&&g.fromB+f>m)break;h++}}return r}const et={scanLimit:500},Z=ot.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=Le(t))}update(t){(t.docChanged||t.viewportChanged||At(t.startState,t.state)||xt(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=Le(t.view))}},{decorations:t=>t.deco}),P=Q.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(Z))===null||e===void 0?void 0:e.gutter)||Ie.empty}}));function At(t,e){return t.field(k,!1)!=e.field(k,!1)}function xt(t,e){return t.facet(b)!=e.facet(b)}const Me=M.line({class:"cm-changedLine"}),tt=M.mark({class:"cm-changedText"}),wt=M.mark({tagName:"ins",class:"cm-insertedLine"}),kt=M.mark({tagName:"del",class:"cm-deletedLine"}),De=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function Bt(t,e,n,l,i,r){let s=n?t.fromA:t.fromB,o=n?t.toA:t.toB,f=0;if(s!=o){i.add(s,s,Me),i.add(s,o,n?kt:wt),r&&r.add(s,s,De);for(let h=e.iterRange(s,o-1),a=s;!h.next().done;){if(h.lineBreak){a++,i.add(a,a,Me),r&&r.add(a,a,De);continue}let d=a+h.value.length;if(l)for(;f<t.changes.length;){let c=t.changes[f],u=s+(n?c.fromA:c.fromB),m=s+(n?c.toA:c.toB),p=Math.max(a,u),g=Math.min(d,m);if(p<g&&i.add(p,g,tt),m<d)f++;else break}a=d}}}function Le(t){let e=t.state.field(k),{side:n,highlightChanges:l,markGutter:i,overrideChunk:r}=t.state.facet(b),s=n=="a",o=new N,f=i?new N:null,{from:h,to:a}=t.viewport;for(let d of e){if((s?d.fromA:d.fromB)>=a)break;(s?d.toA:d.toB)>h&&(!r||!r(t.state,d,o,f))&&Bt(d,t.state.doc,s,l,o,f)}return{deco:o.finish(),gutter:f&&f.finish()}}class q extends Y{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}const K=G.define({map:(t,e)=>t.map(e)}),W=H.define({create:()=>M.none,update:(t,e)=>{for(let n of e.effects)if(n.is(K))return n.value;return t.map(e.changes)},provide:t=>B.decorations.from(t)}),_=.01;function Se(t,e){if(t.size!=e.size)return!1;let n=t.iter(),l=e.iter();for(;n.value;){if(n.from!=l.from||Math.abs(n.value.spec.widget.height-l.value.spec.widget.height)>1)return!1;n.next(),l.next()}return!0}function bt(t,e,n){let l=new N,i=new N,r=t.state.field(W).iter(),s=e.state.field(W).iter(),o=0,f=0,h=0,a=0,d=t.viewport,c=e.viewport;for(let g=0;;g++){let C=g<n.length?n[g]:null,S=C?C.fromA:t.state.doc.length,R=C?C.fromB:e.state.doc.length;if(o<S){let x=t.lineBlockAt(o).top+h,D=e.lineBlockAt(f).top+a,w=x-D;w<-_?(h-=w,l.add(o,o,M.widget({widget:new q(-w),block:!0,side:-1}))):w>_&&(a+=w,i.add(f,f,M.widget({widget:new q(w),block:!0,side:-1})))}if(S>o+1e3&&o<d.from&&S>d.from&&f<c.from&&R>c.from){let x=Math.min(d.from-o,c.from-f);o+=x,f+=x,g--}else if(C)o=C.toA,f=C.toB;else break;for(;r.value&&r.from<o;)h-=r.value.spec.widget.height,r.next();for(;s.value&&s.from<f;)a-=s.value.spec.widget.height,s.next()}for(;r.value;)h-=r.value.spec.widget.height,r.next();for(;s.value;)a-=s.value.spec.widget.height,s.next();let u=t.contentHeight+h-(e.contentHeight+a);u<_?l.add(t.state.doc.length,t.state.doc.length,M.widget({widget:new q(-u),block:!0,side:1})):u>_&&i.add(e.state.doc.length,e.state.doc.length,M.widget({widget:new q(u),block:!0,side:1}));let m=l.finish(),p=i.finish();Se(m,t.state.field(W))||t.dispatch({effects:K.of(m)}),Se(p,e.state.field(W))||e.dispatch({effects:K.of(p)})}const le=G.define({map:(t,e)=>e.mapPos(t)});class Mt extends Y{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let n=document.createElement("div");return n.className="cm-collapsedLines",n.textContent=e.state.phrase("$ unchanged lines",this.lines),n.addEventListener("click",l=>{let i=e.posAtDOM(l.target);e.dispatch({effects:le.of(i)});let{side:r,sibling:s}=e.state.facet(b);s&&s().dispatch({effects:le.of(Dt(i,e.state.field(k),r=="a"))})}),n}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}}function Dt(t,e,n){let l=0,i=0;for(let r=0;;r++){let s=r<e.length?e[r]:null;if(!s||(n?s.fromA:s.fromB)>=t)return i+(t-l);[l,i]=n?[s.toA,s.toB]:[s.toB,s.toA]}}const Lt=H.define({create(t){return M.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(le)&&(t=t.update({filter:l=>l!=n.value}));if(t.size&&e.state.field(k)!=e.startState.field(k,!1)){let n=e.state.facet(b).side=="a",l=[];for(let i of e.state.field(k))t.between(n?i.fromA:i.fromB,n?i.toA:i.toB,r=>{l.push(r)});l.length&&(t=t.update({filter:i=>l.indexOf(i)<0}))}return t},provide:t=>B.decorations.from(t)});function se({margin:t=3,minSize:e=4}){return Lt.init(n=>St(n,t,e))}function St(t,e,n){let l=new N,i=t.facet(b).side=="a",r=t.field(k),s=1;for(let o=0;;o++){let f=o<r.length?r[o]:null,h=o?s+e:1,a=f?t.doc.lineAt(i?f.fromA:f.fromB).number-1-e:t.doc.lines,d=a-h+1;if(d>=n&&l.add(t.doc.line(h).from,t.doc.line(a).to,M.replace({widget:new Mt(d),block:!0})),!f)break;s=t.doc.lineAt(Math.min(t.doc.length,i?f.toA:f.toB)).number}return l.finish()}const Ot=B.styleModule.of(new st({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),nt=B.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"⦚"',marginInlineEnd:"7px"},"&:after":{content:'"⦚"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),Oe=new Ge,$=new Ge;class Et{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||et;let n=[Q.low(Z),nt,Ot,W,B.updateListener.of(d=>{this.measuring<0&&(d.heightChanged||d.viewportChanged)&&!d.transactions.some(c=>c.effects.some(u=>u.is(K)))&&this.measure()})],l=[b.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&l.push(P);let i=ne.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],B.editorAttributes.of({class:"cm-merge-a"}),$.of(l),n]}),r=[b.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&r.push(P);let s=ne.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],B.editorAttributes.of({class:"cm-merge-b"}),$.of(r),n]});this.chunks=O.build(i.doc,s.doc,this.diffConf);let o=[k.init(()=>this.chunks),Oe.of(e.collapseUnchanged?se(e.collapseUnchanged):[])];i=i.update({effects:G.appendConfig.of(o)}).state,s=s.update({effects:G.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let f=e.orientation||"a-b",h=document.createElement("div");h.className="cm-mergeViewEditor";let a=document.createElement("div");a.className="cm-mergeViewEditor",this.editorDOM.appendChild(f=="a-b"?h:a),this.editorDOM.appendChild(f=="a-b"?a:h),this.a=new B({state:i,parent:h,root:e.root,dispatchTransactions:d=>this.dispatch(d,this.a)}),this.b=new B({state:s,parent:a,root:e.root,dispatchTransactions:d=>this.dispatch(d,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,n){if(e.some(l=>l.docChanged)){let l=e[e.length-1],i=e.reduce((s,o)=>s.compose(o.changes),Ne.empty(e[0].startState.doc.length));this.chunks=n==this.a?O.updateA(this.chunks,l.newDoc,this.b.state.doc,i,this.diffConf):O.updateB(this.chunks,this.a.state.doc,l.newDoc,i,this.diffConf),n.update([...e,l.state.update({effects:ie.of(this.chunks)})]);let r=n==this.a?this.b:this.a;r.update([r.state.update({effects:ie.of(this.chunks)})]),this.scheduleMeasure()}else n.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let r=e.orientation!="b-a";if(r!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(r?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(r?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let r=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in e&&(r=!!e.revertControls,s=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(o=e.renderRevertControl),this.setupRevertControls(r,s,o)}let n="highlightChanges"in e,l="gutter"in e,i="collapseUnchanged"in e;if(n||l||i){let r=[],s=[];if(n||l){let o=this.a.state.facet(b),f=l?e.gutter!==!1:o.markGutter,h=n?e.highlightChanges!==!1:o.highlightChanges;r.push($.reconfigure([b.of({side:"a",sibling:()=>this.b,highlightChanges:h,markGutter:f}),f?P:[]])),s.push($.reconfigure([b.of({side:"b",sibling:()=>this.a,highlightChanges:h,markGutter:f}),f?P:[]]))}if(i){let o=Oe.reconfigure(e.collapseUnchanged?se(e.collapseUnchanged):[]);r.push(o),s.push(o)}this.a.dispatch({effects:r}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(e,n,l){this.revertToA=n,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=l,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){bt(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,n=e.firstChild,l=this.a.viewport,i=this.b.viewport;for(let r=0;r<this.chunks.length;r++){let s=this.chunks[r];if(s.fromA>l.to||s.fromB>i.to)break;if(s.fromA<l.from||s.fromB<i.from)continue;let o=this.a.lineBlockAt(s.fromA).top+"px";for(;n&&+n.dataset.chunk<r;)n=Ee(n);n&&n.dataset.chunk==String(r)?(n.style.top!=o&&(n.style.top=o),n=n.nextSibling):e.insertBefore(this.renderRevertButton(o,r),n)}for(;n;)n=Ee(n)}renderRevertButton(e,n){let l;if(this.renderRevert)l=this.renderRevert();else{l=document.createElement("button");let i=this.a.state.phrase("Revert this chunk");l.setAttribute("aria-label",i),l.setAttribute("title",i),l.textContent=this.revertToLeft?"⇜":"⇝"}return l.style.top=e,l.setAttribute("data-chunk",String(n)),l}revertClicked(e){let n=e.target,l;for(;n&&n.parentNode!=this.revertDOM;)n=n.parentNode;if(n&&(l=this.chunks[n.dataset.chunk])){let[i,r,s,o,f,h]=this.revertToA?[this.b,this.a,l.fromB,l.toB,l.fromA,l.toA]:[this.a,this.b,l.fromA,l.toA,l.fromB,l.toB],a=i.state.sliceDoc(s,Math.max(s,o-1));s!=o&&h<=r.state.doc.length&&(a+=i.state.lineBreak),r.dispatch({changes:{from:f,to:Math.min(r.state.doc.length,h),insert:a},userEvent:"revert"}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}}function Ee(t){let e=t.nextSibling;return t.remove(),e}const yt=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-deletedLineGutter"}},Rt=Q.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(Z))===null||e===void 0?void 0:e.gutter)||Ie.empty},widgetMarker:(t,e)=>e instanceof rt?yt:null}));function Tt(t){var e;let n=typeof t.original=="string"?Fe.of(t.original.split(/\r?\n/)):t.original,l=t.diffConfig||et;return[Q.low(Z),Vt,nt,B.editorAttributes.of({class:"cm-merge-b"}),Ze.of((i,r)=>{let s=r.effects.find(o=>o.is(he));return s&&(i=O.updateA(i,s.value.doc,r.startState.doc,s.value.changes,l)),r.docChanged&&(i=O.updateB(i,r.state.field(V),r.newDoc,r.changes,l)),i}),b.of({highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1,syntaxHighlightDeletions:t.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:(e=t.mergeControls)!==null&&e!==void 0?e:!0,overrideChunk:t.allowInlineDiffs?Wt:void 0,side:"b"}),V.init(()=>n),t.gutter!==!1?Rt:[],t.collapseUnchanged?se(t.collapseUnchanged):[],k.init(i=>O.build(n,i.doc,l))]}const he=G.define(),V=H.define({create:()=>Fe.empty,update(t,e){for(let n of e.effects)n.is(he)&&(t=n.value.doc);return t}}),ye=new WeakMap;class rt extends Y{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||(this.dom=this.buildDOM(e))}}function Gt(t,e,n){let l=ye.get(e.changes);if(l)return l;let i=s=>{let{highlightChanges:o,syntaxHighlightDeletions:f,syntaxHighlightDeletionsMaxLength:h,mergeControls:a}=t.facet(b),d=document.createElement("div");if(d.className="cm-deletedChunk",a){let x=d.appendChild(document.createElement("div"));x.className="cm-chunkButtons";let D=A=>{A.preventDefault(),Nt(s,s.posAtDOM(d))},w=A=>{A.preventDefault(),Ft(s,s.posAtDOM(d))};if(typeof a=="function")x.appendChild(a("accept",D)),x.appendChild(a("reject",w));else{let A=x.appendChild(document.createElement("button"));A.name="accept",A.textContent=t.phrase("Accept"),A.onmousedown=D;let L=x.appendChild(document.createElement("button"));L.name="reject",L.textContent=t.phrase("Reject"),L.onmousedown=w}}if(n||e.fromA>=e.toA)return d;let c=s.state.field(V).sliceString(e.fromA,e.endA),u=f&&t.facet(at),m=S(),p=e.changes,g=0,C=!1;function S(){let x=d.appendChild(document.createElement("div"));return x.className="cm-deletedLine",x.appendChild(document.createElement("del"))}function R(x,D,w){for(let A=x;A<D;){if(c.charAt(A)==`
|
|
1
|
+
import{j as J,r as T}from"./index-B4TIVWAq.js";import{R as lt}from"./index-6F4HxV-x.js";import{o as Q,E as B,q as ne,C as Ge,S as G,r as Ne,u as Fe,v as st,w as H,x as M,V as ot,F as Ve,y as je,R as N,W as Y,G as oe,z as at,A as ft,B as Ie,H as dt,m as ht,n as ct}from"./index-BzVyUKXW.js";class v{constructor(e,n,l,i){this.fromA=e,this.toA=n,this.fromB=l,this.toB=i}offset(e,n=e){return new v(this.fromA+e,this.toA+e,this.fromB+n,this.toB+n)}}function y(t,e,n,l,i,r){if(t==l)return[];let s=fe(t,e,n,l,i,r),o=de(t,e+s,n,l,i+s,r);e+=s,n-=o,i+=s,r-=o;let f=n-e,h=r-i;if(!f||!h)return[new v(e,n,i,r)];if(f>h){let d=t.slice(e,n).indexOf(l.slice(i,r));if(d>-1)return[new v(e,e+d,i,i),new v(e+d+h,n,r,r)]}else if(h>f){let d=l.slice(i,r).indexOf(t.slice(e,n));if(d>-1)return[new v(e,e,i,i+d),new v(n,n,i+d+f,r)]}if(f==1||h==1)return[new v(e,n,i,r)];let a=He(t,e,n,l,i,r);if(a){let[d,c,u]=a;return y(t,e,d,l,i,c).concat(y(t,d+u,n,l,c+u,r))}return ut(t,e,n,l,i,r)}let I=1e9,U=0,ae=!1;function ut(t,e,n,l,i,r){let s=n-e,o=r-i;if(I<1e9&&Math.min(s,o)>I*16||U>0&&Date.now()>U)return Math.min(s,o)>I*64?[new v(e,n,i,r)]:ge(t,e,n,l,i,r);let f=Math.ceil((s+o)/2);ee.reset(f),te.reset(f);let h=(u,m)=>t.charCodeAt(e+u)==l.charCodeAt(i+m),a=(u,m)=>t.charCodeAt(n-u-1)==l.charCodeAt(r-m-1),d=(s-o)%2!=0?te:null,c=d?null:ee;for(let u=0;u<f;u++){if(u>I||U>0&&!(u&63)&&Date.now()>U)return ge(t,e,n,l,i,r);let m=ee.advance(u,s,o,f,d,!1,h)||te.advance(u,s,o,f,c,!0,a);if(m)return mt(t,e,n,e+m[0],l,i,r,i+m[1])}return[new v(e,n,i,r)]}class Ue{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let n=0;n<this.len;n++)this.vec[n]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,n,l,i,r,s,o){for(let f=-e+this.start;f<=e-this.end;f+=2){let h=i+f,a=f==-e||f!=e&&this.vec[h-1]<this.vec[h+1]?this.vec[h+1]:this.vec[h-1]+1,d=a-f;for(;a<n&&d<l&&o(a,d);)a++,d++;if(this.vec[h]=a,a>n)this.end+=2;else if(d>l)this.start+=2;else if(r){let c=i+(n-l)-f;if(c>=0&&c<this.len&&r.vec[c]!=-1)if(s){let u=r.vec[c];if(u>=n-a)return[u,i+u-c]}else{let u=n-r.vec[c];if(a>=u)return[a,d]}}}return null}}const ee=new Ue,te=new Ue;function mt(t,e,n,l,i,r,s,o){let f=!1;return!F(t,l)&&++l==n&&(f=!0),!F(i,o)&&++o==s&&(f=!0),f?[new v(e,n,r,s)]:y(t,e,l,i,r,o).concat(y(t,l,n,i,o,s))}function We(t,e){let n=1,l=Math.min(t,e);for(;n<l;)n=n<<1;return n}function fe(t,e,n,l,i,r){if(e==n||e==r||t.charCodeAt(e)!=l.charCodeAt(i))return 0;let s=We(n-e,r-i);for(let o=e,f=i;;){let h=o+s,a=f+s;if(h>n||a>r||t.slice(o,h)!=l.slice(f,a)){if(s==1)return o-e-(F(t,o)?0:1);s=s>>1}else{if(h==n||a==r)return h-e;o=h,f=a}}}function de(t,e,n,l,i,r){if(e==n||i==r||t.charCodeAt(n-1)!=l.charCodeAt(r-1))return 0;let s=We(n-e,r-i);for(let o=n,f=r;;){let h=o-s,a=f-s;if(h<e||a<i||t.slice(h,o)!=l.slice(a,f)){if(s==1)return n-o-(F(t,o)?0:1);s=s>>1}else{if(h==e||a==i)return n-h;o=h,f=a}}}function re(t,e,n,l,i,r,s,o){let f=l.slice(i,r),h=null;for(;;){if(h||s<o)return h;for(let a=e+s;;){F(t,a)||a++;let d=a+s;if(F(t,d)||(d+=d==a+1?1:-1),d>=n)break;let c=t.slice(a,d),u=-1;for(;(u=f.indexOf(c,u+1))!=-1;){let m=fe(t,d,n,l,i+u+c.length,r),p=de(t,e,a,l,i,i+u),g=c.length+m+p;(!h||h[2]<g)&&(h=[a-p,i+u-p,g])}a=d}if(o<0)return h;s=s>>1}}function He(t,e,n,l,i,r){let s=n-e,o=r-i;if(s<o){let f=He(l,i,r,t,e,n);return f&&[f[1],f[0],f[2]]}return s<4||o*2<s?null:re(t,e,n,l,i,r,Math.floor(s/4),-1)}function ge(t,e,n,l,i,r){ae=!0;let s=n-e,o=r-i,f;if(s<o){let c=re(l,i,r,t,e,n,Math.floor(s/6),50);f=c&&[c[1],c[0],c[2]]}else f=re(t,e,n,l,i,r,Math.floor(o/6),50);if(!f)return[new v(e,n,i,r)];let[h,a,d]=f;return y(t,e,h,l,i,a).concat(y(t,h+d,n,l,a+d,r))}function ze(t,e){for(let n=1;n<t.length;n++){let l=t[n-1],i=t[n];l.toA>i.fromA-e&&l.toB>i.fromB-e&&(t[n-1]=new v(l.fromA,i.toA,l.fromB,i.toB),t.splice(n--,1))}}function gt(t,e,n){for(;;){ze(n,1);let l=!1;for(let i=0;i<n.length;i++){let r=n[i],s,o;(s=fe(t,r.fromA,r.toA,e,r.fromB,r.toB))&&(r=n[i]=new v(r.fromA+s,r.toA,r.fromB+s,r.toB)),(o=de(t,r.fromA,r.toA,e,r.fromB,r.toB))&&(r=n[i]=new v(r.fromA,r.toA-o,r.fromB,r.toB-o));let f=r.toA-r.fromA,h=r.toB-r.fromB;if(f&&h)continue;let a=r.fromA-(i?n[i-1].toA:0),d=(i<n.length-1?n[i+1].fromA:t.length)-r.toA;if(!a||!d)continue;let c=f?t.slice(r.fromA,r.toA):e.slice(r.fromB,r.toB);a<=c.length&&t.slice(r.fromA-a,r.fromA)==c.slice(c.length-a)?(n[i]=new v(r.fromA-a,r.toA-a,r.fromB-a,r.toB-a),l=!0):d<=c.length&&t.slice(r.toA,r.toA+d)==c.slice(0,d)&&(n[i]=new v(r.fromA+d,r.toA+d,r.fromB+d,r.toB+d),l=!0)}if(!l)break}return n}function pt(t,e,n){for(let l=0,i=0;i<t.length;i++){let r=t[i],s=r.toA-r.fromA,o=r.toB-r.fromB;if(s&&o||s>3||o>3){let f=i==t.length-1?e.length:t[i+1].fromA,h=r.fromA-l,a=f-r.toA,d=Ce(e,r.fromA,h),c=pe(e,r.toA,a),u=r.fromA-d,m=c-r.toA;if((!s||!o)&&u&&m){let p=Math.max(s,o),[g,C,S]=s?[e,r.fromA,r.toA]:[n,r.fromB,r.toB];p>u&&e.slice(d,r.fromA)==g.slice(S-u,S)?(r=t[i]=new v(d,d+s,r.fromB-u,r.toB-u),d=r.fromA,c=pe(e,r.toA,f-r.toA)):p>m&&e.slice(r.toA,c)==g.slice(C,C+m)&&(r=t[i]=new v(c-s,c,r.fromB+m,r.toB+m),c=r.toA,d=Ce(e,r.fromA,r.fromA-l)),u=r.fromA-d,m=c-r.toA}if(u||m)r=t[i]=new v(r.fromA-u,r.toA+m,r.fromB-u,r.toB+m);else if(s){if(!o){let p=Ae(e,r.fromA,r.toA),g,C=p<0?-1:ve(e,r.toA,r.fromA);p>-1&&(g=p-r.fromA)<=a&&e.slice(r.fromA,p)==e.slice(r.toA,r.toA+g)?r=t[i]=r.offset(g):C>-1&&(g=r.toA-C)<=h&&e.slice(r.fromA-g,r.fromA)==e.slice(C,r.toA)&&(r=t[i]=r.offset(-g))}}else{let p=Ae(n,r.fromB,r.toB),g,C=p<0?-1:ve(n,r.toB,r.fromB);p>-1&&(g=p-r.fromB)<=a&&n.slice(r.fromB,p)==n.slice(r.toB,r.toB+g)?r=t[i]=r.offset(g):C>-1&&(g=r.toB-C)<=h&&n.slice(r.fromB-g,r.fromB)==n.slice(C,r.toB)&&(r=t[i]=r.offset(-g))}}l=r.toA}return ze(t,3),t}let E;try{E=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function Pe(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function qe(t,e){if(e==t.length)return 0;let n=t.charCodeAt(e);return n<192?Pe(n)?1:0:E?!Je(n)||e==t.length-1?E.test(String.fromCharCode(n))?1:0:E.test(t.slice(e,e+2))?2:0:0}function _e(t,e){if(!e)return 0;let n=t.charCodeAt(e-1);return n<192?Pe(n)?1:0:E?!Ke(n)||e==1?E.test(String.fromCharCode(n))?1:0:E.test(t.slice(e-2,e))?2:0:0}const $e=8;function pe(t,e,n){if(e==t.length||!_e(t,e))return e;for(let l=e,i=e+n,r=0;r<$e;r++){let s=qe(t,l);if(!s||l+s>i)return l;l+=s}return e}function Ce(t,e,n){if(!e||!qe(t,e))return e;for(let l=e,i=e-n,r=0;r<$e;r++){let s=_e(t,l);if(!s||l-s<i)return l;l-=s}return e}function ve(t,e,n){for(;e!=n;e--)if(t.charCodeAt(e-1)==10)return e;return-1}function Ae(t,e,n){for(;e!=n;e++)if(t.charCodeAt(e)==10)return e;return-1}const Je=t=>t>=55296&&t<=56319,Ke=t=>t>=56320&&t<=57343;function F(t,e){return!e||e==t.length||!Je(t.charCodeAt(e-1))||!Ke(t.charCodeAt(e))}function Ct(t,e,n){var l;let i=n==null?void 0:n.override;return i?i(t,e):(I=((l=n==null?void 0:n.scanLimit)!==null&&l!==void 0?l:1e9)>>1,U=n!=null&&n.timeout?Date.now()+n.timeout:0,ae=!1,gt(t,e,y(t,0,t.length,e,0,e.length)))}function Qe(){return!ae}function Ye(t,e,n){return pt(Ct(t,e,n),t,e)}const b=Ve.define({combine:t=>t[0]}),ie=G.define(),Ze=Ve.define(),k=H.define({create(t){return null},update(t,e){for(let n of e.effects)n.is(ie)&&(t=n.value);for(let n of e.state.facet(Ze))t=n(t,e);return t}});function vt(t){let e=t.field(k,!1);if(!e)return null;let n=t.facet(b);return{chunks:e,side:n?n.side:null}}class O{constructor(e,n,l,i,r,s=!0){this.changes=e,this.fromA=n,this.toA=l,this.fromB=i,this.toB=r,this.precise=s}offset(e,n){return e||n?new O(this.changes,this.fromA+e,this.toA+e,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,n,l){let i=Ye(e.toString(),n.toString(),l);return Xe(i,e,n,0,0,Qe())}static updateA(e,n,l,i,r){return be(Be(e,i,!0,l.length),e,n,l,r)}static updateB(e,n,l,i,r){return be(Be(e,i,!1,n.length),e,n,l,r)}}function xe(t,e,n,l){let i=n.lineAt(t),r=l.lineAt(e);return i.to==t&&r.to==e&&t<n.length&&e<l.length?[t+1,e+1]:[i.from,r.from]}function we(t,e,n,l){let i=n.lineAt(t),r=l.lineAt(e);return i.from==t&&r.from==e?[t,e]:[i.to+1,r.to+1]}function Xe(t,e,n,l,i,r){let s=[];for(let o=0;o<t.length;o++){let f=t[o],[h,a]=xe(f.fromA+l,f.fromB+i,e,n),[d,c]=we(f.toA+l,f.toB+i,e,n),u=[f.offset(-h+l,-a+i)];for(;o<t.length-1;){let m=t[o+1],[p,g]=xe(m.fromA+l,m.fromB+i,e,n);if(p>d+1&&g>c+1)break;u.push(m.offset(-h+l,-a+i)),[d,c]=we(m.toA+l,m.toB+i,e,n),o++}s.push(new O(u,h,Math.max(h,d),a,Math.max(a,c),r))}return s}const z=1e3;function ke(t,e,n,l){let i=0,r=t.length;for(;;){if(i==r){let a=0,d=0;i&&({toA:a,toB:d}=t[i-1]);let c=e-(n?a:d);return[a+c,d+c]}let s=i+r>>1,o=t[s],[f,h]=n?[o.fromA,o.toA]:[o.fromB,o.toB];if(f>e)r=s;else if(h<=e)i=s+1;else return l?[o.fromA,o.fromB]:[o.toA,o.toB]}}function Be(t,e,n,l){let i=[];return e.iterChangedRanges((r,s,o,f)=>{let h=0,a=n?e.length:l,d=0,c=n?l:e.length;r>z&&([h,d]=ke(t,r-z,n,!0)),s<e.length-z&&([a,c]=ke(t,s+z,n,!1));let u=f-o-(s-r),m,[p,g]=n?[u,0]:[0,u];i.length&&(m=i[i.length-1]).toA>=h?i[i.length-1]={fromA:m.fromA,fromB:m.fromB,toA:a,toB:c,diffA:m.diffA+p,diffB:m.diffB+g}:i.push({fromA:h,toA:a,fromB:d,toB:c,diffA:p,diffB:g})}),i}function be(t,e,n,l,i){if(!t.length)return e;let r=[];for(let s=0,o=0,f=0,h=0;;s++){let a=s==t.length?null:t[s],d=a?a.fromA+o:n.length,c=a?a.fromB+f:l.length;for(;h<e.length;){let g=e[h];if(a&&(g.toA+o>d||g.toB+f>c))break;r.push(g.offset(o,f)),h++}if(!a)break;let u=a.toA+o+a.diffA,m=a.toB+f+a.diffB,p=Ye(n.sliceString(d,u),l.sliceString(c,m),i);for(let g of Xe(p,n,l,d,c,Qe()))r.push(g);for(o+=a.diffA,f+=a.diffB;h<e.length;){let g=e[h];if(g.fromA+o>u&&g.fromB+f>m)break;h++}}return r}const et={scanLimit:500},Z=ot.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=Le(t))}update(t){(t.docChanged||t.viewportChanged||At(t.startState,t.state)||xt(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=Le(t.view))}},{decorations:t=>t.deco}),P=Q.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(Z))===null||e===void 0?void 0:e.gutter)||Ie.empty}}));function At(t,e){return t.field(k,!1)!=e.field(k,!1)}function xt(t,e){return t.facet(b)!=e.facet(b)}const Me=M.line({class:"cm-changedLine"}),tt=M.mark({class:"cm-changedText"}),wt=M.mark({tagName:"ins",class:"cm-insertedLine"}),kt=M.mark({tagName:"del",class:"cm-deletedLine"}),De=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function Bt(t,e,n,l,i,r){let s=n?t.fromA:t.fromB,o=n?t.toA:t.toB,f=0;if(s!=o){i.add(s,s,Me),i.add(s,o,n?kt:wt),r&&r.add(s,s,De);for(let h=e.iterRange(s,o-1),a=s;!h.next().done;){if(h.lineBreak){a++,i.add(a,a,Me),r&&r.add(a,a,De);continue}let d=a+h.value.length;if(l)for(;f<t.changes.length;){let c=t.changes[f],u=s+(n?c.fromA:c.fromB),m=s+(n?c.toA:c.toB),p=Math.max(a,u),g=Math.min(d,m);if(p<g&&i.add(p,g,tt),m<d)f++;else break}a=d}}}function Le(t){let e=t.state.field(k),{side:n,highlightChanges:l,markGutter:i,overrideChunk:r}=t.state.facet(b),s=n=="a",o=new N,f=i?new N:null,{from:h,to:a}=t.viewport;for(let d of e){if((s?d.fromA:d.fromB)>=a)break;(s?d.toA:d.toB)>h&&(!r||!r(t.state,d,o,f))&&Bt(d,t.state.doc,s,l,o,f)}return{deco:o.finish(),gutter:f&&f.finish()}}class q extends Y{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}const K=G.define({map:(t,e)=>t.map(e)}),W=H.define({create:()=>M.none,update:(t,e)=>{for(let n of e.effects)if(n.is(K))return n.value;return t.map(e.changes)},provide:t=>B.decorations.from(t)}),_=.01;function Se(t,e){if(t.size!=e.size)return!1;let n=t.iter(),l=e.iter();for(;n.value;){if(n.from!=l.from||Math.abs(n.value.spec.widget.height-l.value.spec.widget.height)>1)return!1;n.next(),l.next()}return!0}function bt(t,e,n){let l=new N,i=new N,r=t.state.field(W).iter(),s=e.state.field(W).iter(),o=0,f=0,h=0,a=0,d=t.viewport,c=e.viewport;for(let g=0;;g++){let C=g<n.length?n[g]:null,S=C?C.fromA:t.state.doc.length,R=C?C.fromB:e.state.doc.length;if(o<S){let x=t.lineBlockAt(o).top+h,D=e.lineBlockAt(f).top+a,w=x-D;w<-_?(h-=w,l.add(o,o,M.widget({widget:new q(-w),block:!0,side:-1}))):w>_&&(a+=w,i.add(f,f,M.widget({widget:new q(w),block:!0,side:-1})))}if(S>o+1e3&&o<d.from&&S>d.from&&f<c.from&&R>c.from){let x=Math.min(d.from-o,c.from-f);o+=x,f+=x,g--}else if(C)o=C.toA,f=C.toB;else break;for(;r.value&&r.from<o;)h-=r.value.spec.widget.height,r.next();for(;s.value&&s.from<f;)a-=s.value.spec.widget.height,s.next()}for(;r.value;)h-=r.value.spec.widget.height,r.next();for(;s.value;)a-=s.value.spec.widget.height,s.next();let u=t.contentHeight+h-(e.contentHeight+a);u<_?l.add(t.state.doc.length,t.state.doc.length,M.widget({widget:new q(-u),block:!0,side:1})):u>_&&i.add(e.state.doc.length,e.state.doc.length,M.widget({widget:new q(u),block:!0,side:1}));let m=l.finish(),p=i.finish();Se(m,t.state.field(W))||t.dispatch({effects:K.of(m)}),Se(p,e.state.field(W))||e.dispatch({effects:K.of(p)})}const le=G.define({map:(t,e)=>e.mapPos(t)});class Mt extends Y{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let n=document.createElement("div");return n.className="cm-collapsedLines",n.textContent=e.state.phrase("$ unchanged lines",this.lines),n.addEventListener("click",l=>{let i=e.posAtDOM(l.target);e.dispatch({effects:le.of(i)});let{side:r,sibling:s}=e.state.facet(b);s&&s().dispatch({effects:le.of(Dt(i,e.state.field(k),r=="a"))})}),n}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}}function Dt(t,e,n){let l=0,i=0;for(let r=0;;r++){let s=r<e.length?e[r]:null;if(!s||(n?s.fromA:s.fromB)>=t)return i+(t-l);[l,i]=n?[s.toA,s.toB]:[s.toB,s.toA]}}const Lt=H.define({create(t){return M.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(le)&&(t=t.update({filter:l=>l!=n.value}));if(t.size&&e.state.field(k)!=e.startState.field(k,!1)){let n=e.state.facet(b).side=="a",l=[];for(let i of e.state.field(k))t.between(n?i.fromA:i.fromB,n?i.toA:i.toB,r=>{l.push(r)});l.length&&(t=t.update({filter:i=>l.indexOf(i)<0}))}return t},provide:t=>B.decorations.from(t)});function se({margin:t=3,minSize:e=4}){return Lt.init(n=>St(n,t,e))}function St(t,e,n){let l=new N,i=t.facet(b).side=="a",r=t.field(k),s=1;for(let o=0;;o++){let f=o<r.length?r[o]:null,h=o?s+e:1,a=f?t.doc.lineAt(i?f.fromA:f.fromB).number-1-e:t.doc.lines,d=a-h+1;if(d>=n&&l.add(t.doc.line(h).from,t.doc.line(a).to,M.replace({widget:new Mt(d),block:!0})),!f)break;s=t.doc.lineAt(Math.min(t.doc.length,i?f.toA:f.toB)).number}return l.finish()}const Ot=B.styleModule.of(new st({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),nt=B.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"⦚"',marginInlineEnd:"7px"},"&:after":{content:'"⦚"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),Oe=new Ge,$=new Ge;class Et{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||et;let n=[Q.low(Z),nt,Ot,W,B.updateListener.of(d=>{this.measuring<0&&(d.heightChanged||d.viewportChanged)&&!d.transactions.some(c=>c.effects.some(u=>u.is(K)))&&this.measure()})],l=[b.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&l.push(P);let i=ne.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],B.editorAttributes.of({class:"cm-merge-a"}),$.of(l),n]}),r=[b.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&r.push(P);let s=ne.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],B.editorAttributes.of({class:"cm-merge-b"}),$.of(r),n]});this.chunks=O.build(i.doc,s.doc,this.diffConf);let o=[k.init(()=>this.chunks),Oe.of(e.collapseUnchanged?se(e.collapseUnchanged):[])];i=i.update({effects:G.appendConfig.of(o)}).state,s=s.update({effects:G.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let f=e.orientation||"a-b",h=document.createElement("div");h.className="cm-mergeViewEditor";let a=document.createElement("div");a.className="cm-mergeViewEditor",this.editorDOM.appendChild(f=="a-b"?h:a),this.editorDOM.appendChild(f=="a-b"?a:h),this.a=new B({state:i,parent:h,root:e.root,dispatchTransactions:d=>this.dispatch(d,this.a)}),this.b=new B({state:s,parent:a,root:e.root,dispatchTransactions:d=>this.dispatch(d,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,n){if(e.some(l=>l.docChanged)){let l=e[e.length-1],i=e.reduce((s,o)=>s.compose(o.changes),Ne.empty(e[0].startState.doc.length));this.chunks=n==this.a?O.updateA(this.chunks,l.newDoc,this.b.state.doc,i,this.diffConf):O.updateB(this.chunks,this.a.state.doc,l.newDoc,i,this.diffConf),n.update([...e,l.state.update({effects:ie.of(this.chunks)})]);let r=n==this.a?this.b:this.a;r.update([r.state.update({effects:ie.of(this.chunks)})]),this.scheduleMeasure()}else n.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let r=e.orientation!="b-a";if(r!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(r?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(r?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let r=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in e&&(r=!!e.revertControls,s=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(o=e.renderRevertControl),this.setupRevertControls(r,s,o)}let n="highlightChanges"in e,l="gutter"in e,i="collapseUnchanged"in e;if(n||l||i){let r=[],s=[];if(n||l){let o=this.a.state.facet(b),f=l?e.gutter!==!1:o.markGutter,h=n?e.highlightChanges!==!1:o.highlightChanges;r.push($.reconfigure([b.of({side:"a",sibling:()=>this.b,highlightChanges:h,markGutter:f}),f?P:[]])),s.push($.reconfigure([b.of({side:"b",sibling:()=>this.a,highlightChanges:h,markGutter:f}),f?P:[]]))}if(i){let o=Oe.reconfigure(e.collapseUnchanged?se(e.collapseUnchanged):[]);r.push(o),s.push(o)}this.a.dispatch({effects:r}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(e,n,l){this.revertToA=n,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=l,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){bt(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,n=e.firstChild,l=this.a.viewport,i=this.b.viewport;for(let r=0;r<this.chunks.length;r++){let s=this.chunks[r];if(s.fromA>l.to||s.fromB>i.to)break;if(s.fromA<l.from||s.fromB<i.from)continue;let o=this.a.lineBlockAt(s.fromA).top+"px";for(;n&&+n.dataset.chunk<r;)n=Ee(n);n&&n.dataset.chunk==String(r)?(n.style.top!=o&&(n.style.top=o),n=n.nextSibling):e.insertBefore(this.renderRevertButton(o,r),n)}for(;n;)n=Ee(n)}renderRevertButton(e,n){let l;if(this.renderRevert)l=this.renderRevert();else{l=document.createElement("button");let i=this.a.state.phrase("Revert this chunk");l.setAttribute("aria-label",i),l.setAttribute("title",i),l.textContent=this.revertToLeft?"⇜":"⇝"}return l.style.top=e,l.setAttribute("data-chunk",String(n)),l}revertClicked(e){let n=e.target,l;for(;n&&n.parentNode!=this.revertDOM;)n=n.parentNode;if(n&&(l=this.chunks[n.dataset.chunk])){let[i,r,s,o,f,h]=this.revertToA?[this.b,this.a,l.fromB,l.toB,l.fromA,l.toA]:[this.a,this.b,l.fromA,l.toA,l.fromB,l.toB],a=i.state.sliceDoc(s,Math.max(s,o-1));s!=o&&h<=r.state.doc.length&&(a+=i.state.lineBreak),r.dispatch({changes:{from:f,to:Math.min(r.state.doc.length,h),insert:a},userEvent:"revert"}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}}function Ee(t){let e=t.nextSibling;return t.remove(),e}const yt=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-deletedLineGutter"}},Rt=Q.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(Z))===null||e===void 0?void 0:e.gutter)||Ie.empty},widgetMarker:(t,e)=>e instanceof rt?yt:null}));function Tt(t){var e;let n=typeof t.original=="string"?Fe.of(t.original.split(/\r?\n/)):t.original,l=t.diffConfig||et;return[Q.low(Z),Vt,nt,B.editorAttributes.of({class:"cm-merge-b"}),Ze.of((i,r)=>{let s=r.effects.find(o=>o.is(he));return s&&(i=O.updateA(i,s.value.doc,r.startState.doc,s.value.changes,l)),r.docChanged&&(i=O.updateB(i,r.state.field(V),r.newDoc,r.changes,l)),i}),b.of({highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1,syntaxHighlightDeletions:t.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:(e=t.mergeControls)!==null&&e!==void 0?e:!0,overrideChunk:t.allowInlineDiffs?Wt:void 0,side:"b"}),V.init(()=>n),t.gutter!==!1?Rt:[],t.collapseUnchanged?se(t.collapseUnchanged):[],k.init(i=>O.build(n,i.doc,l))]}const he=G.define(),V=H.define({create:()=>Fe.empty,update(t,e){for(let n of e.effects)n.is(he)&&(t=n.value.doc);return t}}),ye=new WeakMap;class rt extends Y{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||(this.dom=this.buildDOM(e))}}function Gt(t,e,n){let l=ye.get(e.changes);if(l)return l;let i=s=>{let{highlightChanges:o,syntaxHighlightDeletions:f,syntaxHighlightDeletionsMaxLength:h,mergeControls:a}=t.facet(b),d=document.createElement("div");if(d.className="cm-deletedChunk",a){let x=d.appendChild(document.createElement("div"));x.className="cm-chunkButtons";let D=A=>{A.preventDefault(),Nt(s,s.posAtDOM(d))},w=A=>{A.preventDefault(),Ft(s,s.posAtDOM(d))};if(typeof a=="function")x.appendChild(a("accept",D)),x.appendChild(a("reject",w));else{let A=x.appendChild(document.createElement("button"));A.name="accept",A.textContent=t.phrase("Accept"),A.onmousedown=D;let L=x.appendChild(document.createElement("button"));L.name="reject",L.textContent=t.phrase("Reject"),L.onmousedown=w}}if(n||e.fromA>=e.toA)return d;let c=s.state.field(V).sliceString(e.fromA,e.endA),u=f&&t.facet(at),m=S(),p=e.changes,g=0,C=!1;function S(){let x=d.appendChild(document.createElement("div"));return x.className="cm-deletedLine",x.appendChild(document.createElement("del"))}function R(x,D,w){for(let A=x;A<D;){if(c.charAt(A)==`
|
|
2
2
|
`){m.firstChild||m.appendChild(document.createElement("br")),m=S(),A++;continue}let L=D,ce=w+(C?" cm-deletedText":""),ue=!1,X=c.indexOf(`
|
|
3
3
|
`,A);if(X>-1&&X<D&&(L=X),o&&g<p.length){let j=Math.max(0,C?p[g].toA:p[g].fromA);j<=L&&(L=j,C&&g++,ue=!0)}if(L>A){let j=document.createTextNode(c.slice(A,L));if(ce){let me=m.appendChild(document.createElement("span"));me.className=ce,me.appendChild(j)}else m.appendChild(j);A=L}ue&&(C=!C)}}if(u&&e.toA-e.fromA<=h){let x=u.parser.parse(c),D=0;ft(x,{style:w=>dt(t,w)},(w,A,L)=>{w>D&&R(D,w,""),R(w,A,L),D=A}),R(D,c.length,"")}else R(0,c.length,"");return m.firstChild||m.appendChild(document.createElement("br")),d},r=M.widget({block:!0,side:-1,widget:new rt(i)});return ye.set(e.changes,r),r}function Nt(t,e){let{state:n}=t,l=e??n.selection.main.head,i=t.state.field(k).find(f=>f.fromB<=l&&f.endB>=l);if(!i)return!1;let r=t.state.sliceDoc(i.fromB,Math.max(i.fromB,i.toB-1)),s=t.state.field(V);i.fromB!=i.toB&&i.toA<=s.length&&(r+=t.state.lineBreak);let o=Ne.of({from:i.fromA,to:Math.min(s.length,i.toA),insert:r},s.length);return t.dispatch({effects:he.of({doc:o.apply(s),changes:o}),userEvent:"accept"}),!0}function Ft(t,e){let{state:n}=t,l=e??n.selection.main.head,i=n.field(k).find(o=>o.fromB<=l&&o.endB>=l);if(!i)return!1;let s=n.field(V).sliceString(i.fromA,Math.max(i.fromA,i.toA-1));return i.fromA!=i.toA&&i.toB<=n.doc.length&&(s+=n.lineBreak),t.dispatch({changes:{from:i.fromB,to:Math.min(n.doc.length,i.toB),insert:s},userEvent:"revert"}),!0}function Re(t){let e=new N;for(let n of t.field(k)){let l=t.facet(b).overrideChunk&&it(t,n);e.add(n.fromB,n.fromB,Gt(t,n,!!l))}return e.finish()}const Vt=H.define({create:t=>Re(t),update(t,e){return e.state.field(k,!1)!=e.startState.field(k,!1)?Re(e.state):t},provide:t=>B.decorations.from(t)}),Te=new WeakMap;function it(t,e){let n=Te.get(e);if(n!==void 0)return n;n=null;let l=t.field(V),i=t.doc,r=l.lineAt(e.endA).number-l.lineAt(e.fromA).number+1,s=i.lineAt(e.endB).number-i.lineAt(e.fromB).number+1;e:if(r==s&&r<10){let o=[],f=0,h=e.fromA,a=e.fromB;for(let d of e.changes){if(d.fromA<d.toA){f+=d.toA-d.fromA;let c=l.sliceString(h+d.fromA,h+d.toA);if(/\n/.test(c))break e;o.push(M.widget({widget:new jt(c),side:-1}).range(a+d.fromB))}d.fromB<d.toB&&o.push(tt.range(a+d.fromB,a+d.toB))}f<e.endA-e.fromA-r*2&&(n=o)}return Te.set(e,n),n}class jt extends Y{constructor(e){super(),this.text=e}eq(e){return this.text==e.text}toDOM(e){let n=document.createElement("del");return n.className="cm-deletedText",n.textContent=this.text,n}}const It=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-inlineChangedLineGutter"}},Ut=M.line({class:"cm-inlineChangedLine"});function Wt(t,e,n,l){let i=it(t,e),r=0;if(!i)return!1;for(let s=t.doc.lineAt(e.fromB);;){for(l&&l.add(s.from,s.from,It),n.add(s.from,s.from,Ut);r<i.length&&i[r].to<=s.to;){let o=i[r++];n.add(o.from,o.to,o.value)}if(s.to>=e.endB)break;s=t.doc.lineAt(s.to+1)}return!0}function Ht(t){const[e,n]=T.useState([]);return T.useEffect(()=>{let l=!1;const i=ht.matchFilename(ct,t);if(!i){n([]);return}return i.load().then(r=>{l||n([r])}).catch(()=>{l||n([])}),()=>{l=!0}},[t]),e}function Kt({baseline:t,current:e,theme:n,filename:l,sideBySide:i,onRejectHunk:r,onHunkCountChange:s}){const o=Ht(l);return i?J.jsx(Pt,{baseline:t,current:e,theme:n,languageExtension:o}):J.jsx(zt,{baseline:t,current:e,theme:n,languageExtension:o,onRejectHunk:r,onHunkCountChange:s})}function zt({baseline:t,current:e,theme:n,languageExtension:l,onRejectHunk:i,onHunkCountChange:r}){const s=T.useRef(-1),o=T.useMemo(()=>[B.lineWrapping,Tt({original:t,gutter:!0,mergeControls:!0,collapseUnchanged:{margin:3,minSize:4}}),...l],[t,l]);return J.jsx(lt,{value:e,editable:!1,readOnly:!0,theme:n,height:"100%",className:"desktop:select-text h-full text-sm",extensions:o,basicSetup:{highlightActiveLine:!1,highlightActiveLineGutter:!1},onChange:f=>i(f),onUpdate:f=>{var a;const h=((a=vt(f.state))==null?void 0:a.chunks.length)??null;h!==null&&h!==s.current&&(s.current=h,r(h))}})}function Pt({baseline:t,current:e,theme:n,languageExtension:l}){const i=T.useRef(null);return T.useEffect(()=>{const r=i.current;if(!r)return;const s=[B.editable.of(!1),ne.readOnly.of(!0),B.lineWrapping,...n==="dark"?[qt()]:[],...l],o=new Et({a:{doc:t,extensions:s},b:{doc:e,extensions:s},parent:r,collapseUnchanged:{margin:3,minSize:4},highlightChanges:!0,gutter:!0});return()=>o.destroy()},[t,e,n,l]),J.jsx("div",{ref:i,className:"cm-diff-split h-full overflow-auto text-sm"})}function qt(){return B.theme({"&":{backgroundColor:"transparent",color:"inherit"}},{dark:!0})}export{Kt as CodeMirrorDiff};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as f}from"./index-
|
|
1
|
+
import{r as n,j as f}from"./index-B4TIVWAq.js";import{R as l}from"./index-6F4HxV-x.js";import{m as a,n as c,E as x}from"./index-BzVyUKXW.js";function j({value:u,editable:t,filename:i,languageHint:e,theme:h,onChange:m}){const[g,r]=n.useState([]);return n.useEffect(()=>{let s=!1;const o=e?a.matchLanguageName(c,e,!0):a.matchFilename(c,i);if(!o){r([]);return}return o.load().then(p=>{s||r([p])}).catch(()=>{s||r([])}),()=>{s=!0}},[i,e]),f.jsx(l,{value:u,editable:t,readOnly:!t,onChange:m,theme:h,height:"100%",className:"desktop:select-text h-full text-sm",extensions:[x.lineWrapping,...g],basicSetup:{highlightActiveLine:t,highlightActiveLineGutter:t}})}export{j as CodeMirrorEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as g,j as e,a as u,Q as p,B as d,R as x,U as j,V as m,W as h,Y as f}from"./index-B4TIVWAq.js";const N={inherited:"Inherited from agent",session_only:"Allowed only in this session",disabled:"Disabled in this session"},v={none:null,connection_paused:"The account is paused.",connection_revoked:"The account was disconnected.",authentication_required:"The account needs to be signed in again.",grant_revoked:"This access was removed.",session_detached:"This session is blocked from using the account.",reconciliation_required:"The account access needs review.",authority_sync_required:"Account access has not finished updating."};function b({agentId:o,onManage:i}){var n;const a=g(o);if(a.isPending)return e.jsx(u,{className:"h-24 w-full rounded-lg"});if(a.isError)return e.jsx(p,{title:"Couldn’t load account access",description:"No access details were changed. Try again.",onRetry:()=>void a.refetch(),isRetrying:a.isFetching});const r=((n=a.data)==null?void 0:n.connections)??[];return e.jsxs("section",{"aria-labelledby":"agent-account-access",className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"agent-account-access",className:"text-sm font-semibold",children:"Account access"}),e.jsx("p",{className:"text-muted-foreground mt-0.5 text-xs",children:"Accounts this agent may use for approved actions."})]}),i&&e.jsxs(d,{variant:"ghost",size:"sm",onClick:i,children:["Manage",e.jsx(x,{className:"size-3.5","aria-hidden":!0})]})]}),r.length===0?e.jsxs("div",{className:"bg-muted/40 rounded-lg p-4 text-sm",children:[e.jsx("p",{className:"font-medium",children:"No account access"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Grant an account from Connections when this agent needs it."})]}):e.jsx("ul",{className:"space-y-1.5",children:r.map(s=>{const c=s.lifecycle==="connected"&&s.authenticationStatus==="active"&&s.reconciliationStatus==="ready"&&s.authoritySync.status==="ready";return e.jsxs("li",{"data-testid":`agent-connection-${s.connectionId}`,className:"bg-muted/40 flex min-h-11 items-center gap-3 rounded-lg px-3 py-2",children:[e.jsx(j,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:"truncate text-sm font-medium",children:[m(s.toolkit)," (",s.label,")"]}),e.jsxs("p",{className:"text-muted-foreground text-xs",children:[s.operationRevisionIds.length," approved"," ",s.operationRevisionIds.length===1?"action":"actions",s.everyAgent&&" · given to every agent"]})]}),e.jsx(h,{size:"xs",variant:c?"secondary":"outline",children:c?"Available":"Unavailable"})]},s.connectionId)})})]})}function C({sessionId:o,onManage:i,emptyAction:a,footer:r}){var c;const n=f(o);if(n.isPending)return e.jsx(u,{className:"h-16 w-full rounded-lg"});if(n.isError)return e.jsxs("section",{"data-testid":"session-connectors",className:"space-y-2",children:[e.jsx("p",{role:"alert",className:"text-destructive px-1 text-xs",children:"Couldn’t load account access."}),e.jsx(d,{variant:"ghost",size:"sm",onClick:()=>void n.refetch(),children:"Try again"})]});const s=((c=n.data)==null?void 0:c.connections)??[];return e.jsxs("section",{"data-testid":"session-connectors","aria-labelledby":"session-account-access",className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[e.jsx("h3",{id:"session-account-access",className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Connections"}),i&&e.jsxs(d,{variant:"ghost",size:"xs",onClick:i,children:["Manage agent access",e.jsx(x,{className:"size-3","aria-hidden":!0})]})]}),s.length===0?e.jsxs("div",{className:"bg-muted/40 space-y-2 rounded-md px-2.5 py-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"No account access"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Ask this agent to request the service and actions it needs."})]}),a]}):s.map(t=>{const l=v[t.dominatingReason];return e.jsxs("div",{"data-testid":`session-connection-${t.connectionId}`,className:"bg-muted/40 rounded-md px-2.5 py-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.jsxs("span",{className:"text-sm font-medium",children:[m(t.toolkit)," (",t.label,")"]}),e.jsx(h,{size:"xs",variant:t.access==="disabled"?"outline":"secondary",children:N[t.access]})]}),e.jsx("p",{className:l?"text-destructive mt-1 text-xs":"text-muted-foreground mt-1 text-xs",children:l??`${t.operationRevisionIds.length} actions available in this session.`})]},t.connectionId)}),s.length>0&&r]})}export{b as A,C as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ad as G,cV as H,r,dv as K,aE as Y,j as e,dw as F,aj as I,dx as E,dy as Z,W as L,cq as J,cr as Q,cs as X,dz as ee,dA as se,B as M,dB as ae,dC as te,dD as R,aD as ne,dE as ie,dF as _,dG as re,dH as ce,dI as de,dJ as oe,dK as le,dL as me,dM as ue,dN as xe,dO as pe,dP as ge,dQ as he,dR as fe,dS as je,P as ye,dT as ve,dU as Ne,dV as Ce,dW as be,dX as Te,dY as Ie,dZ as we,d_ as Ae,d$ as U,aY as N,e0 as Se,e1 as ke,e2 as De,e3 as Re,e4 as Pe,e5 as $,u as Ee,a as Me}from"./index-B4TIVWAq.js";import{A as Be}from"./ConnectionAccessLists-CLulSQsd.js";import"./agent-browser-C7Q5muxI.js";function ze(){const t=G();return H({mutationFn:i=>t.testBinding(i),meta:{errorLabel:"Test failed"}})}const Oe={connected:E.connected,disconnected:Z.warning,error:E.error,connecting:E.starting};function Fe(t){const i=[];return t.canInitiate&&i.push("Can start conversations"),t.canReply||i.push("Cannot reply"),t.canReceive||i.push("Cannot receive"),i.join(" · ")}function Le({binding:t,integrationName:i,integrationIconId:y,integrationAdapterType:l,adapterState:p,errorMessage:g,chatDisplayName:h,lastMessageAt:o,onTogglePause:f,onTest:n,onEdit:m,onRemove:u}){const[a,d]=r.useState(!1),[j,v]=r.useState(!1),x=t.enabled===!1,[w,A]=r.useState(0);r.useEffect(()=>{if(!o||x)return;const C=setInterval(()=>A(s=>s+1),6e4);return()=>clearInterval(C)},[o,x]);const B=h?`${i} · ${h}`:i,S=K({sessionStrategy:t.sessionStrategy,chatDisplayName:h,channelType:t.channelType}),k=t.canInitiate||!t.canReply||!t.canReceive,z=k?Fe(t):"",D=r.useMemo(()=>x?"Paused — no messages routing":o?`Last received ${Y(o).toLowerCase()}`:"No recent activity",[x,o,w]),O=async()=>{v(!0);try{await n()}finally{v(!1)}};return e.jsxs("div",{className:I("relative rounded-xl border px-4 py-3 transition-colors",p==="error"&&!x&&"border-red-500/50 bg-red-500/[0.02]",x&&"opacity-60"),children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs("div",{className:"relative shrink-0",children:[e.jsx(F,{iconId:y,adapterType:l,size:32}),e.jsx("span",{className:I("ring-background absolute -right-0.5 -bottom-0.5 size-2.5 rounded-full ring-2",x?"bg-muted-foreground/40":Oe[p])})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:B}),x&&e.jsx(L,{variant:"secondary",children:"Paused"})]}),x?e.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:D}):p==="error"&&g?e.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:g}):e.jsxs(e.Fragment,{children:[S&&e.jsx("p",{className:"text-muted-foreground truncate text-xs italic",children:S}),e.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:D})]})]}),k&&e.jsxs(J,{children:[e.jsx(Q,{asChild:!0,children:e.jsx(L,{variant:"outline",children:"Restricted"})}),e.jsx(X,{children:z})]}),e.jsxs(ee,{children:[e.jsx(se,{asChild:!0,children:e.jsxs(M,{variant:"ghost",size:"icon-md",responsive:!1,className:"h-8 w-8 shrink-0",children:[e.jsx(ae,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Actions"})]})}),e.jsxs(te,{align:"end",children:[e.jsxs(R,{onClick:O,disabled:j||x,children:[j?e.jsx(ne,{className:"mr-2"}):e.jsx(ie,{className:"mr-2 size-(--size-icon-sm)"}),"Send test"]}),e.jsx(_,{}),e.jsx(R,{onClick:()=>f(!t.enabled),children:x?e.jsxs(e.Fragment,{children:[e.jsx(re,{className:"mr-2 size-4"}),"Resume"]}):e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"mr-2 size-4"}),"Pause"]})}),e.jsx(_,{}),e.jsx(R,{onClick:m,children:"Edit"}),e.jsx(R,{onClick:()=>d(!0),className:"text-destructive focus:text-destructive",children:"Remove"})]})]})]}),e.jsx(de,{open:a,onOpenChange:d,children:e.jsxs(oe,{children:[e.jsxs(le,{children:[e.jsx(me,{children:"Remove connection"}),e.jsxs(ue,{children:["Remove the connection to ",i,"? The agent will no longer receive messages from it."]})]}),e.jsxs(xe,{children:[e.jsx(pe,{children:"Cancel"}),e.jsx(ge,{onClick:()=>{u(),d(!1)},className:"bg-red-600 hover:bg-red-700",children:"Remove"})]})]})})]})}function _e({binding:t,integrationName:i,integrationIconId:y,integrationAdapterType:l,adapterState:p,errorMessage:g,onTogglePause:h,onTest:o,onEdit:f,onRemove:n}){const{data:m=[]}=he(t.adapterId),u=t.chatId?m.find(j=>j.chatId===t.chatId):void 0,a=(u==null?void 0:u.displayName)??(t.chatId?`#${t.chatId.slice(-4)}`:void 0),d=r.useMemo(()=>{if(u)return u.lastMessageAt;if(m.length!==0)return m.reduce((j,v)=>v.lastMessageAt>j?v.lastMessageAt:j,m[0].lastMessageAt)},[u,m]);return e.jsx(Le,{binding:t,integrationName:i,integrationIconId:y,integrationAdapterType:l,adapterState:p,errorMessage:g,chatDisplayName:a,lastMessageAt:d,onTogglePause:h,onTest:o,onEdit:f,onRemove:n})}function q({catalog:t,boundAdapterIds:i,onSelectIntegration:y,onRequestSetup:l,disabled:p}){const[g,h]=r.useState(!1),o=r.useMemo(()=>t.flatMap(a=>a.instances.map(d=>({id:d.id,displayName:d.status.displayName??a.manifest.displayName,label:d.label,state:d.status.state,isDisabled:d.status.state==="error"||!d.enabled,alreadyBound:i.has(d.id),iconId:a.manifest.iconId,adapterType:a.manifest.type}))),[t,i]),f=r.useMemo(()=>t.filter(a=>!a.manifest.deprecated&&(a.instances.length===0||a.manifest.multiInstance)),[t]);function n(a){y(a),h(!1)}function m(a){h(!1),l(a)}const u=o.length===0&&f.length===0;return e.jsxs(fe,{open:g,onOpenChange:h,children:[e.jsx(je,{asChild:!0,children:e.jsxs(M,{variant:"outline",size:"sm",disabled:p,children:[e.jsx(ye,{className:"mr-1.5 size-3.5"}),"Add connection"]})}),e.jsx(ve,{className:"w-72 p-0",align:"start",children:e.jsx("div",{className:"max-h-64 overflow-y-auto",children:u?e.jsx("div",{className:"px-3 py-4 text-center",children:e.jsx("p",{className:"text-muted-foreground text-sm",children:"No connections available"})}):e.jsxs(e.Fragment,{children:[o.length>0&&e.jsx("div",{className:"py-1",children:o.map(a=>e.jsxs("button",{disabled:a.isDisabled||a.alreadyBound,onClick:()=>n(a.id),className:I("flex w-full items-center gap-3 px-3 py-2 text-left text-sm transition-colors","hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"),children:[e.jsxs("div",{className:"relative shrink-0",children:[e.jsx(F,{iconId:a.iconId,adapterType:a.adapterType,size:20,className:"text-muted-foreground"}),e.jsx("span",{className:I("ring-background absolute -right-0.5 -bottom-0.5 size-1.5 rounded-full ring-[1.5px]",E[a.state])})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate font-medium",children:a.displayName}),a.label&&e.jsx("p",{className:"text-muted-foreground truncate text-xs",children:a.label})]}),e.jsx("span",{className:"text-muted-foreground/60 text-xs",children:a.alreadyBound?"Connected":Ne[a.state]})]},a.id))}),f.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"border-t"}),e.jsxs("div",{className:"py-1",children:[e.jsx("p",{className:"text-muted-foreground px-3 py-1 text-xs font-medium",children:"Available to set up"}),f.map(a=>e.jsxs("button",{onClick:()=>m(a.manifest),className:I("flex w-full items-center gap-3 px-3 py-2 text-left text-sm transition-colors","hover:bg-accent"),children:[e.jsx(F,{iconId:a.manifest.iconId,adapterType:a.manifest.type,size:14,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"truncate font-medium",children:a.manifest.displayName})]},a.manifest.type))]})]})]})})})]})}const P={open:!1,binding:null,adapterName:""},W={open:!1};function $e({agent:t}){const i=Ce(),{data:y=[]}=be(),{data:l=[]}=Te(i),p=Ie(),g=we(),h=ze(),o=Ae(),f=U(),[n,m]=r.useState(P),[u,a]=r.useState(W),d=y.filter(s=>s.agentId===t.id),j=r.useMemo(()=>{const s=new Map;for(const c of l)for(const b of c.instances){const T=b.status.state,V=T==="connected"||T==="error"?T:T==="starting"||T==="stopping"||T==="reconnecting"?"connecting":"disconnected";s.set(b.id,{state:V,name:b.status.displayName??c.manifest.displayName,iconId:c.manifest.iconId,adapterType:c.manifest.type,errorMessage:b.status.lastError??void 0})}return s},[l]),v=r.useCallback(s=>j.get(s)??{state:"disconnected",name:s,adapterType:s},[j]),x=r.useMemo(()=>new Set(d.map(s=>s.adapterId)),[d]),w=r.useCallback(async s=>{try{await p.mutateAsync({adapterId:s,agentId:t.id,sessionStrategy:"per-chat",label:"",canInitiate:!1,canReply:!0,canReceive:!0}),N.success("Connection added")}catch{}},[t.id,p]),A=r.useCallback(s=>{a({open:!0,manifest:s})},[]),B=r.useCallback(s=>{m({open:!0,binding:s,adapterName:v(s.adapterId).name})},[v]),S=r.useCallback(async s=>{try{await g.mutateAsync(s),N.success("Connection removed")}catch{}},[g]),k=r.useCallback(async(s,c)=>{try{await o.mutateAsync({id:s,updates:{enabled:c}}),N.success(c?"Connection resumed":"Connection paused")}catch{}},[o]),z=r.useCallback(async s=>{const c=await h.mutateAsync(s);return c.ok?N.success(`Test OK: routed in ${c.latencyMs}ms`):N.error(`Test failed: ${c.reason??"unknown error"}`),c},[h]),D=r.useCallback(async s=>{if(n.binding)try{await o.mutateAsync({id:n.binding.id,updates:Se(s)}),N.success("Connection updated"),m(P)}catch{}},[n.binding,o]),O=r.useCallback(async s=>{try{await g.mutateAsync(s),N.success("Connection removed"),m(P)}catch{}},[g]),C=e.jsxs(e.Fragment,{children:[n.binding&&e.jsx(ke,{open:n.open,onOpenChange:s=>{s||m(P)},mode:"edit",initialValues:{adapterId:n.binding.adapterId,agentId:n.binding.agentId,sessionStrategy:n.binding.sessionStrategy,label:n.binding.label,permissionMode:n.binding.permissionMode,chatId:n.binding.chatId,channelType:n.binding.channelType,canInitiate:n.binding.canInitiate,canReply:n.binding.canReply,canReceive:n.binding.canReceive,notifyOnTaskComplete:n.binding.notifyOnTaskComplete},adapterName:n.adapterName,agentName:De(t),bindingId:n.binding.id,onConfirm:D,onDelete:O,isPending:o.isPending||g.isPending}),u.manifest&&e.jsx(Re,{open:u.open,onOpenChange:s=>{s||a(W)},manifest:u.manifest,existingAdapterIds:l.flatMap(s=>s.instances.map(c=>c.id))})]});return i?l.length===0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-dashed px-6 py-10",children:[e.jsx($,{className:"text-muted-foreground/40 size-8"}),e.jsxs("div",{className:"space-y-1 text-center",children:[e.jsx("p",{className:"text-sm font-medium",children:"No connections available"}),e.jsx("p",{className:"text-muted-foreground max-w-xs text-xs leading-relaxed",children:"To connect this agent to Telegram, Slack, or a webhook, add a connection first. It will appear here as soon as it’s ready."})]}),e.jsx(M,{variant:"outline",size:"sm",onClick:()=>f("messaging"),children:"Add a connection"})]}),C]}):d.length===0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-dashed px-6 py-10",children:[e.jsx($,{className:"text-muted-foreground/40 size-8"}),e.jsxs("div",{className:"space-y-1 text-center",children:[e.jsx("p",{className:"text-sm font-medium",children:"Let this agent reach the outside world"}),e.jsx("p",{className:"text-muted-foreground max-w-xs text-xs leading-relaxed",children:"Connect Telegram, Slack, or a webhook so this agent can send and receive messages while you are away."})]}),e.jsx(q,{catalog:l,boundAdapterIds:x,onSelectIntegration:w,onRequestSetup:A,disabled:p.isPending})]}),C]}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"space-y-2",children:d.map(s=>{const c=v(s.adapterId);return e.jsx(_e,{binding:s,integrationName:c.name,integrationIconId:c.iconId,integrationAdapterType:c.adapterType,adapterState:c.state,errorMessage:c.errorMessage,onTogglePause:b=>k(s.id,b),onTest:()=>z(s.id),onEdit:()=>B(s),onRemove:()=>S(s.id)},s.id)})}),e.jsx(q,{catalog:l,boundAdapterIds:x,onSelectIntegration:w,onRequestSetup:A,disabled:p.isPending}),C]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-dashed px-6 py-10",children:[e.jsx(Pe,{className:"text-muted-foreground/40 size-8"}),e.jsxs("div",{className:"space-y-1 text-center",children:[e.jsx("p",{className:"text-sm font-medium",children:"Messaging is off"}),e.jsx("p",{className:"text-muted-foreground max-w-xs text-xs leading-relaxed",children:"Connections link this agent to messaging platforms. Turn on Messaging in Settings to get started."})]}),e.jsx(M,{variant:"outline",size:"sm",onClick:()=>f("messaging"),children:"Open Messaging settings"})]}),C]})}function Ve({member:t}){const{agent:i,isPending:y}=Ee(t),l=U();return y?e.jsx(Me,{className:"h-32 w-full"}):i?e.jsxs("div",{className:"space-y-6",children:[e.jsx(Be,{agentId:i.id,onManage:()=>l("accounts")}),e.jsxs("section",{"aria-labelledby":"agent-messaging-access",className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"agent-messaging-access",className:"text-sm font-semibold",children:"Messaging"}),e.jsx("p",{className:"text-muted-foreground mt-0.5 text-xs",children:"Places where people can reach this agent."})]}),e.jsx($e,{agent:i})]})]}):e.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this agent’s connections."})}export{Ve as ConnectionsPage};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{r as l,j as s,
|
|
1
|
+
import{r as l,j as s,cv as k,cw as O,cx as I,cy as P,aR as $,aj as d,cz as D,cA as F,C as B,cB as Y,cC as G,A as S,cD as j,cE as z,cF as U,cG as W,cH as p,cI as X,cJ as H,cK as K,cL as V,cM as J,cN as Z,u as q,cO as Q,a as ee,B as te,aY as ne}from"./index-B4TIVWAq.js";import"./agent-browser-C7Q5muxI.js";import{s as w}from"./soul-file-tc6-HkDy.js";function se({title:e,content:t,enabled:n,maxChars:o,charCount:a,disclaimer:u,onChange:r,onBlur:i,onToggle:m,fill:c=!1}){const h=l.useCallback(C=>{r(C.target.value)},[r]);return s.jsx(k,{className:d(!n&&"opacity-60",c&&"flex min-h-0 flex-1 flex-col"),children:s.jsxs(O,{className:d(c&&"flex min-h-0 flex-1 flex-col"),children:[s.jsxs(I,{orientation:"horizontal",className:"items-center justify-between",children:[s.jsx(P,{className:"text-sm font-medium",children:e}),s.jsx($,{checked:n,onCheckedChange:m,"aria-label":`Toggle ${e}`})]}),u&&s.jsx("p",{className:"text-muted-foreground text-xs italic",children:u}),s.jsxs("div",{className:d("space-y-2",c&&"flex min-h-0 flex-1 flex-col"),children:[s.jsx("textarea",{value:t,onChange:h,onBlur:i,rows:c?void 0:8,maxLength:o,className:d("border-border bg-background text-foreground placeholder:text-muted-foreground focus-visible:ring-ring w-full resize-none rounded-md border px-3 py-2 font-mono text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",c&&"min-h-40 flex-1"),placeholder:n?"Write markdown here…":"Turn this on to use it"}),s.jsxs("p",{className:"text-muted-foreground text-right text-xs",children:[a??t.length," / ",o.toLocaleString()]})]})]})})}const N="[new code each turn]",oe=[...new Set([...Object.values(V),...K,"system-reminder"])];function ae(e){const t=e.length>j,n=t?e.slice(0,j):e,o=z(n,oe);return["<agent_memory>",U,W,`--- BEGIN ${p} ${N} ---`,X,...t?[H]:[],o,`--- END ${p} ${N} ---`,"</agent_memory>"].join(`
|
|
2
2
|
`)}function re(e){var o;const n=[`<agent_identity>
|
|
3
3
|
${[`Name: ${e.name}`,`ID: ${e.id}`,e.description?`Description: ${e.description}`:null,(o=e.capabilities)!=null&&o.length?`Capabilities: ${e.capabilities.join(", ")}`:null].filter(a=>a!==null).join(`
|
|
4
4
|
`)}
|
|
5
|
-
</agent_identity>`];if(e.conventions.soul){const a=e.soulContent.includes(
|
|
5
|
+
</agent_identity>`];if(e.conventions.soul){const a=e.soulContent.includes(G)?w(e.traits,S(e.soulContent)):e.soulContent;a.trim()&&n.push(`<agent_persona>
|
|
6
6
|
${a}
|
|
7
7
|
</agent_persona>`)}return e.conventions.nope&&e.nopeContent.trim()&&n.push(`<agent_safety_boundaries>
|
|
8
8
|
${e.nopeContent}
|
|
9
9
|
</agent_safety_boundaries>`),e.conventions.memory&&e.memoryContent.trim()&&n.push(ae(e.memoryContent)),n.join(`
|
|
10
10
|
|
|
11
|
-
`)}function ie(e){const[t,n]=l.useState(!1),o=l.useMemo(()=>re(e),[e]);return s.jsxs(D,{open:t,onOpenChange:n,"data-slot":"profile-injection-preview",children:[s.jsxs(F,{className:"focus-ring text-muted-foreground hover:text-foreground flex items-center gap-1 rounded-md py-1 text-xs transition-colors",children:[s.jsx(B,{"aria-hidden":!0,className:d("size-3.5 transition-transform",t&&"rotate-90")}),"Preview what ",e.displayName," will see"]}),s.jsx(
|
|
11
|
+
`)}function ie(e){const[t,n]=l.useState(!1),o=l.useMemo(()=>re(e),[e]);return s.jsxs(D,{open:t,onOpenChange:n,"data-slot":"profile-injection-preview",children:[s.jsxs(F,{className:"focus-ring text-muted-foreground hover:text-foreground flex items-center gap-1 rounded-md py-1 text-xs transition-colors",children:[s.jsx(B,{"aria-hidden":!0,className:d("size-3.5 transition-transform",t&&"rotate-90")}),"Preview what ",e.displayName," will see"]}),s.jsx(Y,{children:s.jsx("pre",{"data-testid":"injected-prompt","data-slot":"profile-injection-preview-text",className:"bg-muted text-muted-foreground mt-1 max-h-56 overflow-auto rounded-md p-3 text-xs whitespace-pre-wrap",children:s.jsx("code",{children:o})})})]})}const ce="These boundaries guide agent behavior but are not enforced at the tool level. They serve as strong instructions, not hard blocks.",le="Your agent writes notes here as it works, and every note says where it was written. Anything in this file can come up in any conversation the agent joins, including rooms shared with other people, so never keep secrets, passwords or keys here. Deleting a line is forgetting it.";function _(e,t){return w(e.traits,t)}const E={instructions:{title:"Custom Instructions (SOUL.md)",errorLabel:"Couldn’t save your instructions",key:"soul",maxChars:Z,read:e=>S(e.soulContent??""),write:(e,t)=>({soulContent:_(e,t)}),count:(e,t)=>_(e,t).length},boundaries:{title:"Safety Boundaries (NOPE.md)",errorLabel:"Couldn’t save your boundaries",key:"nope",maxChars:J,disclaimer:ce,read:e=>e.nopeContent??"",write:(e,t)=>({nopeContent:t}),count:(e,t)=>t.length},memory:{title:"Agent memory (MEMORY.md)",errorLabel:"Couldn’t save your agent’s memory",key:"memory",maxChars:j,disclaimer:le,read:e=>e.memoryContent??"",write:(e,t)=>({memoryContent:t}),count:(e,t)=>t.length}};function ue(e){const t=Math.max(0,Date.now()-e),n=Math.floor(t/6e4);return n<1?"Saved just now":n<60?`Saved ${n} min ago`:`Saved ${Math.floor(n/60)} h ago`}function de(e,t,n,o){if(e>0){const a=t>0?`. The personality block takes ${t.toLocaleString()} of them`:"";return`Too long by ${e.toLocaleString()} character${e===1?"":"s"}${a}`}return n?"Unsaved changes":o!==null?ue(o):""}function b({member:e,file:t}){const{agent:n,isPending:o,isSaving:a,update:u}=q(e,{errorLabel:t.errorLabel}),r=n?t.read(n):"",[i,m]=l.useState(r),[c,h]=l.useState(r),[C,M]=l.useState(r),[T,A]=l.useState(null),x=i!==c;if(C!==r&&(M(r),x||(m(r),h(r))),Q(x),o)return s.jsx(ee,{className:"h-40 w-full"});if(!n)return s.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this file."});const v=n.conventions??{soul:!0,nope:!0,memory:!0,dorkosKnowledge:!0},y=t.count(n,i),g=y-t.maxChars,L=y-i.length;function R(){if(!n||g>0)return;const f=i;u(t.write(n,f),()=>{h(f),A(Date.now()),ne.success("Saved")})}return s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2","data-slot":"profile-convention",children:[s.jsx(se,{fill:!0,title:t.title,content:i,enabled:v[t.key],maxChars:t.maxChars,charCount:y,disclaimer:t.disclaimer,onChange:m,onToggle:f=>u({conventions:{...v,[t.key]:f}})}),s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s.jsx("span",{"data-slot":"profile-convention-status",className:g>0?"text-destructive text-xs":"text-muted-foreground text-xs",children:de(g,L,x,T)}),s.jsx(te,{size:"sm",className:"ml-auto",disabled:!x||g>0||a,onClick:R,children:"Save"})]}),s.jsx("div",{className:"shrink-0",children:s.jsx(ie,{name:n.name,displayName:n.displayName||n.name,id:n.id,description:n.description,capabilities:n.capabilities,traits:n.traits,conventions:v,soulContent:n.soulContent??"",nopeContent:n.nopeContent??"",memoryContent:n.memoryContent??"",...t.write(n,i)})})]})}function ge(e){return s.jsx(b,{...e,file:E.instructions})}function fe(e){return s.jsx(b,{...e,file:E.boundaries})}function Ce(e){return s.jsx(b,{...e,file:E.memory})}export{fe as BoundariesPage,ge as InstructionsPage,Ce as MemoryPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as X,a as Z,b as j,d as C,D as Je,m as De,s as Ke,i as ze,e as Ve,f as U,g as Qe,t as je,h as We,j as t}from"./index-BrgOWbRQ.js";import{n as Re,t as Xe,r as Ze,BaseTanStackRouterDevtoolsPanel as et}from"./BaseTanStackRouterDevtoolsPanel-B-iktbLX-wUJCR3vL.js";import{am as Ae}from"./index-DDXrdlj0.js";var tt=je('<svg xmlns=http://www.w3.org/2000/svg enable-background="new 0 0 634 633"viewBox="0 0 634 633"><g transform=translate(1)><linearGradient x1=-641.486 x2=-641.486 y1=856.648 y2=855.931 gradientTransform="matrix(633 0 0 -633 406377 542258)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#6bdaff></stop><stop offset=0.319 stop-color=#f9ffb5></stop><stop offset=0.706 stop-color=#ffa770></stop><stop offset=1 stop-color=#ff7373></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5 fill-rule=evenodd clip-rule=evenodd></circle><defs><filter width=454 height=396.9 x=-137.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=176.9 height=129.3 x=272.2 y=308 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=176.9 height=129.3 x=272.2 y=308 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><path fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11 d="M436 403.2l-5 28.6m-140-90.3l-10.9 62m52.8-19.4l-4.3 27.1"></path><linearGradient x1=-645.656 x2=-646.499 y1=854.878 y2=854.788 gradientTransform="matrix(-184.159 -32.4722 11.4608 -64.9973 -128419.844 34938.836)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ee2700></stop><stop offset=1 stop-color=#ff008e></stop></linearGradient><path fill-rule=evenodd d="M344.1 363l97.7 17.2c5.8 2.1 8.2 6.2 7.1 12.1-1 5.9-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1.8-12.8 3.7-3.7 8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd></path><path fill=#D8D8D8 fill-rule=evenodd stroke=#FFF stroke-linecap=round stroke-linejoin=bevel stroke-width=7 d="M428.3 384.5l.9-6.5m-33.9 1.5l.9-6.5m-34 .5l.9-6.1m-38.9-16.1l4.2-3.9m-25.2-16.1l4.2-3.9"clip-rule=evenodd></path></g><defs><filter width=280.6 height=317.4 x=73.2 y=113.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=280.6 height=317.4 x=73.2 y=113.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><linearGradient x1=-646.8 x2=-646.8 y1=854.844 y2=853.844 gradientTransform="matrix(-100.1751 48.8587 -97.9753 -200.879 19124.773 203538.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#a17500></stop><stop offset=1 stop-color=#5d2100></stop></linearGradient><path fill-rule=evenodd d="M192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.2-2.9 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6-3.4-18.7-10.8-51.8-22.2-99.6l-25.3 4.6"clip-rule=evenodd></path><linearGradient x1=-635.467 x2=-635.467 y1=852.115 y2=851.115 gradientTransform="matrix(92.6873 4.8575 2.0257 -38.6535 57323.695 36176.047)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd></path><linearGradient x1=-636.573 x2=-636.573 y1=855.444 y2=854.444 gradientTransform="matrix(109.9945 5.7646 6.3597 -121.3507 64719.133 107659.336)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.3 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20 49.6-53.1 49.6-53.1z"clip-rule=evenodd></path><linearGradient x1=-632.145 x2=-632.145 y1=854.174 y2=853.174 gradientTransform="matrix(62.9558 3.2994 3.5021 -66.8246 37035.367 59284.227)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9c-.8-21.9 6-38 20.6-48.2 14.6-10.2 29.8-15.3 45.5-15.3-6.1 21.4-14.5 35.8-25.2 43.4-10.7 7.5-24.4 14.2-40.9 20.1z"clip-rule=evenodd></path><linearGradient x1=-638.224 x2=-638.224 y1=853.801 y2=852.801 gradientTransform="matrix(152.4666 7.9904 3.0934 -59.0251 94939.86 55646.855)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c31.9-30 64.1-39.7 96.7-29 32.6 10.7 50.8 30.4 54.6 59.1-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd></path><linearGradient x1=-637.723 x2=-637.723 y1=855.103 y2=854.103 gradientTransform="matrix(136.467 7.1519 5.2165 -99.5377 82830.875 89859.578)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c35.8-7.6 65.6-.2 89.2 22 23.6 22.2 37.7 49 42.3 80.3-39.8-9.7-68.3-23.8-85.5-42.4-17.2-18.5-32.5-38.5-46-59.9z"clip-rule=evenodd></path><linearGradient x1=-631.79 x2=-631.79 y1=855.872 y2=854.872 gradientTransform="matrix(60.8683 3.19 8.7771 -167.4773 31110.818 145537.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6-6.5 29.9-3.6 63.1 8.7 99.6 27.4-40.3 43.2-69.6 47.4-88 4.2-18.3 5.5-44.1 4-77.2z"clip-rule=evenodd></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4-5.7 18-9.4 33-11.1 45.1"></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M194.8 185.7c-24.4 1.7-43.8 9-58.1 21.8-14.3 12.8-24.7 25.4-31.3 37.8m99.1-68.9c29.7-6.7 52-8.4 67-5 15 3.4 26.9 8.7 35.8 15.9m-110.8-5.9c20.3 9.9 38.2 20.5 53.9 31.9 15.7 11.4 27.4 22.1 35.1 32"></path></g><defs><filter width=532 height=633 x=50.5 y=399 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=532 height=633 x=50.5 y=399 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><linearGradient x1=-641.104 x2=-641.278 y1=856.577 y2=856.183 gradientTransform="matrix(532 0 0 -633 341484.5 542657)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#fff400></stop><stop offset=1 stop-color=#3c8700></stop></linearGradient><ellipse cx=316.5 cy=715.5 fill-rule=evenodd clip-rule=evenodd rx=266 ry=316.5></ellipse><defs><filter width=288 height=283 x=391 y=-24 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=288 height=283 x=391 y=-24 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><g transform="translate(397 -24)"><linearGradient x1=-1036.672 x2=-1036.672 y1=880.018 y2=879.018 gradientTransform="matrix(227 0 0 -227 235493 199764)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffdf00></stop><stop offset=1 stop-color=#ff9d00></stop></linearGradient><circle cx=168.5 cy=113.5 r=113.5 fill-rule=evenodd clip-rule=evenodd></circle><linearGradient x1=-1017.329 x2=-1018.602 y1=658.003 y2=657.998 gradientTransform="matrix(30 0 0 -1 30558 771)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M30 113H0"></path><linearGradient x1=-1014.501 x2=-1015.774 y1=839.985 y2=839.935 gradientTransform="matrix(26.5 0 0 -5.5 26925 4696.5)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M33.5 79.5L7 74"></path><linearGradient x1=-1016.59 x2=-1017.862 y1=852.671 y2=852.595 gradientTransform="matrix(29 0 0 -8 29523 6971)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M34 146l-29 8"></path><linearGradient x1=-1011.984 x2=-1013.257 y1=863.523 y2=863.229 gradientTransform="matrix(24 0 0 -13 24339 11407)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M45 177l-24 13"></path><linearGradient x1=-1006.673 x2=-1007.946 y1=869.279 y2=868.376 gradientTransform="matrix(20 0 0 -19 20205 16720)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M67 204l-20 19"></path><linearGradient x1=-992.85 x2=-993.317 y1=871.258 y2=870.258 gradientTransform="matrix(13.8339 0 0 -22.8467 13825.796 20131.938)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M94.4 227l-13.8 22.8"></path><linearGradient x1=-953.835 x2=-953.965 y1=871.9 y2=870.9 gradientTransform="matrix(7.5 0 0 -24.5 7278 21605)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M127.5 243.5L120 268"></path><linearGradient x1=244.504 x2=244.496 y1=871.898 y2=870.898 gradientTransform="matrix(.5 0 0 -24.5 45.5 21614)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M167.5 252.5l.5 24.5">');function Pe(){const e=We();return(()=>{var w=tt(),O=w.firstChild.firstChild,F=O.nextSibling,M=F.nextSibling,L=M.firstChild,v=M.nextSibling,I=v.firstChild,G=v.nextSibling,c=G.nextSibling,x=c.firstChild,p=c.nextSibling,h=p.firstChild,u=p.nextSibling,T=u.nextSibling,H=T.firstChild,g=T.nextSibling,Y=g.firstChild,B=g.nextSibling,S=B.nextSibling,q=S.firstChild,o=S.nextSibling,N=o.firstChild,E=o.nextSibling,D=E.nextSibling,ee=D.firstChild,y=D.nextSibling,te=y.firstChild,b=y.nextSibling,z=b.nextSibling,J=z.firstChild,$=z.nextSibling,K=$.firstChild,R=$.nextSibling,A=R.nextSibling,l=A.firstChild,r=A.nextSibling,d=r.firstChild,n=r.nextSibling,a=n.firstChild.nextSibling,f=a.nextSibling,i=n.nextSibling,s=i.firstChild,m=i.nextSibling,P=m.firstChild,k=m.nextSibling,_=k.firstChild,ie=_.nextSibling,le=ie.nextSibling,re=le.nextSibling,ne=re.nextSibling,oe=ne.nextSibling,se=oe.nextSibling,ae=se.nextSibling,de=ae.nextSibling,fe=de.nextSibling,ce=fe.nextSibling,pe=ce.nextSibling,ue=pe.nextSibling,Le=ue.nextSibling,ge=k.nextSibling,Ie=ge.firstChild,V=ge.nextSibling,He=V.firstChild,xe=V.nextSibling,Q=xe.nextSibling,he=Q.nextSibling,Ye=he.firstChild,W=he.nextSibling,qe=W.firstChild,$e=W.nextSibling,me=$e.firstChild.firstChild,ke=me.nextSibling,ve=ke.nextSibling,Se=ve.nextSibling,ye=Se.nextSibling,be=ye.nextSibling,_e=be.nextSibling,Ce=_e.nextSibling,Ue=Ce.nextSibling,we=Ue.nextSibling,Oe=we.nextSibling,Fe=Oe.nextSibling,Me=Fe.nextSibling,Ge=Me.nextSibling,Te=Ge.nextSibling,Be=Te.nextSibling,Ee=Be.nextSibling,Ne=Ee.nextSibling;return t(O,"id",`a-${e}`),t(F,"fill",`url(#a-${e})`),t(L,"id",`b-${e}`),t(v,"id",`c-${e}`),t(I,"filter",`url(#b-${e})`),t(G,"mask",`url(#c-${e})`),t(x,"id",`d-${e}`),t(p,"id",`e-${e}`),t(h,"filter",`url(#d-${e})`),t(u,"mask",`url(#e-${e})`),t(H,"id",`f-${e}`),t(g,"id",`g-${e}`),t(Y,"filter",`url(#f-${e})`),t(B,"mask",`url(#g-${e})`),t(q,"id",`h-${e}`),t(o,"id",`i-${e}`),t(N,"filter",`url(#h-${e})`),t(E,"mask",`url(#i-${e})`),t(ee,"id",`j-${e}`),t(y,"id",`k-${e}`),t(te,"filter",`url(#j-${e})`),t(b,"mask",`url(#k-${e})`),t(J,"id",`l-${e}`),t($,"id",`m-${e}`),t(K,"filter",`url(#l-${e})`),t(R,"mask",`url(#m-${e})`),t(l,"id",`n-${e}`),t(r,"id",`o-${e}`),t(d,"filter",`url(#n-${e})`),t(n,"mask",`url(#o-${e})`),t(a,"id",`p-${e}`),t(f,"fill",`url(#p-${e})`),t(s,"id",`q-${e}`),t(m,"id",`r-${e}`),t(P,"filter",`url(#q-${e})`),t(k,"mask",`url(#r-${e})`),t(_,"id",`s-${e}`),t(ie,"fill",`url(#s-${e})`),t(le,"id",`t-${e}`),t(re,"fill",`url(#t-${e})`),t(ne,"id",`u-${e}`),t(oe,"fill",`url(#u-${e})`),t(se,"id",`v-${e}`),t(ae,"fill",`url(#v-${e})`),t(de,"id",`w-${e}`),t(fe,"fill",`url(#w-${e})`),t(ce,"id",`x-${e}`),t(pe,"fill",`url(#x-${e})`),t(ue,"id",`y-${e}`),t(Le,"fill",`url(#y-${e})`),t(Ie,"id",`z-${e}`),t(V,"id",`A-${e}`),t(He,"filter",`url(#z-${e})`),t(xe,"id",`B-${e}`),t(Q,"fill",`url(#B-${e})`),t(Q,"mask",`url(#A-${e})`),t(Ye,"id",`C-${e}`),t(W,"id",`D-${e}`),t(qe,"filter",`url(#C-${e})`),t($e,"mask",`url(#D-${e})`),t(me,"id",`E-${e}`),t(ke,"fill",`url(#E-${e})`),t(ve,"id",`F-${e}`),t(Se,"stroke",`url(#F-${e})`),t(ye,"id",`G-${e}`),t(be,"stroke",`url(#G-${e})`),t(_e,"id",`H-${e}`),t(Ce,"stroke",`url(#H-${e})`),t(Ue,"id",`I-${e}`),t(we,"stroke",`url(#I-${e})`),t(Oe,"id",`J-${e}`),t(Fe,"stroke",`url(#J-${e})`),t(Me,"id",`K-${e}`),t(Ge,"stroke",`url(#K-${e})`),t(Te,"id",`L-${e}`),t(Be,"stroke",`url(#L-${e})`),t(Ee,"id",`M-${e}`),t(Ne,"stroke",`url(#M-${e})`),w})()}var it=je("<button type=button><div><div></div><div></div></div><div>-</div><div>TanStack Router");function ot({initialIsOpen:e,panelProps:w={},closeButtonProps:O={},toggleButtonProps:F={},position:M="bottom-left",containerElement:L="footer",router:v,routerState:I,shadowDOMTarget:G}){const[c,x]=X();let p;const[h,u]=Re("tanstackRouterDevtoolsOpen",e),[T,H]=Re("tanstackRouterDevtoolsHeight",null),[g,Y]=X(!1),[B,S]=X(!1),q=Xe(),o=Ze(),N=(l,r)=>{if(r.button!==0)return;S(!0);const d={originalHeight:(l==null?void 0:l.getBoundingClientRect().height)??0,pageY:r.pageY},n=f=>{const i=d.pageY-f.pageY,s=d.originalHeight+i;H(s),s<70?u(!1):u(!0)},a=()=>{S(!1),document.removeEventListener("mousemove",n),document.removeEventListener("mouseUp",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)};h(),Z(()=>{Y(h()??!1)}),Z(()=>{var l,r,d;if(g()){const n=(r=(l=c())==null?void 0:l.parentElement)==null?void 0:r.style.paddingBottom,a=()=>{var i;const f=p.getBoundingClientRect().height;(i=c())!=null&&i.parentElement&&x(s=>(s!=null&&s.parentElement&&(s.parentElement.style.paddingBottom=`${f}px`),s))};if(a(),typeof window<"u")return window.addEventListener("resize",a),()=>{var f;window.removeEventListener("resize",a),(f=c())!=null&&f.parentElement&&typeof n=="string"&&x(i=>(i.parentElement.style.paddingBottom=n,i))}}else(d=c())!=null&&d.parentElement&&x(n=>(n!=null&&n.parentElement&&n.parentElement.removeAttribute("style"),n))}),Z(()=>{if(c()){const l=c(),r=getComputedStyle(l).fontSize;l==null||l.style.setProperty("--tsrd-font-size",r)}});const{style:E={},...D}=w,{style:ee={},onClick:y,...te}=O,{onClick:b,class:z,...J}=F;if(!q())return null;const $=j(()=>T()??500),K=j(()=>Ae(o().devtoolsPanelContainer,o().devtoolsPanelContainerVisibility(!!h()),o().devtoolsPanelContainerResizing(B),o().devtoolsPanelContainerAnimation(g(),$()+16))),R=j(()=>({height:`${$()}px`,...E||{}})),A=j(()=>Ae(o().mainCloseBtn,o().mainCloseBtnPosition(M),o().mainCloseBtnAnimation(!!h()),z));return C(Qe,{component:L,ref:x,class:"TanStackRouterDevtools",get children(){return[C(Je.Provider,{value:{onCloseClick:y??(()=>{})},get children(){return C(et,De({ref(l){var r=p;typeof r=="function"?r(l):p=l}},D,{router:v,routerState:I,className:K,style:R,get isOpen(){return g()},setIsOpen:u,handleDragStart:l=>N(p,l),shadowDOMTarget:G}))}}),(()=>{var l=it(),r=l.firstChild,d=r.firstChild,n=d.nextSibling,a=r.nextSibling,f=a.nextSibling;return Ke(l,De(J,{"aria-label":"Open TanStack Router Devtools",onClick:i=>{u(!0),b&&b(i)},get class(){return A()}}),!1,!0),ze(d,C(Pe,{})),ze(n,C(Pe,{})),Ve(i=>{var s=o().mainCloseBtnIconContainer,m=o().mainCloseBtnIconOuter,P=o().mainCloseBtnIconInner,k=o().mainCloseBtnDivider,_=o().routerLogoCloseButton;return s!==i.e&&U(r,i.e=s),m!==i.t&&U(d,i.t=m),P!==i.a&&U(n,i.a=P),k!==i.o&&U(a,i.o=k),_!==i.i&&U(f,i.i=_),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()]}})}export{ot as FloatingTanStackRouterDevtools,ot as default};
|
|
1
|
+
import{c as X,a as Z,b as j,d as C,D as Je,m as De,s as Ke,i as ze,e as Ve,f as U,g as Qe,t as je,h as We,j as t}from"./index-sMuUIc_W.js";import{n as Re,t as Xe,r as Ze,BaseTanStackRouterDevtoolsPanel as et}from"./BaseTanStackRouterDevtoolsPanel-B-iktbLX-BnlmhnMf.js";import{ap as Ae}from"./index-B4TIVWAq.js";var tt=je('<svg xmlns=http://www.w3.org/2000/svg enable-background="new 0 0 634 633"viewBox="0 0 634 633"><g transform=translate(1)><linearGradient x1=-641.486 x2=-641.486 y1=856.648 y2=855.931 gradientTransform="matrix(633 0 0 -633 406377 542258)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#6bdaff></stop><stop offset=0.319 stop-color=#f9ffb5></stop><stop offset=0.706 stop-color=#ffa770></stop><stop offset=1 stop-color=#ff7373></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5 fill-rule=evenodd clip-rule=evenodd></circle><defs><filter width=454 height=396.9 x=-137.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=176.9 height=129.3 x=272.2 y=308 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=176.9 height=129.3 x=272.2 y=308 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><path fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11 d="M436 403.2l-5 28.6m-140-90.3l-10.9 62m52.8-19.4l-4.3 27.1"></path><linearGradient x1=-645.656 x2=-646.499 y1=854.878 y2=854.788 gradientTransform="matrix(-184.159 -32.4722 11.4608 -64.9973 -128419.844 34938.836)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ee2700></stop><stop offset=1 stop-color=#ff008e></stop></linearGradient><path fill-rule=evenodd d="M344.1 363l97.7 17.2c5.8 2.1 8.2 6.2 7.1 12.1-1 5.9-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1.8-12.8 3.7-3.7 8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd></path><path fill=#D8D8D8 fill-rule=evenodd stroke=#FFF stroke-linecap=round stroke-linejoin=bevel stroke-width=7 d="M428.3 384.5l.9-6.5m-33.9 1.5l.9-6.5m-34 .5l.9-6.1m-38.9-16.1l4.2-3.9m-25.2-16.1l4.2-3.9"clip-rule=evenodd></path></g><defs><filter width=280.6 height=317.4 x=73.2 y=113.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=280.6 height=317.4 x=73.2 y=113.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><linearGradient x1=-646.8 x2=-646.8 y1=854.844 y2=853.844 gradientTransform="matrix(-100.1751 48.8587 -97.9753 -200.879 19124.773 203538.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#a17500></stop><stop offset=1 stop-color=#5d2100></stop></linearGradient><path fill-rule=evenodd d="M192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.2-2.9 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6-3.4-18.7-10.8-51.8-22.2-99.6l-25.3 4.6"clip-rule=evenodd></path><linearGradient x1=-635.467 x2=-635.467 y1=852.115 y2=851.115 gradientTransform="matrix(92.6873 4.8575 2.0257 -38.6535 57323.695 36176.047)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd></path><linearGradient x1=-636.573 x2=-636.573 y1=855.444 y2=854.444 gradientTransform="matrix(109.9945 5.7646 6.3597 -121.3507 64719.133 107659.336)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.3 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20 49.6-53.1 49.6-53.1z"clip-rule=evenodd></path><linearGradient x1=-632.145 x2=-632.145 y1=854.174 y2=853.174 gradientTransform="matrix(62.9558 3.2994 3.5021 -66.8246 37035.367 59284.227)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9c-.8-21.9 6-38 20.6-48.2 14.6-10.2 29.8-15.3 45.5-15.3-6.1 21.4-14.5 35.8-25.2 43.4-10.7 7.5-24.4 14.2-40.9 20.1z"clip-rule=evenodd></path><linearGradient x1=-638.224 x2=-638.224 y1=853.801 y2=852.801 gradientTransform="matrix(152.4666 7.9904 3.0934 -59.0251 94939.86 55646.855)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c31.9-30 64.1-39.7 96.7-29 32.6 10.7 50.8 30.4 54.6 59.1-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd></path><linearGradient x1=-637.723 x2=-637.723 y1=855.103 y2=854.103 gradientTransform="matrix(136.467 7.1519 5.2165 -99.5377 82830.875 89859.578)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c35.8-7.6 65.6-.2 89.2 22 23.6 22.2 37.7 49 42.3 80.3-39.8-9.7-68.3-23.8-85.5-42.4-17.2-18.5-32.5-38.5-46-59.9z"clip-rule=evenodd></path><linearGradient x1=-631.79 x2=-631.79 y1=855.872 y2=854.872 gradientTransform="matrix(60.8683 3.19 8.7771 -167.4773 31110.818 145537.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6-6.5 29.9-3.6 63.1 8.7 99.6 27.4-40.3 43.2-69.6 47.4-88 4.2-18.3 5.5-44.1 4-77.2z"clip-rule=evenodd></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4-5.7 18-9.4 33-11.1 45.1"></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M194.8 185.7c-24.4 1.7-43.8 9-58.1 21.8-14.3 12.8-24.7 25.4-31.3 37.8m99.1-68.9c29.7-6.7 52-8.4 67-5 15 3.4 26.9 8.7 35.8 15.9m-110.8-5.9c20.3 9.9 38.2 20.5 53.9 31.9 15.7 11.4 27.4 22.1 35.1 32"></path></g><defs><filter width=532 height=633 x=50.5 y=399 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=532 height=633 x=50.5 y=399 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><linearGradient x1=-641.104 x2=-641.278 y1=856.577 y2=856.183 gradientTransform="matrix(532 0 0 -633 341484.5 542657)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#fff400></stop><stop offset=1 stop-color=#3c8700></stop></linearGradient><ellipse cx=316.5 cy=715.5 fill-rule=evenodd clip-rule=evenodd rx=266 ry=316.5></ellipse><defs><filter width=288 height=283 x=391 y=-24 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=288 height=283 x=391 y=-24 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><g transform="translate(397 -24)"><linearGradient x1=-1036.672 x2=-1036.672 y1=880.018 y2=879.018 gradientTransform="matrix(227 0 0 -227 235493 199764)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffdf00></stop><stop offset=1 stop-color=#ff9d00></stop></linearGradient><circle cx=168.5 cy=113.5 r=113.5 fill-rule=evenodd clip-rule=evenodd></circle><linearGradient x1=-1017.329 x2=-1018.602 y1=658.003 y2=657.998 gradientTransform="matrix(30 0 0 -1 30558 771)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M30 113H0"></path><linearGradient x1=-1014.501 x2=-1015.774 y1=839.985 y2=839.935 gradientTransform="matrix(26.5 0 0 -5.5 26925 4696.5)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M33.5 79.5L7 74"></path><linearGradient x1=-1016.59 x2=-1017.862 y1=852.671 y2=852.595 gradientTransform="matrix(29 0 0 -8 29523 6971)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M34 146l-29 8"></path><linearGradient x1=-1011.984 x2=-1013.257 y1=863.523 y2=863.229 gradientTransform="matrix(24 0 0 -13 24339 11407)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M45 177l-24 13"></path><linearGradient x1=-1006.673 x2=-1007.946 y1=869.279 y2=868.376 gradientTransform="matrix(20 0 0 -19 20205 16720)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M67 204l-20 19"></path><linearGradient x1=-992.85 x2=-993.317 y1=871.258 y2=870.258 gradientTransform="matrix(13.8339 0 0 -22.8467 13825.796 20131.938)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M94.4 227l-13.8 22.8"></path><linearGradient x1=-953.835 x2=-953.965 y1=871.9 y2=870.9 gradientTransform="matrix(7.5 0 0 -24.5 7278 21605)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M127.5 243.5L120 268"></path><linearGradient x1=244.504 x2=244.496 y1=871.898 y2=870.898 gradientTransform="matrix(.5 0 0 -24.5 45.5 21614)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M167.5 252.5l.5 24.5">');function Pe(){const e=We();return(()=>{var w=tt(),O=w.firstChild.firstChild,F=O.nextSibling,M=F.nextSibling,L=M.firstChild,v=M.nextSibling,I=v.firstChild,G=v.nextSibling,c=G.nextSibling,x=c.firstChild,p=c.nextSibling,h=p.firstChild,u=p.nextSibling,T=u.nextSibling,H=T.firstChild,g=T.nextSibling,Y=g.firstChild,B=g.nextSibling,S=B.nextSibling,q=S.firstChild,o=S.nextSibling,N=o.firstChild,E=o.nextSibling,D=E.nextSibling,ee=D.firstChild,y=D.nextSibling,te=y.firstChild,b=y.nextSibling,z=b.nextSibling,J=z.firstChild,$=z.nextSibling,K=$.firstChild,R=$.nextSibling,A=R.nextSibling,l=A.firstChild,r=A.nextSibling,d=r.firstChild,n=r.nextSibling,a=n.firstChild.nextSibling,f=a.nextSibling,i=n.nextSibling,s=i.firstChild,m=i.nextSibling,P=m.firstChild,k=m.nextSibling,_=k.firstChild,ie=_.nextSibling,le=ie.nextSibling,re=le.nextSibling,ne=re.nextSibling,oe=ne.nextSibling,se=oe.nextSibling,ae=se.nextSibling,de=ae.nextSibling,fe=de.nextSibling,ce=fe.nextSibling,pe=ce.nextSibling,ue=pe.nextSibling,Le=ue.nextSibling,ge=k.nextSibling,Ie=ge.firstChild,V=ge.nextSibling,He=V.firstChild,xe=V.nextSibling,Q=xe.nextSibling,he=Q.nextSibling,Ye=he.firstChild,W=he.nextSibling,qe=W.firstChild,$e=W.nextSibling,me=$e.firstChild.firstChild,ke=me.nextSibling,ve=ke.nextSibling,Se=ve.nextSibling,ye=Se.nextSibling,be=ye.nextSibling,_e=be.nextSibling,Ce=_e.nextSibling,Ue=Ce.nextSibling,we=Ue.nextSibling,Oe=we.nextSibling,Fe=Oe.nextSibling,Me=Fe.nextSibling,Ge=Me.nextSibling,Te=Ge.nextSibling,Be=Te.nextSibling,Ee=Be.nextSibling,Ne=Ee.nextSibling;return t(O,"id",`a-${e}`),t(F,"fill",`url(#a-${e})`),t(L,"id",`b-${e}`),t(v,"id",`c-${e}`),t(I,"filter",`url(#b-${e})`),t(G,"mask",`url(#c-${e})`),t(x,"id",`d-${e}`),t(p,"id",`e-${e}`),t(h,"filter",`url(#d-${e})`),t(u,"mask",`url(#e-${e})`),t(H,"id",`f-${e}`),t(g,"id",`g-${e}`),t(Y,"filter",`url(#f-${e})`),t(B,"mask",`url(#g-${e})`),t(q,"id",`h-${e}`),t(o,"id",`i-${e}`),t(N,"filter",`url(#h-${e})`),t(E,"mask",`url(#i-${e})`),t(ee,"id",`j-${e}`),t(y,"id",`k-${e}`),t(te,"filter",`url(#j-${e})`),t(b,"mask",`url(#k-${e})`),t(J,"id",`l-${e}`),t($,"id",`m-${e}`),t(K,"filter",`url(#l-${e})`),t(R,"mask",`url(#m-${e})`),t(l,"id",`n-${e}`),t(r,"id",`o-${e}`),t(d,"filter",`url(#n-${e})`),t(n,"mask",`url(#o-${e})`),t(a,"id",`p-${e}`),t(f,"fill",`url(#p-${e})`),t(s,"id",`q-${e}`),t(m,"id",`r-${e}`),t(P,"filter",`url(#q-${e})`),t(k,"mask",`url(#r-${e})`),t(_,"id",`s-${e}`),t(ie,"fill",`url(#s-${e})`),t(le,"id",`t-${e}`),t(re,"fill",`url(#t-${e})`),t(ne,"id",`u-${e}`),t(oe,"fill",`url(#u-${e})`),t(se,"id",`v-${e}`),t(ae,"fill",`url(#v-${e})`),t(de,"id",`w-${e}`),t(fe,"fill",`url(#w-${e})`),t(ce,"id",`x-${e}`),t(pe,"fill",`url(#x-${e})`),t(ue,"id",`y-${e}`),t(Le,"fill",`url(#y-${e})`),t(Ie,"id",`z-${e}`),t(V,"id",`A-${e}`),t(He,"filter",`url(#z-${e})`),t(xe,"id",`B-${e}`),t(Q,"fill",`url(#B-${e})`),t(Q,"mask",`url(#A-${e})`),t(Ye,"id",`C-${e}`),t(W,"id",`D-${e}`),t(qe,"filter",`url(#C-${e})`),t($e,"mask",`url(#D-${e})`),t(me,"id",`E-${e}`),t(ke,"fill",`url(#E-${e})`),t(ve,"id",`F-${e}`),t(Se,"stroke",`url(#F-${e})`),t(ye,"id",`G-${e}`),t(be,"stroke",`url(#G-${e})`),t(_e,"id",`H-${e}`),t(Ce,"stroke",`url(#H-${e})`),t(Ue,"id",`I-${e}`),t(we,"stroke",`url(#I-${e})`),t(Oe,"id",`J-${e}`),t(Fe,"stroke",`url(#J-${e})`),t(Me,"id",`K-${e}`),t(Ge,"stroke",`url(#K-${e})`),t(Te,"id",`L-${e}`),t(Be,"stroke",`url(#L-${e})`),t(Ee,"id",`M-${e}`),t(Ne,"stroke",`url(#M-${e})`),w})()}var it=je("<button type=button><div><div></div><div></div></div><div>-</div><div>TanStack Router");function ot({initialIsOpen:e,panelProps:w={},closeButtonProps:O={},toggleButtonProps:F={},position:M="bottom-left",containerElement:L="footer",router:v,routerState:I,shadowDOMTarget:G}){const[c,x]=X();let p;const[h,u]=Re("tanstackRouterDevtoolsOpen",e),[T,H]=Re("tanstackRouterDevtoolsHeight",null),[g,Y]=X(!1),[B,S]=X(!1),q=Xe(),o=Ze(),N=(l,r)=>{if(r.button!==0)return;S(!0);const d={originalHeight:(l==null?void 0:l.getBoundingClientRect().height)??0,pageY:r.pageY},n=f=>{const i=d.pageY-f.pageY,s=d.originalHeight+i;H(s),s<70?u(!1):u(!0)},a=()=>{S(!1),document.removeEventListener("mousemove",n),document.removeEventListener("mouseUp",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)};h(),Z(()=>{Y(h()??!1)}),Z(()=>{var l,r,d;if(g()){const n=(r=(l=c())==null?void 0:l.parentElement)==null?void 0:r.style.paddingBottom,a=()=>{var i;const f=p.getBoundingClientRect().height;(i=c())!=null&&i.parentElement&&x(s=>(s!=null&&s.parentElement&&(s.parentElement.style.paddingBottom=`${f}px`),s))};if(a(),typeof window<"u")return window.addEventListener("resize",a),()=>{var f;window.removeEventListener("resize",a),(f=c())!=null&&f.parentElement&&typeof n=="string"&&x(i=>(i.parentElement.style.paddingBottom=n,i))}}else(d=c())!=null&&d.parentElement&&x(n=>(n!=null&&n.parentElement&&n.parentElement.removeAttribute("style"),n))}),Z(()=>{if(c()){const l=c(),r=getComputedStyle(l).fontSize;l==null||l.style.setProperty("--tsrd-font-size",r)}});const{style:E={},...D}=w,{style:ee={},onClick:y,...te}=O,{onClick:b,class:z,...J}=F;if(!q())return null;const $=j(()=>T()??500),K=j(()=>Ae(o().devtoolsPanelContainer,o().devtoolsPanelContainerVisibility(!!h()),o().devtoolsPanelContainerResizing(B),o().devtoolsPanelContainerAnimation(g(),$()+16))),R=j(()=>({height:`${$()}px`,...E||{}})),A=j(()=>Ae(o().mainCloseBtn,o().mainCloseBtnPosition(M),o().mainCloseBtnAnimation(!!h()),z));return C(Qe,{component:L,ref:x,class:"TanStackRouterDevtools",get children(){return[C(Je.Provider,{value:{onCloseClick:y??(()=>{})},get children(){return C(et,De({ref(l){var r=p;typeof r=="function"?r(l):p=l}},D,{router:v,routerState:I,className:K,style:R,get isOpen(){return g()},setIsOpen:u,handleDragStart:l=>N(p,l),shadowDOMTarget:G}))}}),(()=>{var l=it(),r=l.firstChild,d=r.firstChild,n=d.nextSibling,a=r.nextSibling,f=a.nextSibling;return Ke(l,De(J,{"aria-label":"Open TanStack Router Devtools",onClick:i=>{u(!0),b&&b(i)},get class(){return A()}}),!1,!0),ze(d,C(Pe,{})),ze(n,C(Pe,{})),Ve(i=>{var s=o().mainCloseBtnIconContainer,m=o().mainCloseBtnIconOuter,P=o().mainCloseBtnIconInner,k=o().mainCloseBtnDivider,_=o().routerLogoCloseButton;return s!==i.e&&U(r,i.e=s),m!==i.t&&U(d,i.t=m),P!==i.a&&U(n,i.a=P),k!==i.o&&U(a,i.o=k),_!==i.i&&U(f,i.i=_),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()]}})}export{ot as FloatingTanStackRouterDevtools,ot as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r,i}from"./index-B4TIVWAq.js";function o({member:e}){return r.jsx(i,{member:e})}export{o as HandlePage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Hh=Object.defineProperty;var Vh=(n,t,e)=>t in n?Hh(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var k=(n,t,e)=>Vh(n,typeof t!="symbol"?t+"":t,e);import{r as z,j as lt,
|
|
1
|
+
var Hh=Object.defineProperty;var Vh=(n,t,e)=>t in n?Hh(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var k=(n,t,e)=>Vh(n,typeof t!="symbol"?t+"":t,e);import{r as z,j as lt,gd as qh,gp as Gh,gq as Yh,gb as Xh,gr as Qh}from"./index-B4TIVWAq.js";function w(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of t)r.append("v",o);throw e.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Nu(n,...t){const e=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of t)r.append("v",o);e.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Zh(){return typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0}const ee=Zh();function tg(){return ee&&"documentMode"in document?document.documentMode:null}const eg=tg();function ng(n){return ee&&n.test(navigator.platform)}function ro(n){return ee&&n.test(navigator.userAgent)}const Yn=ng(/Mac|iPod|iPhone|iPad/),Oe=ro(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function rg(){return!(!ee||!("InputEvent"in window)||eg)&&"getTargetRanges"in new window.InputEvent("input")}const Xn=rg();function og(){return ee&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}const $e=og(),Eu=ro(/Android/),oo=ro(/Version\/[\d.]+.*Safari/)&&!Eu,wu=ro(/^(?=.*Chrome).*/i),Wo=ee&&Eu&&wu,io=ro(/AppleWebKit\/[\d.]+/)&&Yn&&!wu,Ou=128;function ig(){return 2047}const sg=ig(),Br=oo||$e||io?" ":"",cn=`
|
|
2
2
|
|
|
3
3
|
`,ol=Oe?" ":Br,Ct={bold:1,capitalize:1024,code:16,highlight:Ou,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},$u={directionless:1,unmergeable:2},Qn={center:2,end:6,justify:4,left:1,right:3,start:5};function Mu(n){const t={};for(const e of Object.keys(n))t[n[e]]=e;return t}const Fu=Mu(Qn),il={normal:0,segmented:2,token:1},Au=Mu(il),sl="$",lg=Symbol.for("@lexical/ctrlOrOtherKey"),Ui="$config";function ji(){return gt()._blockCursorElement}function Ji(n){return n!==null&&n.nodeType===1&&n.hasAttribute("data-lexical-slot")}const cg=io||$e||oo;function ec(){const n=ot().createElement("img");n.setAttribute("data-lexical-decorator-boundary","true"),n.alt="";for(const[t,e]of[["position","absolute"],["width","0px"],["height","0px"],["border","0px"],["margin","0px"],["padding","0px"]])n.style.setProperty(t,e,"important");return n}function Uo(n){return n!==null&&n.nodeType===1&&n.hasAttribute("data-lexical-decorator-boundary")}let Du=class $o{constructor(t,e,r){k(this,"element");k(this,"before");k(this,"after");this.element=t,this.before=e||null,this.after=r||null}withBefore(t){return new $o(this.element,t,this.after)}withAfter(t){return new $o(this.element,this.before,t)}withElement(t){return this.element===t?this:new $o(t,this.before,this.after)}insertChild(t){const e=this.getInsertionAnchor();return e!==null&&e.parentElement!==this.element&&w(357),this.element.insertBefore(t,e),this}removeChild(t){return t.parentElement!==this.element&&w(358),this.element.removeChild(t),this}replaceChild(t,e){return e.parentElement!==this.element&&w(359),this.element.replaceChild(t,e),this}getFirstChild(){const t=this.getFirstChildAnchor(),e=t?t.nextSibling:this.element.firstChild;return e===this.getInsertionAnchor()?null:e}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,e,r){if(this.element===t)return e===t&&r===0?"before":"after";const o=nc(t,this.element);if(o===null)return"after";const i=Array.prototype.indexOf.call(t.childNodes,o);if(i<0)return"after";if(e===t)return r<=i?"before":"after";const s=nc(t,e);if(s===null)return"after";const l=Array.prototype.indexOf.call(t.childNodes,s);return l>=0&&l<=i?"before":"after"}getInsertionAnchor(){return this.before}};function nc(n,t){let e=t;for(;e!==null&&e.parentNode!==n;)e=e.parentNode;return e}let Pu=class Mo extends Du{withBefore(t){return new Mo(this.element,t,this.after)}withAfter(t){return new Mo(this.element,this.before,t)}withElement(t){return this.element===t?this:new Mo(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()||this.getDecoratorBoundaryAnchor("trailing")}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),e=t?t.nextSibling:this.element.firstChild;for(;Ji(e);)t=e,e=e.nextSibling;Uo(e)&&(t=e,e=e.nextSibling);const r=t?t.nextSibling:this.element.firstChild;return r!==null&&r===ji()?r:t}getDecoratorBoundaryAnchor(t){let e;if(t==="leading"){const r=super.getFirstChildAnchor();for(e=r?r.nextSibling:this.element.firstChild;Ji(e);)e=e.nextSibling}else e=this.before?this.before.previousSibling:this.element.lastChild,e!==null&&e===ji()&&(e=e.previousSibling);return Uo(e)?e:null}setDecoratorBoundaryAnchor(t,e){const r=this.getDecoratorBoundaryAnchor(t);if(e!==(r!==null))if(r!==null)this.element.removeChild(r);else if(t==="leading"){const o=this.getFirstChildAnchor();this.element.insertBefore(ec(),o?o.nextSibling:this.element.firstChild)}else this.element.insertBefore(ec(),this.before)}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){const e=this.element,r=this.after===null?e.firstChild:this.after.nextSibling,o=t==="empty"&&Ji(r)?null:t;if(e.__lexicalLastChildKind!==o)if(e.__lexicalLastChildKind=o,o===null)this.removeManagedLineBreak();else{const i=o==="decorator"&&cg;this.insertManagedLineBreak(i)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const e=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&e.removeChild(r),e.removeChild(t),e.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const e=this.getManagedLineBreak();if(e){if(t===(e.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,o=this.before||this.getDecoratorBoundaryAnchor("trailing"),i=ot().createElement("br");if(i.setAttribute("data-lexical-managed-linebreak","true"),r.insertBefore(i,o),t){const s=ot().createElement("img");s.setAttribute("data-lexical-managed-linebreak","true"),s.style.setProperty("display","inline","important"),s.style.setProperty("border","0px","important"),s.style.setProperty("margin","0px","important"),s.alt="",r.insertBefore(s,i),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=i}getFirstChildOffset(){const t=this.getFirstChild(),e=this.getInsertionAnchor();let r=0;for(let o=this.element.firstChild;o!==null&&o!==t&&o!==e;o=o.nextSibling)r++;return r}resolveChildIndex(t,e,r,o){if(r===this.element){const c=this.getFirstChildOffset(),a=ji(),u=this.element.childNodes,f=Math.min(o,u.length);let d=0;for(let h=c;h<f;h++)u[h]!==a&&d++;return[t,Math.min(d,t.getChildrenSize())]}const i=rc(e,r);i.push(o);const s=rc(e,this.element);let l=t.getIndexWithinParent();for(let c=0;c<s.length;c++){const a=i[c],u=s[c];if(a===void 0||a<u)break;if(a>u){l+=1;break}}return[t.getParentOrThrow(),l]}};function rc(n,t){const e=[];let r=t;for(;r!==n&&r!==null;r=r.parentNode){let o=0;for(let i=r.previousSibling;i!==null;i=i.previousSibling)o++;e.push(o)}return r!==n&&w(225),e.reverse()}function ag(){let n;try{n="0.51.0+prod.esm"}catch{}return n??'"<unknown>+source"'}const Iu=ag();let vr=class{constructor(){k(this,"_front",new Set);k(this,"_back",new Set);k(this,"_cache")}get size(){return this._front.size+this._back.size}addBack(t){return delete this._cache,this._front.has(t)||this._back.add(t),this}addFront(t){return delete this._cache,this._back.has(t)||this._front.add(t),this}delete(t){return delete this._cache,this._front.delete(t)||this._back.delete(t)}toArray(){const t=Array.from(this._front).reverse();for(const e of this._back)t.push(e);return t}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const en=null;function Lu(n,t=1e3){return n instanceof ps?n.clone():n.size<t?new Map(n):new ps().init(new Map(n),void 0,n.size)}let ps=class Ru{constructor(){k(this,"_mutable",!1);k(this,"_old");k(this,"_nursery");k(this,"_size",0)}clone(){return this._mutable=!1,new Ru().init(this._old,this._nursery,this._size)}init(t,e,r){return this._old=t,this._nursery=e,this._size=r,this}get size(){return this._size}has(t){return this.get(t)!==void 0}getWithTombstone(t){const e=this._nursery&&this._nursery.get(t);return e!==void 0?e:this._old&&this._old.get(t)}get(t){const e=this.getWithTombstone(t);return e===en?void 0:e}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const e=new Map(this._old);for(const[r,o]of this._nursery)o!==en?e.set(r,o):e.delete(r);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(t,e){const r=this.getWithTombstone(t);if(r===e)return this;const o=this.getNursery();return r!==en&&r!==void 0||(this._size++,r===en&&o.delete(t)),o.set(t,e),this}delete(t){const e=this.has(t);return e&&(this.getNursery().set(t,en),this._size--),e}getOrInsert(t,e){const r=this.get(t);return r!==void 0?r:(this.set(t,e),e)}getOrInsertComputed(t,e){const r=this.get(t);if(r!==void 0)return r;const o=e(t);return this.set(t,o),o}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,e=this._old;if(t){if(e)for(const r of e){const o=r[0],i=t.get(o);i!==en&&(i!==void 0&&(r[1]=i),yield r)}for(const r of t)r[1]===en||e&&e.has(r[0])||(yield r)}else e&&(yield*e)}forEach(t,e){e!==void 0&&(t=t.bind(e));for(const[r,o]of this.entries())t(o,r,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}},Or=!1;function ug(n,t,...e){const r=Or;let o;try{Or=n,o=t()}finally{Or=r}var i;return(i=o)===null||typeof i!="object"&&typeof i!="function"||typeof i.then!="function"||w(421),o}function fg(){return Or}function zu(n){const t=n.exportJSON(Or),e=n.constructor;return t.type!==e.getType()&&w(130,e.name),b(n)&&!Array.isArray(t.children)&&w(59,e.name),t}function jo(n,t,e,r,o,i){if(b(n)){let s=n.getFirstChild();for(;s!==null;){const l=s.__key;s.__parent===t&&((b(s)||un(s)&&s.__slots!==null)&&jo(s,l,e,r,o,i),e.has(l)||i.delete(l),o.push(l)),s=s.getNextSibling()}}for(const s of un(n)&&n.__slots!==null?n.__slots.values():[]){const l=r.get(s);l!==void 0&&Sn(l)&&l.__slotHost===t&&((b(l)||un(l)&&l.__slots!==null)&&jo(l,s,e,r,o,i),e.has(s)||i.delete(s),o.push(s))}}let _s=!1,ll=0;function dg(n){ll=n.timeStamp}function Hi(n,t,e){const r=n.nodeName==="BR",o=t.__lexicalLineBreak;return o&&(n===o||r&&n.previousSibling===o)||r&&gr(n,e)!==void 0}function hg(n,t,e){const r=Lt(Kt(e)),o=r&&Bt(r,e._rootElement);let i=null,s=null;o!==null&&o.anchorNode===n&&(i=o.anchorOffset,s=o.focusOffset);const l=n.nodeValue;l!==null&&Fl(t,l,i,s,!1)}function gg(n,t,e){if(O(n)){const r=n.anchor.getNode();if(r.is(e)&&n.format!==r.getFormat())return!1}return ve(t)&&e.isAttached()}function pg(n,t,e){for(let r=n;r&&!Td(r);r=$n(r)){const o=gr(r,t);if(o!==void 0){const i=nt(o,e);if(i)return J(i)||!q(r)?void 0:[r,i]}}}function Bu(n,t,e){_s=!0;const r=performance.now()-ll>100;try{te(n,()=>{const o=A()||(function(f){return f.read("latest",()=>{const d=A();return d!==null?d.clone():null})})(n),i=new Map,s=n._editorState,l=n._blockCursorElement;let c=!1,a="";for(let f=0;f<t.length;f++){const d=t[f],h=d.type,g=d.target,_=pg(g,n,s);if(!_)continue;const[m,p]=_;if(h==="characterData")r&&M(p)&&ve(g)&&gg(o,g,p)&&hg(g,p,n);else if(h==="childList"){c=!0;const y=d.addedNodes;for(let S=0;S<y.length;S++){const C=y[S],N=ud(C),T=C.parentNode;if(!(T==null||C===l||N!==null||Hi(C,T,n)||Uo(C)||n._slotsUsed&&q(C)&&C.hasAttribute("data-lexical-slot")||Td(C))){if(Oe){const E=(q(C)?C.innerText:null)||C.nodeValue;E&&(a+=E)}T.removeChild(C)}}const x=d.removedNodes,v=x.length;if(v>0){let S=0;for(let C=0;C<v;C++){const N=x[C];Hi(N,g,n)||l===N?(g.appendChild(N),S++):Uo(N)&&S++}v!==S&&i.set(m,p)}}}if(i.size>0)for(const[f,d]of i)d.reconcileObservedMutation(f,n);const u=e.takeRecords();if(u.length>0){for(let f=0;f<u.length;f++){const d=u[f],h=d.addedNodes,g=d.target;for(let _=0;_<h.length;_++){const m=h[_],p=m.parentNode;p==null||m.nodeName!=="BR"||Hi(m,g,n)||p.removeChild(m)}}e.takeRecords()}o!==null&&(c&&St(o),Oe&&_d(n)&&o.insertRawText(a))})}finally{_s=!1}}function Ku(n){const t=n._observer;t!==null&&Bu(n,t.takeRecords(),t)}function Wu(n){(function(t){ll===0&&Kt(t).addEventListener("textInput",dg,!0)})(n),n._observer=new MutationObserver((t,e)=>{Bu(n,t,e)})}function Uu(n,t,e){const{isEqual:r}=n;return t===e||r!==void 0&&r(t,e)}function cl(n,t){return Uu(n,t,n.defaultValue)}function Je(n){return typeof n=="object"&&n!==null}function ne(n,t){const e=Ni(n,t).getter;return Je(e)&&e.getterTable!==void 0||w(405,t),al(e.getterTable)}function ce(n,t){const e=Ni(n,t).setter;return Je(e)&&e.setterTable!==void 0||w(406,t),al(e.setterTable)}function Zn(n,t,e){let{meta:r}=Ni(n,t);for(let o=0;;){if(r.kind==="aliased")return al(r.aliases);r.kind==="nullable"||r.kind==="optional"?r=r.inner.meta:r.kind==="array"?r=r.item.meta:w(407,t,String(e))}}function ae(n,t){const e=Ni(n,t),{setter:r}=e;Je(r)&&r.setterTable!==void 0||w(408,t);const o=String(e.defaultValue);return Ke(r.setterTable,o)||w(409,t,o),r.setterTable[o]}function al(n){return Object.assign(Object.create(null),n)}function Ni(n,t){const e=n.get(t);return e===void 0&&w(410,t),e}function Nn(n,t,e,r,o){o!==void 0&&_g.add(o);const i=e===void 0,s=i?n(void 0):e;return i&&Ju(s),Object.assign(n,{accepts:o,defaultValue:s,isEqual:r,meta:t})}const _g=new WeakSet,ju=new WeakSet;function mg(n){return n!==null&&typeof n=="object"&&ju.add(n),n}function Ju(n){if(n!==null&&typeof n=="object"&&!Object.isFrozen(n)&&!ju.has(n)){Object.freeze(n);for(const t of Object.values(n))Ju(t)}}function Hu(n){const{isEqual:t}=n;return t===void 0?void 0:(e,r)=>e==null||r==null?e===r:t(e,r)}function Vu(n,t){return e=>t(e)||ul(n,e)}function ul(n,t){const{accepts:e}=n;return e!==void 0?e.call(n,t):(function(r,o){const{accepts:i}=r;if(i!==void 0)return ul(r,o)?{parsed:r(o)}:void 0;const s=r(o);return cl(r,s)&&o!==r.defaultValue?void 0:{parsed:s}})(n,t)!==void 0}function Ke(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function re(n=""){return Nn(t=>typeof t=="string"?t:n,{kind:"string"},void 0,void 0,t=>typeof t=="string")}const yg=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function He(n=0,t={}){const{integer:e,clamp:r}=t,o=e&&t.min!==void 0?Math.ceil(t.min):t.min,i=e&&t.max!==void 0?Math.floor(t.max):t.max,s=a=>typeof a=="string"&&yg.test(a)?Number(a):a,l=a=>typeof a=="number"&&Number.isFinite(a)&&(!e||Number.isInteger(a)),c=a=>l(a)&&(o===void 0||a>=o)&&(i===void 0||a<=i);return Nn(a=>{const u=s(a);return r&&l(u)?o!==void 0&&u<o?o:i!==void 0&&u>i?i:u:c(u)?u:n},{clamp:r,integer:e,kind:"number",max:i,min:o},void 0,void 0,a=>r?l(s(a)):c(s(a)))}function fl(n=!1){return Nn(t=>typeof t=="boolean"?t:n,{kind:"boolean"},void 0,void 0,t=>typeof t=="boolean")}function dn(n,...t){const e=mg(t.length!==0?t[0]:n[0]),r=new Set(n);return Nn(o=>o!==void 0&&r.has(o)?o:e,{kind:"enum",values:n},e,void 0,o=>r.has(o)&&(o!==void 0||e===void 0))}function $r(n,t={}){const{defaultAsNull:e}=t;return Nn(r=>{if(r==null)return null;const o=n(r);return e&&cl(n,o)?null:o},{defaultAsNull:e,inner:n,kind:"nullable"},void 0,Hu(n),Vu(n,r=>r==null))}function Jo(n,t={}){const{omitDefault:e}=t;return Nn(r=>{if(r===void 0)return;const o=n(r);return e&&cl(n,o)?void 0:o},{inner:n,kind:"optional",omitDefault:e},void 0,Hu(n),Vu(n,r=>r===void 0))}function xe(){return n=>(function(t){return{meta:{fields:t,kind:"node"}}})(n)}function ms(n,t){const e=r=>typeof r=="string"&&Ke(t,r);return Nn(r=>e(r)?t[r]:n(r),{aliases:t,inner:n,kind:"aliased"},n.defaultValue,n.isEqual,r=>e(r)||ul(n,r))}function Mt(n,t){return qu("withField",n,{getter:{field:t.field,getterTable:t.getterTable,method:t.getter,when:t.when},setter:{field:t.field,method:t.setter,setterTable:t.setterTable}})}function ie(n,t){return qu("withAccessors",n,t)}function qu(n,t,e){return Object.assign(r=>t(r),{accepts:t.accepts,defaultValue:t.defaultValue,getter:e.getter,isEqual:t.isEqual,meta:t.meta,setter:e.setter})}const oc="latest";class xg{constructor(t,e){k(this,"key");k(this,"parse");k(this,"unparse");k(this,"isEqual");k(this,"defaultValue");k(this,"resetOnCopyNode");k(this,"schema");this.key=t;const r="meta"in(o=e.parse)&&typeof o.meta=="object"&&o.meta!==null&&"kind"in o.meta&&typeof o.meta.kind=="string"&&"defaultValue"in o?e.parse:void 0;var o;this.schema=r,this.parse=e.parse.bind(e),this.unparse=(e.unparse||Cg).bind(e),this.isEqual=e.isEqual?e.isEqual.bind(e):r!==void 0&&r.isEqual!==void 0?(i,s)=>Uu(r,i,s):Object.is,this.defaultValue=r!==void 0?r.defaultValue:this.parse(void 0),this.resetOnCopyNode=e.resetOnCopyNode||!1}}function ur(n,t){return new xg(n,t)}function Kr(n,t,e=oc){const r=(e===oc?n.getLatest():n).__state;return r?r.getValue(t):t.defaultValue}function fr(n,t,e){let r;if(xt(),typeof e=="function"){const i=n.getLatest(),s=Kr(i,t);if(r=e(s),t.isEqual(s,r))return i}else r=e;const o=n.getWritable();return Yu(o).updateFromKnown(t,r),o}function vg(n){const t=new Map,e=new Set;for(const{ownNodeConfig:r}of vn(typeof n=="function"?n:n.replace))if(r&&r.stateConfigs)for(const o of r.stateConfigs){let i;"stateConfig"in o?(i=o.stateConfig,o.flat&&e.add(i.key)):i=o,t.set(i.key,i)}return{flatKeys:e,sharedConfigMap:t}}const ic=new Set(["__proto__","constructor","prototype"]);let Sg=class Gu{constructor(t,e,r=void 0,o=new Map,i=void 0){k(this,"node");k(this,"knownState");k(this,"unknownState");k(this,"sharedNodeState");k(this,"size");this.node=t,this.sharedNodeState=e,this.unknownState=r,this.knownState=o;const{sharedConfigMap:s}=this.sharedNodeState,l=i!==void 0?i:(function(c,a,u){let f=u.size;if(a)for(const d in a){const h=c.get(d);h&&u.has(h)||f++}return f})(s,r,o);this.size=l}getValue(t){const e=this.knownState.get(t);if(e!==void 0)return e;this.sharedNodeState.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const o=this.unknownState[t.key];o!==void 0&&(r=t.parse(o)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},e={};for(const[r,o]of this.knownState)r.isEqual(o,r.defaultValue)?delete t[r.key]:t[r.key]=r.unparse(o);for(const r of this.sharedNodeState.flatKeys)r in t&&(e[r]=t[r],delete t[r]);return sc(t)&&(e[sl]=t),e}getWritable(t){if(this.node===t)return this;const{sharedNodeState:e,unknownState:r}=this,o=new Map(this.knownState);return new Gu(t,e,(function(i,s,l){let c;if(l)for(const[a,u]of Object.entries(l)){if(ic.has(a))continue;const f=i.get(a);f?s.has(f)||s.set(f,f.parse(u)):(c=c||{},c[a]=u)}return c})(e.sharedConfigMap,o,r),o,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,e){const r=t.key;this.sharedNodeState.sharedConfigMap.set(r,t);const{knownState:o,unknownState:i}=this;o.has(t)||i&&r in i||(i&&(delete i[r],this.unknownState=sc(i)),this.size++),o.set(t,e)}updateFromUnknown(t,e){if(ic.has(t))return;const r=this.sharedNodeState.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(e)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=e)}updateFromJSON(t){const{knownState:e}=this;for(const r of e.keys())e.set(r,r.defaultValue);if(this.size=e.size,this.unknownState=void 0,t)for(const[r,o]of Object.entries(t))this.updateFromUnknown(r,o)}};function Yu(n){const t=n.getWritable(),e=t.__state?t.__state.getWritable(t):new Sg(t,(function(r){return r.__state?r.__state.sharedNodeState:ld(gt(),r.getType()).sharedNodeState})(t));return t.__state=e,e}function Xu(n,t){const e=n.getWritable(),r=t[sl];return(e.__state||r)&&Yu(n).updateFromJSON(r),e}function sc(n){if(n)for(const t in n)return n}function Cg(n){return n}function lc(n,t,e){for(const[r,o]of t.knownState){if(n.has(r.key))continue;n.add(r.key);const i=e?e.getValue(r):r.defaultValue;if(i!==o&&!r.isEqual(i,o))return!0}return!1}function cc(n,t,e){const{unknownState:r}=t,o=e?e.unknownState:void 0;if(r){for(const[i,s]of Object.entries(r))if(!n.has(i)&&(n.add(i),s!==(o?o[i]:void 0)))return!0}return!1}function ac(n,t){const e=n.__state;return e&&e.node===n?e.getWritable(t):e}function uc(n,t){const e=n.__mode,r=n.__format,o=n.__style,i=t.__mode,s=t.__format,l=t.__style,c=n.__state,a=t.__state;return(e===null||e===i)&&(r===null||r===s)&&(o===null||o===l)&&(n.__state===null||c===a||(function(u,f){if(u===f)return!0;const d=new Set;return!(u&&lc(d,u,f)||f&&lc(d,f,u)||u&&cc(d,u,f)||f&&cc(d,f,u))})(c,a))}function fc(n,t){const e=n.mergeWithSibling(t),r=G()._normalizedNodes;return r.add(n.__key),r.add(t.__key),e}function dc(n){let t,e,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&M(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(uc(t,r)){r=fc(t,r);break}break}t.remove()}for(;(e=r.getNextSibling())!==null&&M(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(uc(r,e)){r=fc(r,e);break}break}e.remove()}}else r.remove()}function dl(n){return hc(n.anchor),hc(n.focus),n}function hc(n){for(;n.type==="element";){const t=n.getNode(),e=n.offset;let r,o;if(e===t.getChildrenSize()?(r=t.getChildAtIndex(e-1),o=!0):(r=t.getChildAtIndex(e),o=!1),M(r)){n.set(r.__key,o?r.getTextContentSize():0,"text",!0);break}if(!b(r))break;n.set(r.__key,o?r.getChildrenSize():0,"element",!0)}}const Ho=Symbol.for("@lexical/CachedTextSize");function gc(n,t){return xs.read(()=>{let e=0,r=n;for(let o=0;o<t&&r!==null;o++){const i=oe.get(r);if(i===void 0&&w(345,r),b(i)){const s=st.get(r);if(s!==void 0&&b(s)&&s.__parent!==i.__parent)e+=i.getTextContentSize();else{const l=hn.get(r),c=l&&l.__lexicalTextContent;typeof c!="string"&&w(346,i.getType()),e+=c.length}o<t-1&&!i.isInline()&&(e+=2)}else{const s=i[Ho];s===void 0&&w(347,i.getType(),r),e+=s}r=i.__next}return e},{editor:V})}function Qu(n){b(n)||n[Ho]===void 0&&(n[Ho]=M(n)?n.__text.length:n.getTextContentSize())}const bg=4;let Wr,V,Ur,j="",ht=null,$t=null,wt=null;function he(){return{firstTextKey:wt,format:ht,style:$t}}function Vt(n){n.firstTextKey!==null&&(ht=n.format,$t=n.style,wt=n.firstTextKey)}function ys(n){if(wt!==null)return;const t=n.__lexicalFirstTextKey;if(t===void 0&&w(348),t===null)return;const e=st.get(t);M(e)&&(ht=e.getFormat(),$t=e.getStyle(),wt=t)}let Ei,Mr,Fr,oe,xs,st,hn,vs,jr,gn,ke=!1,Vo=!1;function We(n,t){const e=oe.get(n),r=st.has(n);if(t!==null){const o=ks(n);o.parentNode===t&&t.removeChild(o)}if(!r){if(V._keyToDOMMap.delete(n),b(e)){const o=_i(e,oe);Ss(o,0,o.length-1,null)}if(e!==void 0){for(const o of qt(e).values()){const i=bs(o);We(o,null),i!==null&&i.remove()}Al(jr,Ur,Ei,e,"destroyed")}}}function Ss(n,t,e,r){for(let o=t;o<=e;++o){const i=n[o];i!==void 0&&We(i,r)}}function nn(n,t){n.setProperty("text-align",t)}const Tg="40px";function Zu(n,t){const e=Wr.theme.indent;if(typeof e=="string"){const r=n.classList.contains(e);t>0&&!r?n.classList.add(e):t<1&&r&&n.classList.remove(e)}n.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * var(--lexical-indent-base-value, ${Tg}))`),Xr(n,"class"),Xr(n,"style")}function tf(n,t){const e=n.style;t===0?nn(e,""):t===1?nn(e,"left"):t===2?nn(e,"center"):t===3?nn(e,"right"):t===4?nn(e,"justify"):t===5?nn(e,"start"):t===6&&nn(e,"end"),Xr(n,"style")}function Cs(n,t){const e=(function(r){const o=r.__dir;if(o!==null)return o;if(ut(r))return null;const i=r.getParent();return i===null||Z(i)&&i.__dir===null?"auto":null})(t);e!==null?n.dir=e:n.removeAttribute("dir")}function ef(n){const t=ot().createElement("div");return t.setAttribute("data-lexical-slot",n),t.style.display="none",t}function nf(n,t,e){t||n.contentEditable==="false"?__(e,V):e.removeAttribute("contenteditable")}function pc(n,t,e){const r=j,o=he();j="";let i="";const s=J(n);for(const[l,c]of e){const a=ef(l);nf(t,s,a),t.appendChild(a),j="";const u=he();Ue(c,Ut(n,a,V)),Vt(u),rf(n,l,t,a),i+=j}return Vt(o),j=r,i}function qt(n){return un(n)&&n.__slots!==null?n.__slots:Od}function rf(n,t,e,r){const o=gn.$getSlotTargetElement(n,t,e,V);o!==null&&(r.parentElement!==o&&o.appendChild(r),r.style.display="")}function bs(n){const t=hn.get(n);return t!==void 0?t.parentElement:null}function _c(n,t,e){const r=qt(n),o=qt(t);for(const[u,f]of r)if(!o.has(u)){const d=bs(f);We(f,null),d!==null&&d.remove()}const i=j,s=he();let l="",c=null;const a=J(t);for(const[u,f]of o){const d=r.get(u);let h=d!==void 0?bs(d):null;j="";const g=he();if(h===null){h=ef(u);let _=null;for(const m of e.children)if(!m.hasAttribute("data-lexical-slot")){_=m;break}e.insertBefore(h,_),Ue(f,Ut(t,h,V))}else d===f?Te(f,h):(d!==void 0&&We(d,h),Ue(f,Ut(t,h,V)));if(Vt(g),nf(e,a,h),rf(t,u,e,h),l+=j,h.parentElement===e){const _=c===null?e.firstChild:c.nextSibling;_!==h&&e.insertBefore(h,_),c=h}}return Vt(s),j=i,l}function Ue(n,t){const e=st.get(n);if(e===void 0&&w(60),t!==null){const o=oe.get(n);if(o!==void 0){const i=hn.get(n);if(i!==void 0){const s=Sn(o)?o.__slotHost:null,l=Sn(e)?e.__slotHost:null,c=o.__parent!==e.__parent||s!==l,a=l!==null&&i.parentElement!==t.element;if(c||a)return t.insertChild(i),Te(n,t.element)}}}const r=gn.$createDOM(e,V);if((function(o,i,s){const l=s._keyToDOMMap;fd(i,s,o),l.set(o,i)})(n,r,V),M(e)?r.setAttribute("data-lexical-text","true"):J(e)&&(r.setAttribute("data-lexical-decorator","true"),p_(r,{captureSelection:!0})),b(e)){const o=e.__indent,i=e.__size;Cs(r,e),o!==0&&Zu(r,o);const s=qt(e),l=s.size>0?pc(e,r,s):"";if(i===0)r.__lexicalTextContent=l,r.__lexicalFirstTextKey=null,j+=l,s.size>0&&(r.__lexicalSlotTextLength=l.length);else{const a=j,u=i-1;if(Ts(_i(e,st),e,0,u,Ut(e,r,V)),l!==""){const f=r.__lexicalTextContent||"";r.__lexicalTextContent=l+f,j=a+l+f}s.size>0&&(r.__lexicalSlotTextLength=l.length)}const c=e.__format;c!==0&&tf(r,c),e.isInline()||(sf(null,e,r),of(e,r))}else{const o=e.getTextContent();if(J(e)){const i=e.decorate(V,Wr);i!==null&&lf(n,i),r.contentEditable="false";const s=qt(e);s.size>0&&pc(e,r,s)}j+=o}return t!==null&&t.insertChild(r),gn.$decorateDOM(e,null,r,V),Qu(e),Al(jr,Ur,Ei,e,"created"),r}function Ts(n,t,e,r,o){const i=j,s=he();j="",ht=null,$t=null,wt=null;let l=e;for(;l<=r;++l){const a=he();Ue(n[l],o);const u=st.get(n[l]);u!==null&&M(u)?ht===null&&(ht=u.getFormat(),$t=u.getStyle(),wt=u.__key):b(u)&&l<r&&!u.isInline()&&(j+=cn),Vt(a)}const c=V._keyToDOMMap.get(t.__key);c===void 0&&w(349,t.__key),c.__lexicalTextContent=j,c.__lexicalFirstTextKey=wt,j=i+j,Vt(s)}function mc(n,t){if(!n)return!1;const e=t.get(n);return J(e)&&!e.isInline()}function of(n,t){const e=Ut(n,t,V);e.setDecoratorBoundaryAnchor("leading",mc(n.__first,st)),e.setDecoratorBoundaryAnchor("trailing",mc(n.__last,st))}function sf(n,t,e){const r=Ut(t,e,V),o=(function(i,s){if(i){const l=i.__last;if(l){const c=s.get(l);if(c)return Nt(c)?"line-break":J(c)&&c.isInline()?"decorator":null}return"empty"}return null})(t,st);r.setManagedLineBreak(o)}function kg(n,t,e){var r;ht=null,$t=null,wt=null,(function(o,i,s){const l=j,c=o.__size,a=i.__size;j="";const u=s.element,f=V._keyToDOMMap.get(i.__key);f===void 0&&w(351,i.__key);const d=a-c;if(!ke&&Math.abs(d)<=1&&c>=bg&&o.__first===i.__first&&(d!==0||!V._cloneNotNeeded.has(o.__key))){const h=f.__lexicalTextContent,g=vs.get(o.__key);if(!ke&&typeof h=="string"&&g!==void 0){const _=(function(m,p){const y=p.size;if(y===0||y>=m.__size)return null;let x=m.__last,v=null,S=0;for(;x!==null&&S<y;){if(!p.has(x))return null;v=x;const C=st.get(x);if(C===void 0)return null;x=C.__prev,S++}return S!==y||x!==null&&p.has(x)?null:v})(i,g);if(_!==null){const m=g.size;if(d===0){const p=gc(_,m);let y=_,x=0;for(;y!==null&&x<m;){const T=st.get(y);if(T===void 0)break;const E=he();Te(y,u),M(T)&&ht===null&&(ht=T.getFormat(),$t=T.getStyle(),wt=T.__key),Vt(E),y=T.__next,x++}let v="";for(y=_,x=0;y!==null&&x<m;){const T=st.get(y);if(T===void 0)break;let E;if(b(T)){const $=V._keyToDOMMap.get(y),F=$&&$.__lexicalTextContent;typeof F!="string"&&w(352,T.getType()),E=F}else E=T.getTextContent();v+=E,x<m-1&&b(T)&&!T.isInline()&&(v+=cn),y=T.__next,x++}const S=f.__lexicalSlotTextLength||0,C=S>0?h.slice(S):h,N=C.slice(0,C.length-p)+v;return f.__lexicalTextContent=N,j=l+N,void yc(i,f,g)}if((function(p,y,x,v,S,C,N,T){if(T!==1&&T!==-1||N!==(T===1?2:1))return!1;const $=N-T;let F=p.__last;for(let it=0;it<$-1;it++){if(F===null)return!1;const _t=oe.get(F);if(_t===void 0)return!1;F=_t.__prev}if(F===null)return!1;const D=st.get(C),L=oe.get(F);if(D===void 0||L===void 0||D.__prev!==L.__prev)return!1;const B=[];let U=C;for(let it=0;it<N;it++){if(U===null)return!1;B.push(U);const _t=st.get(U);U=_t?_t.__next:null}const Q=[];U=F;for(let it=0;it<$;it++){if(U===null)return!1;Q.push(U);const _t=oe.get(U);U=_t?_t.__next:null}const H=new Set(Q),Et=new Set(B),et=[];let ft=0,dt=0;for(;ft<$&&dt<N;)if(B[dt]===Q[ft])et.push({key:B[dt],kind:"reconcile"}),ft++,dt++;else if(Et.has(Q[ft])){if(H.has(B[dt]))return!1;et.push({key:B[dt],kind:"create",nextIndex:dt}),dt++}else et.push({key:Q[ft],kind:"destroy"}),ft++;for(;ft<$;)et.push({key:Q[ft++],kind:"destroy"});for(;dt<N;)et.push({key:B[dt],kind:"create",nextIndex:dt}),dt++;const Se=gc(F,$);for(const it of et){const _t=he();if(it.kind==="reconcile")Te(it.key,x.element);else if(it.kind==="destroy")We(it.key,x.element);else{let Ht=null;for(let Fn=it.nextIndex+1;Fn<N;Fn++){const xr=V._keyToDOMMap.get(B[Fn]);if(xr!==void 0){Ht=xr;break}}Ue(it.key,x.withBefore(Ht??x.before))}if(it.kind!=="destroy"){const Ht=st.get(it.key);Ht&&M(Ht)&&ht===null&&(ht=Ht.getFormat(),$t=Ht.getStyle(),wt=Ht.__key)}Vt(_t)}let Jt="";for(let it=0;it<N;it++){const _t=st.get(B[it]);if(_t===void 0)return!1;let Ht;if(b(_t)){const Fn=V._keyToDOMMap.get(B[it]),xr=Fn&&Fn.__lexicalTextContent;typeof xr!="string"&&w(350,_t.getType()),Ht=xr}else Ht=_t.getTextContent();Jt+=Ht,it<N-1&&b(_t)&&!_t.isInline()&&(Jt+=cn)}const Ae=v.__lexicalSlotTextLength||0,yr=Ae>0?S.slice(Ae):S;return v.__lexicalTextContent=yr.slice(0,yr.length-Se)+Jt,!0})(o,0,s,f,h,_,m,d)){const p=f.__lexicalTextContent;return typeof p!="string"&&w(353),j=l+p,void yc(i,f,g)}}}if(d===0){let _=o.__first,m=0;for(;_!==null;){const p=st.get(_);if(p===void 0)break;const y=ke||Fr.has(_)||Mr.has(_),x=he();if(y)Te(_,u);else{let v,S;if(b(p)){S=hn.get(_);const C=S&&S.__lexicalTextContent;typeof C!="string"&&w(354,p.getType()),v=C}else v=p.getTextContent();j+=v,S!==void 0&&ys(S)}M(p)?ht===null&&(ht=p.getFormat(),$t=p.getStyle(),wt=p.__key):b(p)&&m<a-1&&!p.isInline()&&(j+=cn),Vt(x),_=p.__next,m++}return f.__lexicalTextContent=j,f.__lexicalFirstTextKey=wt,void(j=l+j)}}if(c===1&&a===1){const h=o.__first,g=i.__first;if(h===g)Te(h,u);else{const m=ks(h),p=Ue(g,null);try{m.parentNode===u?u.replaceChild(p,m):s.insertChild(p)}catch(y){if(typeof y=="object"&&y!=null){const x=`${y.toString()} Parent: ${u.tagName}, new child: {tag: ${p.tagName} key: ${g}}, old child: {tag: ${m.tagName}, key: ${h}}.`;throw new Error(x)}throw y}We(h,null)}const _=st.get(g);M(_)&&ht===null&&(ht=_.getFormat(),$t=_.getStyle(),wt=_.__key)}else{const h=_i(o,oe),g=_i(i,st);if(h.length!==c&&w(227),g.length!==a&&w(228),c===0)a!==0&&Ts(g,i,0,a-1,s);else if(a===0){if(c!==0){const _=s.after==null&&s.before==null&&qt(i).size===0&&s.element.__lexicalLineBreak==null;Ss(h,0,c-1,_?null:u),_&&(u.textContent="")}}else(function(_,m,p,y,x,v){const S=y-1,C=x-1;let N,T,E=v.getFirstChild(),$=0,F=0;for(;$<=S&&F<=C;){const B=m[$],U=p[F],Q=he();if(B===U)E=Vi(Te(U,v.element)),$++,F++;else{if(T===void 0&&(T=xc(p,F)),N===void 0)N=xc(m,$);else if(!N.has(B)){$++,Vt(Q);continue}if(!T.has(B)){E=Vi(ks(B)),We(B,v.element),$++,N.delete(B),Vt(Q);continue}if(N.has(U)){const Et=rr(V,U);Et!==E&&v.withBefore(E??v.before).insertChild(Et),E=Vi(Te(U,v.element)),$++,F++}else Ue(U,v.withBefore(E??v.before)),F++}const H=st.get(U);H!==null&&M(H)?ht===null&&(ht=H.getFormat(),$t=H.getStyle(),wt=H.__key):b(H)&&F<=C&&!H.isInline()&&(j+=cn),Vt(Q)}const D=$>S,L=F>C;if(D&&!L){const B=p[C+1],U=B===void 0?null:V.getElementByKey(B);Ts(p,_,F,C,v.withBefore(U??v.before))}else L&&!D&&Ss(m,$,S,v.element)})(i,h,g,c,a,s)}f.__lexicalTextContent=j,f.__lexicalFirstTextKey=wt,j=l+j})(n,t,Ut(t,e,V)),Z(t)||(r=t,ht==null||ht===r.__textFormat||Vo||r.setTextFormat(ht),(function(o){$t==null||$t===o.__textStyle||Vo||o.setTextStyle($t)})(t))}function yc(n,t,e){const r=t.__lexicalFirstTextKey;if(r!=null){const o=n.__key;let i=r;for(;i!==null;){const s=st.get(i);if(s===void 0){i=null;break}if(s.__parent===o)break;i=s.__parent}if(i!==null&&!e.has(i)){const s=st.get(r);if(M(s))return ht=s.getFormat(),void($t=s.getStyle())}}t.__lexicalFirstTextKey=wt}function Te(n,t){const e=oe.get(n);let r=st.get(n);e!==void 0&&r!==void 0||w(61);const o=ke||Fr.has(n)||Mr.has(n),i=rr(V,n);if(e===r&&!o){let s;if(b(e)){const l=i.__lexicalTextContent;typeof l!="string"&&w(355,e.getType()),s=l,ys(i)}else s=e.getTextContent();return j+=s,i}if(e!==r&&o&&Al(jr,Ur,Ei,r,"updated"),gn.$updateDOM(r,e,i,V)){const s=Ue(n,null);return t===null&&w(62),t.replaceChild(s,i),We(n,null),s}if(b(e)){b(r)||w(334,n);const s=r.__indent;(ke||s!==e.__indent)&&Zu(i,s);const l=r.__format;(ke||l!==e.__format)&&tf(i,l);const c=o&&(qt(r).size>0||qt(e).size>0)?_c(e,r,i):"";if(o){const a=j;if(kg(e,r,i),r.isInline()||(ut(r)||sf(0,r,i),of(r,i)),c!==""){const u=i.__lexicalTextContent||"";i.__lexicalTextContent=c+u,j=a+c+u,i.__lexicalSlotTextLength=c.length}else(qt(r).size>0||qt(e).size>0)&&(i.__lexicalSlotTextLength=0)}else{const a=i.__lexicalTextContent;typeof a!="string"&&w(356,e.getType()),j+=a,ys(i)}if((ke||r.__dir!==e.__dir||r.__parent!==e.__parent)&&(Cs(i,r),ut(r)&&!ke))for(const a of r.getChildren())b(a)&&Cs(rr(V,a.getKey()),a)}else{const s=r.getTextContent();if(J(r)){const l=r.decorate(V,Wr);l!==null&&lf(n,l),o&&(qt(r).size>0||qt(e).size>0)&&_c(e,r,i)}j+=s}if(!Vo&&ut(r)){const s=r.getLatest();if(s.__cachedText!==j){const l=s.getWritable();l.__cachedText=j,r=l}}return gn.$decorateDOM(r,e,i,V),Qu(r),i}function lf(n,t){let e=V._pendingDecorators;const r=V._decorators;if(e===null){if(r[n]===t)return;e=dd(V)}e[n]=t}function Vi(n){let t=n.nextSibling;return t!==null&&t===V._blockCursorElement&&(t=t.nextSibling),t}function xc(n,t){const e=new Set;for(let r=t;r<n.length;r++)e.add(n[r]);return e}function Ng(n,t,e,r,o,i){j="",ht=null,$t=null,wt=null,ke=r===2,V=e,Wr=e._config,gn=e._config.dom||ci,Ur=e._nodes,Ei=V._listeners.mutation,Mr=o,Fr=i,oe=n._nodeMap,xs=n,st=t._nodeMap,Vo=t._readOnly,hn=Lu(e._keyToDOMMap),vs=(function(){const l=new Map,c=a=>{for(const u of a){const f=st.get(u);if(f===void 0)continue;const d=f.__parent;if(d===null)continue;let h=l.get(d);h===void 0&&(h=new Set,l.set(d,h)),h.add(u)}};return c(Mr.keys()),c(Fr),l})();const s=new Map;return jr=s,Te("root",null),V=void 0,Ur=void 0,Mr=void 0,Fr=void 0,oe=void 0,xs=void 0,st=void 0,Wr=void 0,hn=void 0,vs=void 0,jr=void 0,gn=ci,s}function ks(n){const t=hn.get(n);return t===void 0&&w(75,n),t}function P(n){return{type:n}}const cf=P("SELECTION_CHANGE_COMMAND"),Eg=P("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),af=P("CLICK_COMMAND"),uf=P("BEFORE_INPUT_COMMAND"),ff=P("INPUT_COMMAND"),df=P("COMPOSITION_START_COMMAND"),hf=P("COMPOSITION_END_COMMAND"),an=P("DELETE_CHARACTER_COMMAND"),zn=P("INSERT_LINE_BREAK_COMMAND"),Jr=P("INSERT_PARAGRAPH_COMMAND"),Bn=P("CONTROLLED_TEXT_INSERTION_COMMAND"),wi=P("PASTE_COMMAND"),Fo=P("REMOVE_TEXT_COMMAND"),Hr=P("DELETE_WORD_COMMAND"),Kn=P("DELETE_LINE_COMMAND"),Le=P("FORMAT_TEXT_COMMAND"),wg=P("SET_TEXT_FORMAT_COMMAND"),qo=P("UNDO_COMMAND"),Vr=P("REDO_COMMAND"),gf=P("KEYDOWN_COMMAND"),pf=P("KEY_ARROW_RIGHT_COMMAND"),Ns=P("MOVE_TO_END"),_f=P("KEY_ARROW_LEFT_COMMAND"),Es=P("MOVE_TO_START"),hl=P("KEY_ARROW_UP_COMMAND"),gl=P("KEY_ARROW_DOWN_COMMAND"),so=P("KEY_ENTER_COMMAND"),mf=P("KEY_SPACE_COMMAND"),pl=P("KEY_BACKSPACE_COMMAND"),_l=P("KEY_ESCAPE_COMMAND"),yf=P("KEY_DELETE_COMMAND"),ml=P("KEY_TAB_COMMAND"),Og=P("INSERT_TAB_COMMAND"),$g=P("INDENT_CONTENT_COMMAND"),vc=P("OUTDENT_CONTENT_COMMAND"),yl=P("DROP_COMMAND"),Mg=P("FORMAT_ELEMENT_COMMAND"),xf=P("DRAGSTART_COMMAND"),xl=P("DRAGOVER_COMMAND"),Fg=P("DRAGEND_COMMAND"),Oi=P("COPY_COMMAND"),vl=P("CUT_COMMAND"),vf=P("SELECT_ALL_COMMAND"),Ag=P("CLEAR_EDITOR_COMMAND"),Dg=P("CLEAR_HISTORY_COMMAND"),po=P("CAN_REDO_COMMAND"),_o=P("CAN_UNDO_COMMAND"),Pg=P("FOCUS_COMMAND"),Ig=P("BLUR_COMMAND"),Lg=P("KEY_MODIFIER_COMMAND");function Sf(n,t){return{...t,[lg]:n}}const rn=Sf("metaKey",{ctrlKey:!Yn,metaKey:Yn}),Sc=Sf("altKey",{altKey:Yn,ctrlKey:!Yn}),Cc=[["altKey",1],["ctrlKey",2],["metaKey",4],["shiftKey",8]];function qi(n,t,e){const r=n.get(t);r?r.push(e):n.set(t,[e])}class Rg{constructor(){k(this,"byKey",new Map);k(this,"byCode",new Map)}add(t){const{key:e,modifiers:r={}}=t;e.length>0||w(399);const o=e.toLowerCase();for(const i of(function(s){let l=[0];for(const[c,a]of Cc){const u=s[c]||!1;u==="any"?l=l.concat(l.map(f=>f|a)):u&&(l=l.map(f=>f|a))}return l})(r))qi(this.byKey,`${i}:${o}`,t),e.length===1&&(/[0-9]/.test(e)?qi(this.byCode,`${i}:Digit${e}`,t):/[a-z]/.test(o)&&qi(this.byCode,`${i}:Key${o.toUpperCase()}`,t));return this}matches(t){const e=t.key;if(!e)return[];const r=(function(s){let l=0;for(const[c,a]of Cc)s[c]&&(l|=a);return l})(t),o=this.byKey.get(`${r}:${e.toLowerCase()}`),i=o?o.slice():[];if(this.byCode.size>0&&!(e.length===1&&e.charCodeAt(0)<=127)){const s=this.byCode.get(`${r}:${t.code}`);s&&i.push(...s)}return i}match(t){return this.matches(t)[0]}}function zg(n){const t=new Rg;for(const e of n)t.add(e);return t}function Bg(n){const t=new Map;return{dispose(){for(const e of t.values())e.dispose();t.clear()},register(e,r){let o=t.get(e);o===void 0&&(o={dispose:n(e,r),holders:new Set},t.set(e,o));const i=()=>{const s=t.get(e);s&&s.holders.delete(i)&&s.holders.size===0&&(t.delete(e),s.dispose())};return o.holders.add(i),i}}}function Kg(n,t,e,r){return n.addEventListener(t,e,r),n.removeEventListener.bind(n,t,e,r)}const Ce=Object.freeze({});let Gi;function Wg(){if(Gi!==void 0)return Gi;const n=[["keydown",Zg],["pointerdown",Jg],["compositionstart",Gg],["compositionend",Qg],["input",Vg],["click",jg],["cut",Ce],["copy",Ce],["dragstart",Ce],["dragover",Ce],["dragend",Ce],["paste",Ce],["focus",Ce],["blur",Ce],["drop",Ce]];return Xn&&n.push(["beforeinput",(t,e)=>(function(r,o){const i=r.inputType;i==="deleteCompositionText"||Oe&&_d(o)||i!=="insertCompositionText"&&te(o,()=>{kf(r,o)||R(o,uf,r)},{event:r})})(t,e)]),Gi=n,n}const ws=new WeakMap,Go=new WeakMap,Ug=Bg(n=>(n.addEventListener("selectionchange",Oc),()=>n.removeEventListener("selectionchange",Oc)));function Cf(n,t,e,r,o,i){const s=n.anchor,l=n.focus,c=s.getNode(),a=G();let u;if(i!==void 0)u=i;else{const _=Lt(Kt(a));u=_!==null?Bt(_,a._rootElement):null}const f=u!==null?u.anchorNode:null,d=s.key,h=a.getElementByKey(d),g=e.length;return d!==l.key||!M(c)||(!o&&(!Xn||a._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&g<2||hd(e))&&s.offset!==l.offset&&!c.isComposing()||Yt(c)||c.isDirty()&&g>1||(o||!Xn)&&h!==null&&!c.isComposing()&&f!==je(c,h,a)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!c.isComposing()&&(c.getFormat()!==n.format||c.getStyle()!==n.style)||(function(_,m){if(m.isSegmented())return!0;if(!_.isCollapsed())return!1;const p=_.anchor.offset,y=m.getParentOrThrow(),x=ai(m);return p===0?!m.canInsertTextBefore()||!y.canInsertTextBefore()&&!m.isComposing()||x||(function(v){const S=v.getPreviousSibling();return(M(S)||b(S)&&S.isInline())&&!S.canInsertTextAfter()})(m):p===m.getTextContentSize()&&(!m.canInsertTextAfter()||!y.canInsertTextAfter()&&!m.isComposing()||x)})(n,c)}function bc(n,t){return ve(n)&&n.nodeValue!==null&&t!==0&&t!==n.nodeValue.length}function Tc(n,t,e){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}=Bt(n,t._rootElement),l=t._inputState,c=l.isSelectionChangeFromDOMUpdate;if(c){l.isSelectionChangeFromDOMUpdate=!1;const a=l.selectionChangeFromDOMUpdatePoints;if(l.selectionChangeFromDOMUpdatePoints=null,bc(r,o)&&bc(i,s)&&!l.postDeleteSelectionToRestore&&(a===null||a.anchorNode===r&&a.anchorOffset===o&&a.focusNode===i&&a.focusOffset===s))return}te(t,()=>{if(!e)return void St(null);if(!uo(t,r,i))return;let a=A();if(l.postDeleteSelectionToRestore&&O(a)&&a.isCollapsed()){const f=a.anchor,d=l.postDeleteSelectionToRestore.anchor;(f.key===d.key&&f.offset===d.offset+1||f.offset===1&&d.getNode().is(f.getNode().getPreviousSibling()))&&(a=l.postDeleteSelectionToRestore.clone(),St(a))}if(l.postDeleteSelectionToRestore=null,O(a)){const f=a.anchor,d=f.getNode();if(a.isCollapsed()){n.type==="Range"&&r===i&&(a.dirty=!0);const h=Kt(t).event,g=h?h.timeStamp:performance.now(),{format:_,style:m,offset:p,key:y,timeStamp:x}=l.collapsedSelectionFormat,v=Y(),S=t.isComposing()===!1&&v.getTextContent()==="";if(g<x+200&&f.offset===p&&f.key===y)Ao(a,_,m);else if(f.type==="text")M(d)||w(141),bf(a,d);else if(f.type==="element"&&!S){b(d)||w(259);const C=f.getNode();C.isEmpty()?(function(N,T){const E=T.getTextFormat(),$=T.getTextStyle();Ao(N,E,$)})(a,C):Ao(a,a.format,"")}}else{const h=f.key,g=a.focus.key,_=a.getNodes(),m=_.length,p=a.isBackward(),y=p?s:o,x=p?o:s,v=p?g:h,S=p?h:g;let C=sg,N=!1;for(let T=0;T<m;T++){const E=_[T],$=E.getTextContentSize();if(M(E)&&$!==0&&!(T===0&&E.__key===v&&y===$||T===m-1&&E.__key===S&&x===0)&&(N=!0,C&=E.getFormat(),C===0))break}a.format=N?C:0}}const u=wn();(c||(a!==null?a.dirty||!O(a)||!a.is(u):u!==null))&&R(t,cf)})}function Ao(n,t,e){n.format===t&&n.style===e||(n.format=t,n.style=e,n.dirty=!0)}function bf(n,t){Ao(n,t.getFormat(),t.getStyle())}function jg(n,t){te(t,()=>{const e=A(),r=Lt(Kt(t)),o=wn();if(r){if(O(e)){const i=e.anchor,s=i.getNode();i.type==="element"&&i.offset===0&&e.isCollapsed()&&!ut(s)&&Y().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&o!==null&&e.is(o)&&(r.removeAllRanges(),e.dirty=!0)}else if(n.pointerType==="touch"||n.pointerType==="pen"){const i=Bt(r,t._rootElement).anchorNode;(q(i)||ve(i))&&St(ei(o,r,t,n))}}if(Oe&&r!==null&&r.rangeCount===0){const i=t._rootElement;if(i!==null&&n.target===i){const s=n.clientY;let l=i.childNodes.length;for(let a=0;a<i.childNodes.length;a++){const u=i.childNodes[a];if(q(u)){const f=u.getBoundingClientRect();if(s<=(f.top+f.bottom)/2){l=a;break}}}r.setBaseAndExtent(i,l,i,l);const c=ei(o,r,t,n);c!==null?St(c):r.removeAllRanges()}}R(t,af,n)})}function Jg(n,t){const e=Sd(n),r=n.pointerType;pr(e)&&r!=="touch"&&r!=="pen"&&n.button===0&&te(t,()=>{gi(e,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}function Tf(n){if(!n.getTargetRanges)return null;const t=n.getTargetRanges();return t.length===0?null:t[0]}function kc(n){const{lastKeyCode:t}=G()._inputState;if(n==null||n.length<=1||t==null)return;const e=t.length===1?t:t==="Enter"?`
|
|
4
4
|
`:t==="Tab"?" ":null;if(!e)return;const r=A();if(!O(r)||!r.isCollapsed())return;const o=r.anchor.getNode();if(!M(o))return;const{offset:i}=r.anchor;if(o.getTextContentSize()===i){const s=o.getNextSibling();if(e===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,t as o,p as r,b as l,C as d}from"./index-
|
|
1
|
+
import{j as e,t as o,p as r,b as l,C as d}from"./index-B4TIVWAq.js";function c({member:a,onOpen:i}){const t=o(a),n=r(a);return e.jsxs("button",{type:"button",onClick:i,"data-slot":"profile-managed-row",className:"focus-ring hover:bg-muted/50 flex h-11 w-full items-center gap-2.5 rounded-md px-2 text-left transition-colors",children:[e.jsx(l,{size:"sm",kind:t.kind,color:t.color,emoji:t.emoji,imageUrl:t.imageUrl,fallback:t.fallback,origin:t.origin}),e.jsxs("span",{className:"flex min-w-0 flex-col",children:[e.jsx("span",{className:"truncate text-sm",children:a.displayName}),e.jsx("span",{className:"text-muted-foreground truncate text-xs",children:n.text})]}),e.jsx(d,{"aria-hidden":!0,className:"text-muted-foreground/70 ml-auto size-3.5 shrink-0"})]})}function x({member:a,roster:i,onPush:t}){const n=i.filter(s=>s.kind==="agent"&&s.ownerId===a.id);return n.length===0?e.jsxs("p",{className:"text-muted-foreground text-sm",children:[a.isSelf?"You manage":`${a.displayName} manages`," no agents yet."]}):e.jsx("div",{className:"flex flex-col",children:n.map(s=>e.jsx(c,{member:s,onOpen:()=>t({kind:"profile",memberId:s.id})},s.id))})}export{x as ManagesPage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var i_=Object.defineProperty;var s_=(r,e,t)=>e in r?i_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var jt=(r,e,t)=>s_(r,typeof e!="symbol"?e+"":e,t);import{r as Xc,j as Kc}from"./index-
|
|
1
|
+
var i_=Object.defineProperty;var s_=(r,e,t)=>e in r?i_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var jt=(r,e,t)=>s_(r,typeof e!="symbol"?e+"":e,t);import{r as Xc,j as Kc}from"./index-B4TIVWAq.js";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r,h as o}from"./index-B4TIVWAq.js";function a({member:e}){return r.jsx(o,{member:e})}export{a as NamePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,l as s}from"./index-
|
|
1
|
+
import{j as t,l as s}from"./index-B4TIVWAq.js";function o({member:i}){var e;const n=((e=i.agent)==null?void 0:e.manifestId)??null;return n===null?t.jsx("div",{className:"min-h-0 flex-1 px-4 py-3","data-slot":"profile-notifications",children:t.jsx("p",{className:"text-muted-foreground text-xs",children:"Notifications are kept per agent, and this profile is not one."})}):t.jsx("div",{className:"min-h-0 flex-1 px-2 py-2","data-slot":"profile-notifications",children:t.jsx(s,{lens:{agentId:n},emptyLabel:`${i.displayName} has not told you anything yet.`})})}export{o as NotificationsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as i,j as s,n as r,o as a}from"./index-B4TIVWAq.js";function d({member:t}){var n;const e=i((n=t.agent)==null?void 0:n.runtime),o=(e==null?void 0:e.supportsMcp)??!0;return s.jsxs("div",{className:"space-y-6",children:[o?null:s.jsx("p",{className:"text-muted-foreground text-sm",children:"This agent’s runtime can’t use DorkOS tools, so these settings don’t change anything for it."}),s.jsx(r,{scope:{kind:"agent",agentId:t.id}}),s.jsxs("section",{className:"space-y-2",children:[s.jsx("h3",{className:"text-sm font-semibold",children:"History"}),s.jsx(a,{agentId:t.id})]})]})}export{d as PermissionsPage};
|
package/dist/client/assets/{PersonalityPopover-Dej6dI7y.js → PersonalityPopover-BN1CFq8D.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o,j as t,a as i,z as u}from"./index-
|
|
1
|
+
import{u as o,j as t,a as i,z as u}from"./index-B4TIVWAq.js";import{u as l}from"./use-personality-commit-vpAu5T8A.js";import"./soul-file-tc6-HkDy.js";function f({member:r}){const{agent:e,isPending:a,update:n}=o(r),s=l(e,n);return a?t.jsx(i,{className:"h-40 w-full"}):e?t.jsx(u,{traits:s.traits,onTraitsChange:s.onTraitsChange,compact:!0,className:"p-1"}):t.jsx("p",{className:"text-muted-foreground p-1 text-sm",children:"Couldn’t read this agent’s personality."})}export{f as PersonalityPopover};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,k as r}from"./index-B4TIVWAq.js";function i({member:o}){return t.jsx(r,{member:o})}export{i as PhotoPage};
|