@inkeep/open-knowledge 0.88.12-beta.0 → 0.88.12

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.
Files changed (138) hide show
  1. package/dist/{cli-CHOXNBzz.mjs → cli-CfWjK1ym.mjs} +57 -57
  2. package/dist/cli.mjs +1 -1
  3. package/dist/config-schema.json +0 -25
  4. package/dist/config.user.schema.json +0 -25
  5. package/dist/constants-mS0PdPwD.mjs +1 -0
  6. package/dist/dist-By4Q8HCV.mjs +2227 -0
  7. package/dist/dist-Ttulen40.mjs +1 -0
  8. package/dist/index.d.mts +0 -3
  9. package/dist/index.mjs +245 -343
  10. package/dist/{init-D7ht1hAb.mjs → init-BSw-61hy.mjs} +8 -8
  11. package/dist/init-DJaf3PYS.mjs +1 -0
  12. package/dist/{launch-json-removal-FsYm5bTy.mjs → launch-json-removal-BK6LlndC.mjs} +1 -1
  13. package/dist/{loader-txqXuZkh.mjs → loader-By5YZXpa.mjs} +1 -1
  14. package/dist/loader-DElTEkt_.mjs +1 -0
  15. package/dist/{lzma-Ciwelb1t.mjs → lzma-B6QS2aZK.mjs} +2 -2
  16. package/dist/{md-manager-BGnqyqi1-DCCfgLfC.mjs → md-manager-BGnqyqi1-B5Gyjk_N.mjs} +143 -142
  17. package/dist/{open-browser-Bb2-wy79.mjs → open-browser-kL892VYi.mjs} +1 -1
  18. package/dist/parse-worker.mjs +1 -1
  19. package/dist/{preview-Dpv-rYA5.mjs → preview-BD_1OoUq.mjs} +1 -1
  20. package/dist/preview-BJYi7yUi.mjs +1 -0
  21. package/dist/public/assets/{AccountSection-Duudie77.js → AccountSection-B8ISmC61.js} +1 -1
  22. package/dist/public/assets/{ActivityModeContent-BFhSaloX.js → ActivityModeContent-Da8d4Pw_.js} +1 -1
  23. package/dist/public/assets/{AddPropertiesButton-GAQfaIq7.js → AddPropertiesButton-GHwogTgD.js} +1 -1
  24. package/dist/public/assets/{AgentConnectionsSection-DYtfZ4WI.js → AgentConnectionsSection-C4coYzmt.js} +1 -1
  25. package/dist/public/assets/{AgentDiffPane-BnXkJkLz.js → AgentDiffPane-D_NqZYXa.js} +1 -1
  26. package/dist/public/assets/{AgentIconCluster-B9rTFji5.js → AgentIconCluster-6RCoigPZ.js} +1 -1
  27. package/dist/public/assets/AppMenubar-DZbYKPxT.js +1 -0
  28. package/dist/public/assets/{AttachmentsSection-H2HNwBzb.js → AttachmentsSection-CBUQjLvV.js} +1 -1
  29. package/dist/public/assets/{CodeMirrorPropInput-o8i3gLwL.js → CodeMirrorPropInput-CPRRmBkJ.js} +1 -1
  30. package/dist/public/assets/{ContentRulesSection-a1UGdVsB.js → ContentRulesSection-CmZHvXvb.js} +1 -1
  31. package/dist/public/assets/{DocumentContext-DqUuPSJl.js → DocumentContext-BKoh5zZq.js} +1 -1
  32. package/dist/public/assets/{EditorModeToggle-Cxfu8vc1.js → EditorModeToggle-BWiwJofe.js} +1 -1
  33. package/dist/public/assets/{ExcalidrawDocEditor-BSFJkNBJ.js → ExcalidrawDocEditor-D4r0IaYE.js} +1 -1
  34. package/dist/public/assets/FeedbackForm-Dn_eq77_.js +1 -0
  35. package/dist/public/assets/{GraphPanel-HRPYLSN9.js → GraphPanel-DBwMPvu9.js} +1 -1
  36. package/dist/public/assets/{ImportSkillDialog-Bmn1unrq.js → ImportSkillDialog-CCuiGAWL.js} +1 -1
  37. package/dist/public/assets/{LinkPreviewsSection-DrHVesDA.js → LinkPreviewsSection-BpSTXHQd.js} +1 -1
  38. package/dist/public/assets/{LintConfigEditor-CH0JB3FB.js → LintConfigEditor-C8Zrekgq.js} +1 -1
  39. package/dist/public/assets/{LintingSection-CnZdwesC.js → LintingSection-Czqug2mL.js} +1 -1
  40. package/dist/public/assets/{ManagedArtifactProperties-BPI-_chz.js → ManagedArtifactProperties-BQZJIbCZ.js} +1 -1
  41. package/dist/public/assets/ManagedArtifactProperties-DzEOvtda.js +1 -0
  42. package/dist/public/assets/{MermaidDocEditor-BpxupGz-.js → MermaidDocEditor-1Vww-7BG.js} +1 -1
  43. package/dist/public/assets/{NetworkAccessSection-D-Rln6zh.js → NetworkAccessSection-B9Nt3yhN.js} +1 -1
  44. package/dist/public/assets/{OpenInAgentMenuItem-N6xIhi4p.js → OpenInAgentMenuItem-D0YuEr4G.js} +1 -1
  45. package/dist/public/assets/{ProjectTemplatesSection-CjX7q09w.js → ProjectTemplatesSection-BGHJfURv.js} +1 -1
  46. package/dist/public/assets/{PropertyDisplayRow-Kh_HFzCs.js → PropertyDisplayRow-Dd4PTg43.js} +1 -1
  47. package/dist/public/assets/{PublishToGitHubDialog-DSLDhsry.js → PublishToGitHubDialog-D-mMG2oj.js} +1 -1
  48. package/dist/public/assets/{SchemaConfigEditor-ksF-0806.js → SchemaConfigEditor-C4TB3Onn.js} +1 -1
  49. package/dist/public/assets/{SearchSection-B0BR_xQy.js → SearchSection-DtepUbSd.js} +1 -1
  50. package/dist/public/assets/{SessionsHost-CWOp3w3X.js → SessionsHost-D9WJzh7y.js} +2 -2
  51. package/dist/public/assets/{SettingsDialogBody-BS4WQcpY.js → SettingsDialogBody-CHzfbT0j.js} +2 -2
  52. package/dist/public/assets/{ShareReceiveMissDialog-DGv07ytG.js → ShareReceiveMissDialog-klM8X0JD.js} +1 -1
  53. package/dist/public/assets/{SkillInstallMenu-CpsFAIPJ.js → SkillInstallMenu-B45UDmOd.js} +1 -1
  54. package/dist/public/assets/{SkillPluginBundleDialog-CingGivw.js → SkillPluginBundleDialog-26H_hV9A.js} +1 -1
  55. package/dist/public/assets/{SkillToolbarControls-USvBm9UK.js → SkillToolbarControls-CDG-Ns7O.js} +1 -1
  56. package/dist/public/assets/{SkillsManagerSection-1FLLRX0x.js → SkillsManagerSection-BMAj32UM.js} +1 -1
  57. package/dist/public/assets/{SourceEditor-BgFJdC3x.js → SourceEditor-CN1q4kL6.js} +1 -1
  58. package/dist/public/assets/{SpellingSettings-CDk5F0uz.js → SpellingSettings-BnekUXi0.js} +1 -1
  59. package/dist/public/assets/{SyncSection-_5olS0th.js → SyncSection-DHbLCTly.js} +1 -1
  60. package/dist/public/assets/{SyncStatusBadge-Ba3iUAco.js → SyncStatusBadge-C-SximYs.js} +1 -1
  61. package/dist/public/assets/{TemplateRow-Cs_8LNHD.js → TemplateRow-CHung0e5.js} +1 -1
  62. package/dist/public/assets/{TerminalLaunchContext-BiKZKemG.js → TerminalLaunchContext-B-4BsXHi.js} +1 -1
  63. package/dist/public/assets/{TerminalPanel-BZDwVc-Y.js → TerminalPanel-DEeIEH1K.js} +1 -1
  64. package/dist/public/assets/{TerminalSection-EfwpofBq.js → TerminalSection-CYLWKi_8.js} +1 -1
  65. package/dist/public/assets/{TerminalWindowApp-CYc01P_j.js → TerminalWindowApp-D4BpK4rs.js} +1 -1
  66. package/dist/public/assets/{TextDocEditor-DXAWUTX-.js → TextDocEditor-BmvFCTwu.js} +1 -1
  67. package/dist/public/assets/{ThemePluginSection-DSJaRBB-.js → ThemePluginSection-htJshVsF.js} +1 -1
  68. package/dist/public/assets/{ThreadView-C5yxNlst.js → ThreadView-0O42FKbZ.js} +1 -1
  69. package/dist/public/assets/{TimelineDiffPane-DlmD2E-E.js → TimelineDiffPane-BpWLh_76.js} +1 -1
  70. package/dist/public/assets/{agent-connections-DofjYVxj.js → agent-connections-3h0-CznI.js} +1 -1
  71. package/dist/public/assets/{client-version-Bf2iRqGU.js → client-version-CfYIPv8m.js} +1 -1
  72. package/dist/public/assets/{comment-chips-DnVeee4D.js → comment-chips-Dp42V9cR.js} +1 -1
  73. package/dist/public/assets/config-provider-DX7dmJxA.js +4 -0
  74. package/dist/public/assets/config-schema-BFeDYLCd.js +1 -0
  75. package/dist/public/assets/context-menu-D6QSuT0b.js +1 -0
  76. package/dist/public/assets/{doc-undo-manager-B4DcQrQB.js → doc-undo-manager-B7LFEuAG.js} +1 -1
  77. package/dist/public/assets/dropdown-menu-5XqyQTVx.js +1 -0
  78. package/dist/public/assets/field-controls-lq4qcuvr.js +1 -0
  79. package/dist/public/assets/{field-controls-pq-AYiCQ.js → field-controls-uK27_e3u.js} +1 -1
  80. package/dist/public/assets/globals-LvHcnSk0.css +1 -0
  81. package/dist/public/assets/{index-7PTB0URg.js → index-Bl4Bu-9G.js} +107 -107
  82. package/dist/public/assets/{lint-config-client-CZ22hfd5.js → lint-config-client-D7WzQSDg.js} +1 -1
  83. package/dist/public/assets/{lint-plugins-Cf5g-Z--.js → lint-plugins-CTVrugZN.js} +1 -1
  84. package/dist/public/assets/{markdown-lint-D13AGXjm.js → markdown-lint-DwFRnZJ_.js} +2 -2
  85. package/dist/public/assets/{markdownlint-rule-browser-BIpAh6PU.js → markdownlint-rule-browser-DBy2EH_P.js} +1 -1
  86. package/dist/public/assets/{pending-receive-nav-store-CrBdBGbd.js → pending-receive-nav-store-Bar3sGpE.js} +1 -1
  87. package/dist/public/assets/{preferred-session-events-CVoAUx8-.js → preferred-session-events-BwbAHIwl.js} +1 -1
  88. package/dist/public/assets/{progress-C1W-tvDC.js → progress-vp8dAYq8.js} +1 -1
  89. package/dist/public/assets/saved-themes-client-DX5dCXi5.js +1 -0
  90. package/dist/public/assets/{schema-section-Bn1HnUE0.js → schema-section-Cp00yQR2.js} +1 -1
  91. package/dist/public/assets/{select-BsDvTs6I.js → select-Bx_fIuqY.js} +1 -1
  92. package/dist/public/assets/{selection-context-CEEtGLdd.js → selection-context-BkNNdwZo.js} +1 -1
  93. package/dist/public/assets/{src-BjC5FSTO.js → src-DpR2KWk7.js} +1 -1
  94. package/dist/public/assets/{tabs-C958Luf9.js → tabs-BmABRF8o.js} +1 -1
  95. package/dist/public/assets/{tag-pill-input-DNcSO6rN.js → tag-pill-input-B6OegoPJ.js} +1 -1
  96. package/dist/public/assets/{telemetry-impl-Ccc0F1pQ.js → telemetry-impl-VcoKkyoe.js} +1 -1
  97. package/dist/public/assets/{telemetry-startup-BoeKP8Zc.js → telemetry-startup-Ct-Ggaf_.js} +1 -1
  98. package/dist/public/assets/toggle-group-B7p69Qfd.js +1 -0
  99. package/dist/public/assets/{typing-burst-detector-Br5ssjBk.js → typing-burst-detector-CfcUMy65.js} +1 -1
  100. package/dist/public/assets/{uninstall-SVMQWWzy.js → uninstall-BRba0hi_.js} +1 -1
  101. package/dist/public/assets/{use-activity-panel-C0CGEm7W.js → use-activity-panel-BICf-aDx.js} +1 -1
  102. package/dist/public/assets/{use-open-skill-Br25_0Zs.js → use-open-skill-CF2Tc73x.js} +1 -1
  103. package/dist/public/assets/{use-terminal-enabled-B5u6V0Yi.js → use-terminal-enabled-NNs5m9F6.js} +1 -1
  104. package/dist/public/assets/{use-timeline-entry-diff-C3GRFvG6.js → use-timeline-entry-diff-CTTA8NII.js} +1 -1
  105. package/dist/public/index.html +35 -35
  106. package/dist/public/uninstall.html +3 -3
  107. package/dist/{registry-probes-D3TQ7oxm.mjs → registry-probes-B_znYoKV.mjs} +2 -2
  108. package/dist/{removal-file-path-C743cSZA.mjs → removal-file-path-SJD59h2s.mjs} +1 -1
  109. package/dist/{repair-launch-json-C_3EMufn.mjs → repair-launch-json-strY7zZu.mjs} +1 -1
  110. package/dist/{repair-mcp-configs-B0FADin9.mjs → repair-mcp-configs-DI0oY4QB.mjs} +1 -1
  111. package/dist/schemas/v0/config.user.schema.json +0 -25
  112. package/dist/src-3BiP_zs6.mjs +16 -0
  113. package/dist/src-DGiVUSy2.mjs +1 -0
  114. package/dist/start-Bjt8sGOE.mjs +1 -0
  115. package/dist/{start-B0AH-f5N.mjs → start-CrxINPHY.mjs} +3 -3
  116. package/dist/{tar-MZQD7NO4-D-JBnhvQ.mjs → tar-MZQD7NO4-ljX84Spn.mjs} +2 -2
  117. package/package.json +4 -4
  118. package/dist/constants-DyVp9M0Z.mjs +0 -1
  119. package/dist/dist-BSNy29T3.mjs +0 -2326
  120. package/dist/dist-Bfg_JABr.mjs +0 -1
  121. package/dist/init-DwPDs2bS.mjs +0 -1
  122. package/dist/loader-Btt-HfCX.mjs +0 -1
  123. package/dist/preview-uebUIBVB.mjs +0 -1
  124. package/dist/public/assets/AppMenubar-DTwFx6E3.js +0 -1
  125. package/dist/public/assets/FeedbackForm-OQoJz7rc.js +0 -1
  126. package/dist/public/assets/ManagedArtifactProperties-DiuSEg5U.js +0 -1
  127. package/dist/public/assets/config-provider-f9PDyLDl.js +0 -4
  128. package/dist/public/assets/config-schema-DM88r6Wp.js +0 -1
  129. package/dist/public/assets/context-menu-DFxnhV9i.js +0 -1
  130. package/dist/public/assets/dropdown-menu-DH6UNmuX.js +0 -1
  131. package/dist/public/assets/field-controls-C_LUFJDr.js +0 -1
  132. package/dist/public/assets/globals-m_KFV1Tp.css +0 -1
  133. package/dist/public/assets/saved-themes-client-B4QZmuf_.js +0 -1
  134. package/dist/public/assets/toggle-group-aEGkM0EG.js +0 -1
  135. package/dist/src-5bKhSF8L.mjs +0 -1
  136. package/dist/src-Cn5ytgj-.mjs +0 -16
  137. package/dist/start-COZO7HSH.mjs +0 -1
  138. /package/dist/public/assets/{globals-B0TGTCQa.js → globals-C_rdkif1.js} +0 -0
@@ -1 +0,0 @@
1
- import{Cc as e,Et as t,Ot as n,Pc as r,S as i,X as a,_c as o,no as s,v as c}from"./md-manager-BGnqyqi1-DCCfgLfC.mjs";import{$ as l,$a as u,$i as d,$n as f,$r as p,$t as m,A as h,Aa as g,Ai as _,An as v,Ao as y,Ar as b,At as x,B as S,Ba as C,Bi as w,Bn as T,Bo as E,Br as D,Bt as O,C as k,Ca as A,Ci as j,Cn as M,Co as N,Cr as P,Cs as F,Ct as I,D as L,Da as R,Di as z,Dn as B,Do as V,Dr as H,Dt as U,E as W,Ea as G,Ei as K,En as q,Eo as J,Er as Y,Et as X,F as Z,Fa as Q,Fi as $,Fn as ee,Fo as te,Fr as ne,Ft as re,G as ie,Ga as ae,Gi as oe,Gn as se,Go as ce,Gr as le,Gs as ue,Gt as de,H as fe,Ha as pe,Hi as me,Hn as he,Ho as ge,Hr as _e,Ht as ve,I as ye,Ia as be,Ii as xe,In as Se,Io as Ce,Ir as we,It as Te,J as Ee,Ja as De,Ji as Oe,Jn as ke,Jo as Ae,Jr as je,Jt as Me,K as Ne,Ka as Pe,Ki as Fe,Kn as Ie,Ko as Le,Kr as Re,Ks as ze,Kt as Be,L as Ve,La as He,Li as Ue,Ln as We,Lo as Ge,Lr as Ke,Lt as qe,M as Je,Ma as Ye,Mi as Xe,Mn as Ze,Mo as Qe,Mr as $e,Mt as et,N as tt,Na as nt,Ni as rt,Nn as it,No as at,Nr as ot,Nt as st,O as ct,Oa as lt,Oi as ut,On as dt,Oo as ft,Or as pt,Ot as mt,P as ht,Pa as gt,Pi as _t,Pn as vt,Po as yt,Pr as bt,Pt as xt,Q as St,Qa as Ct,Qi as wt,Qn as Tt,Qr as Et,Qt as Dt,R as Ot,Ra as kt,Ri as At,Rn as jt,Ro as Mt,Rr as Nt,Rt as Pt,S as Ft,Sa as It,Si as Lt,Sn as Rt,So as zt,Sr as Bt,Ss as Vt,St as Ht,T as Ut,Ta as Wt,Ti as Gt,Tn as Kt,To as qt,Tr as Jt,Tt as Yt,U as Xt,Ua as Zt,Ui as Qt,Un as $t,Uo as en,Ur as tn,Us as nn,Ut as rn,V as an,Va as on,Vi as sn,Vn as cn,Vo as ln,Vr as un,Vt as dn,W as fn,Wa as pn,Wi as mn,Wn as hn,Wo as gn,Wr as _n,Ws as vn,Wt as yn,X as bn,Xa as xn,Xi as Sn,Xn as Cn,Xr as wn,Xt as Tn,Y as En,Ya as Dn,Yi as On,Yn as kn,Yo as An,Yr as jn,Yt as Mn,Z as Nn,Za as Pn,Zi as Fn,Zn as In,Zr as Ln,Zt as Rn,_ as zn,_a as Bn,_i as Vn,_n as Hn,_o as Un,_r as Wn,_s as Gn,_t as Kn,a as qn,aa as Jn,ai as Yn,an as Xn,ao as Zn,ar as Qn,at as $n,b as er,ba as tr,bi as nr,bn as rr,bo as ir,br as ar,bs as or,bt as sr,c as cr,ca as lr,ci as ur,cn as dr,co as fr,cr as pr,ct as mr,d as hr,da as gr,di as _r,dn as vr,do as yr,dr as br,ds as xr,dt as Sr,ea as Cr,ei as wr,en as Tr,eo as Er,er as Dr,et as Or,f as kr,fa as Ar,fi as jr,fn as Mr,fo as Nr,fr as Pr,fs as Fr,ft as Ir,g as Lr,ga as Rr,gi as zr,gn as Br,go as Vr,gr as Hr,gs as Ur,gt as Wr,h as Gr,ha as Kr,hi as qr,hn as Jr,ho as Yr,hr as Xr,ht as Zr,i as Qr,ia as $r,ii as ei,in as ti,io as ni,ir as ri,it as ii,j as ai,ja as oi,ji as si,jn as ci,jo as li,jr as ui,jt as di,k as fi,ka as pi,ki as mi,kn as hi,ko as gi,kr as _i,kt as vi,l as yi,la as bi,li as xi,ln as Si,lo as Ci,lr as wi,lt as Ti,m as Ei,ma as Di,mi as Oi,mn as ki,mo as Ai,mr as ji,mt as Mi,n as Ni,na as Pi,ni as Fi,nn as Ii,no as Li,nr as Ri,nt as zi,o as Bi,oa as Vi,oi as Hi,on as Ui,oo as Wi,or as Gi,ot as Ki,p as qi,pa as Ji,pi as Yi,pn as Xi,po as Zi,pr as Qi,pt as $i,q as ea,qa as ta,qi as na,qn as ra,qo as ia,qr as aa,qt as oa,r as sa,ra as ca,ri as la,rn as ua,ro as da,rr as fa,rt as pa,s as ma,sa as ha,si as ga,sn as _a,so as va,sr as ya,st as ba,t as xa,ta as Sa,ti as Ca,tn as wa,to as Ta,tr as Ea,tt as Da,u as Oa,ua as ka,ui as Aa,un as ja,uo as Ma,ur as Na,ut as Pa,v as Fa,va as Ia,vi as La,vn as Ra,vo as za,vr as Ba,vs as Va,vt as Ha,w as Ua,wa as Wa,wi as Ga,wn as Ka,wo as qa,wr as Ja,ws as Ya,wt as Xa,x as Za,xa as Qa,xi as $a,xn as eo,xo as to,xr as no,xs as ro,xt as io,y as ao,ya as oo,yi as so,yn as co,yo as lo,yr as uo,ys as fo,yt as po,z as mo,za as ho,zi as go,zn as _o,zo as vo,zr as yo,zt as bo}from"./dist-BSNy29T3.mjs";import{f as xo,h as So,m as Co,n as wo,p as To,t as Eo}from"./fs-find-project-root-BYV07wjn.mjs";export{xa as AGENT_ID_MAX_LEN,Ni as AGENT_ID_RE,sa as AGENT_WRITE_ORIGIN,s as AUDIT_EMPTY_SCOPE_WARNING,Qr as AcpPermissionStore,qn as AcpRegistry,Bi as AcpThreadManager,ma as AgentFocusBroadcaster,cr as AgentPresenceBroadcaster,yi as AgentSessionCapacityError,Oa as AgentSessionManager,hr as AutoStartDisabledError,kr as BUNDLE_IDS,qi as BUNDLE_SCOPE,Ei as BUNDLE_SKILL_NAME,Gr as BacklinkIndex,Lr as CC1Broadcaster,e as CC1_CONTRACT_VERSION,zn as CONCURRENT_REPLACE_WINDOW_MS,Fa as CONFIG_FILENAME,ao as CONFLICT_MARKER_RE,er as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Za as ConfigSchema,Ft as ConflictAuthority,k as DEFAULT_CHECKPOINT_RETENTION,Ua as DEFAULT_EMBEDDINGS_DIMENSIONS,Ut as DEFAULT_PACK_ID,W as DocumentDurabilityState,L as DocumentDurabilityStateError,ct as EMBEDDINGS_API_KEY_ENV,fi as EPHEMERAL_PROJECT_DIR_PREFIX,h as ExposureConsentError,ai as FEATURED_AGENT_IDS,Je as FILE_SYSTEM_WRITER,tt as FILE_WATCHER_ORIGIN,ht as FileEmbeddingsBackend,Z as FilesystemRootProjectError,ye as GIT_PREFLIGHT_FAIL_SPAN_NAME,Ve as GIT_UPSTREAM_WRITER,xr as GitDirAccessError,Ot as GitNotAvailableError,mo as GitProbeTimeoutError,S as GitTooOldError,an as HOCUSPOCUS_AUTH_REJECTION_REASONS,fe as HocuspocusAuthRejection,Xt as HocuspocusAuthTokenSchema,fn as HomeProjectRootError,ie as INSTALLED_AGENTS_SCHEMES,Ne as JSON_SCHEMA_DIALECT_2020_12,ue as LINEAGE_EPOCH_KEY,ea as LIVE_DERIVED_INDEX_DEBOUNCE_MS,Ee as LOCK_FILE_ACCESS_REMEDY,En as MANAGED_RENAME_ORIGIN,bn as MAX_ACP_THREADS,Nn as MAX_AGENT_SESSIONS,St as MCP_CONNECTION_ID_HEADER,o as MCP_SERVER_NAME,l as MIN_EVICTABLE_IDLE_MS,Or as MIN_GIT_VERSION,Fr as MalformedGitPointerError,Da as McpLogger,zi as MissingOkConfigError,pa as OBSERVER_SYNC_ORIGIN,ii as OK_OKIGNORE_TEMPLATE,$n as ONBOARDING_BUNDLE_IDS,nn as ORPHAN_MODES,ze as PROTOCOL_VERSION,Ur as PinoLogger,Ki as ProcessLockCollisionError,ba as ProcessLockFileError,mr as ProjectGitInitError,Ti as ROLLBACK_ORIGIN,Pa as ROOT_GITIGNORE_TEMPLATE,Sr as RUNTIME_VERSION,Ir as SERVICE_WRITER,$i as SKILL_INSTALL_EVENTS_FILENAME,c as SKILL_STATE_TARGETS,Mi as STARTER_FOLDER_FRONTMATTER_FILENAME,Zr as STARTER_PACKS,Wr as STARTER_PACK_IDS,Kn as STATE_MANIFEST_FILENAME,Ha as STATE_SCHEMA_VERSION,po as SYMLINK_MERGE_MIN_GIT_LABEL,sr as SYMLINK_MERGE_MIN_GIT_VERSION,r as SYSTEM_DOC_NAME,io as SeedPrerequisiteError,Ht as SeedRootDirError,I as ServerAuthorityCollisionError,Xa as ServerAuthorityRegistryError,Yt as ServerLockCollisionError,X as SingleFileNotAFileError,U as SingleFileNotFoundError,mt as SingleFileNotMarkdownError,vi as SingleFileProjectOverrideError,x as StateManifestError,i as TEST_LOOP_CORE_MARKER,di as TEST_LOOP_SERVER_MARKER,et as TagIndex,st as USER_GLOBAL_BUNDLE_IDS,xt as UnsafeIncomingSymlinkError,re as __getShowAllWalkStatsForTesting,Te as __resetShowAllWalkStatsForTesting,qe as acpThreadStoreRoots,Pt as acpThreadsDir,bo as acquireProcessLock,O as acquireServerLock,dn as applyAgentMarkdownWrite,ve as applyExternalChange,rn as applySeed,yn as assertCheckoutSymlinksSafe,de as assertCompatibleStateManifest,Be as assertGitAvailable,oa as assertIncomingSymlinksSafe,Me as assertMergeNameResolvesTo,Mn as assertNeverDiskEvent,Tn as assertRepoCheckoutSymlinksSafe,Rn as assertSafeProjectRoot,Dt as assessLockHolder,m as attachAcpThreadSocket,Tr as attachCollabClientCounter,wa as attachIdleShutdown,Ii as auditScopeNotFoundTitle,ua as bindConflictAuthority,ti as bootServer,Xn as buildAndOpenSkill,Ui as buildConfigYmlContent,_a as buildExecResult,dr as buildIngressPolicy,Si as buildOkMcpStdioCommand,ja as buildSkillZip,vr as buildStarterFolderFrontmatterYaml,Mr as buildWipTree,Xi as bundleSkillMdPath,ki as canonicalProjectKey,Jr as canonicalizeForCompare,Br as classifyEvents,Hn as classifyFsPath,Ra as classifyLockHolder,co as clearAllEmbeddingsKeys,rr as coercePackId,eo as collectServerHostSnapshot,t as colorFromSeed,Rt as commitUpstreamImport,M as commitWip,Ka as commitWipFromTree,Kt as compareSemver,q as composeEffectiveLinterConfig,B as composeFrontmatterSchemasConfig,dt as containsConflictMarkers,hi as contentHash,v as contributorCount,ci as countShadowObjects,Ze as countStaleAgentWipRefs,it as countWipRefs,vt as createApiExtension,ee as createAssetServeMiddleware,Se as createCollaborationHost,We as createContentFilter,jt as createContentFilterAsync,_o as createEmbeddingsSecretStore,T as createEphemeralProjectDir,cn as createExternalChangeHandler,xo as createFileLogger,he as createLiveDerivedIndexExtension,$t as createMcpHttpHandler,hn as createOsProbe,se as createPersistenceExtension,Ie as createProbeFailureReporter,ra as createServer,ke as createServerObserverExtension,kn as createServerProbeResolver,Cn as createStreamingErrorWriter,Gn as createTestLogger,In as describeStoredEmbeddingsKey,Tt as detectClaudeDesktopPresence,f as detectGit,Dr as detectProjectShape,Ea as detectUserSkillHosts,Ri as discoverLockDirs,fa as discoverMarkdownlintConfig,ri as emitPreflightFailureSpan,Qn as encodeDocName,Gi as encodeFolderRoute,ya as encodeSkillRoute,pr as ensureProjectGit,wi as errorResponse,Na as evictStaleTrackerEntries,br as extractHeadings,Pr as extractOkBinaryPath,Qi as extractWikiLinksFromMarkdown,ji as fallbackPaths,Xr as findEnclosingGitRoot,Eo as findEnclosingProjectRoot,Hr as findNativeMarkdownlintFile,To as flushFileLogger,Wn as formatAuditBrokenLinkSuppressionLine,Ba as formatAuthRejectionWire,uo as formatContributorsFrom,ar as formatPackRationale,no as gcCheckpointRefs,Bt as getCurrentMcpLogger,P as getIngressContext,Ja as getLocalDir,Co as getLogFilePath,Va as getLogger,So as getLogsDir,Jt as getMachineId,Y as getMeter,H as getMetrics,pt as getTracer,_i as handleCollabSocketError,b as handleSpawnCursor,ui as hasForwardingHeaders,$e as hasGcLogLatch,n as iconFromClientName,ot as incrementCollabSocketFilteredError,bt as incrementServerObserverFire,ne as initContent,we as initShadowRepo,Ke as initTelemetry,Nt as initToleranceTelemetryWriter,yo as installJsonSchemaDialect,D as installPrettyZodErrors,fo as installTestLoggers,un as installUserSkill,_e as isAllowedApiOrigin,tn as isAllowedWorkspaceHostHeader,_n as isConfigDoc,le as isDefunctProcess,Re as isDocInConflict,aa as isFilesystemRoot,je as isHocuspocusAuthRejectionReason,jn as isHomeDir,wn as isHostAdmitted,Ln as isKnownPackId,Et as isLinkIndexExcludedDoc,p as isLockFromThisMachine,wr as isLockProcessRunning,Ca as isLoopbackAddress,Fi as isManagedArtifactDoc,la as isMintedThreadId,ei as isOriginAdmitted,vn as isOrphanMode,Yn as isPairedWriteOrigin,Hi as isPathWithinDir,ga as isPeerAdmitted,ur as isProcessAlive,wo as isProjectRoot,xi as isReservedForUserTree,Aa as isSelfWrite,_r as isSkillInstallReportEnvOptOut,jr as isSystemDoc,Yi as isToleranceTelemetryEnabled,Oi as isValidLockPid,qr as lastKnownHash,zr as listRescueCheckpoints,Vn as listStarterPacks,La as loadCustomAgents,so as loadPrincipal,nr as lockAdvertisesUi,$a as lockBaseUrl,Lt as lockFilePath,or as loggerFactory,j as loginShapedUserinfoUser,ro as logsCurrentPath,Vt as logsPreviousPath,Ga as machineIdFilePath,Gt as makeLazyEmbeddingsKeyStore,K as markServerLockDraining,z as missingOkConfigMessage,ut as mountMcpAndApi,mi as normalizeFsPath,_ as observeReadiness,si as packageVersionMajorMinor,Xe as parseAuthRejectionWire,rt as parseGitVersion,_t as parseHocuspocusAuthToken,$ as parseKeepaliveConnectionId,xe as parseProcessStartToken,Ue as pathToDocName,At as planSeed,go as prepareProjectLogsDir,w as prepareSingleFileOpen,sn as prepareSpawnProjectLogsDir,me as processCommand,Qt as processStartToken,mn as processUsage,oe as readAgentBrowserTools,Fe as readAllTargets,na as readBootStartedAtMs,Oe as readBundleDecision,On as readDeclaredGitHubHosts,Sn as readOriginCredentialHost,Fn as readOriginGitHubRepo,wt as readOwnNativeRules,d as readProcessLock,Cr as readProcessLockDetailed,Sa as readProcessStart,Pi as readProcessState,ca as readProjectHeadState,$r as readProjectLocalSemanticConfig,Jn as readServerLock,Vi as readServerPackageVersion,ha as readSkillInstallStateSnapshot,lr as readStateManifest,bi as readTargetRecordedAt,ka as readTargetVersion,gr as reconcile,Ar as recordContributor,Ji as recordSkillInstallEvent,Di as recordsLockOwner,Kr as redactShareSubprocessStderr,Rr as registerAllTools,Bn as registerNativeProcessStartReader,Ia as registerWrite,oo as releaseProcessLock,tr as releaseServerLock,Qa as removeLastKnownHash,It as removeLockIfUnchanged,A as removeProjectSkillGitignoreBlock,Wa as reportSkillInstall,Wt as resetMetrics,G as resolveAuditScope,R as resolveBuiltinSkillHosts,a as resolveBundleEnabled,lt as resolveBundledSkillDir,pi as resolveContentDir,g as resolveCursorBinaryDefault,oi as resolveCursorSpawnInvocation,Ye as resolveEffectiveLinterConfig,nt as resolveEmbeddingsCredential,gt as resolveGitHubAccountFromUrl,Q as resolveGitHubAuthHost,be as resolveLockDir,He as resolveNativeConfigForDoc,kt as resolveNativeMarkdownlintConfig,ho as resolvePack,C as resolvePackageVersion,on as resolveSkillInstallReportSettings,pe as resolveUiInfo,Zt as restoreContributors,pn as rewriteMarkdownLinksForDocumentRename,ae as rewriteWikiLinksForDocumentRename,Pe as runAuthReposSubprocess,ta as runAuthStatusSubprocess,De as runCloneSubprocess,Dn as runDeviceFlowSubprocess,xn as runWithMcpLogger,Pn as safeContentPath,Ct as safeSubdir,u as safetyCheckpoint,Er as sameGitHubLogin,Ta as sanitizeClientName,Li as saveInMemoryCheckpoint,da as saveVersion,ni as scanLockProcesses,Zn as seedBasenameIndex,Wi as seedEphemeralProjectDir,va as serializeError,fr as setActiveSpanAttributes,Ci as setupServerObservers,Ma as shadowGit,yr as shutdownTelemetry,F as spansCurrentPath,Ya as spansPreviousPath,Nr as spawnDetached,Zi as splitMarkdownBlocks,Ai as startWatcher,Yr as strategiesFor,Vr as streamedChunkOf,Un as streamingProblemEvent,za as swapContributors,lo as teardownToleranceTelemetryWriter,ir as toBroadcasterKey,to as toProcessLockMetadata,zt as tracedAppendFileSync,N as tracedLinkSync,qa as tracedMkdir,qt as tracedMkdirSync,J as tracedRename,V as tracedRenameSync,ft as tracedRmSync,gi as tracedRmdirSync,y as tracedUnlinkSync,li as tracedWriteFile,Qe as tracedWriteFileSync,at as trustSystemCertificates,yt as updateLastKnownHash,te as updateProcessLockPort,Ce as updateServerLockPort,Ge as validateAgentId,Mt as validateCloneInputs,vo as validateSkillZip,E as waitForServerLockDrain,ln as withHiddenWindowsConsole,ge as withSpan,en as withSpanSync,gn as writeBundleDecision,ce as writeMarkdownlintRule,Le as writeRootGitignoreForNewRepo,ia as writeStateManifest,Ae as writeTargetVersion,An as writeTracker};
@@ -1 +0,0 @@
1
- import"./dist-BSNy29T3.mjs";import{v as e}from"./init-D7ht1hAb.mjs";export{e as runInit};
@@ -1 +0,0 @@
1
- import{n as e}from"./loader-txqXuZkh.mjs";export{e as loadConfig};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./preview-Dpv-rYA5.mjs";export{t as formatPreviewBlock,e as previewContent};
@@ -1 +0,0 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{a as o}from"./dist-CSCUSbQc.js";import{c as s,i as c,l,n as u,o as d}from"./dist-DTFuvKje.js";import{n as f,t as ee}from"./dist-uiDX6Nr9.js";import{n as te,r as p,t as m}from"./dist-BKgU0kag.js";import{_ as h,a as ne,c as re,d as ie,f as ae,g as oe,h as se,i as ce,l as le,m as g,n as ue,o as _,p as de,r as v,s as fe,t as y,u as b}from"./dist-d2WYntJB.js";import{t as pe}from"./check-B2OLRY33.js";import{t as me}from"./chevron-right-Bofu4lib.js";import{t as he}from"./app-menubar-gate-CO6NcM5E.js";import{n as ge}from"./single-file-mode-DURp6aom.js";import{n as _e,r as ve,t as ye}from"./platform-labels-DDy1ouuX.js";var x=e(n(),1),S=t(),C=`Menubar`,[w,T,be]=f(C),[E,xe]=s(C,[be,p]),D=h(),O=p(),[Se,k]=E(C),Ce=x.forwardRef((e,t)=>{let{__scopeMenubar:n,value:r,onValueChange:i,defaultValue:a,loop:o=!0,dir:s,...u}=e,d=ee(s),f=O(n),[p,m]=c({prop:r,onChange:i,defaultProp:a??``,caller:C}),[h,ne]=x.useState(null);return(0,S.jsx)(Se,{scope:n,value:p,onMenuOpen:x.useCallback(e=>{m(e),ne(e)},[m]),onMenuClose:x.useCallback(()=>m(``),[m]),onMenuToggle:x.useCallback(e=>{m(t=>t?``:e),ne(e)},[m]),dir:d,loop:o,children:(0,S.jsx)(w.Provider,{scope:n,children:(0,S.jsx)(w.Slot,{scope:n,children:(0,S.jsx)(te,{asChild:!0,...f,orientation:`horizontal`,loop:o,dir:d,currentTabStopId:h,onCurrentTabStopIdChange:ne,children:(0,S.jsx)(l.div,{role:`menubar`,...u,ref:t})})})})})});Ce.displayName=C;var A=`MenubarMenu`,[we,j]=E(A),Te=e=>{let{__scopeMenubar:t,value:n,...r}=e,i=u(),a=n||i||`LEGACY_REACT_AUTO_VALUE`,o=k(A,t),s=D(t),c=x.useRef(null),l=x.useRef(!1),d=o.value===a;return x.useEffect(()=>{d||(l.current=!1)},[d]),(0,S.jsx)(we,{scope:t,value:a,triggerId:u(),triggerRef:c,contentId:u(),wasKeyboardTriggerOpenRef:l,children:(0,S.jsx)(ae,{...s,open:d,onOpenChange:e=>{e||o.onMenuClose()},modal:!1,dir:o.dir,...r})})};Te.displayName=A;var M=`MenubarTrigger`,N=x.forwardRef((e,t)=>{let{__scopeMenubar:n,disabled:r=!1,...i}=e,a=O(n),s=D(n),c=k(M,n),u=j(M,n),f=x.useRef(null),ee=o(t,f,u.triggerRef),[te,p]=x.useState(!1),h=c.value===u.value;return(0,S.jsx)(w.ItemSlot,{scope:n,value:u.value,disabled:r,children:(0,S.jsx)(m,{asChild:!0,...a,focusable:!r,tabStopId:u.value,children:(0,S.jsx)(y,{asChild:!0,...s,children:(0,S.jsx)(l.button,{type:`button`,role:`menuitem`,id:u.triggerId,"aria-haspopup":`menu`,"aria-expanded":h,"aria-controls":h?u.contentId:void 0,"data-highlighted":te?``:void 0,"data-state":h?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:ee,onPointerDown:d(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(c.onMenuOpen(u.value),h||e.preventDefault())}),onPointerEnter:d(e.onPointerEnter,()=>{c.value&&!h&&(c.onMenuOpen(u.value),f.current?.focus())}),onKeyDown:d(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&c.onMenuToggle(u.value),e.key===`ArrowDown`&&c.onMenuOpen(u.value),[`Enter`,` `,`ArrowDown`].includes(e.key)&&(u.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))}),onFocus:d(e.onFocus,()=>p(!0)),onBlur:d(e.onBlur,()=>p(!1))})})})})});N.displayName=M;var P=`MenubarPortal`,Ee=e=>{let{__scopeMenubar:t,...n}=e,r=D(t);return(0,S.jsx)(le,{...r,...n})};Ee.displayName=P;var F=`MenubarContent`,I=x.forwardRef((e,t)=>{let{__scopeMenubar:n,align:r=`start`,...i}=e,a=D(n),o=k(F,n),s=j(F,n),c=T(n),l=x.useRef(!1);return(0,S.jsx)(ce,{id:s.contentId,"aria-labelledby":s.triggerId,"data-radix-menubar-content":``,...a,...i,ref:t,align:r,onCloseAutoFocus:d(e.onCloseAutoFocus,e=>{!o.value&&!l.current&&s.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onFocusOutside:d(e.onFocusOutside,e=>{let t=e.target;c().some(e=>e.ref.current?.contains(t))&&e.preventDefault()}),onInteractOutside:d(e.onInteractOutside,()=>{l.current=!0}),onEntryFocus:e=>{s.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:d(e.onKeyDown,e=>{if([`ArrowRight`,`ArrowLeft`].includes(e.key)){let t=e.target,n=t.hasAttribute(`data-radix-menubar-subtrigger`),r=t.closest(`[data-radix-menubar-content]`)!==e.currentTarget,i=(o.dir===`rtl`?`ArrowRight`:`ArrowLeft`)===e.key;if(!i&&n||r&&i)return;let a=c().filter(e=>!e.disabled).map(e=>e.value);i&&a.reverse();let l=a.indexOf(s.value);a=o.loop?K(a,l+1):a.slice(l+1);let[u]=a;u&&o.onMenuOpen(u)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})});I.displayName=F;var De=`MenubarGroup`,Oe=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(ne,{...i,...r,ref:t})});Oe.displayName=De;var ke=`MenubarLabel`,L=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(re,{...i,...r,ref:t})});L.displayName=ke;var Ae=`MenubarItem`,R=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(_,{...i,...r,ref:t})});R.displayName=Ae;var je=`MenubarCheckboxItem`,Me=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(v,{...i,...r,ref:t})});Me.displayName=je;var z=`MenubarRadioGroup`,B=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(b,{...i,...r,ref:t})});B.displayName=z;var Ne=`MenubarRadioItem`,Pe=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(ie,{...i,...r,ref:t})});Pe.displayName=Ne;var Fe=`MenubarItemIndicator`,Ie=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(fe,{...i,...r,ref:t})});Ie.displayName=Fe;var V=`MenubarSeparator`,Le=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(de,{...i,...r,ref:t})});Le.displayName=V;var Re=`MenubarArrow`,ze=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(ue,{...i,...r,ref:t})});ze.displayName=Re;var Be=`MenubarSub`,H=e=>{let{__scopeMenubar:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=D(t),[s,l]=c({prop:r,defaultProp:a??!1,onChange:i,caller:Be});return(0,S.jsx)(g,{...o,open:s,onOpenChange:l,children:n})};H.displayName=Be;var U=`MenubarSubTrigger`,W=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(oe,{"data-radix-menubar-subtrigger":``,...i,...r,ref:t})});W.displayName=U;var G=`MenubarSubContent`,Ve=x.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=D(n);return(0,S.jsx)(se,{...i,"data-radix-menubar-content":``,...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})});Ve.displayName=G;function K(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var q=Ce,He=Te,J=N,Y=Ee,Ue=I,We=R,Ge=Me,Ke=Ie,qe=Le,Je=H,Ye=W,Xe=Ve,X=i();function Ze(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`flex h-8 items-center gap-0.5 rounded-lg border p-[3px]`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,S.jsx)(q,{"data-slot":`menubar`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function Qe(e){let t=(0,X.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,S.jsx)(He,{"data-slot":`menubar-menu`,...n}),t[2]=n,t[3]=r),r}function $e(e){let t=(0,X.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,S.jsx)(Y,{"data-slot":`menubar-portal`,...n}),t[2]=n,t[3]=r),r}function et(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-none focus-visible:outline-hidden select-none hover:bg-muted aria-expanded:bg-muted`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,S.jsx)(J,{"data-slot":`menubar-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function tt(e){let t=(0,X.c)(14),n,r,i,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4],s=t[5]):({className:n,align:i,alignOffset:o,sideOffset:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s);let c=i===void 0?`start`:i,l=o===void 0?-4:o,u=s===void 0?8:s,d;t[6]===n?d=t[7]:(d=a(`z-50 max-h-(--radix-menubar-content-available-height) min-w-36 origin-(--radix-menubar-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[state=closed]:overflow-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 subtle-scrollbar`,n),t[6]=n,t[7]=d);let f;return t[8]!==c||t[9]!==l||t[10]!==r||t[11]!==u||t[12]!==d?(f=(0,S.jsx)($e,{children:(0,S.jsx)(Ue,{"data-slot":`menubar-content`,align:c,alignOffset:l,sideOffset:u,className:d,collisionPadding:8,...r})}),t[8]=c,t[9]=l,t[10]=r,t[11]=u,t[12]=d,t[13]=f):f=t[13],f}function Z(e){let t=(0,X.c)(12),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({className:n,inset:r,variant:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s=o===void 0?`default`:o,c;t[5]===n?c=t[6]:(c=a(`group/menubar-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none focus-visible:outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!`,n),t[5]=n,t[6]=c);let l;return t[7]!==r||t[8]!==i||t[9]!==c||t[10]!==s?(l=(0,S.jsx)(We,{"data-slot":`menubar-item`,"data-inset":r,"data-variant":s,className:c,...i}),t[7]=r,t[8]=i,t[9]=c,t[10]=s,t[11]=l):l=t[11],l}function nt(e){let t=(0,X.c)(15),n,r,i,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4],s=t[5]):({className:i,children:r,checked:n,inset:o,...s}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s);let c;t[6]===i?c=t[7]:(c=a(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-none focus-visible:outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0`,i),t[6]=i,t[7]=c);let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,S.jsx)(`span`,{className:`pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4`,children:(0,S.jsx)(Ke,{children:(0,S.jsx)(pe,{})})}),t[8]=l):l=t[8];let u;return t[9]!==n||t[10]!==r||t[11]!==o||t[12]!==s||t[13]!==c?(u=(0,S.jsxs)(Ge,{"data-slot":`menubar-checkbox-item`,"data-inset":o,className:c,checked:n,...s,children:[l,r]}),t[9]=n,t[10]=r,t[11]=o,t[12]=s,t[13]=c,t[14]=u):u=t[14],u}function Q(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,S.jsx)(qe,{"data-slot":`menubar-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function $(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,S.jsx)(`span`,{"data-slot":`menubar-shortcut`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function rt(e){let t=(0,X.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,S.jsx)(Je,{"data-slot":`menubar-sub`,...n}),t[2]=n,t[3]=r),r}function it(e){let t=(0,X.c)(13),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({className:r,inset:i,children:n,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s;t[5]===r?s=t[6]:(s=a(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground focus-visible:outline-hidden data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,S.jsx)(me,{className:`ml-auto size-4`}),t[7]=c):c=t[7];let l;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==s?(l=(0,S.jsxs)(Ye,{"data-slot":`menubar-sub-trigger`,"data-inset":i,className:s,...o,children:[n,c]}),t[8]=n,t[9]=i,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}function at(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`z-50 max-h-(--radix-menubar-content-available-height) min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[state=closed]:overflow-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 subtle-scrollbar`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,S.jsx)(Xe,{"data-slot":`menubar-sub-content`,className:i,collisionPadding:8,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function ot(e){let t=(0,X.c)(412),{className:n}=e,{_:i}=r(),o=typeof window<`u`?window.okDesktop??null:null,[s,c]=(0,x.useState)(null),l=ge();if(!he()||o==null||o.menu==null)return null;let u=o.menu,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>{u.dispatch(e).catch(st)},t[0]=d):d=t[0];let f=d,ee;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(ee=()=>{u.dispatch({kind:`query`}).then(e=>c(e??null)).catch(()=>c(null))},t[1]=ee):ee=t[1];let te=ee,p=s?.activeTarget.kind??null,m=s?.viewMenuState,h;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=ve(o.platform),t[2]=h):h=t[2];let ne=h,re;t[3]===n?re=t[4]:(re=a(`h-auto rounded-none border-0 bg-transparent p-0 shadow-none [-webkit-app-region:no-drag]`,n),t[3]=n,t[4]=re);let ie;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(ie=e=>{e&&te()},t[5]=ie):ie=t[5];let ae;t[6]===i?ae=t[7]:(ae=i({id:`J2eKUI`}),t[6]=i,t[7]=ae);let oe;t[8]===ae?oe=t[9]:(oe=(0,S.jsx)(et,{className:`px-2 py-1 text-xs font-normal`,children:ae}),t[8]=ae,t[9]=oe);let se;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(se=()=>f({kind:`menu-action`,action:`new-doc`}),t[10]=se):se=t[10];let ce;t[11]===i?ce=t[12]:(ce=i({id:`HdkSiO`}),t[11]=i,t[12]=ce);let le;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,S.jsx)($,{children:`Ctrl+N`}),t[13]=le):le=t[13];let g;t[14]===ce?g=t[15]:(g=(0,S.jsxs)(Z,{onSelect:se,children:[ce,le]}),t[14]=ce,t[15]=g);let ue;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ue=()=>f({kind:`menu-action`,action:`new-folder`}),t[16]=ue):ue=t[16];let _;t[17]===i?_=t[18]:(_=i({id:`96G6Re`}),t[17]=i,t[18]=_);let de;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,S.jsx)($,{children:`Ctrl+Shift+N`}),t[19]=de):de=t[19];let v;t[20]===_?v=t[21]:(v=(0,S.jsxs)(Z,{onSelect:ue,children:[_,de]}),t[20]=_,t[21]=v);let fe;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(fe=()=>f({kind:`menu-action`,action:`new-from-template`}),t[22]=fe):fe=t[22];let y;t[23]===i?y=t[24]:(y=i({id:`ioMn4Z`}),t[23]=i,t[24]=y);let b;t[25]===y?b=t[26]:(b=(0,S.jsx)(Z,{onSelect:fe,children:y}),t[25]=y,t[26]=b);let pe;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,S.jsx)(Q,{}),t[27]=pe):pe=t[27];let me;t[28]===i?me=t[29]:(me=i({id:`ten9en`}),t[28]=i,t[29]=me);let C;t[30]===me?C=t[31]:(C=(0,S.jsx)(it,{children:me}),t[30]=me,t[31]=C);let w;t[32]!==i||t[33]!==s?(w=(0,S.jsx)(at,{children:s==null||s.recentProjects.length===0?(0,S.jsx)(Z,{disabled:!0,children:i({id:`SvBFYA`})}):(0,S.jsxs)(S.Fragment,{children:[s.recentProjects.slice(0,10).map(e=>(0,S.jsx)(Z,{onSelect:()=>f({kind:`open-recent-project`,path:e.path}),children:e.name},e.path)),(0,S.jsx)(Q,{}),(0,S.jsx)(Z,{onSelect:()=>f({kind:`command`,command:`clear-recent-projects`}),children:i({id:`ak4LLg`})})]})}),t[32]=i,t[33]=s,t[34]=w):w=t[34];let T;t[35]!==C||t[36]!==w?(T=(0,S.jsxs)(rt,{children:[C,w]}),t[35]=C,t[36]=w,t[37]=T):T=t[37];let be;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(be=()=>f({kind:`menu-action`,action:`new-project`}),t[38]=be):be=t[38];let E;t[39]===i?E=t[40]:(E=i({id:`NYu2Pt`}),t[39]=i,t[40]=E);let xe;t[41]===E?xe=t[42]:(xe=(0,S.jsx)(Z,{onSelect:be,children:E}),t[41]=E,t[42]=xe);let D;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>f({kind:`command`,command:`open-navigator`}),t[43]=D):D=t[43];let O;t[44]===i?O=t[45]:(O=i({id:`vYPvPB`}),t[44]=i,t[45]=O);let Se;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,S.jsx)($,{children:`Ctrl+Shift+P`}),t[46]=Se):Se=t[46];let k;t[47]===O?k=t[48]:(k=(0,S.jsxs)(Z,{onSelect:D,children:[O,Se]}),t[47]=O,t[48]=k);let Ce;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=()=>f({kind:`command`,command:`open-folder-dialog`}),t[49]=Ce):Ce=t[49];let A;t[50]===i?A=t[51]:(A=i({id:`FDBwmS`}),t[50]=i,t[51]=A);let we;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,S.jsx)($,{children:`Ctrl+O`}),t[52]=we):we=t[52];let j;t[53]===A?j=t[54]:(j=(0,S.jsxs)(Z,{onSelect:Ce,children:[A,we]}),t[53]=A,t[54]=j);let Te;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,S.jsx)(Q,{}),t[55]=Te):Te=t[55];let M;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>f({kind:`menu-action`,action:`new-worktree`}),t[56]=M):M=t[56];let N;t[57]===i?N=t[58]:(N=i({id:`TTDXD8`}),t[57]=i,t[58]=N);let P;t[59]===N?P=t[60]:(P=(0,S.jsx)(Z,{onSelect:M,children:N}),t[59]=N,t[60]=P);let Ee;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=()=>f({kind:`menu-action`,action:`switch-worktree`}),t[61]=Ee):Ee=t[61];let F;t[62]===i?F=t[63]:(F=i({id:`mxGJVE`}),t[62]=i,t[63]=F);let I;t[64]===F?I=t[65]:(I=(0,S.jsx)(Z,{onSelect:Ee,children:F}),t[64]=F,t[65]=I);let De;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,S.jsx)(Q,{}),t[66]=De):De=t[66];let Oe=p!==`doc`&&p!==`folder`,ke;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(ke=()=>f({kind:`menu-action`,action:`duplicate`}),t[67]=ke):ke=t[67];let L;t[68]===i?L=t[69]:(L=i({id:`euc6Ns`}),t[68]=i,t[69]=L);let Ae;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,S.jsx)($,{children:`Ctrl+D`}),t[70]=Ae):Ae=t[70];let R;t[71]!==Oe||t[72]!==L?(R=(0,S.jsxs)(Z,{disabled:Oe,onSelect:ke,children:[L,Ae]}),t[71]=Oe,t[72]=L,t[73]=R):R=t[73];let je=p===null,Me;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(Me=()=>f({kind:`menu-action`,action:`rename`}),t[74]=Me):Me=t[74];let z;t[75]===i?z=t[76]:(z=i({id:`2wxgft`}),t[75]=i,t[76]=z);let B;t[77]!==je||t[78]!==z?(B=(0,S.jsx)(Z,{disabled:je,onSelect:Me,children:z}),t[77]=je,t[78]=z,t[79]=B):B=t[79];let Ne=p===null,Pe,Fe,Ie;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=()=>f({kind:`menu-action`,action:`move-to-trash`}),Fe=_e(o.platform),Ie=(0,S.jsx)($,{children:`Ctrl+Del`}),t[80]=Pe,t[81]=Fe,t[82]=Ie):(Pe=t[80],Fe=t[81],Ie=t[82]);let V;t[83]===Ne?V=t[84]:(V=(0,S.jsxs)(Z,{disabled:Ne,onSelect:Pe,children:[Fe,Ie]}),t[83]=Ne,t[84]=V);let Le;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,S.jsx)(Q,{}),t[85]=Le):Le=t[85];let Re;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,S.jsx)(Z,{onSelect:()=>f({kind:`menu-action`,action:`reveal-in-finder`}),children:ne}),t[86]=Re):Re=t[86];let ze=p===`asset`,Be;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(Be=()=>f({kind:`menu-action`,action:`send-to-ai`}),t[87]=Be):Be=t[87];let H;t[88]===i?H=t[89]:(H=i({id:`O7_W_a`}),t[88]=i,t[89]=H);let U;t[90]!==ze||t[91]!==H?(U=(0,S.jsx)(Z,{disabled:ze,onSelect:Be,children:H}),t[90]=ze,t[91]=H,t[92]=U):U=t[92];let W;t[93]===i?W=t[94]:(W=i({id:`oCZkaG`}),t[93]=i,t[94]=W);let G;t[95]===W?G=t[96]:(G=(0,S.jsx)(it,{children:W}),t[95]=W,t[96]=G);let Ve;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=()=>f({kind:`menu-action`,action:`copy-full-path`}),t[97]=Ve):Ve=t[97];let K;t[98]===i?K=t[99]:(K=i({id:`oQA-cA`}),t[98]=i,t[99]=K);let q;t[100]===K?q=t[101]:(q=(0,S.jsx)(Z,{onSelect:Ve,children:K}),t[100]=K,t[101]=q);let He;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(He=()=>f({kind:`menu-action`,action:`copy-relative-path`}),t[102]=He):He=t[102];let J;t[103]===i?J=t[104]:(J=i({id:`s061i4`}),t[103]=i,t[104]=J);let Y;t[105]===J?Y=t[106]:(Y=(0,S.jsx)(Z,{onSelect:He,children:J}),t[105]=J,t[106]=Y);let Ue;t[107]!==q||t[108]!==Y?(Ue=(0,S.jsxs)(at,{children:[q,Y]}),t[107]=q,t[108]=Y,t[109]=Ue):Ue=t[109];let We;t[110]!==G||t[111]!==Ue?(We=(0,S.jsxs)(rt,{children:[G,Ue]}),t[110]=G,t[111]=Ue,t[112]=We):We=t[112];let Ge;t[113]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,S.jsx)(Q,{}),t[113]=Ge):Ge=t[113];let Ke;t[114]!==i||t[115]!==s?.canReconfigureMcpWiring?(Ke=s?.canReconfigureMcpWiring===!0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Z,{onSelect:()=>f({kind:`command`,command:`reconfigure-mcp-wiring`}),children:i({id:`zBUqvf`})}),(0,S.jsx)(Q,{})]}),t[114]=i,t[115]=s?.canReconfigureMcpWiring,t[116]=Ke):Ke=t[116];let qe;t[117]===Symbol.for(`react.memo_cache_sentinel`)?(qe=()=>f({kind:`command`,command:`open-settings`}),t[117]=qe):qe=t[117];let Je;t[118]===i?Je=t[119]:(Je=i({id:`uVbUP8`}),t[118]=i,t[119]=Je);let Ye;t[120]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=(0,S.jsx)($,{children:`Ctrl+,`}),t[120]=Ye):Ye=t[120];let Xe;t[121]===Je?Xe=t[122]:(Xe=(0,S.jsxs)(Z,{onSelect:qe,children:[Je,Ye]}),t[121]=Je,t[122]=Xe);let $e;t[123]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,S.jsx)(Q,{}),t[123]=$e):$e=t[123];let ot;t[124]===Symbol.for(`react.memo_cache_sentinel`)?(ot=()=>f({kind:`role`,role:`quit`}),t[124]=ot):ot=t[124];let ct;t[125]===i?ct=t[126]:(ct=i({id:`ydzS9x`}),t[125]=i,t[126]=ct);let lt;t[127]===ct?lt=t[128]:(lt=(0,S.jsx)(Z,{onSelect:ot,children:ct}),t[127]=ct,t[128]=lt);let ut;t[129]!==g||t[130]!==v||t[131]!==b||t[132]!==T||t[133]!==xe||t[134]!==k||t[135]!==j||t[136]!==P||t[137]!==I||t[138]!==R||t[139]!==B||t[140]!==V||t[141]!==U||t[142]!==We||t[143]!==Ke||t[144]!==Xe||t[145]!==lt?(ut=(0,S.jsxs)(tt,{"data-bug-report-launcher":``,children:[g,v,b,pe,T,xe,k,j,Te,P,I,De,R,B,V,Le,Re,U,We,Ge,Ke,Xe,$e,lt]}),t[129]=g,t[130]=v,t[131]=b,t[132]=T,t[133]=xe,t[134]=k,t[135]=j,t[136]=P,t[137]=I,t[138]=R,t[139]=B,t[140]=V,t[141]=U,t[142]=We,t[143]=Ke,t[144]=Xe,t[145]=lt,t[146]=ut):ut=t[146];let dt;t[147]!==oe||t[148]!==ut?(dt=(0,S.jsxs)(Qe,{children:[oe,ut]}),t[147]=oe,t[148]=ut,t[149]=dt):dt=t[149];let ft;t[150]===i?ft=t[151]:(ft=i({id:`ePK91l`}),t[150]=i,t[151]=ft);let pt;t[152]===ft?pt=t[153]:(pt=(0,S.jsx)(et,{className:`px-2 py-1 text-xs font-normal`,children:ft}),t[152]=ft,t[153]=pt);let mt;t[154]===Symbol.for(`react.memo_cache_sentinel`)?(mt=()=>f({kind:`role`,role:`undo`}),t[154]=mt):mt=t[154];let ht;t[155]===i?ht=t[156]:(ht=i({id:`9uI_rE`}),t[155]=i,t[156]=ht);let gt;t[157]===Symbol.for(`react.memo_cache_sentinel`)?(gt=(0,S.jsx)($,{children:`Ctrl+Z`}),t[157]=gt):gt=t[157];let _t;t[158]===ht?_t=t[159]:(_t=(0,S.jsxs)(Z,{onSelect:mt,children:[ht,gt]}),t[158]=ht,t[159]=_t);let vt;t[160]===Symbol.for(`react.memo_cache_sentinel`)?(vt=()=>f({kind:`role`,role:`redo`}),t[160]=vt):vt=t[160];let yt;t[161]===i?yt=t[162]:(yt=i({id:`H3oH0g`}),t[161]=i,t[162]=yt);let bt;t[163]===Symbol.for(`react.memo_cache_sentinel`)?(bt=(0,S.jsx)($,{children:`Ctrl+Y`}),t[163]=bt):bt=t[163];let xt;t[164]===yt?xt=t[165]:(xt=(0,S.jsxs)(Z,{onSelect:vt,children:[yt,bt]}),t[164]=yt,t[165]=xt);let St;t[166]===Symbol.for(`react.memo_cache_sentinel`)?(St=(0,S.jsx)(Q,{}),t[166]=St):St=t[166];let Ct;t[167]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=()=>f({kind:`role`,role:`cut`}),t[167]=Ct):Ct=t[167];let wt;t[168]===i?wt=t[169]:(wt=i({id:`cCd8Bs`}),t[168]=i,t[169]=wt);let Tt;t[170]===Symbol.for(`react.memo_cache_sentinel`)?(Tt=(0,S.jsx)($,{children:`Ctrl+X`}),t[170]=Tt):Tt=t[170];let Et;t[171]===wt?Et=t[172]:(Et=(0,S.jsxs)(Z,{onSelect:Ct,children:[wt,Tt]}),t[171]=wt,t[172]=Et);let Dt;t[173]===Symbol.for(`react.memo_cache_sentinel`)?(Dt=()=>f({kind:`role`,role:`copy`}),t[173]=Dt):Dt=t[173];let Ot;t[174]===i?Ot=t[175]:(Ot=i({id:`he3ygx`}),t[174]=i,t[175]=Ot);let kt;t[176]===Symbol.for(`react.memo_cache_sentinel`)?(kt=(0,S.jsx)($,{children:`Ctrl+C`}),t[176]=kt):kt=t[176];let At;t[177]===Ot?At=t[178]:(At=(0,S.jsxs)(Z,{onSelect:Dt,children:[Ot,kt]}),t[177]=Ot,t[178]=At);let jt;t[179]===Symbol.for(`react.memo_cache_sentinel`)?(jt=()=>f({kind:`role`,role:`paste`}),t[179]=jt):jt=t[179];let Mt;t[180]===i?Mt=t[181]:(Mt=i({id:`HzVv6g`}),t[180]=i,t[181]=Mt);let Nt;t[182]===Symbol.for(`react.memo_cache_sentinel`)?(Nt=(0,S.jsx)($,{children:`Ctrl+V`}),t[182]=Nt):Nt=t[182];let Pt;t[183]===Mt?Pt=t[184]:(Pt=(0,S.jsxs)(Z,{onSelect:jt,children:[Mt,Nt]}),t[183]=Mt,t[184]=Pt);let Ft;t[185]===Symbol.for(`react.memo_cache_sentinel`)?(Ft=()=>f({kind:`role`,role:`selectAll`}),t[185]=Ft):Ft=t[185];let It;t[186]===i?It=t[187]:(It=i({id:`mCB6Je`}),t[186]=i,t[187]=It);let Lt;t[188]===Symbol.for(`react.memo_cache_sentinel`)?(Lt=(0,S.jsx)($,{children:`Ctrl+A`}),t[188]=Lt):Lt=t[188];let Rt;t[189]===It?Rt=t[190]:(Rt=(0,S.jsxs)(Z,{onSelect:Ft,children:[It,Lt]}),t[189]=It,t[190]=Rt);let zt;t[191]===Symbol.for(`react.memo_cache_sentinel`)?(zt=(0,S.jsx)(Q,{}),t[191]=zt):zt=t[191];let Bt=s?.spellCheckEnabled??!0,Vt;t[192]===Symbol.for(`react.memo_cache_sentinel`)?(Vt=()=>f({kind:`command`,command:`toggle-spell-check`}),t[192]=Vt):Vt=t[192];let Ht;t[193]===i?Ht=t[194]:(Ht=i({id:`ZgJVnp`}),t[193]=i,t[194]=Ht);let Ut;t[195]!==Bt||t[196]!==Ht?(Ut=(0,S.jsx)(nt,{checked:Bt,onSelect:Vt,children:Ht}),t[195]=Bt,t[196]=Ht,t[197]=Ut):Ut=t[197];let Wt;t[198]!==At||t[199]!==Pt||t[200]!==Rt||t[201]!==Ut||t[202]!==_t||t[203]!==xt||t[204]!==Et?(Wt=(0,S.jsxs)(tt,{"data-bug-report-launcher":``,children:[_t,xt,St,Et,At,Pt,Rt,zt,Ut]}),t[198]=At,t[199]=Pt,t[200]=Rt,t[201]=Ut,t[202]=_t,t[203]=xt,t[204]=Et,t[205]=Wt):Wt=t[205];let Gt;t[206]!==Wt||t[207]!==pt?(Gt=(0,S.jsxs)(Qe,{children:[pt,Wt]}),t[206]=Wt,t[207]=pt,t[208]=Gt):Gt=t[208];let Kt;t[209]===i?Kt=t[210]:(Kt=i({id:`jpctdh`}),t[209]=i,t[210]=Kt);let qt;t[211]===Kt?qt=t[212]:(qt=(0,S.jsx)(et,{className:`px-2 py-1 text-xs font-normal`,children:Kt}),t[211]=Kt,t[212]=qt);let Jt;t[213]===Symbol.for(`react.memo_cache_sentinel`)?(Jt=()=>f({kind:`menu-action`,action:`navigate-back`}),t[213]=Jt):Jt=t[213];let Yt;t[214]===i?Yt=t[215]:(Yt=i({id:`iH8pgl`}),t[214]=i,t[215]=Yt);let Xt;t[216]===Symbol.for(`react.memo_cache_sentinel`)?(Xt=(0,S.jsx)($,{children:`Alt+Left`}),t[216]=Xt):Xt=t[216];let Zt;t[217]===Yt?Zt=t[218]:(Zt=(0,S.jsxs)(Z,{onSelect:Jt,children:[Yt,Xt]}),t[217]=Yt,t[218]=Zt);let Qt;t[219]===Symbol.for(`react.memo_cache_sentinel`)?(Qt=()=>f({kind:`menu-action`,action:`navigate-forward`}),t[219]=Qt):Qt=t[219];let $t;t[220]===i?$t=t[221]:($t=i({id:`rxWGWX`}),t[220]=i,t[221]=$t);let en;t[222]===Symbol.for(`react.memo_cache_sentinel`)?(en=(0,S.jsx)($,{children:`Alt+Right`}),t[222]=en):en=t[222];let tn;t[223]===$t?tn=t[224]:(tn=(0,S.jsxs)(Z,{onSelect:Qt,children:[$t,en]}),t[223]=$t,t[224]=tn);let nn;t[225]===Symbol.for(`react.memo_cache_sentinel`)?(nn=(0,S.jsx)(Q,{}),t[225]=nn):nn=t[225];let rn;t[226]===Symbol.for(`react.memo_cache_sentinel`)?(rn=()=>f({kind:`role`,role:`reload`}),t[226]=rn):rn=t[226];let an;t[227]===i?an=t[228]:(an=i({id:`HpK_8d`}),t[227]=i,t[228]=an);let on;t[229]===an?on=t[230]:(on=(0,S.jsx)(Z,{onSelect:rn,children:an}),t[229]=an,t[230]=on);let sn;t[231]===Symbol.for(`react.memo_cache_sentinel`)?(sn=()=>f({kind:`role`,role:`forceReload`}),t[231]=sn):sn=t[231];let cn;t[232]===i?cn=t[233]:(cn=i({id:`2CHoQv`}),t[232]=i,t[233]=cn);let ln;t[234]===cn?ln=t[235]:(ln=(0,S.jsx)(Z,{onSelect:sn,children:cn}),t[234]=cn,t[235]=ln);let un;t[236]!==i||t[237]!==s?.showDevToolsMenu?(un=s?.showDevToolsMenu===!0&&(0,S.jsx)(Z,{onSelect:()=>f({kind:`role`,role:`toggleDevTools`}),children:i({id:`pgDlbM`})}),t[236]=i,t[237]=s?.showDevToolsMenu,t[238]=un):un=t[238];let dn;t[239]===Symbol.for(`react.memo_cache_sentinel`)?(dn=(0,S.jsx)(Q,{}),t[239]=dn):dn=t[239];let fn;t[240]===Symbol.for(`react.memo_cache_sentinel`)?(fn=()=>f({kind:`menu-action`,action:`toggle-sidebar`}),t[240]=fn):fn=t[240];let pn;t[241]!==i||t[242]!==m?.sidebarVisible?(pn=m?.sidebarVisible===!1?i({id:`151wvk`}):i({id:`Q1mtyd`}),t[241]=i,t[242]=m?.sidebarVisible,t[243]=pn):pn=t[243];let mn;t[244]===Symbol.for(`react.memo_cache_sentinel`)?(mn=(0,S.jsx)($,{children:`Ctrl+Alt+S`}),t[244]=mn):mn=t[244];let hn;t[245]===pn?hn=t[246]:(hn=(0,S.jsxs)(Z,{onSelect:fn,children:[pn,mn]}),t[245]=pn,t[246]=hn);let gn;t[247]===Symbol.for(`react.memo_cache_sentinel`)?(gn=()=>f({kind:`menu-action`,action:`toggle-doc-panel`}),t[247]=gn):gn=t[247];let _n;t[248]!==i||t[249]!==m?.docPanelVisible?(_n=m?.docPanelVisible===!1?i({id:`fSRzLo`}):i({id:`GSYWCm`}),t[248]=i,t[249]=m?.docPanelVisible,t[250]=_n):_n=t[250];let vn;t[251]===Symbol.for(`react.memo_cache_sentinel`)?(vn=(0,S.jsx)($,{children:`Ctrl+Alt+B`}),t[251]=vn):vn=t[251];let yn;t[252]===_n?yn=t[253]:(yn=(0,S.jsxs)(Z,{onSelect:gn,children:[_n,vn]}),t[252]=_n,t[253]=yn);let bn;t[254]!==i||t[255]!==l||t[256]!==m?.editorVisible?(bn=!l&&(0,S.jsx)(Z,{onSelect:()=>f({kind:`menu-action`,action:`toggle-editor`}),children:m?.editorVisible===!1?i({id:`y0_w13`}):i({id:`uqgCZJ`})}),t[254]=i,t[255]=l,t[256]=m?.editorVisible,t[257]=bn):bn=t[257];let xn;t[258]!==i||t[259]!==m?.terminalVisible?(xn=o.config.ptyAvailable&&(0,S.jsxs)(Z,{onSelect:()=>f({kind:`menu-action`,action:`toggle-terminal`}),children:[m?.terminalVisible===!0?i({id:`9xCnv8`}):i({id:`xi9KGG`}),(0,S.jsx)($,{children:`Ctrl+J`})]}),t[258]=i,t[259]=m?.terminalVisible,t[260]=xn):xn=t[260];let Sn;t[261]===Symbol.for(`react.memo_cache_sentinel`)?(Sn=(0,S.jsx)(Q,{}),t[261]=Sn):Sn=t[261];let Cn=m?.showHiddenFiles??!1,wn;t[262]===Symbol.for(`react.memo_cache_sentinel`)?(wn=()=>f({kind:`menu-action`,action:`toggle-show-hidden-files`}),t[262]=wn):wn=t[262];let Tn;t[263]===i?Tn=t[264]:(Tn=i({id:`XcGbim`}),t[263]=i,t[264]=Tn);let En;t[265]===Symbol.for(`react.memo_cache_sentinel`)?(En=(0,S.jsx)($,{children:`Ctrl+Shift+.`}),t[265]=En):En=t[265];let Dn;t[266]!==Cn||t[267]!==Tn?(Dn=(0,S.jsxs)(nt,{checked:Cn,onSelect:wn,children:[Tn,En]}),t[266]=Cn,t[267]=Tn,t[268]=Dn):Dn=t[268];let On=m?.showOkFolders??!1,kn;t[269]===Symbol.for(`react.memo_cache_sentinel`)?(kn=()=>f({kind:`menu-action`,action:`toggle-show-ok-folders`}),t[269]=kn):kn=t[269];let An;t[270]===i?An=t[271]:(An=i({id:`GHsJb8`}),t[270]=i,t[271]=An);let jn;t[272]!==On||t[273]!==An?(jn=(0,S.jsx)(nt,{checked:On,onSelect:kn,children:An}),t[272]=On,t[273]=An,t[274]=jn):jn=t[274];let Mn=m?.showOnlyMarkdownFiles??!1,Nn;t[275]===Symbol.for(`react.memo_cache_sentinel`)?(Nn=()=>f({kind:`menu-action`,action:`toggle-show-only-markdown-files`}),t[275]=Nn):Nn=t[275];let Pn;t[276]===i?Pn=t[277]:(Pn=i({id:`WkTLN7`}),t[276]=i,t[277]=Pn);let Fn;t[278]!==Mn||t[279]!==Pn?(Fn=(0,S.jsx)(nt,{checked:Mn,onSelect:Nn,children:Pn}),t[278]=Mn,t[279]=Pn,t[280]=Fn):Fn=t[280];let In=m?.showSkillsSection??!0,Ln;t[281]===Symbol.for(`react.memo_cache_sentinel`)?(Ln=()=>f({kind:`menu-action`,action:`toggle-show-skills-section`}),t[281]=Ln):Ln=t[281];let Rn;t[282]===i?Rn=t[283]:(Rn=i({id:`WkyP2p`}),t[282]=i,t[283]=Rn);let zn;t[284]!==In||t[285]!==Rn?(zn=(0,S.jsx)(nt,{checked:In,onSelect:Ln,children:Rn}),t[284]=In,t[285]=Rn,t[286]=zn):zn=t[286];let Bn;t[287]===Symbol.for(`react.memo_cache_sentinel`)?(Bn=(0,S.jsx)(Q,{}),t[287]=Bn):Bn=t[287];let Vn;t[288]!==i||t[289]!==m?.canExpandAll?(Vn=(m?.canExpandAll??!0)&&(0,S.jsx)(Z,{onSelect:()=>f({kind:`menu-action`,action:`expand-all-tree`}),children:i({id:`OlAl5i`})}),t[288]=i,t[289]=m?.canExpandAll,t[290]=Vn):Vn=t[290];let Hn;t[291]!==i||t[292]!==m?.canCollapseAll?(Hn=(m?.canCollapseAll??!0)&&(0,S.jsx)(Z,{onSelect:()=>f({kind:`menu-action`,action:`collapse-all-tree`}),children:i({id:`qvWGzP`})}),t[291]=i,t[292]=m?.canCollapseAll,t[293]=Hn):Hn=t[293];let Un;t[294]===Symbol.for(`react.memo_cache_sentinel`)?(Un=(0,S.jsx)(Q,{}),t[294]=Un):Un=t[294];let Wn;t[295]===Symbol.for(`react.memo_cache_sentinel`)?(Wn=()=>f({kind:`role`,role:`resetZoom`}),t[295]=Wn):Wn=t[295];let Gn;t[296]===i?Gn=t[297]:(Gn=i({id:`FF7V5K`}),t[296]=i,t[297]=Gn);let Kn;t[298]===Gn?Kn=t[299]:(Kn=(0,S.jsx)(Z,{onSelect:Wn,children:Gn}),t[298]=Gn,t[299]=Kn);let qn;t[300]===Symbol.for(`react.memo_cache_sentinel`)?(qn=()=>f({kind:`role`,role:`zoomIn`}),t[300]=qn):qn=t[300];let Jn;t[301]===i?Jn=t[302]:(Jn=i({id:`Dz7fsq`}),t[301]=i,t[302]=Jn);let Yn;t[303]===Jn?Yn=t[304]:(Yn=(0,S.jsx)(Z,{onSelect:qn,children:Jn}),t[303]=Jn,t[304]=Yn);let Xn;t[305]===Symbol.for(`react.memo_cache_sentinel`)?(Xn=()=>f({kind:`role`,role:`zoomOut`}),t[305]=Xn):Xn=t[305];let Zn;t[306]===i?Zn=t[307]:(Zn=i({id:`bbJ-VR`}),t[306]=i,t[307]=Zn);let Qn;t[308]===Zn?Qn=t[309]:(Qn=(0,S.jsx)(Z,{onSelect:Xn,children:Zn}),t[308]=Zn,t[309]=Qn);let $n;t[310]===Symbol.for(`react.memo_cache_sentinel`)?($n=(0,S.jsx)(Q,{}),t[310]=$n):$n=t[310];let er;t[311]===Symbol.for(`react.memo_cache_sentinel`)?(er=()=>f({kind:`role`,role:`toggleFullScreen`}),t[311]=er):er=t[311];let tr;t[312]===i?tr=t[313]:(tr=i({id:`LTeJuX`}),t[312]=i,t[313]=tr);let nr;t[314]===Symbol.for(`react.memo_cache_sentinel`)?(nr=(0,S.jsx)($,{children:`F11`}),t[314]=nr):nr=t[314];let rr;t[315]===tr?rr=t[316]:(rr=(0,S.jsxs)(Z,{onSelect:er,children:[tr,nr]}),t[315]=tr,t[316]=rr);let ir;t[317]!==Zt||t[318]!==tn||t[319]!==on||t[320]!==ln||t[321]!==un||t[322]!==hn||t[323]!==yn||t[324]!==bn||t[325]!==xn||t[326]!==Dn||t[327]!==jn||t[328]!==Fn||t[329]!==zn||t[330]!==Vn||t[331]!==Hn||t[332]!==Kn||t[333]!==Yn||t[334]!==Qn||t[335]!==rr?(ir=(0,S.jsxs)(tt,{"data-bug-report-launcher":``,children:[Zt,tn,nn,on,ln,un,dn,hn,yn,bn,xn,Sn,Dn,jn,Fn,zn,Bn,Vn,Hn,Un,Kn,Yn,Qn,$n,rr]}),t[317]=Zt,t[318]=tn,t[319]=on,t[320]=ln,t[321]=un,t[322]=hn,t[323]=yn,t[324]=bn,t[325]=xn,t[326]=Dn,t[327]=jn,t[328]=Fn,t[329]=zn,t[330]=Vn,t[331]=Hn,t[332]=Kn,t[333]=Yn,t[334]=Qn,t[335]=rr,t[336]=ir):ir=t[336];let ar;t[337]!==qt||t[338]!==ir?(ar=(0,S.jsxs)(Qe,{children:[qt,ir]}),t[337]=qt,t[338]=ir,t[339]=ar):ar=t[339];let or;t[340]===i?or=t[341]:(or=i({id:`T3Mld1`}),t[340]=i,t[341]=or);let sr;t[342]===or?sr=t[343]:(sr=(0,S.jsx)(et,{className:`px-2 py-1 text-xs font-normal`,children:or}),t[342]=or,t[343]=sr);let cr;t[344]===Symbol.for(`react.memo_cache_sentinel`)?(cr=()=>f({kind:`role`,role:`minimize`}),t[344]=cr):cr=t[344];let lr;t[345]===i?lr=t[346]:(lr=i({id:`3TSz9S`}),t[345]=i,t[346]=lr);let ur;t[347]===lr?ur=t[348]:(ur=(0,S.jsx)(Z,{onSelect:cr,children:lr}),t[347]=lr,t[348]=ur);let dr;t[349]===Symbol.for(`react.memo_cache_sentinel`)?(dr=()=>f({kind:`role`,role:`close`}),t[349]=dr):dr=t[349];let fr;t[350]===i?fr=t[351]:(fr=i({id:`aRI3Om`}),t[350]=i,t[351]=fr);let pr;t[352]===fr?pr=t[353]:(pr=(0,S.jsx)(Z,{onSelect:dr,children:fr}),t[352]=fr,t[353]=pr);let mr;t[354]!==ur||t[355]!==pr?(mr=(0,S.jsxs)(tt,{"data-bug-report-launcher":``,children:[ur,pr]}),t[354]=ur,t[355]=pr,t[356]=mr):mr=t[356];let hr;t[357]!==sr||t[358]!==mr?(hr=(0,S.jsxs)(Qe,{children:[sr,mr]}),t[357]=sr,t[358]=mr,t[359]=hr):hr=t[359];let gr;t[360]===i?gr=t[361]:(gr=i({id:`c3XJ18`}),t[360]=i,t[361]=gr);let _r;t[362]===gr?_r=t[363]:(_r=(0,S.jsx)(et,{className:`px-2 py-1 text-xs font-normal`,children:gr}),t[362]=gr,t[363]=_r);let vr;t[364]===Symbol.for(`react.memo_cache_sentinel`)?(vr=()=>f({kind:`command`,command:`open-github`}),t[364]=vr):vr=t[364];let yr;t[365]===i?yr=t[366]:(yr=i({id:`LeGeTf`}),t[365]=i,t[366]=yr);let br;t[367]===yr?br=t[368]:(br=(0,S.jsx)(Z,{onSelect:vr,children:yr}),t[367]=yr,t[368]=br);let xr;t[369]===Symbol.for(`react.memo_cache_sentinel`)?(xr=()=>f({kind:`command`,command:`open-docs`}),t[369]=xr):xr=t[369];let Sr;t[370]===i?Sr=t[371]:(Sr=i({id:`TvY_XA`}),t[370]=i,t[371]=Sr);let Cr;t[372]===Sr?Cr=t[373]:(Cr=(0,S.jsx)(Z,{onSelect:xr,children:Sr}),t[372]=Sr,t[373]=Cr);let wr;t[374]===Symbol.for(`react.memo_cache_sentinel`)?(wr=()=>f({kind:`command`,command:`open-discord`}),t[374]=wr):wr=t[374];let Tr;t[375]===i?Tr=t[376]:(Tr=i({id:`36aWJD`}),t[375]=i,t[376]=Tr);let Er;t[377]===Tr?Er=t[378]:(Er=(0,S.jsx)(Z,{onSelect:wr,children:Tr}),t[377]=Tr,t[378]=Er);let Dr;t[379]===Symbol.for(`react.memo_cache_sentinel`)?(Dr=()=>f({kind:`menu-action`,action:`report-bug`}),t[379]=Dr):Dr=t[379];let Or;t[380]===i?Or=t[381]:(Or=i({id:`ft-BOm`}),t[380]=i,t[381]=Or);let kr;t[382]===Symbol.for(`react.memo_cache_sentinel`)?(kr=(0,S.jsx)($,{children:`Ctrl+Shift+D`}),t[382]=kr):kr=t[382];let Ar;t[383]===Or?Ar=t[384]:(Ar=(0,S.jsxs)(Z,{onSelect:Dr,children:[Or,kr]}),t[383]=Or,t[384]=Ar);let jr;t[385]===Symbol.for(`react.memo_cache_sentinel`)?(jr=()=>f({kind:`menu-action`,action:`send-feedback`}),t[385]=jr):jr=t[385];let Mr;t[386]===i?Mr=t[387]:(Mr=i({id:`_JOGC0`}),t[386]=i,t[387]=Mr);let Nr;t[388]===Mr?Nr=t[389]:(Nr=(0,S.jsx)(Z,{onSelect:jr,children:Mr}),t[388]=Mr,t[389]=Nr);let Pr;t[390]!==i||t[391]!==s?.canCheckForUpdates?(Pr=s?.canCheckForUpdates===!0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Q,{}),(0,S.jsx)(Z,{onSelect:()=>f({kind:`command`,command:`check-for-updates`}),children:i({id:`3SZrdj`})})]}),t[390]=i,t[391]=s?.canCheckForUpdates,t[392]=Pr):Pr=t[392];let Fr;t[393]===Symbol.for(`react.memo_cache_sentinel`)?(Fr=(0,S.jsx)(Q,{}),t[393]=Fr):Fr=t[393];let Ir;t[394]===Symbol.for(`react.memo_cache_sentinel`)?(Ir=(0,S.jsx)(Z,{onSelect:()=>f({kind:`role`,role:`about`}),children:ye(o.platform)}),t[394]=Ir):Ir=t[394];let Lr;t[395]!==br||t[396]!==Cr||t[397]!==Er||t[398]!==Ar||t[399]!==Nr||t[400]!==Pr?(Lr=(0,S.jsxs)(tt,{"data-bug-report-launcher":``,children:[br,Cr,Er,Ar,Nr,Pr,Fr,Ir]}),t[395]=br,t[396]=Cr,t[397]=Er,t[398]=Ar,t[399]=Nr,t[400]=Pr,t[401]=Lr):Lr=t[401];let Rr;t[402]!==_r||t[403]!==Lr?(Rr=(0,S.jsxs)(Qe,{children:[_r,Lr]}),t[402]=_r,t[403]=Lr,t[404]=Rr):Rr=t[404];let zr;return t[405]!==Gt||t[406]!==ar||t[407]!==hr||t[408]!==Rr||t[409]!==re||t[410]!==dt?(zr=(0,S.jsxs)(Ze,{"data-testid":`app-menubar`,className:re,onValueChange:ie,children:[dt,Gt,ar,hr,Rr]}),t[405]=Gt,t[406]=ar,t[407]=hr,t[408]=Rr,t[409]=re,t[410]=dt,t[411]=zr):zr=t[411],zr}function st(){}export{ot as AppMenubar};
@@ -1 +0,0 @@
1
- import{t as e}from"./index-7PTB0URg.js";export{e as FeedbackForm};
@@ -1 +0,0 @@
1
- import{t as e}from"./ManagedArtifactProperties-BPI-_chz.js";export{e as ManagedArtifactProperties};
@@ -1,4 +0,0 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r}from"./dist-PQ5KMVDh.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{a,i as o,n as s,r as c}from"./constants-cc1-Bt4QPTUe.js";import{Nt as l,jt as u}from"./schemas-api-WgoIuF0H.js";import{n as d,r as f}from"./use-apply-config-theme-CYFG76sS.js";import{a as p,b as m,c as ee,p as te,r as ne,x as re}from"./use-apply-config-color-theme-CTtLraO9.js";import{C as ie,T as ae,_ as oe,a as se,c as ce,i as le,n as ue,t as de,w as fe}from"./saved-themes-client-B4QZmuf_.js";import{i as pe}from"./use-apply-config-language-9fLQZCsK.js";import{t as me}from"./trace-api-nQInEDYS.js";import{t as he}from"./status-CUwkWWLj.js";import{a as ge,i as _e,n as ve,t as ye}from"./css-color-to-hex-pv-EKOQu.js";import{i as be}from"./client-version-Bf2iRqGU.js";var xe=i(),h=Math.floor,Se=Math.abs,g=(e,t)=>e<t?e:t,_=(e,t)=>e>t?e:t;Number.isNaN;var Ce=e=>e===0?1/e<0:e<0,we=1<<17,Te=1<<18,Ee=1<<19,De=1<<20,Oe=1<<21,ke=1<<22,Ae=1<<23,je=1<<24,Me=1<<25,Ne=1<<26,Pe=1<<27,Fe=1<<28,Ie=1<<29;we-1,Te-1,Ee-1,De-1,Oe-1,ke-1,Ae-1,je-1,Me-1,Ne-1,Pe-1,Fe-1,Ie-1;var Le=2**53-1,Re=-(2**53-1),ze=Number.isInteger||(e=>typeof e==`number`&&isFinite(e)&&h(e)===e);Number.isNaN,Number.parseInt;var v=()=>new Set,Be=e=>e[e.length-1],Ve=(e,t)=>{for(let n=0;n<t.length;n++)e.push(t[n])},y=Array.from,He=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Ue=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1},We=(e,t)=>{let n=Array(e);for(let r=0;r<e;r++)n[r]=t(r,n);return n},b=Array.isArray,Ge=String.fromCharCode;String.fromCodePoint,Ge(65535);var Ke=e=>e.toLowerCase(),qe=/^\s*/g,Je=e=>e.replace(qe,``),Ye=/([A-Z])/g,Xe=(e,t)=>Je(e.replace(Ye,e=>`${t}${Ke(e)}`)),Ze=e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},Qe=typeof TextEncoder<`u`?new TextEncoder:null,$e=Qe?e=>Qe.encode(e):Ze,et=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});et&&et.decode(new Uint8Array).length===1&&(et=null);var tt=(e,t)=>We(t,()=>e).join(``),nt=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}},rt=()=>new nt,it=e=>{let t=rt();return e(t),x(t)},at=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},x=e=>{let t=new Uint8Array(at(e)),n=0;for(let r=0;r<e.bufs.length;r++){let i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},ot=(e,t)=>{let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(new Uint8Array(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(_(n,t)*2),e.cpos=0)},S=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},st=S,C=(e,t)=>{for(;t>127;)S(e,128|127&t),t=h(t/128);S(e,127&t)},ct=(e,t)=>{let n=Ce(t);for(n&&(t=-t),S(e,(t>63?128:0)|(n?64:0)|63&t),t=h(t/64);t>0;)S(e,(t>127?128:0)|127&t),t=h(t/128)},lt=new Uint8Array(3e4),ut=lt.length/3,dt=Qe&&Qe.encodeInto?(e,t)=>{if(t.length<ut){let n=Qe.encodeInto(t,lt).written||0;C(e,n);for(let t=0;t<n;t++)S(e,lt[t])}else w(e,$e(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;C(e,r);for(let t=0;t<r;t++)S(e,n.codePointAt(t))},ft=(e,t)=>{let n=e.cbuf.length,r=e.cpos,i=g(n-r,t.length),a=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,a>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(_(n*2,a)),e.cbuf.set(t.subarray(i)),e.cpos=a)},w=(e,t)=>{C(e,t.byteLength),ft(e,t)},pt=(e,t)=>{ot(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},mt=(e,t)=>pt(e,4).setFloat32(0,t,!1),ht=(e,t)=>pt(e,8).setFloat64(0,t,!1),gt=(e,t)=>pt(e,8).setBigInt64(0,t,!1),_t=new DataView(new ArrayBuffer(4)),vt=e=>(_t.setFloat32(0,e),_t.getFloat32(0)===e),yt=(e,t)=>{switch(typeof t){case`string`:S(e,119),dt(e,t);break;case`number`:ze(t)&&Se(t)<=2147483647?(S(e,125),ct(e,t)):vt(t)?(S(e,124),mt(e,t)):(S(e,123),ht(e,t));break;case`bigint`:S(e,122),gt(e,t);break;case`object`:if(t===null)S(e,126);else if(b(t)){S(e,117),C(e,t.length);for(let n=0;n<t.length;n++)yt(e,t[n])}else if(t instanceof Uint8Array)S(e,116),w(e,t);else{S(e,118);let n=Object.keys(t);C(e,n.length);for(let r=0;r<n.length;r++){let i=n[r];dt(e,i),yt(e,t[i])}}break;case`boolean`:S(e,t?120:121);break;default:S(e,127)}},bt=class extends nt{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&C(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}},xt=e=>{e.count>0&&(ct(e.encoder,e.count===1?e.s:-e.s),e.count>1&&C(e.encoder,e.count-2))},St=class{constructor(){this.encoder=new nt,this.s=0,this.count=0}write(e){this.s===e?this.count++:(xt(this),this.count=1,this.s=e)}toUint8Array(){return xt(this),x(this.encoder)}},Ct=e=>{if(e.count>0){let t=e.diff*2+(e.count===1?0:1);ct(e.encoder,t),e.count>1&&C(e.encoder,e.count-2)}},wt=class{constructor(){this.encoder=new nt,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(Ct(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return Ct(this),x(this.encoder)}},Tt=class{constructor(){this.sarr=[],this.s=``,this.lensE=new St}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=``),this.lensE.write(e.length)}toUint8Array(){let e=new nt;return this.sarr.push(this.s),this.s=``,dt(e,this.sarr.join(``)),ft(e,this.lensE.toUint8Array()),x(e)}},T=e=>Error(e),E=()=>{throw T(`Method unimplemented`)},D=()=>{throw T(`Unexpected case`)},Et=T(`Unexpected end of array`),Dt=T(`Integer out of Range`),Ot=class{constructor(e){this.arr=e,this.pos=0}},kt=e=>new Ot(e),At=e=>e.pos!==e.arr.length,jt=(e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},O=e=>jt(e,k(e)),Mt=e=>e.arr[e.pos++],k=e=>{let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let r=e.arr[e.pos++];if(t+=(r&127)*n,n*=128,r<128)return t;if(t>Le)throw Dt}throw Et},Nt=e=>{let t=e.arr[e.pos++],n=t&63,r=64,i=(t&64)>0?-1:1;if(!(t&128))return i*n;let a=e.arr.length;for(;e.pos<a;){if(t=e.arr[e.pos++],n+=(t&127)*r,r*=128,t<128)return i*n;if(n>Le)throw Dt}throw Et},Pt=et?e=>et.decode(O(e)):e=>{let t=k(e);if(t===0)return``;{let n=String.fromCodePoint(Mt(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(Mt(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},Ft=(e,t)=>{let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},It=[e=>void 0,e=>null,Nt,e=>Ft(e,4).getFloat32(0,!1),e=>Ft(e,8).getFloat64(0,!1),e=>Ft(e,8).getBigInt64(0,!1),e=>!1,e=>!0,Pt,e=>{let t=k(e),n={};for(let r=0;r<t;r++){let t=Pt(e);n[t]=Lt(e)}return n},e=>{let t=k(e),n=[];for(let r=0;r<t;r++)n.push(Lt(e));return n},O],Lt=e=>It[127-Mt(e)](e),Rt=class extends Ot{constructor(e,t){super(e),this.reader=t,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),At(this)?this.count=k(this)+1:this.count=-1),this.count--,this.s}},zt=class extends Ot{constructor(e){super(e),this.s=0,this.count=0}read(){if(this.count===0){this.s=Nt(this);let e=Ce(this.s);this.count=1,e&&(this.s=-this.s,this.count=k(this)+2)}return this.count--,this.s}},Bt=class extends Ot{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){let e=Nt(this),t=e&1;this.diff=h(e/2),this.count=1,t&&(this.count=k(this)+2)}return this.s+=this.diff,this.count--,this.s}},Vt=class{constructor(e){this.decoder=new zt(e),this.str=Pt(this.decoder),this.spos=0}read(){let e=this.spos+this.decoder.read(),t=this.str.slice(this.spos,e);return this.spos=e,t}},Ht=function(e){return e[e.Token=0]=`Token`,e[e.PermissionDenied=1]=`PermissionDenied`,e[e.Authenticated=2]=`Authenticated`,e}({}),Ut=(e,t)=>{C(e,Ht.Token),dt(e,t)},Wt=(e,t,n,r)=>{switch(k(e)){case Ht.Token:t();break;case Ht.PermissionDenied:n(Pt(e));break;case Ht.Authenticated:r(Pt(e));break;default:}},Gt=e=>Array.from(e.entries()).map(([e,t])=>({clientId:e,...t})),Kt=`\0`;function qt(e,t){return e+Kt+t}function Jt(e){let t=e.indexOf(Kt);return t===-1?{documentName:e,sessionId:null}:{documentName:e.substring(0,t),sessionId:e.substring(t+1)}}var Yt=function(e){return e[e.Connecting=0]=`Connecting`,e[e.Open=1]=`Open`,e[e.Closing=2]=`Closing`,e[e.Closed=3]=`Closed`,e}({}),A=()=>new Map,Xt=e=>{let t=A();return e.forEach((e,n)=>{t.set(n,e)}),t},j=(e,t,n)=>{let r=e.get(t);return r===void 0&&e.set(t,r=n()),r},Zt=(e,t)=>{let n=[];for(let[r,i]of e)n.push(t(i,r));return n},Qt=(e,t)=>{for(let[n,r]of e)if(t(r,n))return!0;return!1},$t=class{constructor(){this._observers=A()}on(e,t){return j(this._observers,e,v).add(t),t}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);n!==void 0&&(n.delete(t),n.size===0&&this._observers.delete(e))}emit(e,t){return y((this._observers.get(e)||A()).values()).forEach(e=>e(...t))}destroy(){this._observers=A()}},en=class{constructor(){this._observers=A()}on(e,t){j(this._observers,e,v).add(t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);n!==void 0&&(n.delete(t),n.size===0&&this._observers.delete(e))}emit(e,t){return y((this._observers.get(e)||A()).values()).forEach(e=>e(...t))}destroy(){this._observers=A()}};crypto.subtle;var tn=crypto.getRandomValues.bind(crypto),nn=Math.random,rn=()=>tn(new Uint32Array(1))[0],an=e=>e[h(nn()*e.length)],on=`10000000-1000-4000-8000-100000000000`,sn=()=>on.replace(/[018]/g,e=>(e^rn()&15>>e/4).toString(16)),cn=Date.now,ln=e=>new Promise(e);Promise.all.bind(Promise);var un=e=>e===void 0?null:e,dn=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}};try{typeof localStorage<`u`&&localStorage&&(dn=localStorage)}catch{}var fn=dn,pn=Symbol(`Equality`),mn=(e,t)=>e===t||!!e?.[pn]?.(t)||!1,hn=e=>typeof e==`object`,gn=Object.assign,_n=Object.keys,vn=(e,t)=>{for(let n in e)t(e[n],n)},yn=e=>_n(e).length,bn=e=>{for(let t in e)return!1;return!0},xn=(e,t)=>{for(let n in e)if(!t(e[n],n))return!1;return!0},Sn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Cn=(e,t)=>e===t||yn(e)===yn(t)&&xn(e,(e,n)=>(e!==void 0||Sn(t,n))&&mn(t[n],e)),wn=Object.freeze,Tn=e=>{for(let t in e){let n=e[t];(typeof n==`object`||typeof n==`function`)&&Tn(e[t])}return wn(e)},En=(e,t,n=0)=>{try{for(;n<e.length;n++)e[n](...t)}finally{n<e.length&&En(e,t,n+1)}},Dn=e=>e,On=(e,t)=>{if(e===t)return!0;if(e==null||t==null||e.constructor!==t.constructor&&(e.constructor||Object)!==(t.constructor||Object))return!1;if(e[pn]!=null)return e[pn](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(let n of e.keys())if(!t.has(n)||!On(e.get(n),t.get(n)))return!1;break;case void 0:case Object:if(yn(e)!==yn(t))return!1;for(let n in e)if(!Sn(e,n)||!On(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!On(e[n],t[n]))return!1;break;default:return!1}return!0},kn=(e,t)=>t.includes(e),An=typeof process<`u`&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`,jn=typeof window<`u`&&typeof document<`u`&&!An;typeof navigator<`u`&&/Mac/.test(navigator.platform);var M,Mn=[],Nn=()=>{if(M===void 0)if(An){M=A();let e=process.argv,t=null;for(let n=0;n<e.length;n++){let r=e[n];r[0]===`-`?(t!==null&&M.set(t,``),t=r):t===null?Mn.push(r):(M.set(t,r),t=null)}t!==null&&M.set(t,``)}else typeof location==`object`?(M=A(),(location.search||`?`).slice(1).split(`&`).forEach(e=>{if(e.length!==0){let[t,n]=e.split(`=`);M.set(`--${Xe(t,`-`)}`,n),M.set(`-${Xe(t,`-`)}`,n)}})):M=A();return M},Pn=e=>Nn().has(e),Fn=e=>un(An?{}[e.toUpperCase().replaceAll(`-`,`_`)]:fn.getItem(e)),In=e=>Pn(`--`+e)||Fn(e)!==null,Ln=In(`production`),Rn=An&&kn({}.FORCE_COLOR,[`true`,`1`,`2`])||!Pn(`--no-colors`)&&!In(`no-color`)&&(!An||process.stdout.isTTY)&&(!An||Pn(`--color`)||Fn(`COLORTERM`)!==null||(Fn(`TERM`)||``).includes(`color`)),zn=e=>new Uint8Array(e),Bn=jn?e=>{let t=``;for(let n=0;n<e.byteLength;n++)t+=Ge(e[n]);return btoa(t)}:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString(`base64`),Vn=e=>{let t=zn(e.byteLength);return t.set(e),t},Hn=e=>it(t=>yt(t,e)),Un=class{constructor(e,t){this.left=e,this.right=t}},N=(e,t)=>new Un(e,t),Wn=(e,t)=>e.forEach(e=>t(e.left,e.right)),Gn=e=>e.next()>=.5,Kn=(e,t,n)=>h(e.next()*(n+1-t)+t),qn=(e,t,n)=>h(e.next()*(n+1-t)+t),Jn=(e,t,n)=>qn(e,t,n),Yn=e=>Ge(Jn(e,97,122)),Xn=(e,t=0,n=20)=>{let r=Jn(e,t,n),i=``;for(let t=0;t<r;t++)i+=Yn(e);return i},Zn=(e,t)=>t[Jn(e,0,t.length-1)],Qn=Symbol(`0schema`),$n=class{constructor(){this._rerrs=[]}extend(e,t,n,r=null){this._rerrs.push({path:e,expected:t,has:n,message:r})}toString(){let e=[];for(let t=this._rerrs.length-1;t>0;t--){let n=this._rerrs[t];e.push(tt(` `,(this._rerrs.length-t)*2)+`${n.path==null?``:`[${n.path}] `}${n.has} doesn't match ${n.expected}. ${n.message}`)}return e.join(`
2
- `)}},er=(e,t)=>e===t?!0:e==null||t==null||e.constructor!==t.constructor?!1:e[pn]?mn(e,t):b(e)?He(e,e=>Ue(t,t=>er(e,t))):hn(e)?xn(e,(e,n)=>er(e,t[n])):!1,P=class{static _dilutes=!1;extends(e){let[t,n]=[this.shape,e.shape];return this.constructor._dilutes&&([n,t]=[t,n]),er(t,n)}equals(e){return this.constructor===e.constructor&&On(this.shape,e.shape)}[Qn](){return!0}[pn](e){return this.equals(e)}validate(e){return this.check(e)}check(e,t){E()}get nullable(){return jr(this,Kr)}get optional(){return new lr(this)}cast(e){return Xr(e,this),e}expect(e){return Xr(e,this),e}},tr=class extends P{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t=void 0){let n=e?.constructor===this.shape&&(this._c==null||this._c(e));return!n&&t?.extend(null,this.shape.name,e?.constructor.name,e?.constructor===this.shape?`Check failed`:`Constructor match failed`),n}},F=(e,t=null)=>new tr(e,t);F(tr);var nr=class extends P{constructor(e){super(),this.shape=e}check(e,t){let n=this.shape(e);return!n&&t?.extend(null,`custom prop`,e?.constructor.name,`failed to check custom prop`),n}},I=e=>new nr(e);F(nr);var rr=class extends P{constructor(e){super(),this.shape=e}check(e,t){let n=this.shape.some(t=>t===e);return!n&&t?.extend(null,this.shape.join(` | `),e.toString()),n}},ir=(...e)=>new rr(e),ar=F(rr),or=RegExp.escape||(e=>e.replace(/[().|&,$^[\]]/g,e=>`\\`+e)),sr=e=>{if(Vr.check(e))return[or(e)];if(ar.check(e))return e.shape.map(e=>e+``);if(Br.check(e))return[`[+-]?\\d+.?\\d*`];if(Hr.check(e))return[`.*`];if(Mr.check(e))return e.shape.map(sr).flat(1);D()};F(class extends P{constructor(e){super(),this.shape=e,this._r=RegExp(`^`+e.map(sr).map(e=>`(${e.join(`|`)})`).join(``)+`$`)}check(e,t){let n=this._r.exec(e)!=null;return!n&&t?.extend(null,this._r.toString(),e.toString(),`String doesn't match string template.`),n}});var cr=Symbol(`optional`),lr=class extends P{constructor(e){super(),this.shape=e}check(e,t){let n=e===void 0||this.shape.check(e);return!n&&t?.extend(null,`undefined (optional)`,`()`),n}get[cr](){return!0}},ur=F(lr),dr=class extends P{check(e,t){return t?.extend(null,`never`,typeof e),!1}};new dr,F(dr);var fr=class e extends P{constructor(e,t=!1){super(),this.shape=e,this._isPartial=t}static _dilutes=!0;get partial(){return new e(this.shape,!0)}check(e,t){return e==null?(t?.extend(null,`object`,`null`),!1):xn(this.shape,(n,r)=>{let i=this._isPartial&&!Sn(e,r)||n.check(e[r],t);return!i&&t?.extend(r.toString(),n.toString(),typeof e[r],`Object property does not match`),i})}},pr=e=>new fr(e),mr=F(fr),hr=I(e=>e!=null&&(e.constructor===Object||e.constructor==null)),gr=class extends P{constructor(e,t){super(),this.shape={keys:e,values:t}}check(e,t){return e!=null&&xn(e,(n,r)=>{let i=this.shape.keys.check(r,t);return!i&&t?.extend(r+``,`Record`,typeof e,i?`Key doesn't match schema`:`Value doesn't match value`),i&&this.shape.values.check(n,t)})}},_r=(e,t)=>new gr(e,t),vr=F(gr),yr=class extends P{constructor(e){super(),this.shape=e}check(e,t){return e!=null&&xn(this.shape,(n,r)=>{let i=n.check(e[r],t);return!i&&t?.extend(r.toString(),`Tuple`,typeof n),i})}},br=(...e)=>new yr(e);F(yr);var xr=class extends P{constructor(e){super(),this.shape=e.length===1?e[0]:new Ar(e)}check(e,t){let n=b(e)&&He(e,e=>this.shape.check(e));return!n&&t?.extend(null,`Array`,``),n}},Sr=(...e)=>new xr(e),Cr=F(xr),wr=I(e=>b(e)),Tr=class extends P{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t){let n=e instanceof this.shape&&(this._c==null||this._c(e));return!n&&t?.extend(null,this.shape.name,e?.constructor.name),n}},Er=(e,t=null)=>new Tr(e,t);F(Tr);var Dr=Er(P),Or=F(class extends P{constructor(e){super(),this.len=e.length-1,this.args=br(...e.slice(-1)),this.res=e[this.len]}check(e,t){let n=e.constructor===Function&&e.length<=this.len;return!n&&t?.extend(null,`function`,typeof e),n}}),kr=I(e=>typeof e==`function`);F(class extends P{constructor(e){super(),this.shape=e}check(e,t){let n=He(this.shape,n=>n.check(e,t));return!n&&t?.extend(null,`Intersectinon`,typeof e),n}},e=>e.shape.length>0);var Ar=class extends P{static _dilutes=!0;constructor(e){super(),this.shape=e}check(e,t){let n=Ue(this.shape,n=>n.check(e,t));return t?.extend(null,`Union`,typeof e),n}},jr=(...e)=>e.findIndex(e=>Mr.check(e))>=0?jr(...e.map(e=>Yr(e)).map(e=>Mr.check(e)?e.shape:[e]).flat(1)):e.length===1?e[0]:new Ar(e),Mr=F(Ar),Nr=()=>!0,Pr=I(Nr),Fr=F(nr,e=>e.shape===Nr),Ir=I(e=>typeof e==`bigint`),Lr=I(e=>e===Ir),Rr=I(e=>typeof e==`symbol`);I(e=>e===Rr);var zr=I(e=>typeof e==`number`),Br=I(e=>e===zr),Vr=I(e=>typeof e==`string`),Hr=I(e=>e===Vr),Ur=I(e=>typeof e==`boolean`),Wr=I(e=>e===Ur),Gr=ir(void 0);F(rr,e=>e.shape.length===1&&e.shape[0]===void 0),ir(void 0);var Kr=ir(null),qr=F(rr,e=>e.shape.length===1&&e.shape[0]===null);F(Uint8Array),F(tr,e=>e.shape===Uint8Array);var Jr=jr(zr,Vr,Kr,Gr,Ir,Ur,Rr);(()=>{let e=Sr(Pr),t=_r(Vr,Pr),n=jr(zr,Vr,Kr,Ur,e,t);return e.shape=n,t.shape.values=n,n})();var Yr=e=>{if(Dr.check(e))return e;if(hr.check(e)){let t={};for(let n in e)t[n]=Yr(e[n]);return pr(t)}else if(wr.check(e))return jr(...e.map(Yr));else if(Jr.check(e))return ir(e);else if(kr.check(e))return F(e);D()},Xr=Ln?()=>{}:(e,t)=>{let n=new $n;if(!t.check(e,n))throw T(`Expected value to be of type ${t.constructor.name}.\n${n.toString()}`)},Zr=class{constructor(e){this.patterns=[],this.$state=e}if(e,t){return this.patterns.push({if:Yr(e),h:t}),this}else(e){return this.if(Pr,e)}done(){return(e,t)=>{for(let n=0;n<this.patterns.length;n++){let r=this.patterns[n];if(r.if.check(e))return r.h(e,t)}throw T(`Unhandled pattern`)}}},Qr=(e=>new Zr(e))(Pr).if(Br,(e,t)=>Kn(t,Re,Le)).if(Hr,(e,t)=>Xn(t)).if(Wr,(e,t)=>Gn(t)).if(Lr,(e,t)=>BigInt(Kn(t,Re,Le))).if(Mr,(e,t)=>$r(t,Zn(t,e.shape))).if(mr,(e,t)=>{let n={};for(let r in e.shape){let i=e.shape[r];if(ur.check(i)){if(Gn(t))continue;i=i.shape}n[r]=Qr(i,t)}return n}).if(Cr,(e,t)=>{let n=[],r=qn(t,0,42);for(let i=0;i<r;i++)n.push($r(t,e.shape));return n}).if(ar,(e,t)=>Zn(t,e.shape)).if(qr,(e,t)=>null).if(Or,(e,t)=>{let n=$r(t,e.res);return()=>n}).if(Fr,(e,t)=>$r(t,Zn(t,[zr,Vr,Kr,Gr,Ir,Ur,Sr(zr),_r(jr(`a`,`b`,`c`),zr)]))).if(vr,(e,t)=>{let n={},r=Kn(t,0,3);for(let i=0;i<r;i++){let r=$r(t,e.shape.keys);n[r]=$r(t,e.shape.values)}return n}).done(),$r=(e,t)=>Qr(Yr(t),e),L=typeof document<`u`?document:{},ei=e=>L.createElement(e),ti=()=>L.createDocumentFragment();I(e=>e.nodeType===pi);var ni=e=>L.createTextNode(e);typeof DOMParser<`u`&&new DOMParser;var ri=(e,t)=>(Wn(t,(t,n)=>{n===!1?e.removeAttribute(t):n===!0?e.setAttribute(t,``):e.setAttribute(t,n)}),e),ii=e=>{let t=ti();for(let n=0;n<e.length;n++)li(t,e[n]);return t},ai=(e,t)=>(li(e,ii(t)),e),oi=(e,t=[],n=[])=>ai(ri(ei(e),t),n);I(e=>e.nodeType===ui);var si=ni;I(e=>e.nodeType===di);var ci=e=>Zt(e,(e,t)=>`${t}:${e};`).join(``),li=(e,t)=>e.appendChild(t),ui=L.ELEMENT_NODE,di=L.TEXT_NODE;L.CDATA_SECTION_NODE,L.COMMENT_NODE;var fi=L.DOCUMENT_NODE;L.DOCUMENT_TYPE_NODE;var pi=L.DOCUMENT_FRAGMENT_NODE;I(e=>e.nodeType===fi);var mi=(e=>class{constructor(e){this._=e}destroy(){e(this._)}})(clearTimeout),hi=(e,t)=>new mi(setTimeout(t,e)),R=Symbol,gi=R(),_i=R(),vi=R(),yi=R(),bi=R(),xi=R(),Si=R(),Ci=R(),wi=R(),Ti=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=0;for(;r<e.length;r++){let n=e[r];if(n===void 0)break;if(n.constructor===String||n.constructor===Number)t.push(n);else if(n.constructor===Object)break}for(r>0&&n.push(t.join(``));r<e.length;r++){let t=e[r];t instanceof Symbol||n.push(t)}return n};cn();var Ei={[gi]:N(`font-weight`,`bold`),[_i]:N(`font-weight`,`normal`),[vi]:N(`color`,`blue`),[bi]:N(`color`,`green`),[yi]:N(`color`,`grey`),[xi]:N(`color`,`red`),[Si]:N(`color`,`purple`),[Ci]:N(`color`,`orange`),[wi]:N(`color`,`black`)},Di=Rn?e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=A(),i=[],a=0;for(;a<e.length;a++){let i=e[a],o=Ei[i];if(o!==void 0)r.set(o.left,o.right);else{if(i===void 0)break;if(i.constructor===String||i.constructor===Number){let e=ci(r);a>0||e.length>0?(t.push(`%c`+i),n.push(e)):t.push(i)}else break}}for(a>0&&(i=n,i.unshift(t.join(``)));a<e.length;a++){let t=e[a];t instanceof Symbol||i.push(t)}return i}:Ti,Oi=(...e)=>{console.log(...Di(e)),Ai.forEach(t=>t.print(e))},ki=(...e)=>{console.warn(...Di(e)),e.unshift(Ci),Ai.forEach(t=>t.print(e))},Ai=v(),ji=e=>({[Symbol.iterator](){return this},next:e}),Mi=(e,t)=>ji(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),Ni=(e,t)=>ji(()=>{let{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}}),Pi=class{constructor(e,t){this.clock=e,this.len=t}},Fi=class{constructor(){this.clients=new Map}},Ii=(e,t,n)=>t.clients.forEach((t,r)=>{let i=e.doc.store.clients.get(r);if(i!=null){let r=i[i.length-1],a=r.id.clock+r.length;for(let r=0,o=t[r];r<t.length&&o.clock<a;o=t[++r])Za(e,i,o.clock,o.len,n)}}),Li=(e,t)=>{let n=0,r=e.length-1;for(;n<=r;){let i=h((n+r)/2),a=e[i],o=a.clock;if(o<=t){if(t<o+a.len)return i;n=i+1}else r=i-1}return null},Ri=(e,t)=>{let n=e.clients.get(t.client);return n!==void 0&&Li(n,t.clock)!==null},zi=e=>{e.clients.forEach(e=>{e.sort((e,t)=>e.clock-t.clock);let t,n;for(t=1,n=1;t<e.length;t++){let r=e[n-1],i=e[t];r.clock+r.len>=i.clock?e[n-1]=new Pi(r.clock,_(r.len,i.clock+i.len-r.clock)):(n<t&&(e[n]=i),n++)}e.length=n})},Bi=e=>{let t=new Fi;for(let n=0;n<e.length;n++)e[n].clients.forEach((r,i)=>{if(!t.clients.has(i)){let a=r.slice();for(let t=n+1;t<e.length;t++)Ve(a,e[t].clients.get(i)||[]);t.clients.set(i,a)}});return zi(t),t},Vi=(e,t,n,r)=>{j(e.clients,t,()=>[]).push(new Pi(n,r))},Hi=()=>new Fi,Ui=e=>{let t=Hi();return e.clients.forEach((e,n)=>{let r=[];for(let t=0;t<e.length;t++){let n=e[t];if(n.deleted){let i=n.id.clock,a=n.length;if(t+1<e.length)for(let n=e[t+1];t+1<e.length&&n.deleted;n=e[++t+1])a+=n.length;r.push(new Pi(i,a))}}r.length>0&&t.clients.set(n,r)}),t},Wi=(e,t)=>{C(e.restEncoder,t.clients.size),y(t.clients.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{e.resetDsCurVal(),C(e.restEncoder,t);let r=n.length;C(e.restEncoder,r);for(let t=0;t<r;t++){let r=n[t];e.writeDsClock(r.clock),e.writeDsLen(r.len)}})},Gi=e=>{let t=new Fi,n=k(e.restDecoder);for(let r=0;r<n;r++){e.resetDsCurVal();let n=k(e.restDecoder),r=k(e.restDecoder);if(r>0){let i=j(t.clients,n,()=>[]);for(let t=0;t<r;t++)i.push(new Pi(e.readDsClock(),e.readDsLen()))}}return t},Ki=(e,t,n)=>{let r=new Fi,i=k(e.restDecoder);for(let a=0;a<i;a++){e.resetDsCurVal();let i=k(e.restDecoder),a=k(e.restDecoder),o=n.clients.get(i)||[],s=B(n,i);for(let n=0;n<a;n++){let n=e.readDsClock(),a=n+e.readDsLen();if(n<s){s<a&&Vi(r,i,s,a-s);let e=V(o,n),c=o[e];for(!c.deleted&&c.id.clock<n&&(o.splice(e+1,0,uc(t,c,n-c.id.clock)),e++);e<o.length&&(c=o[e++],c.id.clock<a);)c.deleted||(a<c.id.clock+c.length&&o.splice(e,0,uc(t,c,a-c.id.clock)),c.delete(t))}else Vi(r,i,n,a-n)}}if(r.clients.size>0){let e=new na;return C(e.restEncoder,0),Wi(e,r),e.toUint8Array()}return null},qi=rn,Ji=class e extends $t{constructor({guid:e=sn(),collectionid:t=null,gc:n=!0,gcFilter:r=()=>!0,meta:i=null,autoLoad:a=!1,shouldLoad:o=!0}={}){super(),this.gc=n,this.gcFilter=r,this.clientID=qi(),this.guid=e,this.collectionid=t,this.share=new Map,this.store=new Wa,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=o,this.autoLoad=a,this.meta=i,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=ln(e=>{this.on(`load`,()=>{this.isLoaded=!0,e(this)})});let s=()=>ln(e=>{let t=n=>{(n===void 0||n===!0)&&(this.off(`sync`,t),e())};this.on(`sync`,t)});this.on(`sync`,e=>{e===!1&&this.isSynced&&(this.whenSynced=s()),this.isSynced=e===void 0||e===!0,this.isSynced&&!this.isLoaded&&this.emit(`load`,[this])}),this.whenSynced=s()}load(){let e=this._item;e!==null&&!this.shouldLoad&&U(e.parent.doc,e=>{e.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(y(this.subdocs).map(e=>e.guid))}transact(e,t=null){return U(this,e,t)}get(e,t=G){let n=j(this.share,e,()=>{let e=new t;return e._integrate(this,null),e}),r=n.constructor;if(t!==G&&r!==t)if(r===G){let r=new t;r._map=n._map,n._map.forEach(e=>{for(;e!==null;e=e.left)e.parent=r}),r._start=n._start;for(let e=r._start;e!==null;e=e.right)e.parent=r;return r._length=n._length,this.share.set(e,r),r._integrate(this,null),r}else throw Error(`Type with the name ${e} has already been defined with a different constructor`);return n}getArray(e=``){return this.get(e,es)}getText(e=``){return this.get(e,xs)}getMap(e=``){return this.get(e,rs)}getXmlElement(e=``){return this.get(e,Es)}getXmlFragment(e=``){return this.get(e,ws)}toJSON(){let e={};return this.share.forEach((t,n)=>{e[n]=t.toJSON()}),e}destroy(){this.isDestroyed=!0,y(this.subdocs).forEach(e=>e.destroy());let t=this._item;if(t!==null){this._item=null;let n=t.content;n.doc=new e({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=t,U(t.parent.doc,e=>{let r=n.doc;t.deleted||e.subdocsAdded.add(r),e.subdocsRemoved.add(this)},null,!0)}this.emit(`destroyed`,[!0]),this.emit(`destroy`,[this]),super.destroy()}},Yi=class{constructor(e){this.restDecoder=e}resetDsCurVal(){}readDsClock(){return k(this.restDecoder)}readDsLen(){return k(this.restDecoder)}},Xi=class extends Yi{readLeftID(){return z(k(this.restDecoder),k(this.restDecoder))}readRightID(){return z(k(this.restDecoder),k(this.restDecoder))}readClient(){return k(this.restDecoder)}readInfo(){return Mt(this.restDecoder)}readString(){return Pt(this.restDecoder)}readParentInfo(){return k(this.restDecoder)===1}readTypeRef(){return k(this.restDecoder)}readLen(){return k(this.restDecoder)}readAny(){return Lt(this.restDecoder)}readBuf(){return Vn(O(this.restDecoder))}readJSON(){return JSON.parse(Pt(this.restDecoder))}readKey(){return Pt(this.restDecoder)}},Zi=class{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=k(this.restDecoder),this.dsCurrVal}readDsLen(){let e=k(this.restDecoder)+1;return this.dsCurrVal+=e,e}},Qi=class extends Zi{constructor(e){super(e),this.keys=[],k(e),this.keyClockDecoder=new Bt(O(e)),this.clientDecoder=new zt(O(e)),this.leftClockDecoder=new Bt(O(e)),this.rightClockDecoder=new Bt(O(e)),this.infoDecoder=new Rt(O(e),Mt),this.stringDecoder=new Vt(O(e)),this.parentInfoDecoder=new Rt(O(e),Mt),this.typeRefDecoder=new zt(O(e)),this.lenDecoder=new zt(O(e))}readLeftID(){return new Ta(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Ta(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return Lt(this.restDecoder)}readBuf(){return O(this.restDecoder)}readJSON(){return Lt(this.restDecoder)}readKey(){let e=this.keyClockDecoder.read();if(e<this.keys.length)return this.keys[e];{let e=this.stringDecoder.read();return this.keys.push(e),e}}},$i=class{constructor(){this.restEncoder=rt()}toUint8Array(){return x(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){C(this.restEncoder,e)}writeDsLen(e){C(this.restEncoder,e)}},ea=class extends $i{writeLeftID(e){C(this.restEncoder,e.client),C(this.restEncoder,e.clock)}writeRightID(e){C(this.restEncoder,e.client),C(this.restEncoder,e.clock)}writeClient(e){C(this.restEncoder,e)}writeInfo(e){st(this.restEncoder,e)}writeString(e){dt(this.restEncoder,e)}writeParentInfo(e){C(this.restEncoder,+!!e)}writeTypeRef(e){C(this.restEncoder,e)}writeLen(e){C(this.restEncoder,e)}writeAny(e){yt(this.restEncoder,e)}writeBuf(e){w(this.restEncoder,e)}writeJSON(e){dt(this.restEncoder,JSON.stringify(e))}writeKey(e){dt(this.restEncoder,e)}},ta=class{constructor(){this.restEncoder=rt(),this.dsCurrVal=0}toUint8Array(){return x(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){let t=e-this.dsCurrVal;this.dsCurrVal=e,C(this.restEncoder,t)}writeDsLen(e){e===0&&D(),C(this.restEncoder,e-1),this.dsCurrVal+=e}},na=class extends ta{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new wt,this.clientEncoder=new St,this.leftClockEncoder=new wt,this.rightClockEncoder=new wt,this.infoEncoder=new bt(st),this.stringEncoder=new Tt,this.parentInfoEncoder=new bt(st),this.typeRefEncoder=new St,this.lenEncoder=new St}toUint8Array(){let e=rt();return C(e,0),w(e,this.keyClockEncoder.toUint8Array()),w(e,this.clientEncoder.toUint8Array()),w(e,this.leftClockEncoder.toUint8Array()),w(e,this.rightClockEncoder.toUint8Array()),w(e,x(this.infoEncoder)),w(e,this.stringEncoder.toUint8Array()),w(e,x(this.parentInfoEncoder)),w(e,this.typeRefEncoder.toUint8Array()),w(e,this.lenEncoder.toUint8Array()),ft(e,x(this.restEncoder)),x(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(+!!e)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){yt(this.restEncoder,e)}writeBuf(e){w(this.restEncoder,e)}writeJSON(e){yt(this.restEncoder,e)}writeKey(e){let t=this.keyMap.get(e);t===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(t)}},ra=(e,t,n,r)=>{r=_(r,t[0].id.clock);let i=V(t,r);C(e.restEncoder,t.length-i),e.writeClient(n),C(e.restEncoder,r);let a=t[i];a.write(e,r-a.id.clock);for(let n=i+1;n<t.length;n++)t[n].write(e,0)},ia=(e,t,n)=>{let r=new Map;n.forEach((e,n)=>{B(t,n)>e&&r.set(n,e)}),Ga(t).forEach((e,t)=>{n.has(t)||r.set(t,0)}),C(e.restEncoder,r.size),y(r.entries()).sort((e,t)=>t[0]-e[0]).forEach(([n,r])=>{ra(e,t.clients.get(n),n,r)})},aa=(e,t)=>{let n=A(),r=k(e.restDecoder);for(let i=0;i<r;i++){let r=k(e.restDecoder),i=Array(r),a=e.readClient(),o=k(e.restDecoder);n.set(a,{i:0,refs:i});for(let n=0;n<r;n++){let r=e.readInfo();switch(31&r){case 0:{let t=e.readLen();i[n]=new K(z(a,o),t),o+=t;break}case 10:{let t=k(e.restDecoder);i[n]=new Y(z(a,o),t),o+=t;break}default:{let s=(r&192)==0,c=new J(z(a,o),null,(r&128)==128?e.readLeftID():null,null,(r&64)==64?e.readRightID():null,s?e.readParentInfo()?t.get(e.readString()):e.readLeftID():null,s&&(r&32)==32?e.readString():null,pc(e,r));i[n]=c,o+=c.length}}}}return n},oa=(e,t,n)=>{let r=[],i=y(n.keys()).sort((e,t)=>e-t);if(i.length===0)return null;let a=()=>{if(i.length===0)return null;let e=n.get(i[i.length-1]);for(;e.refs.length===e.i;)if(i.pop(),i.length>0)e=n.get(i[i.length-1]);else return null;return e},o=a();if(o===null)return null;let s=new Wa,c=new Map,l=(e,t)=>{let n=c.get(e);(n==null||n>t)&&c.set(e,t)},u=o.refs[o.i++],d=new Map,f=()=>{for(let e of r){let t=e.id.client,r=n.get(t);r?(r.i--,s.clients.set(t,r.refs.slice(r.i)),n.delete(t),r.i=0,r.refs=[]):s.clients.set(t,[e]),i=i.filter(e=>e!==t)}r.length=0};for(;;){if(u.constructor!==Y){let i=j(d,u.id.client,()=>B(t,u.id.client))-u.id.clock;if(i<0)r.push(u),l(u.id.client,u.id.clock-1),f();else{let a=u.getMissing(e,t);if(a!==null){r.push(u);let e=n.get(a)||{refs:[],i:0};if(e.refs.length===e.i)l(a,B(t,a)),f();else{u=e.refs[e.i++];continue}}else (i===0||i<u.length)&&(u.integrate(e,i),d.set(u.id.client,u.id.clock+u.length))}}if(r.length>0)u=r.pop();else if(o!==null&&o.i<o.refs.length)u=o.refs[o.i++];else{if(o=a(),o===null)break;u=o.refs[o.i++]}}if(s.clients.size>0){let e=new na;return ia(e,s,new Map),C(e.restEncoder,0),{missing:c,update:e.toUint8Array()}}return null},sa=(e,t)=>ia(e,t.doc.store,t.beforeState),ca=(e,t,n,r=new Qi(e))=>U(t,e=>{e.local=!1;let t=!1,n=e.doc,i=n.store,a=oa(e,i,aa(r,n)),o=i.pendingStructs;if(o){for(let[e,n]of o.missing)if(n<B(i,e)){t=!0;break}if(a){for(let[e,t]of a.missing){let n=o.missing.get(e);(n==null||n>t)&&o.missing.set(e,t)}o.update=ho([o.update,a.update])}}else i.pendingStructs=a;let s=Ki(r,e,i);if(i.pendingDs){let t=new Qi(kt(i.pendingDs));k(t.restDecoder);let n=Ki(t,e,i);s&&n?i.pendingDs=ho([s,n]):i.pendingDs=s||n}else i.pendingDs=s;if(t){let t=i.pendingStructs.update;i.pendingStructs=null,la(e.doc,t)}},n,!1),la=(e,t,n,r=Qi)=>{let i=kt(t);ca(i,e,n,new r(i))},ua=(e,t,n)=>la(e,t,n,Xi),da=(e,t,n=new Map)=>{ia(e,t.store,n),Wi(e,Ui(t.store))},fa=(e,t=new Uint8Array([0]),n=new na)=>{da(n,e,ha(t));let r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(go(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===ea)return po(r.map((e,t)=>t===0?e:xo(e)));if(n.constructor===na)return ho(r)}return r[0]},pa=(e,t)=>fa(e,t,new ea),ma=e=>{let t=new Map,n=k(e.restDecoder);for(let r=0;r<n;r++){let n=k(e.restDecoder),r=k(e.restDecoder);t.set(n,r)}return t},ha=e=>ma(new Yi(kt(e))),ga=(e,t)=>(C(e.restEncoder,t.size),y(t.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{C(e.restEncoder,t),C(e.restEncoder,n)}),e),_a=(e,t)=>ga(e,Ga(t.store)),va=(e,t=new ta)=>(e instanceof Map?ga(t,e):_a(t,e),t.toUint8Array()),ya=e=>va(e,new $i),ba=class{constructor(){this.l=[]}},xa=()=>new ba,Sa=(e,t)=>e.l.push(t),Ca=(e,t)=>{let n=e.l,r=n.length;e.l=n.filter(e=>t!==e),r===e.l.length&&console.error(`[yjs] Tried to remove event handler that doesn't exist.`)},wa=(e,t,n)=>En(e.l,[t,n]),Ta=class{constructor(e,t){this.client=e,this.clock=t}},Ea=(e,t)=>e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock,z=(e,t)=>new Ta(e,t),Da=e=>{for(let[t,n]of e.doc.share.entries())if(n===e)return t;throw D()},Oa=(e,t)=>{for(;t!==null;){if(t.parent===e)return!0;t=t.parent._item}return!1},ka=class{constructor(e,t,n,r=0){this.type=e,this.tname=t,this.item=n,this.assoc=r}},Aa=e=>{let t={};return e.type&&(t.type=e.type),e.tname&&(t.tname=e.tname),e.item&&(t.item=e.item),e.assoc!=null&&(t.assoc=e.assoc),t},ja=e=>new ka(e.type==null?null:z(e.type.client,e.type.clock),e.tname??null,e.item==null?null:z(e.item.client,e.item.clock),e.assoc==null?0:e.assoc),Ma=class{constructor(e,t,n=0){this.type=e,this.index=t,this.assoc=n}},Na=(e,t,n=0)=>new Ma(e,t,n),Pa=(e,t,n)=>{let r=null,i=null;return e._item===null?i=Da(e):r=z(e._item.id.client,e._item.id.clock),new ka(r,i,t,n)},Fa=(e,t,n=0)=>{let r=e._start;if(n<0){if(t===0)return Pa(e,null,n);t--}for(;r!==null;){if(!r.deleted&&r.countable){if(r.length>t)return Pa(e,z(r.id.client,r.id.clock+t),n);t-=r.length}if(r.right===null&&n<0)return Pa(e,r.lastId,n);r=r.right}return Pa(e,null,n)},Ia=(e,t)=>{let n=qa(e,t);return{item:n,diff:t.clock-n.id.clock}},La=(e,t,n=!0)=>{let r=t.store,i=e.item,a=e.type,o=e.tname,s=e.assoc,c=null,l=0;if(i!==null){if(B(r,i.client)<=i.clock)return null;let e=n?cc(r,i):Ia(r,i),t=e.item;if(!(t instanceof J))return null;if(c=t.parent,c._item===null||!c._item.deleted){l=t.deleted||!t.countable?0:e.diff+(s>=0?0:1);let n=t.left;for(;n!==null;)!n.deleted&&n.countable&&(l+=n.length),n=n.left}}else{if(o!==null)c=t.get(o);else if(a!==null){if(B(r,a.client)<=a.clock)return null;let{item:e}=n?cc(r,a):{item:qa(r,a)};if(e instanceof J&&e.content instanceof oc)c=e.content.type;else return null}else throw D();l=s>=0?c._length:0}return Na(c,l,e.assoc)},Ra=(e,t)=>e===t||e!==null&&t!==null&&e.tname===t.tname&&Ea(e.item,t.item)&&Ea(e.type,t.type)&&e.assoc===t.assoc,za=class{constructor(e,t){this.ds=e,this.sv=t}},Ba=(e,t)=>new za(e,t);Ba(Hi(),new Map);var Va=e=>Ba(Ui(e.store),Ga(e.store)),Ha=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!Ri(t.ds,e.id),Ua=(e,t)=>{let n=j(e.meta,Ua,v),r=e.doc.store;n.has(t)||(t.sv.forEach((t,n)=>{t<B(r,n)&&H(e,z(n,t))}),Ii(e,t.ds,e=>{}),n.add(t))},Wa=class{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}},Ga=e=>{let t=new Map;return e.clients.forEach((e,n)=>{let r=e[e.length-1];t.set(n,r.id.clock+r.length)}),t},B=(e,t)=>{let n=e.clients.get(t);if(n===void 0)return 0;let r=n[n.length-1];return r.id.clock+r.length},Ka=(e,t)=>{let n=e.clients.get(t.id.client);if(n===void 0)n=[],e.clients.set(t.id.client,n);else{let e=n[n.length-1];if(e.id.clock+e.length!==t.id.clock)throw D()}n.push(t)},V=(e,t)=>{let n=0,r=e.length-1,i=e[r],a=i.id.clock;if(a===t)return r;let o=h(t/(a+i.length-1)*r);for(;n<=r;){if(i=e[o],a=i.id.clock,a<=t){if(t<a+i.length)return o;n=o+1}else r=o-1;o=h((n+r)/2)}throw D()},qa=(e,t)=>{let n=e.clients.get(t.client);return n[V(n,t.clock)]},Ja=(e,t,n)=>{let r=V(t,n),i=t[r];return i.id.clock<n&&i instanceof J?(t.splice(r+1,0,uc(e,i,n-i.id.clock)),r+1):r},H=(e,t)=>{let n=e.doc.store.clients.get(t.client);return n[Ja(e,n,t.clock)]},Ya=(e,t,n)=>{let r=t.clients.get(n.client),i=V(r,n.clock),a=r[i];return n.clock!==a.id.clock+a.length-1&&a.constructor!==K&&r.splice(i+1,0,uc(e,a,n.clock-a.id.clock+1)),a},Xa=(e,t,n)=>{let r=e.clients.get(t.id.client);r[V(r,t.id.clock)]=n},Za=(e,t,n,r,i)=>{if(r===0)return;let a=n+r,o=Ja(e,t,n),s;do s=t[o++],a<s.id.clock+s.length&&Ja(e,t,a),i(s);while(o<t.length&&t[o].id.clock<a)},Qa=class{constructor(e,t,n){this.doc=e,this.deleteSet=new Fi,this.beforeState=Ga(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=t,this.meta=new Map,this.local=n,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}},$a=(e,t)=>t.deleteSet.clients.size===0&&!Qt(t.afterState,(e,n)=>t.beforeState.get(n)!==e)?!1:(zi(t.deleteSet),sa(e,t),Wi(e,t.deleteSet),!0),eo=(e,t,n)=>{let r=t._item;(r===null||r.id.clock<(e.beforeState.get(r.id.client)||0)&&!r.deleted)&&j(e.changed,t,v).add(n)},to=(e,t)=>{let n=e[t],r=e[t-1],i=t;for(;i>0;n=r,r=e[--i-1]){if(r.deleted===n.deleted&&r.constructor===n.constructor&&r.mergeWith(n)){n instanceof J&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,r);continue}break}let a=t-i;return a&&e.splice(t+1-a,a),a},no=(e,t,n)=>{for(let[r,i]of e.clients.entries()){let e=t.clients.get(r);for(let r=i.length-1;r>=0;r--){let a=i[r],o=a.clock+a.len;for(let r=V(e,a.clock),i=e[r];r<e.length&&i.id.clock<o;i=e[++r]){let i=e[r];if(a.clock+a.len<=i.id.clock)break;i instanceof J&&i.deleted&&!i.keep&&n(i)&&i.gc(t,!1)}}}},ro=(e,t)=>{e.clients.forEach((e,n)=>{let r=t.clients.get(n);for(let t=e.length-1;t>=0;t--){let n=e[t],i=g(r.length-1,1+V(r,n.clock+n.len-1));for(let e=i,t=r[e];e>0&&t.id.clock>=n.clock;t=r[e])e-=1+to(r,e)}})},io=(e,t)=>{if(t<e.length){let n=e[t],r=n.doc,i=r.store,a=n.deleteSet,o=n._mergeStructs;try{zi(a),n.afterState=Ga(n.doc.store),r.emit(`beforeObserverCalls`,[n,r]);let e=[];n.changed.forEach((t,r)=>e.push(()=>{(r._item===null||!r._item.deleted)&&r._callObserver(n,t)})),e.push(()=>{n.changedParentTypes.forEach((t,r)=>{r._dEH.l.length>0&&(r._item===null||!r._item.deleted)&&(t=t.filter(e=>e.target._item===null||!e.target._item.deleted),t.forEach(e=>{e.currentTarget=r,e._path=null}),t.sort((e,t)=>e.path.length-t.path.length),e.push(()=>{wa(r._dEH,t,n)}))}),e.push(()=>r.emit(`afterTransaction`,[n,r])),e.push(()=>{n._needFormattingCleanup&&vs(n)})}),En(e,[])}finally{r.gc&&no(a,i,r.gcFilter),ro(a,i),n.afterState.forEach((e,t)=>{let r=n.beforeState.get(t)||0;if(r!==e){let e=i.clients.get(t),n=_(V(e,r),1);for(let t=e.length-1;t>=n;)t-=1+to(e,t)}});for(let e=o.length-1;e>=0;e--){let{client:t,clock:n}=o[e].id,r=i.clients.get(t),a=V(r,n);a+1<r.length&&to(r,a+1)>1||a>0&&to(r,a)}if(!n.local&&n.afterState.get(r.clientID)!==n.beforeState.get(r.clientID)&&(Oi(Ci,gi,`[yjs] `,_i,xi,`Changed the client-id because another client seems to be using it.`),r.clientID=qi()),r.emit(`afterTransactionCleanup`,[n,r]),r._observers.has(`update`)){let e=new ea;$a(e,n)&&r.emit(`update`,[e.toUint8Array(),n.origin,r,n])}if(r._observers.has(`updateV2`)){let e=new na;$a(e,n)&&r.emit(`updateV2`,[e.toUint8Array(),n.origin,r,n])}let{subdocsAdded:s,subdocsLoaded:c,subdocsRemoved:l}=n;(s.size>0||l.size>0||c.size>0)&&(s.forEach(e=>{e.clientID=r.clientID,e.collectionid??=r.collectionid,r.subdocs.add(e)}),l.forEach(e=>r.subdocs.delete(e)),r.emit(`subdocs`,[{loaded:c,added:s,removed:l},r,n]),l.forEach(e=>e.destroy())),e.length<=t+1?(r._transactionCleanups=[],r.emit(`afterAllTransactions`,[r,e])):io(e,t+1)}}},U=(e,t,n=null,r=!0)=>{let i=e._transactionCleanups,a=!1,o=null;e._transaction===null&&(a=!0,e._transaction=new Qa(e,n,r),i.push(e._transaction),i.length===1&&e.emit(`beforeAllTransactions`,[e]),e.emit(`beforeTransaction`,[e._transaction,e]));try{o=t(e._transaction)}finally{if(a){let t=e._transaction===i[0];e._transaction=null,t&&io(i,0)}}return o},ao=class{constructor(e,t){this.insertions=t,this.deletions=e,this.meta=new Map}},oo=(e,t,n)=>{Ii(e,n.deletions,n=>{n instanceof J&&t.scope.some(t=>t===e.doc||Oa(t,n))&&lc(n,!1)})},so=(e,t,n)=>{let r=null,i=e.doc,a=e.scope;U(i,n=>{for(;t.length>0&&e.currStackItem===null;){let r=i.store,o=t.pop(),s=new Set,c=[],l=!1;Ii(n,o.insertions,e=>{if(e instanceof J){if(e.redone!==null){let{item:t,diff:i}=cc(r,e.id);i>0&&(t=H(n,z(t.id.client,t.id.clock+i))),e=t}!e.deleted&&a.some(t=>t===n.doc||Oa(t,e))&&c.push(e)}}),Ii(n,o.deletions,e=>{e instanceof J&&a.some(t=>t===n.doc||Oa(t,e))&&!Ri(o.insertions,e.id)&&s.add(e)}),s.forEach(t=>{l=fc(n,t,s,o.insertions,e.ignoreRemoteMapChanges,e)!==null||l});for(let t=c.length-1;t>=0;t--){let r=c[t];e.deleteFilter(r)&&(r.delete(n),l=!0)}e.currStackItem=l?o:null}n.changed.forEach((e,t)=>{e.has(null)&&t._searchMarker&&(t._searchMarker.length=0)}),r=n},e);let o=e.currStackItem;if(o!=null){let t=r.changedParentTypes;e.emit(`stack-item-popped`,[{stackItem:o,type:n,changedParentTypes:t,origin:e},e]),e.currStackItem=null}return o},co=class extends $t{constructor(e,{captureTimeout:t=500,captureTransaction:n=e=>!0,deleteFilter:r=()=>!0,trackedOrigins:i=new Set([null]),ignoreRemoteMapChanges:a=!1,doc:o=b(e)?e[0].doc:e instanceof Ji?e:e.doc}={}){super(),this.scope=[],this.doc=o,this.addToScope(e),this.deleteFilter=r,i.add(this),this.trackedOrigins=i,this.captureTransaction=n,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.currStackItem=null,this.lastChange=0,this.ignoreRemoteMapChanges=a,this.captureTimeout=t,this.afterTransactionHandler=e=>{if(!this.captureTransaction(e)||!this.scope.some(t=>e.changedParentTypes.has(t)||t===this.doc)||!this.trackedOrigins.has(e.origin)&&(!e.origin||!this.trackedOrigins.has(e.origin.constructor)))return;let t=this.undoing,n=this.redoing,r=t?this.redoStack:this.undoStack;t?this.stopCapturing():n||this.clear(!1,!0);let i=new Fi;e.afterState.forEach((t,n)=>{let r=e.beforeState.get(n)||0,a=t-r;a>0&&Vi(i,n,r,a)});let a=cn(),o=!1;if(this.lastChange>0&&a-this.lastChange<this.captureTimeout&&r.length>0&&!t&&!n){let t=r[r.length-1];t.deletions=Bi([t.deletions,e.deleteSet]),t.insertions=Bi([t.insertions,i])}else r.push(new ao(e.deleteSet,i)),o=!0;!t&&!n&&(this.lastChange=a),Ii(e,e.deleteSet,t=>{t instanceof J&&this.scope.some(n=>n===e.doc||Oa(n,t))&&lc(t,!0)});let s=[{stackItem:r[r.length-1],origin:e.origin,type:t?`redo`:`undo`,changedParentTypes:e.changedParentTypes},this];o?this.emit(`stack-item-added`,s):this.emit(`stack-item-updated`,s)},this.doc.on(`afterTransaction`,this.afterTransactionHandler),this.doc.on(`destroy`,()=>{this.destroy()})}addToScope(e){let t=new Set(this.scope);e=b(e)?e:[e],e.forEach(e=>{t.has(e)||(t.add(e),(e instanceof G?e.doc!==this.doc:e!==this.doc)&&ki(`[yjs#509] Not same Y.Doc`),this.scope.push(e))})}addTrackedOrigin(e){this.trackedOrigins.add(e)}removeTrackedOrigin(e){this.trackedOrigins.delete(e)}clear(e=!0,t=!0){(e&&this.canUndo()||t&&this.canRedo())&&this.doc.transact(n=>{e&&(this.undoStack.forEach(e=>oo(n,this,e)),this.undoStack=[]),t&&(this.redoStack.forEach(e=>oo(n,this,e)),this.redoStack=[]),this.emit(`stack-cleared`,[{undoStackCleared:e,redoStackCleared:t}])})}stopCapturing(){this.lastChange=0}undo(){this.undoing=!0;let e;try{e=so(this,this.undoStack,`undo`)}finally{this.undoing=!1}return e}redo(){this.redoing=!0;let e;try{e=so(this,this.redoStack,`redo`)}finally{this.redoing=!1}return e}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off(`afterTransaction`,this.afterTransactionHandler),super.destroy()}};function*lo(e){let t=k(e.restDecoder);for(let n=0;n<t;n++){let t=k(e.restDecoder),n=e.readClient(),r=k(e.restDecoder);for(let i=0;i<t;i++){let t=e.readInfo();if(t===10){let t=k(e.restDecoder);yield new Y(z(n,r),t),r+=t}else if(31&t){let i=(t&192)==0,a=new J(z(n,r),null,(t&128)==128?e.readLeftID():null,null,(t&64)==64?e.readRightID():null,i?e.readParentInfo()?e.readString():e.readLeftID():null,i&&(t&32)==32?e.readString():null,pc(e,t));yield a,r+=a.length}else{let t=e.readLen();yield new K(z(n,r),t),r+=t}}}}var uo=class{constructor(e,t){this.gen=lo(e),this.curr=null,this.done=!1,this.filterSkips=t,this.next()}next(){do this.curr=this.gen.next().value||null;while(this.filterSkips&&this.curr!==null&&this.curr.constructor===Y);return this.curr}},fo=class{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}},po=e=>ho(e,Xi,ea),mo=(e,t)=>{if(e.constructor===K){let{client:n,clock:r}=e.id;return new K(z(n,r+t),e.length-t)}else if(e.constructor===Y){let{client:n,clock:r}=e.id;return new Y(z(n,r+t),e.length-t)}else{let n=e,{client:r,clock:i}=n.id;return new J(z(r,i+t),null,z(r,i+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},ho=(e,t=Qi,n=na)=>{if(e.length===1)return e[0];let r=e.map(e=>new t(kt(e))),i=r.map(e=>new uo(e,!0)),a=null,o=new n,s=new fo(o);for(;i=i.filter(e=>e.curr!==null),i.sort((e,t)=>{if(e.curr.id.client===t.curr.id.client){let n=e.curr.id.clock-t.curr.id.clock;return n===0?e.curr.constructor===t.curr.constructor?0:e.curr.constructor===Y?1:-1:n}else return t.curr.id.client-e.curr.id.client}),i.length!==0;){let e=i[0],t=e.curr.id.client;if(a!==null){let n=e.curr,r=!1;for(;n!==null&&n.id.clock+n.length<=a.struct.id.clock+a.struct.length&&n.id.client>=a.struct.id.client;)n=e.next(),r=!0;if(n===null||n.id.client!==t||r&&n.id.clock>a.struct.id.clock+a.struct.length)continue;if(t!==a.struct.id.client)vo(s,a.struct,a.offset),a={struct:n,offset:0},e.next();else if(a.struct.id.clock+a.struct.length<n.id.clock)if(a.struct.constructor===Y)a.struct.length=n.id.clock+n.length-a.struct.id.clock;else{vo(s,a.struct,a.offset);let e=n.id.clock-a.struct.id.clock-a.struct.length;a={struct:new Y(z(t,a.struct.id.clock+a.struct.length),e),offset:0}}else{let t=a.struct.id.clock+a.struct.length-n.id.clock;t>0&&(a.struct.constructor===Y?a.struct.length-=t:n=mo(n,t)),a.struct.mergeWith(n)||(vo(s,a.struct,a.offset),a={struct:n,offset:0},e.next())}}else a={struct:e.curr,offset:0},e.next();for(let n=e.curr;n!==null&&n.id.client===t&&n.id.clock===a.struct.id.clock+a.struct.length&&n.constructor!==Y;n=e.next())vo(s,a.struct,a.offset),a={struct:n,offset:0}}return a!==null&&(vo(s,a.struct,a.offset),a=null),yo(s),Wi(o,Bi(r.map(e=>Gi(e)))),o.toUint8Array()},go=(e,t,n=Qi,r=na)=>{let i=ha(t),a=new r,o=new fo(a),s=new n(kt(e)),c=new uo(s,!1);for(;c.curr;){let e=c.curr,t=e.id.client,n=i.get(t)||0;if(c.curr.constructor===Y){c.next();continue}if(e.id.clock+e.length>n)for(vo(o,e,_(n-e.id.clock,0)),c.next();c.curr&&c.curr.id.client===t;)vo(o,c.curr,0),c.next();else for(;c.curr&&c.curr.id.client===t&&c.curr.id.clock+c.curr.length<=n;)c.next()}return yo(o),Wi(a,Gi(s)),a.toUint8Array()},_o=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:x(e.encoder.restEncoder)}),e.encoder.restEncoder=rt(),e.written=0)},vo=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&_o(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),C(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},yo=e=>{_o(e);let t=e.encoder.restEncoder;C(t,e.clientStructs.length);for(let n=0;n<e.clientStructs.length;n++){let r=e.clientStructs[n];C(t,r.written),ft(t,r.restEncoder)}},bo=(e,t,n,r)=>{let i=new n(kt(e)),a=new uo(i,!1),o=new r,s=new fo(o);for(let e=a.curr;e!==null;e=a.next())vo(s,t(e),0);return yo(s),Wi(o,Gi(i)),o.toUint8Array()},xo=e=>bo(e,Dn,Qi,ea),So=`You must not compute changes after the event-handler fired.`,Co=class{constructor(e,t){this.target=e,this.currentTarget=e,this.transaction=t,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||=wo(this.currentTarget,this.target)}deletes(e){return Ri(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw T(So);let e=new Map,t=this.target;this.transaction.changed.get(t).forEach(n=>{if(n!==null){let r=t._map.get(n),i,a;if(this.adds(r)){let e=r.left;for(;e!==null&&this.adds(e);)e=e.left;if(this.deletes(r))if(e!==null&&this.deletes(e))i=`delete`,a=Be(e.content.getContent());else return;else e!==null&&this.deletes(e)?(i=`update`,a=Be(e.content.getContent())):(i=`add`,a=void 0)}else if(this.deletes(r))i=`delete`,a=Be(r.content.getContent());else return;e.set(n,{action:i,oldValue:a})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(e===null){if(this.transaction.doc._transactionCleanups.length===0)throw T(So);let t=this.target,n=v(),r=v(),i=[];if(e={added:n,deleted:r,delta:i,keys:this.keys},this.transaction.changed.get(t).has(null)){let e=null,a=()=>{e&&i.push(e)};for(let i=t._start;i!==null;i=i.right)i.deleted?this.deletes(i)&&!this.adds(i)&&((e===null||e.delete===void 0)&&(a(),e={delete:0}),e.delete+=i.length,r.add(i)):this.adds(i)?((e===null||e.insert===void 0)&&(a(),e={insert:[]}),e.insert=e.insert.concat(i.content.getContent()),n.add(i)):((e===null||e.retain===void 0)&&(a(),e={retain:0}),e.retain+=i.length);e!==null&&e.retain===void 0&&a()}this._changes=e}return e}},wo=(e,t)=>{let n=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)n.unshift(t._item.parentSub);else{let e=0,r=t._item.parent._start;for(;r!==t._item&&r!==null;)!r.deleted&&r.countable&&(e+=r.length),r=r.right;n.unshift(e)}t=t._item.parent}return n},W=()=>{ki(`Invalid access: Add Yjs type to a document before reading data.`)},To=80,Eo=0,Do=class{constructor(e,t){e.marker=!0,this.p=e,this.index=t,this.timestamp=Eo++}},Oo=e=>{e.timestamp=Eo++},ko=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=Eo++},Ao=(e,t,n)=>{if(e.length>=To){let r=e.reduce((e,t)=>e.timestamp<t.timestamp?e:t);return ko(r,t,n),r}else{let r=new Do(t,n);return e.push(r),r}},jo=(e,t)=>{if(e._start===null||t===0||e._searchMarker===null)return null;let n=e._searchMarker.length===0?null:e._searchMarker.reduce((e,n)=>Se(t-e.index)<Se(t-n.index)?e:n),r=e._start,i=0;for(n!==null&&(r=n.p,i=n.index,Oo(n));r.right!==null&&i<t;){if(!r.deleted&&r.countable){if(t<i+r.length)break;i+=r.length}r=r.right}for(;r.left!==null&&i>t;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);for(;r.left!==null&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);return n!==null&&Se(n.index-i)<r.parent.length/To?(ko(n,r,i),n):Ao(e._searchMarker,r,i)},Mo=(e,t,n)=>{for(let r=e.length-1;r>=0;r--){let i=e[r];if(n>0){let t=i.p;for(t.marker=!1;t&&(t.deleted||!t.countable);)t=t.left,t&&!t.deleted&&t.countable&&(i.index-=t.length);if(t===null||t.marker===!0){e.splice(r,1);continue}i.p=t,t.marker=!0}(t<i.index||n>0&&t===i.index)&&(i.index=_(t,i.index+n))}},No=(e,t,n)=>{let r=e,i=t.changedParentTypes;for(;j(i,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;wa(r._eH,n,t)},G=class{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=xa(),this._dEH=xa(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,t){this.doc=e,this._item=t}_copy(){throw E()}clone(){throw E()}_write(e){}get _first(){let e=this._start;for(;e!==null&&e.deleted;)e=e.right;return e}_callObserver(e,t){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){Sa(this._eH,e)}observeDeep(e){Sa(this._dEH,e)}unobserve(e){Ca(this._eH,e)}unobserveDeep(e){Ca(this._dEH,e)}toJSON(){}},Po=(e,t,n)=>{e.doc??W(),t<0&&(t=e._length+t),n<0&&(n=e._length+n);let r=n-t,i=[],a=e._start;for(;a!==null&&r>0;){if(a.countable&&!a.deleted){let e=a.content.getContent();if(e.length<=t)t-=e.length;else{for(let n=t;n<e.length&&r>0;n++)i.push(e[n]),r--;t=0}}a=a.right}return i},Fo=e=>{e.doc??W();let t=[],n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){let e=n.content.getContent();for(let n=0;n<e.length;n++)t.push(e[n])}n=n.right}return t},Io=(e,t)=>{let n=[],r=e._start;for(;r!==null;){if(r.countable&&Ha(r,t)){let e=r.content.getContent();for(let t=0;t<e.length;t++)n.push(e[t])}r=r.right}return n},Lo=(e,t)=>{let n=0,r=e._start;for(e.doc??W();r!==null;){if(r.countable&&!r.deleted){let i=r.content.getContent();for(let r=0;r<i.length;r++)t(i[r],n++,e)}r=r.right}},Ro=(e,t)=>{let n=[];return Lo(e,(r,i)=>{n.push(t(r,i,e))}),n},zo=e=>{let t=e._start,n=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};n=t.content.getContent(),r=0,t=t.right}let e=n[r++];return n.length<=r&&(n=null),{done:!1,value:e}}}},Bo=(e,t)=>{e.doc??W();let n=jo(e,t),r=e._start;for(n!==null&&(r=n.p,t-=n.index);r!==null;r=r.right)if(!r.deleted&&r.countable){if(t<r.length)return r.content.getContent()[t];t-=r.length}},Vo=(e,t,n,r)=>{let i=n,a=e.doc,o=a.clientID,s=a.store,c=n===null?t._start:n.right,l=[],u=()=>{l.length>0&&(i=new J(z(o,B(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new Js(l)),i.integrate(e,0),l=[])};r.forEach(n=>{if(n===null)l.push(n);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:l.push(n);break;default:switch(u(),n.constructor){case Uint8Array:case ArrayBuffer:i=new J(z(o,B(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new Fs(new Uint8Array(n))),i.integrate(e,0);break;case Ji:i=new J(z(o,B(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new Bs(n)),i.integrate(e,0);break;default:if(n instanceof G)i=new J(z(o,B(s,o)),i,i&&i.lastId,c,c&&c.id,t,null,new oc(n)),i.integrate(e,0);else throw Error(`Unexpected content type in insert operation`)}}}),u()},Ho=()=>T(`Length exceeded!`),Uo=(e,t,n,r)=>{if(n>t._length)throw Ho();if(n===0)return t._searchMarker&&Mo(t._searchMarker,n,r.length),Vo(e,t,null,r);let i=n,a=jo(t,n),o=t._start;for(a!==null&&(o=a.p,n-=a.index,n===0&&(o=o.prev,n+=o&&o.countable&&!o.deleted?o.length:0));o!==null;o=o.right)if(!o.deleted&&o.countable){if(n<=o.length){n<o.length&&H(e,z(o.id.client,o.id.clock+n));break}n-=o.length}return t._searchMarker&&Mo(t._searchMarker,i,r.length),Vo(e,t,o,r)},Wo=(e,t,n)=>{let r=(t._searchMarker||[]).reduce((e,t)=>t.index>e.index?t:e,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return Vo(e,t,r,n)},Go=(e,t,n,r)=>{if(r===0)return;let i=n,a=r,o=jo(t,n),s=t._start;for(o!==null&&(s=o.p,n-=o.index);s!==null&&n>0;s=s.right)!s.deleted&&s.countable&&(n<s.length&&H(e,z(s.id.client,s.id.clock+n)),n-=s.length);for(;r>0&&s!==null;)s.deleted||(r<s.length&&H(e,z(s.id.client,s.id.clock+r)),s.delete(e),r-=s.length),s=s.right;if(r>0)throw Ho();t._searchMarker&&Mo(t._searchMarker,i,-a+r)},Ko=(e,t,n)=>{let r=t._map.get(n);r!==void 0&&r.delete(e)},qo=(e,t,n,r)=>{let i=t._map.get(n)||null,a=e.doc,o=a.clientID,s;if(r==null)s=new Js([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:s=new Js([r]);break;case Uint8Array:s=new Fs(r);break;case Ji:s=new Bs(r);break;default:if(r instanceof G)s=new oc(r);else throw Error(`Unexpected content type`)}new J(z(o,B(a.store,o)),i,i&&i.lastId,null,null,t,n,s).integrate(e,0)},Jo=(e,t)=>{e.doc??W();let n=e._map.get(t);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},Yo=e=>{let t={};return e.doc??W(),e._map.forEach((e,n)=>{e.deleted||(t[n]=e.content.getContent()[e.length-1])}),t},Xo=(e,t)=>{e.doc??W();let n=e._map.get(t);return n!==void 0&&!n.deleted},Zo=(e,t)=>{let n={};return e._map.forEach((e,r)=>{let i=e;for(;i!==null&&(!t.sv.has(i.id.client)||i.id.clock>=(t.sv.get(i.id.client)||0));)i=i.left;i!==null&&Ha(i,t)&&(n[r]=i.content.getContent()[i.length-1])}),n},Qo=e=>(e.doc??W(),Mi(e._map.entries(),e=>!e[1].deleted)),$o=class extends Co{},es=class e extends G{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){let n=new e;return n.push(t),n}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new e}clone(){let t=new e;return t.insert(0,this.toArray().map(e=>e instanceof G?e.clone():e)),t}get length(){return this.doc??W(),this._length}_callObserver(e,t){super._callObserver(e,t),No(this,e,new $o(this,e))}insert(e,t){this.doc===null?this._prelimContent.splice(e,0,...t):U(this.doc,n=>{Uo(n,this,e,t)})}push(e){this.doc===null?this._prelimContent.push(...e):U(this.doc,t=>{Wo(t,this,e)})}unshift(e){this.insert(0,e)}delete(e,t=1){this.doc===null?this._prelimContent.splice(e,t):U(this.doc,n=>{Go(n,this,e,t)})}get(e){return Bo(this,e)}toArray(){return Fo(this)}slice(e=0,t=this.length){return Po(this,e,t)}toJSON(){return this.map(e=>e instanceof G?e.toJSON():e)}map(e){return Ro(this,e)}forEach(e){Lo(this,e)}[Symbol.iterator](){return zo(this)}_write(e){e.writeTypeRef($s)}},ts=e=>new es,ns=class extends Co{constructor(e,t,n){super(e,t),this.keysChanged=n}},rs=class e extends G{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,t){super._integrate(e,t),this._prelimContent.forEach((e,t)=>{this.set(t,e)}),this._prelimContent=null}_copy(){return new e}clone(){let t=new e;return this.forEach((e,n)=>{t.set(n,e instanceof G?e.clone():e)}),t}_callObserver(e,t){No(this,e,new ns(this,e,t))}toJSON(){this.doc??W();let e={};return this._map.forEach((t,n)=>{if(!t.deleted){let r=t.content.getContent()[t.length-1];e[n]=r instanceof G?r.toJSON():r}}),e}get size(){return[...Qo(this)].length}keys(){return Ni(Qo(this),e=>e[0])}values(){return Ni(Qo(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return Ni(Qo(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??W(),this._map.forEach((t,n)=>{t.deleted||e(t.content.getContent()[t.length-1],n,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc===null?this._prelimContent.delete(e):U(this.doc,t=>{Ko(t,this,e)})}set(e,t){return this.doc===null?this._prelimContent.set(e,t):U(this.doc,n=>{qo(n,this,e,t)}),t}get(e){return Jo(this,e)}has(e){return Xo(this,e)}clear(){this.doc===null?this._prelimContent.clear():U(this.doc,e=>{this.forEach(function(t,n,r){Ko(e,r,n)})})}_write(e){e.writeTypeRef(ec)}},is=e=>new rs,as=(e,t)=>e===t||typeof e==`object`&&typeof t==`object`&&e&&t&&Cn(e,t),os=class{constructor(e,t,n,r){this.left=e,this.right=t,this.index=n,this.currentAttributes=r}forward(){switch(this.right===null&&D(),this.right.content.constructor){case q:this.right.deleted||us(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}},ss=(e,t,n)=>{for(;t.right!==null&&n>0;){switch(t.right.content.constructor){case q:t.right.deleted||us(t.currentAttributes,t.right.content);break;default:t.right.deleted||(n<t.right.length&&H(e,z(t.right.id.client,t.right.id.clock+n)),t.index+=t.right.length,n-=t.right.length);break}t.left=t.right,t.right=t.right.right}return t},cs=(e,t,n,r)=>{let i=new Map,a=r?jo(t,n):null;return a?ss(e,new os(a.p.left,a.p,a.index,i),n-a.index):ss(e,new os(null,t._start,0,i),n)},ls=(e,t,n,r)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===q&&as(r.get(n.right.content.key),n.right.content.value));)n.right.deleted||r.delete(n.right.content.key),n.forward();let i=e.doc,a=i.clientID;r.forEach((r,o)=>{let s=n.left,c=n.right,l=new J(z(a,B(i.store,a)),s,s&&s.lastId,c,c&&c.id,t,null,new q(o,r));l.integrate(e,0),n.right=l,n.forward()})},us=(e,t)=>{let{key:n,value:r}=t;r===null?e.delete(n):e.set(n,r)},ds=(e,t)=>{for(;e.right!==null&&(e.right.deleted||e.right.content.constructor===q&&as(t[e.right.content.key]??null,e.right.content.value));)e.forward()},fs=(e,t,n,r)=>{let i=e.doc,a=i.clientID,o=new Map;for(let s in r){let c=r[s],l=n.currentAttributes.get(s)??null;if(!as(l,c)){o.set(s,l);let{left:r,right:u}=n;n.right=new J(z(a,B(i.store,a)),r,r&&r.lastId,u,u&&u.id,t,null,new q(s,c)),n.right.integrate(e,0),n.forward()}}return o},ps=(e,t,n,r,i)=>{n.currentAttributes.forEach((e,t)=>{i[t]===void 0&&(i[t]=null)});let a=e.doc,o=a.clientID;ds(n,i);let s=fs(e,t,n,i),c=r.constructor===String?new Xs(r):r instanceof G?new oc(r):new Hs(r),{left:l,right:u,index:d}=n;t._searchMarker&&Mo(t._searchMarker,n.index,c.getLength()),u=new J(z(o,B(a.store,o)),l,l&&l.lastId,u,u&&u.id,t,null,c),u.integrate(e,0),n.right=u,n.index=d,n.forward(),ls(e,t,n,s)},ms=(e,t,n,r,i)=>{let a=e.doc,o=a.clientID;ds(n,i);let s=fs(e,t,n,i);iterationLoop:for(;n.right!==null&&(r>0||s.size>0&&(n.right.deleted||n.right.content.constructor===q));){if(!n.right.deleted)switch(n.right.content.constructor){case q:{let{key:t,value:a}=n.right.content,o=i[t];if(o!==void 0){if(as(o,a))s.delete(t);else{if(r===0)break iterationLoop;s.set(t,a)}n.right.delete(e)}else n.currentAttributes.set(t,a);break}default:r<n.right.length&&H(e,z(n.right.id.client,n.right.id.clock+r)),r-=n.right.length;break}n.forward()}if(r>0){let i=``;for(;r>0;r--)i+=`
3
- `;n.right=new J(z(o,B(a.store,o)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new Xs(i)),n.right.integrate(e,0),n.forward()}ls(e,t,n,s)},hs=(e,t,n,r,i)=>{let a=t,o=A();for(;a&&(!a.countable||a.deleted);){if(!a.deleted&&a.content.constructor===q){let e=a.content;o.set(e.key,e)}a=a.right}let s=0,c=!1;for(;t!==a;){if(n===t&&(c=!0),!t.deleted){let n=t.content;switch(n.constructor){case q:{let{key:a,value:l}=n,u=r.get(a)??null;(o.get(a)!==n||u===l)&&(t.delete(e),s++,!c&&(i.get(a)??null)===l&&u!==l&&(u===null?i.delete(a):i.set(a,u))),!c&&!t.deleted&&us(i,n);break}}}t=t.right}return s},gs=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;let n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===q){let r=t.content.key;n.has(r)?t.delete(e):n.add(r)}t=t.left}},_s=e=>{let t=0;return U(e.doc,n=>{let r=e._start,i=e._start,a=A(),o=Xt(a);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case q:us(o,i.content);break;default:t+=hs(n,r,i,a,o),a=Xt(o),r=i;break}i=i.right}}),t},vs=e=>{let t=new Set,n=e.doc;for(let[r,i]of e.afterState.entries()){let a=e.beforeState.get(r)||0;i!==a&&Za(e,n.store.clients.get(r),a,i,e=>{!e.deleted&&e.content.constructor===q&&e.constructor!==K&&t.add(e.parent)})}U(n,n=>{Ii(e,e.deleteSet,e=>{if(e instanceof K||!e.parent._hasFormatting||t.has(e.parent))return;let r=e.parent;e.content.constructor===q?t.add(r):gs(n,e)});for(let e of t)_s(e)})},ys=(e,t,n)=>{let r=n,i=Xt(t.currentAttributes),a=t.right;for(;n>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case oc:case Hs:case Xs:n<t.right.length&&H(e,z(t.right.id.client,t.right.id.clock+n)),n-=t.right.length,t.right.delete(e);break}t.forward()}a&&hs(e,a,t.right,i,t.currentAttributes);let o=(t.left||t.right).parent;return o._searchMarker&&Mo(o._searchMarker,t.index,-r+n),t},bs=class extends Co{constructor(e,t,n){super(e,t),this.childListChanged=!1,this.keysChanged=new Set,n.forEach(e=>{e===null?this.childListChanged=!0:this.keysChanged.add(e)})}get changes(){return this._changes===null&&(this._changes={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set}),this._changes}get delta(){if(this._delta===null){let e=this.target.doc,t=[];U(e,e=>{let n=new Map,r=new Map,i=this.target._start,a=null,o={},s=``,c=0,l=0,u=()=>{if(a!==null){let e=null;switch(a){case`delete`:l>0&&(e={delete:l}),l=0;break;case`insert`:(typeof s==`object`||s.length>0)&&(e={insert:s},n.size>0&&(e.attributes={},n.forEach((t,n)=>{t!==null&&(e.attributes[n]=t)}))),s=``;break;case`retain`:c>0&&(e={retain:c},bn(o)||(e.attributes=gn({},o))),c=0;break}e&&t.push(e),a=null}};for(;i!==null;){switch(i.content.constructor){case oc:case Hs:this.adds(i)?this.deletes(i)||(u(),a=`insert`,s=i.content.getContent()[0],u()):this.deletes(i)?(a!==`delete`&&(u(),a=`delete`),l+=1):i.deleted||(a!==`retain`&&(u(),a=`retain`),c+=1);break;case Xs:this.adds(i)?this.deletes(i)||(a!==`insert`&&(u(),a=`insert`),s+=i.content.str):this.deletes(i)?(a!==`delete`&&(u(),a=`delete`),l+=i.length):i.deleted||(a!==`retain`&&(u(),a=`retain`),c+=i.length);break;case q:{let{key:t,value:s}=i.content;if(this.adds(i))this.deletes(i)||(as(n.get(t)??null,s)?s!==null&&i.delete(e):(a===`retain`&&u(),as(s,r.get(t)??null)?delete o[t]:o[t]=s));else if(this.deletes(i)){r.set(t,s);let e=n.get(t)??null;as(e,s)||(a===`retain`&&u(),o[t]=e)}else if(!i.deleted){r.set(t,s);let n=o[t];n!==void 0&&(as(n,s)?n!==null&&i.delete(e):(a===`retain`&&u(),s===null?delete o[t]:o[t]=s))}i.deleted||(a===`insert`&&u(),us(n,i.content));break}}i=i.right}for(u();t.length>0;){let e=t[t.length-1];if(e.retain!==void 0&&e.attributes===void 0)t.pop();else break}}),this._delta=t}return this._delta}},xs=class e extends G{constructor(e){super(),this._pending=e===void 0?[]:[()=>this.insert(0,e)],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??W(),this._length}_integrate(e,t){super._integrate(e,t);try{this._pending.forEach(e=>e())}catch(e){console.error(e)}this._pending=null}_copy(){return new e}clone(){let t=new e;return t.applyDelta(this.toDelta()),t}_callObserver(e,t){super._callObserver(e,t);let n=new bs(this,e,t);No(this,e,n),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??W();let e=``,t=this._start;for(;t!==null;)!t.deleted&&t.countable&&t.content.constructor===Xs&&(e+=t.content.str),t=t.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:t=!0}={}){this.doc===null?this._pending.push(()=>this.applyDelta(e)):U(this.doc,n=>{let r=new os(null,this._start,0,new Map);for(let i=0;i<e.length;i++){let a=e[i];if(a.insert!==void 0){let o=!t&&typeof a.insert==`string`&&i===e.length-1&&r.right===null&&a.insert.slice(-1)===`
4
- `?a.insert.slice(0,-1):a.insert;(typeof o!=`string`||o.length>0)&&ps(n,this,r,o,a.attributes||{})}else a.retain===void 0?a.delete!==void 0&&ys(n,r,a.delete):ms(n,this,r,a.retain,a.attributes||{})}})}toDelta(e,t,n){this.doc??W();let r=[],i=new Map,a=this.doc,o=``,s=this._start;function c(){if(o.length>0){let e={},t=!1;i.forEach((n,r)=>{t=!0,e[r]=n});let n={insert:o};t&&(n.attributes=e),r.push(n),o=``}}let l=()=>{for(;s!==null;){if(Ha(s,e)||t!==void 0&&Ha(s,t))switch(s.content.constructor){case Xs:{let r=i.get(`ychange`);e!==void 0&&!Ha(s,e)?(r===void 0||r.user!==s.id.client||r.type!==`removed`)&&(c(),i.set(`ychange`,n?n(`removed`,s.id):{type:`removed`})):t!==void 0&&!Ha(s,t)?(r===void 0||r.user!==s.id.client||r.type!==`added`)&&(c(),i.set(`ychange`,n?n(`added`,s.id):{type:`added`})):r!==void 0&&(c(),i.delete(`ychange`)),o+=s.content.str;break}case oc:case Hs:{c();let e={insert:s.content.getContent()[0]};if(i.size>0){let t={};e.attributes=t,i.forEach((e,n)=>{t[n]=e})}r.push(e);break}case q:Ha(s,e)&&(c(),us(i,s.content));break}s=s.right}c()};return e||t?U(a,n=>{e&&Ua(n,e),t&&Ua(n,t),l()},`cleanup`):l(),r}insert(e,t,n){if(t.length<=0)return;let r=this.doc;r===null?this._pending.push(()=>this.insert(e,t,n)):U(r,r=>{let i=cs(r,this,e,!n);n||(n={},i.currentAttributes.forEach((e,t)=>{n[t]=e})),ps(r,this,i,t,n)})}insertEmbed(e,t,n){let r=this.doc;r===null?this._pending.push(()=>this.insertEmbed(e,t,n||{})):U(r,r=>{let i=cs(r,this,e,!n);ps(r,this,i,t,n||{})})}delete(e,t){if(t===0)return;let n=this.doc;n===null?this._pending.push(()=>this.delete(e,t)):U(n,n=>{ys(n,cs(n,this,e,!0),t)})}format(e,t,n){if(t===0)return;let r=this.doc;r===null?this._pending.push(()=>this.format(e,t,n)):U(r,r=>{let i=cs(r,this,e,!1);i.right!==null&&ms(r,this,i,t,n)})}removeAttribute(e){this.doc===null?this._pending.push(()=>this.removeAttribute(e)):U(this.doc,t=>{Ko(t,this,e)})}setAttribute(e,t){this.doc===null?this._pending.push(()=>this.setAttribute(e,t)):U(this.doc,n=>{qo(n,this,e,t)})}getAttribute(e){return Jo(this,e)}getAttributes(){return Yo(this)}_write(e){e.writeTypeRef(tc)}},Ss=e=>new xs,Cs=class{constructor(e,t=()=>!0){this._filter=t,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??W()}[Symbol.iterator](){return this}next(){let e=this._currentNode,t=e&&e.content&&e.content.type;if(e!==null&&(!this._firstCall||e.deleted||!this._filter(t)))do if(t=e.content.type,!e.deleted&&(t.constructor===Es||t.constructor===ws)&&t._start!==null)e=t._start;else for(;e!==null;){let t=e.next;if(t!==null){e=t;break}else e=e.parent===this._root?null:e.parent._item}while(e!==null&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,e===null?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}},ws=class e extends G{constructor(){super(),this._prelimContent=[]}get firstChild(){let e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new e}clone(){let t=new e;return t.insert(0,this.toArray().map(e=>e instanceof G?e.clone():e)),t}get length(){return this.doc??W(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new Cs(this,e)}querySelector(e){e=e.toUpperCase();let t=new Cs(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e).next();return t.done?null:t.value}querySelectorAll(e){return e=e.toUpperCase(),y(new Cs(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e))}_callObserver(e,t){No(this,e,new Os(this,t,e))}toString(){return Ro(this,e=>e.toString()).join(``)}toJSON(){return this.toString()}toDOM(e=document,t={},n){let r=e.createDocumentFragment();return n!==void 0&&n._createAssociation(r,this),Lo(this,i=>{r.insertBefore(i.toDOM(e,t,n),null)}),r}insert(e,t){this.doc===null?this._prelimContent.splice(e,0,...t):U(this.doc,n=>{Uo(n,this,e,t)})}insertAfter(e,t){if(this.doc!==null)U(this.doc,n=>{let r=e&&e instanceof G?e._item:e;Vo(n,this,r,t)});else{let n=this._prelimContent,r=e===null?0:n.findIndex(t=>t===e)+1;if(r===0&&e!==null)throw T(`Reference item not found`);n.splice(r,0,...t)}}delete(e,t=1){this.doc===null?this._prelimContent.splice(e,t):U(this.doc,n=>{Go(n,this,e,t)})}toArray(){return Fo(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return Bo(this,e)}slice(e=0,t=this.length){return Po(this,e,t)}forEach(e){Lo(this,e)}_write(e){e.writeTypeRef(rc)}},Ts=e=>new ws,Es=class e extends ws{constructor(e=`UNDEFINED`){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,t){super._integrate(e,t),this._prelimAttrs.forEach((e,t)=>{this.setAttribute(t,e)}),this._prelimAttrs=null}_copy(){return new e(this.nodeName)}clone(){let t=new e(this.nodeName);return vn(this.getAttributes(),(e,n)=>{t.setAttribute(n,e)}),t.insert(0,this.toArray().map(e=>e instanceof G?e.clone():e)),t}toString(){let e=this.getAttributes(),t=[],n=[];for(let t in e)n.push(t);n.sort();let r=n.length;for(let i=0;i<r;i++){let r=n[i];t.push(r+`="`+e[r]+`"`)}let i=this.nodeName.toLocaleLowerCase();return`<${i}${t.length>0?` `+t.join(` `):``}>${super.toString()}</${i}>`}removeAttribute(e){this.doc===null?this._prelimAttrs.delete(e):U(this.doc,t=>{Ko(t,this,e)})}setAttribute(e,t){this.doc===null?this._prelimAttrs.set(e,t):U(this.doc,n=>{qo(n,this,e,t)})}getAttribute(e){return Jo(this,e)}hasAttribute(e){return Xo(this,e)}getAttributes(e){return e?Zo(this,e):Yo(this)}toDOM(e=document,t={},n){let r=e.createElement(this.nodeName),i=this.getAttributes();for(let e in i){let t=i[e];typeof t==`string`&&r.setAttribute(e,t)}return Lo(this,i=>{r.appendChild(i.toDOM(e,t,n))}),n!==void 0&&n._createAssociation(r,this),r}_write(e){e.writeTypeRef(nc),e.writeKey(this.nodeName)}},Ds=e=>new Es(e.readKey()),Os=class extends Co{constructor(e,t,n){super(e,n),this.childListChanged=!1,this.attributesChanged=new Set,t.forEach(e=>{e===null?this.childListChanged=!0:this.attributesChanged.add(e)})}},ks=class e extends rs{constructor(e){super(),this.hookName=e}_copy(){return new e(this.hookName)}clone(){let t=new e(this.hookName);return this.forEach((e,n)=>{t.set(n,e)}),t}toDOM(e=document,t={},n){let r=t[this.hookName],i;return i=r===void 0?document.createElement(this.hookName):r.createDom(this),i.setAttribute(`data-yjs-hook`,this.hookName),n!==void 0&&n._createAssociation(i,this),i}_write(e){e.writeTypeRef(ic),e.writeKey(this.hookName)}},As=e=>new ks(e.readKey()),js=class e extends xs{get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new e}clone(){let t=new e;return t.applyDelta(this.toDelta()),t}toDOM(e=document,t,n){let r=e.createTextNode(this.toString());return n!==void 0&&n._createAssociation(r,this),r}toString(){return this.toDelta().map(e=>{let t=[];for(let n in e.attributes){let r=[];for(let t in e.attributes[n])r.push({key:t,value:e.attributes[n][t]});r.sort((e,t)=>e.key<t.key?-1:1),t.push({nodeName:n,attrs:r})}t.sort((e,t)=>e.nodeName<t.nodeName?-1:1);let n=``;for(let e=0;e<t.length;e++){let r=t[e];n+=`<${r.nodeName}`;for(let e=0;e<r.attrs.length;e++){let t=r.attrs[e];n+=` ${t.key}="${t.value}"`}n+=`>`}n+=e.insert;for(let e=t.length-1;e>=0;e--)n+=`</${t[e].nodeName}>`;return n}).join(``)}toJSON(){return this.toString()}_write(e){e.writeTypeRef(ac)}},Ms=e=>new js,Ns=class{constructor(e,t){this.id=e,this.length=t}get deleted(){throw E()}mergeWith(e){return!1}write(e,t,n){throw E()}integrate(e,t){throw E()}},Ps=0,K=class extends Ns{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor?(this.length+=e.length,!0):!1}integrate(e,t){t>0&&(this.id.clock+=t,this.length-=t),Ka(e.doc.store,this)}write(e,t){e.writeInfo(Ps),e.writeLen(this.length-t)}getMissing(e,t){return null}},Fs=class e{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new e(this.content)}splice(e){throw E()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeBuf(this.content)}getRef(){return 3}},Is=e=>new Fs(e.readBuf()),Ls=class e{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new e(this.len)}splice(t){let n=new e(this.len-t);return this.len=t,n}mergeWith(e){return this.len+=e.len,!0}integrate(e,t){Vi(e.deleteSet,t.id.client,t.id.clock,this.len),t.markDeleted()}delete(e){}gc(e){}write(e,t){e.writeLen(this.len-t)}getRef(){return 1}},Rs=e=>new Ls(e.readLen()),zs=(e,t)=>new Ji({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1}),Bs=class e{constructor(e){e._item&&console.error(`This document was already integrated as a sub-document. You should create a second instance instead with the same guid.`),this.doc=e;let t={};this.opts=t,e.gc||(t.gc=!1),e.autoLoad&&(t.autoLoad=!0),e.meta!==null&&(t.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new e(zs(this.doc.guid,this.opts))}splice(e){throw E()}mergeWith(e){return!1}integrate(e,t){this.doc._item=t,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,t){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}},Vs=e=>new Bs(zs(e.readString(),e.readAny())),Hs=class e{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new e(this.embed)}splice(e){throw E()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeJSON(this.embed)}getRef(){return 5}},Us=e=>new Hs(e.readJSON()),q=class e{constructor(e,t){this.key=e,this.value=t}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new e(this.key,this.value)}splice(e){throw E()}mergeWith(e){return!1}integrate(e,t){let n=t.parent;n._searchMarker=null,n._hasFormatting=!0}delete(e){}gc(e){}write(e,t){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}},Ws=e=>new q(e.readKey(),e.readJSON()),Gs=class e{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new e(this.arr)}splice(t){let n=new e(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){let n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){let t=this.arr[r];e.writeString(t===void 0?`undefined`:JSON.stringify(t))}}getRef(){return 2}},Ks=e=>{let t=e.readLen(),n=[];for(let r=0;r<t;r++){let t=e.readString();t===`undefined`?n.push(void 0):n.push(JSON.parse(t))}return new Gs(n)},qs=Fn(`node_env`)===`development`,Js=class e{constructor(e){this.arr=e,qs&&Tn(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new e(this.arr)}splice(t){let n=new e(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){let n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){let t=this.arr[r];e.writeAny(t)}}getRef(){return 8}},Ys=e=>{let t=e.readLen(),n=[];for(let r=0;r<t;r++)n.push(e.readAny());return new Js(n)},Xs=class e{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split(``)}isCountable(){return!0}copy(){return new e(this.str)}splice(t){let n=new e(this.str.slice(t));this.str=this.str.slice(0,t);let r=this.str.charCodeAt(t-1);return r>=55296&&r<=56319&&(this.str=this.str.slice(0,t-1)+`�`,n.str=`�`+n.str.slice(1)),n}mergeWith(e){return this.str+=e.str,!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeString(t===0?this.str:this.str.slice(t))}getRef(){return 4}},Zs=e=>new Xs(e.readString()),Qs=[ts,is,Ss,Ds,Ts,As,Ms],$s=0,ec=1,tc=2,nc=3,rc=4,ic=5,ac=6,oc=class e{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new e(this.type._copy())}splice(e){throw E()}mergeWith(e){return!1}integrate(e,t){this.type._integrate(e.doc,t)}delete(e){let t=this.type._start;for(;t!==null;)t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e),t=t.right;this.type._map.forEach(t=>{t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e)}),e.changed.delete(this.type)}gc(e){let t=this.type._start;for(;t!==null;)t.gc(e,!0),t=t.right;this.type._start=null,this.type._map.forEach(t=>{for(;t!==null;)t.gc(e,!0),t=t.left}),this.type._map=new Map}write(e,t){this.type._write(e)}getRef(){return 7}},sc=e=>new oc(Qs[e.readTypeRef()](e)),cc=(e,t)=>{let n=t,r=0,i;do r>0&&(n=z(n.client,n.clock+r)),i=qa(e,n),r=n.clock-i.id.clock,n=i.redone;while(n!==null&&i instanceof J);return{item:i,diff:r}},lc=(e,t)=>{for(;e!==null&&e.keep!==t;)e.keep=t,e=e.parent._item},uc=(e,t,n)=>{let{client:r,clock:i}=t.id,a=new J(z(r,i+n),t,z(r,i+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&a.markDeleted(),t.keep&&(a.keep=!0),t.redone!==null&&(a.redone=z(t.redone.client,t.redone.clock+n)),t.right=a,a.right!==null&&(a.right.left=a),e._mergeStructs.push(a),a.parentSub!==null&&a.right===null&&a.parent._map.set(a.parentSub,a),t.length=n,a},dc=(e,t)=>Ue(e,e=>Ri(e.deletions,t)),fc=(e,t,n,r,i,a)=>{let o=e.doc,s=o.store,c=o.clientID,l=t.redone;if(l!==null)return H(e,l);let u=t.parent._item,d=null,f;if(u!==null&&u.deleted===!0){if(u.redone===null&&(!n.has(u)||fc(e,u,n,r,i,a)===null))return null;for(;u.redone!==null;)u=H(e,u.redone)}let p=u===null?t.parent:u.content.type;if(t.parentSub===null){for(d=t.left,f=t;d!==null;){let t=d;for(;t!==null&&t.parent._item!==u;)t=t.redone===null?null:H(e,t.redone);if(t!==null&&t.parent._item===u){d=t;break}d=d.left}for(;f!==null;){let t=f;for(;t!==null&&t.parent._item!==u;)t=t.redone===null?null:H(e,t.redone);if(t!==null&&t.parent._item===u){f=t;break}f=f.right}}else{if(f=null,t.right&&!i){for(d=t;d!==null&&d.right!==null&&(d.right.redone||Ri(r,d.right.id)||dc(a.undoStack,d.right.id)||dc(a.redoStack,d.right.id));)for(d=d.right;d.redone;)d=H(e,d.redone);if(d&&d.right!==null)return null}else d=p._map.get(t.parentSub)||null;d!==null&&d.parent._item!==u&&(d=p._map.get(t.parentSub)||null)}let m=z(c,B(s,c)),ee=new J(m,d,d&&d.lastId,f,f&&f.id,p,t.parentSub,t.content.copy());return t.redone=m,lc(ee,!0),ee.integrate(e,0),ee},J=class e extends Ns{constructor(e,t,n,r,i,a,o,s){super(e,s.getLength()),this.origin=n,this.left=t,this.right=r,this.rightOrigin=i,this.parent=a,this.parentSub=o,this.redone=null,this.content=s,this.info=this.content.isCountable()?2:0}set marker(e){(this.info&8)>0!==e&&(this.info^=8)}get marker(){return(this.info&8)>0}get keep(){return(this.info&1)>0}set keep(e){this.keep!==e&&(this.info^=1)}get countable(){return(this.info&2)>0}get deleted(){return(this.info&4)>0}set deleted(e){this.deleted!==e&&(this.info^=4)}markDeleted(){this.info|=4}getMissing(t,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=B(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=B(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Ta&&this.id.client!==this.parent.client&&this.parent.clock>=B(n,this.parent.client))return this.parent.client;if(this.origin&&=(this.left=Ya(t,n,this.origin),this.left.lastId),this.rightOrigin&&=(this.right=H(t,this.rightOrigin),this.right.id),this.left&&this.left.constructor===K||this.right&&this.right.constructor===K)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===e?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===e&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Ta){let e=qa(n,this.parent);e.constructor===K?this.parent=null:this.parent=e.content.type}return null}integrate(e,t){if(t>0&&(this.id.clock+=t,this.left=Ya(e,e.doc.store,z(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(t),this.length-=t),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let t=this.left,n;if(t!==null)n=t.right;else if(this.parentSub!==null)for(n=this.parent._map.get(this.parentSub)||null;n!==null&&n.left!==null;)n=n.left;else n=this.parent._start;let r=new Set,i=new Set;for(;n!==null&&n!==this.right;){if(i.add(n),r.add(n),Ea(this.origin,n.origin)){if(n.id.client<this.id.client)t=n,r.clear();else if(Ea(this.rightOrigin,n.rightOrigin))break}else if(n.origin!==null&&i.has(qa(e.doc.store,n.origin)))r.has(qa(e.doc.store,n.origin))||(t=n,r.clear());else break;n=n.right}this.left=t}if(this.left!==null)this.right=this.left.right,this.left.right=this;else{let e;if(this.parentSub!==null)for(e=this.parent._map.get(this.parentSub)||null;e!==null&&e.left!==null;)e=e.left;else e=this.parent._start,this.parent._start=this;this.right=e}this.right===null?this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(e)):this.right.left=this,this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),Ka(e.doc.store,this),this.content.integrate(e,this),eo(e,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(e)}else new K(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;e!==null&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;e!==null&&e.deleted;)e=e.left;return e}get lastId(){return this.length===1?this.id:z(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&Ea(e.origin,this.lastId)&&this.right===e&&Ea(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&this.redone===null&&e.redone===null&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){let t=this.parent._searchMarker;return t&&t.forEach(t=>{t.p===e&&(t.p=this,!this.deleted&&this.countable&&(t.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,this.right!==null&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){let t=this.parent;this.countable&&this.parentSub===null&&(t._length-=this.length),this.markDeleted(),Vi(e.deleteSet,this.id.client,this.id.clock,this.length),eo(e,t,this.parentSub),this.content.delete(e)}}gc(e,t){if(!this.deleted)throw D();this.content.gc(e),t?Xa(e,this,new K(this.id,this.length)):this.content=new Ls(this.length)}write(e,t){let n=t>0?z(this.id.client,this.id.clock+t-1):this.origin,r=this.rightOrigin,i=this.parentSub,a=this.content.getRef()&31|(n===null?0:128)|(r===null?0:64)|(i===null?0:32);if(e.writeInfo(a),n!==null&&e.writeLeftID(n),r!==null&&e.writeRightID(r),n===null&&r===null){let t=this.parent;if(t._item!==void 0){let n=t._item;if(n===null){let n=Da(t);e.writeParentInfo(!0),e.writeString(n)}else e.writeParentInfo(!1),e.writeLeftID(n.id)}else t.constructor===String?(e.writeParentInfo(!0),e.writeString(t)):t.constructor===Ta?(e.writeParentInfo(!1),e.writeLeftID(t)):D();i!==null&&e.writeString(i)}this.content.write(e,t)}},pc=(e,t)=>mc[t&31](e),mc=[()=>{D()},Rs,Ks,Is,Zs,Us,Ws,sc,Ys,Vs,()=>{D()}],hc=10,Y=class extends Ns{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor?(this.length+=e.length,!0):!1}integrate(e,t){D()}write(e,t){e.writeInfo(hc),C(e.restEncoder,this.length-t)}getMissing(e,t){return null}},gc=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{},_c=`__ $YJS$ __`;gc[_c]===!0&&console.error(`Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438`),gc[_c]=!0;function vc(e){return e||={},{delay:e.delay===void 0?200:e.delay,initialDelay:e.initialDelay===void 0?0:e.initialDelay,minDelay:e.minDelay===void 0?0:e.minDelay,maxDelay:e.maxDelay===void 0?0:e.maxDelay,factor:e.factor===void 0?0:e.factor,maxAttempts:e.maxAttempts===void 0?3:e.maxAttempts,timeout:e.timeout===void 0?0:e.timeout,jitter:e.jitter===!0,initialJitter:e.initialJitter===!0,handleError:e.handleError===void 0?null:e.handleError,handleTimeout:e.handleTimeout===void 0?null:e.handleTimeout,beforeAttempt:e.beforeAttempt===void 0?null:e.beforeAttempt,calculateDelay:e.calculateDelay===void 0?null:e.calculateDelay}}async function yc(e){return new Promise(t=>setTimeout(t,e))}function bc(e,t){let n=t.delay;if(n===0)return 0;if(t.factor&&(n*=t.factor**(e.attemptNum-1),t.maxDelay!==0&&(n=Math.min(n,t.maxDelay))),t.jitter){let e=Math.ceil(t.minDelay);n=Math.floor(Math.random()*(Math.floor(n)-e+1))+e}return Math.round(n)}async function xc(e,t){let n=vc(t);for(let e of[`delay`,`initialDelay`,`minDelay`,`maxDelay`,`maxAttempts`,`timeout`]){let t=n[e];if(!Number.isInteger(t)||t<0)throw Error(`Value for ${e} must be an integer greater than or equal to 0`)}if(n.factor.constructor!==Number||n.factor<0)throw Error(`Value for factor must be a number greater than or equal to 0`);if(n.delay<n.minDelay)throw Error(`delay cannot be less than minDelay (delay: ${n.delay}, minDelay: ${n.minDelay}`);let r={attemptNum:0,attemptsRemaining:n.maxAttempts?n.maxAttempts:-1,aborted:!1,abort(){r.aborted=!0}},i=n.calculateDelay||bc;async function a(){if(n.beforeAttempt&&n.beforeAttempt(r,n),r.aborted){let e=Error(`Attempt aborted`);throw e.code=`ATTEMPT_ABORTED`,e}let t=async e=>{if(n.handleError&&await n.handleError(e,r,n),r.aborted||r.attemptsRemaining===0)throw e;r.attemptNum++;let t=i(r,n);return t&&await yc(t),a()};return r.attemptsRemaining>0&&r.attemptsRemaining--,n.timeout?new Promise((i,a)=>{let o=setTimeout(()=>{if(n.handleTimeout)try{i(n.handleTimeout(r,n))}catch(e){a(e)}else{let e=Error(`Retry timeout (attemptNum: ${r.attemptNum}, timeout: ${n.timeout})`);e.code=`ATTEMPT_TIMEOUT`,a(e)}},n.timeout);e(r,n).then(e=>{clearTimeout(o),i(e)}).catch(e=>{clearTimeout(o),t(e).then(i).catch(a)})}):e(r,n).catch(t)}let o=n.calculateDelay?n.calculateDelay(r,n):n.initialDelay;if(o&&await yc(o),r.attemptNum<1&&n.initialJitter){let e=i(r,n);e&&await yc(e)}return a()}var Sc=Math.floor,Cc=(e,t)=>e<t?e:t,wc=(e,t)=>e>t?e:t;Number.isNaN;var Tc=64,Ec=128,Dc=1<<17,Oc=1<<18,kc=1<<19,Ac=1<<20,jc=1<<21,Mc=1<<22,Nc=1<<23,Pc=1<<24,Fc=1<<25,Ic=1<<26,Lc=1<<27,Rc=1<<28,zc=1<<29,Bc=1<<30,Vc=63,Hc=127;Dc-1,Oc-1,kc-1,Ac-1,jc-1,Mc-1,Nc-1,Pc-1,Fc-1,Ic-1,Lc-1,Rc-1,zc-1,Bc-1;var Uc=2**53-1;Number.isInteger,Number.isNaN,Number.parseInt;var Wc=()=>new Set,Gc=Array.from;Array.isArray;var Kc=String.fromCharCode;String.fromCodePoint,Kc(65535);var qc=e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},Jc=typeof TextEncoder<`u`?new TextEncoder:null,Yc=Jc?e=>Jc.encode(e):qc,Xc=typeof TextDecoder>`u`?null:new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});Xc&&Xc.decode(new Uint8Array).length===1&&(Xc=null);var Zc=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}},Qc=()=>new Zc,$c=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},el=e=>{let t=new Uint8Array($c(e)),n=0;for(let r=0;r<e.bufs.length;r++){let i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},tl=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},X=(e,t)=>{for(;t>Hc;)tl(e,Ec|Hc&t),t=Sc(t/128);tl(e,Hc&t)},nl=new Uint8Array(3e4),rl=nl.length/3,Z=Jc&&Jc.encodeInto?(e,t)=>{if(t.length<rl){let n=Jc.encodeInto(t,nl).written||0;X(e,n);for(let t=0;t<n;t++)tl(e,nl[t])}else al(e,Yc(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;X(e,r);for(let t=0;t<r;t++)tl(e,n.codePointAt(t))},il=(e,t)=>{let n=e.cbuf.length,r=e.cpos,i=Cc(n-r,t.length),a=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,a>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(wc(n*2,a)),e.cbuf.set(t.subarray(i)),e.cpos=a)},al=(e,t)=>{X(e,t.byteLength),il(e,t)},ol=e=>Error(e),sl=ol(`Unexpected end of array`),cl=ol(`Integer out of Range`),ll=class{constructor(e){this.arr=e,this.pos=0}},ul=e=>new ll(e),dl=(e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},fl=e=>dl(e,ml(e)),pl=e=>e.arr[e.pos++],ml=e=>{let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let r=e.arr[e.pos++];if(t+=(r&Hc)*n,n*=128,r<Ec)return t;if(t>Uc)throw cl}throw sl},hl=e=>{let t=e.arr[e.pos++],n=t&Vc,r=64,i=(t&Tc)>0?-1:1;if((t&Ec)===0)return i*n;let a=e.arr.length;for(;e.pos<a;){if(t=e.arr[e.pos++],n+=(t&Hc)*r,r*=128,t<Ec)return i*n;if(n>Uc)throw cl}throw sl},gl=Xc?e=>Xc.decode(fl(e)):e=>{let t=ml(e);if(t===0)return``;{let n=String.fromCodePoint(pl(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(pl(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},_l=e=>{let t=e.pos,n=gl(e);return e.pos=t,n},vl=Date.now,yl=()=>new Map,bl=(e,t,n)=>{let r=e.get(t);return r===void 0&&e.set(t,r=n()),r},xl=class{constructor(){this._observers=yl()}on(e,t){bl(this._observers,e,Wc).add(t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);n!==void 0&&(n.delete(t),n.size===0&&this._observers.delete(e))}emit(e,t){return Gc((this._observers.get(e)||yl()).values()).forEach(e=>e(...t))}destroy(){this._observers=yl()}},Sl=Symbol(`Equality`),Cl=Object.keys,wl=e=>Cl(e).length,Tl=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),El=(e,t)=>{if(e===t)return!0;if(e==null||t==null||e.constructor!==t.constructor&&(e.constructor||Object)!==(t.constructor||Object))return!1;if(e[Sl]!=null)return e[Sl](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(let n of e.keys())if(!t.has(n)||!El(e.get(n),t.get(n)))return!1;break;case void 0:case Object:if(wl(e)!==wl(t))return!1;for(let n in e)if(!Tl(e,n)||!El(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!El(e[n],t[n]))return!1;break;default:return!1}return!0},Dl=3e4,Ol=class extends xl{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{let e=vl();this.getLocalState()!==null&&Dl/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());let t=[];this.meta.forEach((n,r)=>{r!==this.clientID&&Dl<=e-n.lastUpdated&&this.states.has(r)&&t.push(r)}),t.length>0&&kl(this,t,`timeout`)},Sc(Dl/10)),e.on(`destroy`,()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit(`destroy`,[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){let t=this.clientID,n=this.meta.get(t),r=n===void 0?0:n.clock+1,i=this.states.get(t);e===null?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:r,lastUpdated:vl()});let a=[],o=[],s=[],c=[];e===null?c.push(t):i==null?e!=null&&a.push(t):(o.push(t),El(i,e)||s.push(t)),(a.length>0||s.length>0||c.length>0)&&this.emit(`change`,[{added:a,updated:s,removed:c},`local`]),this.emit(`update`,[{added:a,updated:o,removed:c},`local`])}setLocalStateField(e,t){let n=this.getLocalState();n!==null&&this.setLocalState({...n,[e]:t})}getStates(){return this.states}},kl=(e,t,n)=>{let r=[];for(let n=0;n<t.length;n++){let i=t[n];if(e.states.has(i)){if(e.states.delete(i),i===e.clientID){let t=e.meta.get(i);e.meta.set(i,{clock:t.clock+1,lastUpdated:vl()})}r.push(i)}}r.length>0&&(e.emit(`change`,[{added:[],updated:[],removed:r},n]),e.emit(`update`,[{added:[],updated:[],removed:r},n]))},Al=(e,t,n=e.states)=>{let r=t.length,i=Qc();X(i,r);for(let a=0;a<r;a++){let r=t[a],o=n.get(r)||null,s=e.meta.get(r).clock;X(i,r),X(i,s),Z(i,JSON.stringify(o))}return el(i)},jl=(e,t,n)=>{let r=ul(t),i=vl(),a=[],o=[],s=[],c=[],l=ml(r);for(let t=0;t<l;t++){let t=ml(r),n=ml(r),l=JSON.parse(gl(r)),u=e.meta.get(t),d=e.states.get(t),f=u===void 0?0:u.clock;(f<n||f===n&&l===null&&e.states.has(t))&&(l===null?t===e.clientID&&e.getLocalState()!=null?n++:e.states.delete(t):e.states.set(t,l),e.meta.set(t,{clock:n,lastUpdated:i}),u===void 0&&l!==null?a.push(t):u!==void 0&&l===null?c.push(t):l!==null&&(El(l,d)||s.push(t),o.push(t)))}(a.length>0||s.length>0||c.length>0)&&e.emit(`change`,[{added:a,updated:s,removed:c},n]),(a.length>0||o.length>0||c.length>0)&&e.emit(`update`,[{added:a,updated:o,removed:c},n])},Ml=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}},Nl=class{constructor(e){this.data=e,this.encoder=Qc(),this.decoder=ul(new Uint8Array(this.data))}peekVarString(){return _l(this.decoder)}readVarUint(){return ml(this.decoder)}readVarString(){return gl(this.decoder)}readVarUint8Array(){return fl(this.decoder)}writeVarUint(e){return X(this.encoder,e)}writeVarString(e){return Z(this.encoder,e)}writeVarUint8Array(e){return al(this.encoder,e)}length(){return $c(this.encoder)}},Q=function(e){return e[e.Sync=0]=`Sync`,e[e.Awareness=1]=`Awareness`,e[e.Auth=2]=`Auth`,e[e.QueryAwareness=3]=`QueryAwareness`,e[e.Stateless=5]=`Stateless`,e[e.CLOSE=7]=`CLOSE`,e[e.SyncStatus=8]=`SyncStatus`,e[e.Ping=9]=`Ping`,e[e.Pong=10]=`Pong`,e}({}),$=function(e){return e.Connecting=`connecting`,e.Connected=`connected`,e.Disconnected=`disconnected`,e}({}),Pl=class{constructor(){this.encoder=Qc()}get(e){return e.encoder}toUint8Array(){return el(this.encoder)}},Fl=class extends Pl{constructor(...e){super(...e),this.type=Q.CLOSE,this.description=`Ask the server to close the connection`}get(e){return Z(this.encoder,e.documentName),X(this.encoder,this.type),this.encoder}},Il=class e extends Ml{static{this.DEDUPLICATABLE_TYPES=new Set([Q.Awareness,Q.QueryAwareness])}constructor(e){super(),this.messageQueue=[],this.configuration={url:``,autoConnect:!0,preserveTrailingSlash:!1,document:void 0,WebSocketPolyfill:void 0,messageReconnectTimeout:3e4,delay:1e3,initialDelay:0,factor:2,maxAttempts:0,minDelay:1e3,maxDelay:3e4,jitter:!0,timeout:0,onOpen:()=>null,onConnect:()=>null,onMessage:()=>null,onOutgoingMessage:()=>null,onStatus:()=>null,onDisconnect:()=>null,onClose:()=>null,onDestroy:()=>null,onAwarenessUpdate:()=>null,onAwarenessChange:()=>null,handleTimeout:null,providerMap:new Map},this.webSocket=null,this.webSocketHandlers={},this.shouldConnect=!0,this.status=$.Disconnected,this.lastMessageReceived=0,this.identifier=0,this.intervals={connectionChecker:null},this.connectionAttempt=null,this.receivedOnOpenPayload=void 0,this.closeTries=0,this.reconnectTimeout=null,this.setConfiguration(e),this.configuration.WebSocketPolyfill=e.WebSocketPolyfill?e.WebSocketPolyfill:WebSocket,this.on(`open`,this.configuration.onOpen),this.on(`open`,this.onOpen.bind(this)),this.on(`connect`,this.configuration.onConnect),this.on(`message`,this.configuration.onMessage),this.on(`outgoingMessage`,this.configuration.onOutgoingMessage),this.on(`status`,this.configuration.onStatus),this.on(`disconnect`,this.configuration.onDisconnect),this.on(`close`,this.configuration.onClose),this.on(`destroy`,this.configuration.onDestroy),this.on(`awarenessUpdate`,this.configuration.onAwarenessUpdate),this.on(`awarenessChange`,this.configuration.onAwarenessChange),this.on(`close`,this.onClose.bind(this)),this.on(`message`,this.onMessage.bind(this)),this.intervals.connectionChecker=setInterval(this.checkConnection.bind(this),this.configuration.messageReconnectTimeout/10),this.shouldConnect&&this.connect()}async onOpen(e){this.status=$.Connected,this.emit(`status`,{status:$.Connected}),this.cancelWebsocketRetry=void 0,this.receivedOnOpenPayload=e}attach(e){let t=e.effectiveName,n=this.configuration.providerMap.get(t);if(n&&n!==e&&n.isAuthenticated)throw Error(`Cannot attach two providers with the same effective name "${t}". Use sessionAwareness: true to multiplex providers with the same document name.`);this.configuration.providerMap.set(t,e),this.status===$.Disconnected&&this.shouldConnect&&this.connect(),this.receivedOnOpenPayload&&this.status===$.Connected&&e.onOpen(this.receivedOnOpenPayload)}detach(e){let t=e.effectiveName;this.configuration.providerMap.has(t)&&(e.send(Fl,{documentName:t}),this.configuration.providerMap.delete(t))}setConfiguration(e={}){this.configuration={...this.configuration,...e},this.configuration.autoConnect||(this.shouldConnect=!1)}clearReconnectTimeout(){this.reconnectTimeout&&=(clearTimeout(this.reconnectTimeout),null)}async connect(){if(this.status===$.Connected)return;this.clearReconnectTimeout(),this.cancelWebsocketRetry&&=(this.cancelWebsocketRetry(),void 0),this.receivedOnOpenPayload=void 0,this.shouldConnect=!0;let{retryPromise:e,cancelFunc:t}=(()=>{let e=!1;return{retryPromise:xc(this.createWebSocketConnection.bind(this),{delay:this.configuration.delay,initialDelay:this.configuration.initialDelay,factor:this.configuration.factor,maxAttempts:this.configuration.maxAttempts,minDelay:this.configuration.minDelay,maxDelay:this.configuration.maxDelay,jitter:this.configuration.jitter,timeout:this.configuration.timeout,handleTimeout:this.configuration.handleTimeout,beforeAttempt:t=>{(!this.shouldConnect||e)&&t.abort()}}).catch(e=>{if(e&&e.code!==`ATTEMPT_ABORTED`)throw e}),cancelFunc:()=>{e=!0}}})();return this.cancelWebsocketRetry=t,e}attachWebSocketListeners(e,t){let{identifier:n}=e,r=e=>this.emit(`message`,e),i=e=>this.emit(`close`,{event:e}),a=e=>this.emit(`open`,e),o=e=>{t(e)};this.webSocketHandlers[n]={message:r,close:i,open:a,error:o};let s=this.webSocketHandlers[e.identifier];Object.keys(s).forEach(t=>{e.addEventListener(t,s[t])})}cleanupWebSocket(){if(!this.webSocket)return;let{identifier:e}=this.webSocket,t=this.webSocketHandlers[e];Object.keys(t).forEach(n=>{this.webSocket?.removeEventListener(n,t[n]),delete this.webSocketHandlers[e]}),this.webSocket.close(),this.webSocket=null}createWebSocketConnection(){return new Promise((e,t)=>{this.webSocket&&(this.messageQueue=[],this.cleanupWebSocket()),this.lastMessageReceived=0,this.identifier+=1;let n=new this.configuration.WebSocketPolyfill(this.url);n.binaryType=`arraybuffer`,n.identifier=this.identifier,this.attachWebSocketListeners(n,t),this.webSocket=n,this.status=$.Connecting,this.emit(`status`,{status:$.Connecting}),this.connectionAttempt={resolve:e,reject:t}})}onMessage(e){this.resolveConnectionAttempt(),this.lastMessageReceived=vl();let t=new Uint8Array(e.data);if(t.length===1&&t[0]===Q.Ping){this.sendPong();return}let n=new Nl(t).peekVarString();this.configuration.providerMap.get(n)?.onMessage(e)}sendPong(){let e=Qc();X(e,Q.Pong),this.send(el(e))}resolveConnectionAttempt(){this.connectionAttempt&&(this.connectionAttempt.resolve(),this.connectionAttempt=null,this.status=$.Connected,this.emit(`status`,{status:$.Connected}),this.emit(`connect`),this.messageQueue.forEach(e=>this.send(e)),this.messageQueue=[])}stopConnectionAttempt(){this.connectionAttempt=null}rejectConnectionAttempt(){this.connectionAttempt?.reject(),this.connectionAttempt=null}checkConnection(){this.status===$.Connected&&this.lastMessageReceived&&(this.configuration.messageReconnectTimeout>=vl()-this.lastMessageReceived||(this.closeTries+=1,this.closeTries>2?(this.emit(`close`,{event:{code:4408,reason:`forced`}}),this.closeTries=0):(this.webSocket?.close(),this.messageQueue=[])))}get serverUrl(){if(this.configuration.preserveTrailingSlash)return this.configuration.url;let e=this.configuration.url;for(;e[e.length-1]===`/`;)e=e.slice(0,e.length-1);return e}get url(){return this.serverUrl}disconnect(){if(this.shouldConnect=!1,this.clearReconnectTimeout(),this.webSocket!==null)try{this.webSocket.close(),this.messageQueue=[]}catch(e){console.error(e)}}parseQueuedMessage(e){try{let t=ul(e);return{documentName:gl(t),messageType:ml(t)}}catch{return null}}addToQueue(t){if(t instanceof Uint8Array){let n=this.parseQueuedMessage(t);n&&e.DEDUPLICATABLE_TYPES.has(n.messageType)&&(this.messageQueue=this.messageQueue.filter(e=>{if(!(e instanceof Uint8Array))return!0;let t=this.parseQueuedMessage(e);return t?!(t.documentName===n.documentName&&t.messageType===n.messageType):!0}))}this.messageQueue.push(t)}send(e){this.webSocket?.readyState===Yt.Open?this.webSocket.send(e):this.addToQueue(e)}onClose({event:e}){this.closeTries=0,this.cleanupWebSocket(),this.connectionAttempt&&this.rejectConnectionAttempt(),this.status=$.Disconnected,this.emit(`status`,{status:$.Disconnected}),this.emit(`disconnect`,{event:e}),!this.cancelWebsocketRetry&&this.shouldConnect&&(this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,this.connect()},this.configuration.delay))}destroy(){this.emit(`destroy`),clearInterval(this.intervals.connectionChecker),this.stopConnectionAttempt(),this.disconnect(),this.removeAllListeners(),this.cleanupWebSocket()}},Ll=0,Rl=1,zl=2,Bl=(e,t)=>{X(e,Ll),al(e,ya(t))},Vl=(e,t,n)=>{X(e,Rl),al(e,pa(t,n))},Hl=(e,t,n)=>Vl(t,n,fl(e)),Ul=(e,t,n,r)=>{try{ua(t,fl(e),n)}catch(e){r?.(e),console.error(`Caught error while handling a Yjs update`,e)}},Wl=(e,t)=>{X(e,zl),al(e,t)},Gl=Ul,Kl=(e,t,n,r,i)=>{let a=ml(e);switch(a){case Ll:Hl(e,t,n);break;case Rl:Ul(e,n,r,i);break;case zl:Gl(e,n,r,i);break;default:throw Error(`Unknown message type`)}return a},ql=class{constructor(e){this.message=e}apply(e,t){let{message:n}=this,r=n.readVarUint(),i=n.length();switch(r){case Q.Sync:this.applySyncMessage(e,t);break;case Q.Awareness:this.applyAwarenessMessage(e);break;case Q.Auth:this.applyAuthMessage(e);break;case Q.QueryAwareness:this.applyQueryAwarenessMessage(e);break;case Q.Stateless:e.receiveStateless(gl(n.decoder));break;case Q.SyncStatus:this.applySyncStatusMessage(e,hl(n.decoder)===1);break;case Q.CLOSE:let i={code:1e3,reason:gl(n.decoder)};e.onClose(),e.configuration.onClose({event:i}),e.forwardClose({event:i});break;default:console.error(`Can’t apply message of unknown type: ${r}`)}n.length()>i+1&&e.send(Pl,{encoder:n.encoder})}applySyncMessage(e,t){let{message:n}=this;n.writeVarUint(Q.Sync);let r=Kl(n.decoder,n.encoder,e.document,e);t&&r===Rl&&(e.synced=!0)}applySyncStatusMessage(e,t){t&&e.decrementUnsyncedChanges()}applyAwarenessMessage(e){if(!e.awareness)return;let{message:t}=this;jl(e.awareness,t.readVarUint8Array(),e)}applyAuthMessage(e){let{message:t}=this;Wt(t.decoder,e.sendToken.bind(e),e.permissionDeniedHandler.bind(e),e.authenticatedHandler.bind(e))}applyQueryAwarenessMessage(e){if(!e.awareness)return;let{message:t}=this;t.writeVarUint(Q.Awareness),t.writeVarUint8Array(Al(e.awareness,Array.from(e.awareness.getStates().keys())))}},Jl=class{constructor(e,t={}){this.message=new e,this.encoder=this.message.get(t)}create(){return el(this.encoder)}send(e){e?.send(this.create())}},Yl=`4.0.0-rc.1`,Xl=class extends Pl{constructor(...e){super(...e),this.type=Q.Auth,this.description=`Authentication`}get(e){if(e.token===void 0)throw Error("The authentication message requires `token` as an argument.");return Z(this.encoder,e.documentName),X(this.encoder,this.type),Ut(this.encoder,e.token),Z(this.encoder,Yl),this.encoder}},Zl=class extends Pl{constructor(...e){super(...e),this.type=Q.Awareness,this.description=`Awareness states update`}get(e){if(e.awareness===void 0)throw Error(`The awareness message requires awareness as an argument`);if(e.clients===void 0)throw Error(`The awareness message requires clients as an argument`);Z(this.encoder,e.documentName),X(this.encoder,this.type);let t;return t=e.states===void 0?Al(e.awareness,e.clients):Al(e.awareness,e.clients,e.states),al(this.encoder,t),this.encoder}},Ql=class extends Pl{constructor(...e){super(...e),this.type=Q.Stateless,this.description=`A stateless message`}get(e){return Z(this.encoder,e.documentName),X(this.encoder,this.type),Z(this.encoder,e.payload??``),this.encoder}},$l=class extends Pl{constructor(...e){super(...e),this.type=Q.Sync,this.description=`First sync step`}get(e){if(e.document===void 0)throw Error(`The sync step one message requires document as an argument`);return Z(this.encoder,e.documentName),X(this.encoder,this.type),Bl(this.encoder,e.document),this.encoder}},eu=class extends Pl{constructor(...e){super(...e),this.type=Q.Sync,this.description=`A document update`}get(e){return Z(this.encoder,e.documentName),X(this.encoder,this.type),Wl(this.encoder,e.update),this.encoder}},tu=class extends Error{constructor(...e){super(...e),this.code=1001}},nu=class extends Ml{get effectiveName(){return this.configuration.sessionAwareness?qt(this.configuration.name,this.sessionId):this.configuration.name}constructor(e){super(),this.configuration={name:``,document:void 0,awareness:void 0,token:null,sessionAwareness:!0,forceSyncInterval:!1,onAuthenticated:()=>null,onAuthenticationFailed:()=>null,onOpen:()=>null,onConnect:()=>null,onMessage:()=>null,onOutgoingMessage:()=>null,onSynced:()=>null,onStatus:()=>null,onDisconnect:()=>null,onClose:()=>null,onDestroy:()=>null,onAwarenessUpdate:()=>null,onAwarenessChange:()=>null,onStateless:()=>null,onUnsyncedChanges:()=>null},this.isSynced=!1,this.unsyncedChanges=0,this.isAuthenticated=!1,this.authorizedScope=void 0,this.manageSocket=!1,this._isAttached=!1,this.sessionId=Math.random().toString(36).slice(2),this.intervals={forceSync:null},this.boundDocumentUpdateHandler=this.documentUpdateHandler.bind(this),this.boundAwarenessUpdateHandler=this.awarenessUpdateHandler.bind(this),this.boundPageHide=this.pageHide.bind(this),this.boundOnOpen=this.onOpen.bind(this),this.boundOnClose=this.onClose.bind(this),this.forwardConnect=()=>this.emit(`connect`),this.forwardStatus=e=>this.emit(`status`,e),this.forwardClose=e=>this.emit(`close`,e),this.forwardDisconnect=e=>this.emit(`disconnect`,e),this.forwardDestroy=()=>this.emit(`destroy`),this.setConfiguration(e),this.configuration.document=e.document?e.document:new Ji,this.configuration.awareness=e.awareness===void 0?new Ol(this.document):e.awareness,this.on(`open`,this.configuration.onOpen),this.on(`message`,this.configuration.onMessage),this.on(`outgoingMessage`,this.configuration.onOutgoingMessage),this.on(`synced`,this.configuration.onSynced),this.on(`destroy`,this.configuration.onDestroy),this.on(`awarenessUpdate`,this.configuration.onAwarenessUpdate),this.on(`awarenessChange`,this.configuration.onAwarenessChange),this.on(`stateless`,this.configuration.onStateless),this.on(`unsyncedChanges`,this.configuration.onUnsyncedChanges),this.on(`authenticated`,this.configuration.onAuthenticated),this.on(`authenticationFailed`,this.configuration.onAuthenticationFailed),this.awareness?.on(`update`,()=>{this.emit(`awarenessUpdate`,{states:Gt(this.awareness.getStates())})}),this.awareness?.on(`change`,()=>{this.emit(`awarenessChange`,{states:Gt(this.awareness.getStates())})}),this.document.on(`update`,this.boundDocumentUpdateHandler),this.awareness?.on(`update`,this.boundAwarenessUpdateHandler),this.registerEventListeners(),this.configuration.forceSyncInterval&&typeof this.configuration.forceSyncInterval==`number`&&(this.intervals.forceSync=setInterval(this.forceSync.bind(this),this.configuration.forceSyncInterval)),this.manageSocket&&this.attach()}setConfiguration(e={}){e.websocketProvider||(this.manageSocket=!0,this.configuration.websocketProvider=new Il(e)),this.configuration={...this.configuration,...e}}get document(){return this.configuration.document}get isAttached(){return this._isAttached}get awareness(){return this.configuration.awareness}get hasUnsyncedChanges(){return this.unsyncedChanges>0}resetUnsyncedChanges(){this.unsyncedChanges=1,this.emit(`unsyncedChanges`,{number:this.unsyncedChanges})}incrementUnsyncedChanges(){this.unsyncedChanges+=1,this.emit(`unsyncedChanges`,{number:this.unsyncedChanges})}decrementUnsyncedChanges(){this.unsyncedChanges>0&&--this.unsyncedChanges,this.unsyncedChanges===0&&(this.synced=!0),this.emit(`unsyncedChanges`,{number:this.unsyncedChanges})}forceSync(){this.resetUnsyncedChanges(),this.send($l,{document:this.document,documentName:this.effectiveName})}pageHide(){this.awareness&&kl(this.awareness,[this.document.clientID],`page hide`)}registerEventListeners(){typeof window>`u`||!(`addEventListener`in window)||window.addEventListener(`pagehide`,this.boundPageHide)}sendStateless(e){this.send(Ql,{documentName:this.effectiveName,payload:e})}async sendToken(){let e;try{e=await this.getToken()}catch(e){this.permissionDeniedHandler(`Failed to get token during sendToken(): ${e}`);return}this.send(Xl,{token:e??``,documentName:this.effectiveName})}documentUpdateHandler(e,t){t!==this&&(this.incrementUnsyncedChanges(),this.send(eu,{update:e,documentName:this.effectiveName}))}awarenessUpdateHandler({added:e,updated:t,removed:n},r){let i=e.concat(t).concat(n);this.send(Zl,{awareness:this.awareness,clients:i,documentName:this.effectiveName})}get synced(){return this.isSynced}set synced(e){this.isSynced!==e&&(this.isSynced=e,e&&this.emit(`synced`,{state:e}))}receiveStateless(e){this.emit(`stateless`,{payload:e})}async connect(){if(this.manageSocket)return this.configuration.websocketProvider.connect();console.warn(`HocuspocusProvider::connect() is deprecated and does not do anything. Please connect/disconnect on the websocketProvider, or attach/deattach providers.`)}disconnect(){if(this.manageSocket)return this.configuration.websocketProvider.disconnect();console.warn(`HocuspocusProvider::disconnect() is deprecated and does not do anything. Please connect/disconnect on the websocketProvider, or attach/deattach providers.`)}async onOpen(e){this.isAuthenticated=!1,this.emit(`open`,{event:e}),await this.sendToken(),this.startSync()}async getToken(){return typeof this.configuration.token==`function`?await this.configuration.token():this.configuration.token}startSync(){this.resetUnsyncedChanges(),this.send($l,{document:this.document,documentName:this.effectiveName}),this.awareness&&this.awareness.getLocalState()!==null&&this.send(Zl,{awareness:this.awareness,clients:[this.document.clientID],documentName:this.effectiveName})}send(e,t){if(!this._isAttached)return;let n=new Jl(e,t);this.emit(`outgoingMessage`,{message:n.message}),n.send(this.configuration.websocketProvider)}onMessage(e){let t=new Nl(e.data),{documentName:n}=Jt(t.readVarString());t.writeVarString(this.effectiveName),this.emit(`message`,{event:e,message:new Nl(e.data)}),new ql(t).apply(this,!0)}onClose(){this.isAuthenticated=!1,this.synced=!1,this.awareness&&kl(this.awareness,Array.from(this.awareness.getStates().keys()).filter(e=>e!==this.document.clientID),this)}destroy(){this.emit(`destroy`),this.intervals.forceSync&&clearInterval(this.intervals.forceSync),this.awareness&&(kl(this.awareness,[this.document.clientID],`provider destroy`),this.awareness.off(`update`,this.boundAwarenessUpdateHandler),this.awareness.destroy()),this.document.off(`update`,this.boundDocumentUpdateHandler),this.removeAllListeners(),this.detach(),this.manageSocket&&this.configuration.websocketProvider.destroy(),!(typeof window>`u`||!(`removeEventListener`in window))&&window.removeEventListener(`pagehide`,this.boundPageHide)}detach(){this.configuration.websocketProvider.off(`connect`,this.configuration.onConnect),this.configuration.websocketProvider.off(`connect`,this.forwardConnect),this.configuration.websocketProvider.off(`status`,this.forwardStatus),this.configuration.websocketProvider.off(`status`,this.configuration.onStatus),this.configuration.websocketProvider.off(`open`,this.boundOnOpen),this.configuration.websocketProvider.off(`close`,this.boundOnClose),this.configuration.websocketProvider.off(`close`,this.configuration.onClose),this.configuration.websocketProvider.off(`close`,this.forwardClose),this.configuration.websocketProvider.off(`disconnect`,this.configuration.onDisconnect),this.configuration.websocketProvider.off(`disconnect`,this.forwardDisconnect),this.configuration.websocketProvider.off(`destroy`,this.configuration.onDestroy),this.configuration.websocketProvider.off(`destroy`,this.forwardDestroy),this.configuration.websocketProvider.detach(this),this._isAttached=!1}attach(){this._isAttached||=(this.configuration.websocketProvider.on(`connect`,this.configuration.onConnect),this.configuration.websocketProvider.on(`connect`,this.forwardConnect),this.configuration.websocketProvider.on(`status`,this.configuration.onStatus),this.configuration.websocketProvider.on(`status`,this.forwardStatus),this.configuration.websocketProvider.on(`open`,this.boundOnOpen),this.configuration.websocketProvider.on(`close`,this.boundOnClose),this.configuration.websocketProvider.on(`close`,this.configuration.onClose),this.configuration.websocketProvider.on(`close`,this.forwardClose),this.configuration.websocketProvider.on(`disconnect`,this.configuration.onDisconnect),this.configuration.websocketProvider.on(`disconnect`,this.forwardDisconnect),this.configuration.websocketProvider.on(`destroy`,this.configuration.onDestroy),this.configuration.websocketProvider.on(`destroy`,this.forwardDestroy),this.configuration.websocketProvider.attach(this),!0)}permissionDeniedHandler(e){this.emit(`authenticationFailed`,{reason:e}),this.isAuthenticated=!1}authenticatedHandler(e){this.isAuthenticated=!0,this.authorizedScope=e,this.emit(`authenticated`,{scope:e})}setAwarenessField(e,t){if(!this.awareness)throw new tu(`Cannot set awareness field "${e}" to ${JSON.stringify(t)}. You have disabled Awareness for this provider by explicitly passing awareness: null in the provider configuration.`);this.awareness.setLocalStateField(e,t)}},ru=`open-knowledge-config`;function iu(e,t,n){let r=me.getTracer(ru),i=t?{attributes:t}:{};return r.startActiveSpan(e,i,e=>{try{return n(e)}catch(t){throw e.recordException(t),e.setStatus({code:he.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function au(e,t){let n=me.getActiveSpan();n&&n.addEvent(e,t)}function ou(e,t){return e===`either`?!0:e===t}function su(e,t){let n=null;function r(e,i){if(n!==null||e===void 0)return;let a=se(ce,i);if(a?.scope!==void 0&&!ou(a.scope,t)){n={code:`SCOPE_VIOLATION`,path:i,expectedScope:a.scope,actualScope:t};return}if(typeof e==`object`&&e&&!Array.isArray(e)){for(let[t,a]of Object.entries(e))if(r(a,[...i,t]),n!==null)return;return}}for(let[t,i]of Object.entries(e))if(r(i,[t]),n!==null)break;return n}var cu=`source`;function lu(e){return{ok:!1,error:e}}function uu(e){return{ok:!0,...e}}function du(){return ce.parse({})}function fu(e,t){let n=e.toString();if(n.length===0)return du();let r=u(n);if(r.errors.length>0)return console.warn(`[bindConfigDoc:${t}] Y.Text contains invalid YAML; returning schema defaults. Errors: ${r.errors.map(e=>e.message).join(`; `)}`),du();let i=r.toJSON()??{},a=ce.safeParse(i);return a.success?a.data:(console.warn(`[bindConfigDoc:${t}] Y.Text content fails schema validation; returning schema defaults. First issue: ${a.error.issues[0]?.message??`(unknown)`}`),du())}function pu(e,t,n={}){return iu(`config.bind`,{"config.scope":t,"config.transport":`ytext`},()=>mu(e,t,n))}function mu(e,t,n){let{ytextKey:r=cu}=n,i=e.document,a=i.getText(r),o=new Set,s=new Set,c=!1,d=!1;function f(){if(c)return;let e=fu(a,t);for(let n of o)try{n(e)}catch(e){console.warn(`[bindConfigDoc:${t}] listener threw:`,e)}}function p(){if(c||(f(),d))return;d=!0;let e=[...s];s.clear();for(let n of e)try{n()}catch(e){console.warn(`[bindConfigDoc:${t}] synced listener threw:`,e)}}a.observe(f),e.on(`synced`,p);function m(e){if(c)return lu({code:`WRITE_ERROR`,detail:`ConfigBinding (${t}) has been disposed`});if(!d)return lu({code:`NOT_SYNCED`,detail:`ConfigBinding (${t}) has not completed initial sync`});let n=su(e,t);if(n!==null)return lu(n);let r=fe(e);if(r!==null)return lu(r);let o=ae(e);if(o!==null)return lu(o);let s=u(a.toString()),f=s.contents!==null&&!l(s.contents);if(s.errors.length>0||f){au(`config.corrupt-ytext-reset`,{"config.scope":t,"config.parse.errorCount":s.errors.length,"config.parse.topLevelNonMap":f});let e=s.errors.length>0?s.errors.map(e=>e.message).join(`; `):`top-level YAML is not a mapping`;console.warn(`[bindConfigDoc:${t}] dropping corrupt Y.Text and re-applying patch onto empty doc. Reason: ${e}`),s=u(``)}s.contents===null&&(s.contents=s.createNode({}));let p=oe(s,e),m=s.toJSON()??{},ee=iu(`config.validate`,{"config.scope":t,"config.validation.layer":`L1`},e=>{let t=ce.safeParse(m);if(e.setAttribute(`config.outcome`,t.success?`success`:`rejected`),!t.success)for(let e of t.error.issues)au(`config.validation.issue`,{"issue.path":e.path.map(e=>String(e)).join(`.`),"issue.message":e.message});return t});if(!ee.success)return lu({code:`SCHEMA_INVALID`,issues:ee.error.issues.map(ie)});let te=s.toString();return i.transact(()=>{a.length>0&&a.delete(0,a.length),a.insert(0,te)}),uu({effective:ee.data,appliedPaths:p})}return{current(){return fu(a,t)},patch(e){return iu(`config.patch`,{"config.scope":t,"config.transport":`ytext`},t=>{let n=m(e);return t.setAttribute(`config.outcome`,n.ok?`success`:`rejected`),n.ok||t.setAttribute(`config.error.code`,n.error.code),n})},subscribe(e){return o.add(e),()=>{o.delete(e)}},hasSynced(){return d},subscribeSynced(e){if(c)return()=>{};if(d){let n=!1;return queueMicrotask(()=>{if(!(n||c))try{e()}catch(e){console.warn(`[bindConfigDoc:${t}] synced listener threw:`,e)}}),()=>{n=!0}}return s.add(e),()=>{s.delete(e)}},dispose(){c||(c=!0,a.unobserve(f),e.off(`synced`,p),o.clear(),s.clear())}}}var hu=`source`,gu=800;function _u(e){return{ok:!1,error:e}}function vu(e){return{ok:!0,...e}}function yu(e,t={}){let{ytextKey:n=hu,acceptanceDelayMs:r=gu}=t,i=e.document,a=i.getText(n),o=new Set,s=new Set,c=new Set,l=!1,u=`idle`,d=null;function f(){d!==null&&(clearTimeout(d),d=null)}function p(e){if(!l&&u!==e){u=e;for(let t of c)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] status listener threw:`,e)}}}function m(){if(l)return;let e=a.toString();for(let t of o)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] text listener threw:`,e)}}function ee(e){if(!l)for(let t of s)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] rejection listener threw:`,e)}}return a.observe(m),e.on(`synced`,m),{current(){return a.toString()},patch(e){return l?_u({code:`WRITE_ERROR`,detail:`OkignoreBinding has been disposed`}):(i.transact(()=>{a.length>0&&a.delete(0,a.length),e.length>0&&a.insert(0,e)}),f(),p(`pending`),d=setTimeout(()=>{d=null,!l&&u===`pending`&&p(`accepted`)},r),vu({text:e}))},subscribe(e){return o.add(e),()=>{o.delete(e)}},subscribeRejection(e){return s.add(e),()=>{s.delete(e)}},subscribeStatus(e){return c.add(e),()=>{c.delete(e)}},status(){return u},notifyRejection(e){l||(f(),p(`rejected`),ee({error:e,text:a.toString()}))},dispose(){l||(l=!0,f(),a.unobserve(m),e.off(`synced`,m),o.clear(),s.clear(),c.clear())}}}function bu(e,t,n){return xu([e,t,n],[])}function xu(e,t){if(t.length>0){let n=se(ce,t);if(n?.scope===`user`)return e[0];if(n?.scope===`project`)return e[1]??e[0];if(n?.scope===`project-local`)return e[2]??e[0]}let n=Su(e);if(n===void 0)return;if(n===null)return null;if(Array.isArray(n)||typeof n!=`object`)return n;let r=e.map(e=>Cu(e)?e:void 0),i=new Set;for(let e of r)if(e!==void 0)for(let t of Object.keys(e))i.add(t);let a={};for(let e of i)a[e]=xu(r.map(t=>t===void 0?void 0:t[e]),[...t,e]);return a}function Su(e){for(let t=e.length-1;t>=0;t--)if(e[t]!==void 0)return e[t]}function Cu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var wu=e(n(),1);function Tu(e,t,n){let r=(0,xe.c)(5),i,a;r[0]!==e||r[1]!==t||r[2]!==n?(i=()=>{!e||!n||typeof e.setLanguagePreference==`function`&&e.setLanguagePreference(t??`system`).catch(e=>{console.warn(JSON.stringify({event:`language-preference-push-failed`,preference:t??`system`,error:e instanceof Error?e.message:String(e)}))})},a=[e,t,n],r[0]=e,r[1]=t,r[2]=n,r[3]=i,r[4]=a):(i=r[3],a=r[4]),(0,wu.useEffect)(i,a)}function Eu(e){let t=document.createElement(`span`);t.style.display=`none`,t.style.backgroundColor=`var(${e})`,document.body.appendChild(t);try{let e=getComputedStyle(t).backgroundColor;return!e||e===`rgba(0, 0, 0, 0)`||e.includes(`var(`)?null:ye(e)}finally{t.remove()}}function Du(){if(!(typeof document>`u`))try{let e=Eu(`--desk`),t=Eu(`--sidebar-foreground`);return!e||!t?void 0:{bg:e,symbol:t}}catch{return}}function Ou(e,t,n){let r=(0,xe.c)(7),i=(0,wu.useRef)(null),a;r[0]!==e||r[1]!==t?(a=()=>{if(t!==`light`&&t!==`dark`&&t!==`system`||!e)return;let n=!1,r=!1,a,o=window.matchMedia(`(prefers-reduced-transparency: reduce)`),s=()=>{if(n||!r||_e())return;let t={reducedTransparency:o.matches,chrome:Du()},i=JSON.stringify(t);i!==a&&(e.signalThemeApplied(t),a=i)},c=ve(s);o.addEventListener(`change`,s);let l=()=>{n||(r=!0,s())},u=i.current;if(u?.bridge===e&&u.source===t)u.settled.then(l);else{let n={bridge:e,source:t,settled:e.setThemeSource(t).catch(e=>{i.current===n&&(i.current=null),console.warn(JSON.stringify({event:`theme-source-set-failed`,themeValue:t,error:e instanceof Error?e.message:String(e)}))})};i.current=n,n.settled.then(l)}return()=>{n=!0,c(),o.removeEventListener(`change`,s)}},r[0]=e,r[1]=t,r[2]=a):a=r[2];let o;r[3]!==e||r[4]!==n||r[5]!==t?(o=[e,n,t],r[3]=e,r[4]=n,r[5]=t,r[6]=o):o=r[6],(0,wu.useEffect)(a,o)}function ku(e,t,n=null,r=null){let i={...be()};return e!==null&&(i.principalId=e.principalId,i.tabSessionId=e.tabSessionId),t!==null&&t.length>0&&(i.expectedServerInstanceId=t),n!==null&&n.length>0&&(i.expectedBranch=n),r!==null&&r.length>0&&(i.expectedDocLineageEpoch=r),JSON.stringify(i)}var Au=t();function ju(e,t,n,r){console.warn(JSON.stringify({event:`ok-${e}-${n}`,docName:t,code:r?.code,reason:r?.reason??void 0}))}function Mu(e,t,n,r){let i=new Ji,a=new nu({url:e,name:t,document:i,token:ku(null,r,null),onDisconnect:({event:e})=>ju(`config-provider`,t,`disconnect`,e),onClose:({event:e})=>ju(`config-provider`,t,`close`,e)}),o=pu(a,n);return{binding:o,config:o.current(),cleanup:()=>{o.dispose(),a.destroy(),i.destroy()}}}function Nu(e,t){let n=new Ji,r=new nu({url:e,name:s,document:n,token:ku(null,t,null),onDisconnect:({event:e})=>ju(`okignore-provider`,s,`disconnect`,e),onClose:({event:e})=>ju(`okignore-provider`,s,`close`,e)}),i=yu(r);return{binding:i,provider:r,cleanup:()=>{i.dispose(),r.destroy(),n.destroy()}}}function Pu(e){let t=(0,xe.c)(20),{collabUrl:n,collabTerminal:i,children:s}=e,l=i===void 0?!1:i,{themes:u,loaded:ie,loadError:ae}=ue(),oe=le(),{systemTheme:se}=r(),ce=se===`dark`,[de,fe]=(0,wu.useState)(null),[me,he]=(0,wu.useState)(null),[_e,ve]=(0,wu.useState)(null),[ye,be]=(0,wu.useState)(null),h,Se;t[0]!==n||t[1]!==oe?(h=()=>{if(n===null)return;let e=Mu(n,a,`user`,oe),t=Mu(n,c,`project`,oe),r=Mu(n,o,`project-local`,oe),i=Nu(n,oe);fe({binding:e.binding,config:e.config,synced:e.binding.hasSynced()}),he({binding:t.binding,config:t.config,synced:t.binding.hasSynced()}),ve({binding:r.binding,config:r.config,synced:r.binding.hasSynced()}),be({binding:i.binding,synced:!1});let s=e.binding.subscribe(t=>{fe(n=>n?.binding===e.binding?{...n,config:t}:n)}),l=e.binding.subscribeSynced(()=>{fe(t=>t?.binding===e.binding?{...t,config:e.binding.current(),synced:!0}:t)}),u=t.binding.subscribe(e=>{he(n=>n?.binding===t.binding?{...n,config:e}:n)}),d=t.binding.subscribeSynced(()=>{he(e=>e?.binding===t.binding?{...e,config:t.binding.current(),synced:!0}:e)}),f=r.binding.subscribe(e=>{ve(t=>t?.binding===r.binding?{...t,config:e}:t)}),p=r.binding.subscribeSynced(()=>{ve(e=>e?.binding===r.binding?{...e,config:r.binding.current(),synced:!0}:e)}),m=()=>{be(e=>e?.binding===i.binding?{...e,synced:!0}:e)};return i.provider.on(`synced`,m),()=>{s(),l(),u(),d(),f(),p(),i.provider.off(`synced`,m);for(let n of[e,t,r,i])try{n.cleanup()}catch(e){console.warn(JSON.stringify({event:`ok-config-provider-cleanup-error`,error:String(e)}))}fe(t=>t?.binding===e.binding?null:t),he(e=>e?.binding===t.binding?null:e),ve(e=>e?.binding===r.binding?null:e),be(e=>e?.binding===i.binding?null:e)}},Se=[n,oe],t[0]=n,t[1]=oe,t[2]=h,t[3]=Se):(h=t[2],Se=t[3]),(0,wu.useEffect)(h,Se);let g=de&&me?bu(de.config,me.config,_e?.config):null,_=g?.appearance?.theme,Ce=g?.appearance?.customTheme,we=g?.appearance?.colorThemeEnabled!==!1,Te=n===null||de?.synced===!0&&me?.synced===!0&&_e?.synced===!0,Ee=[g?.appearance?.colorThemeLight,g?.appearance?.colorThemeDark,g?.appearance?.colorTheme],De=we&&Ee.some(Fu),Oe=Te&&(!De||ie),ke=Te&&(!De||ie||ae),Ae=m(g?.appearance,u),je=re(_,ce),Me=we?Ae[je]:`default`,Ne=Me===`custom`?ee(te(Ce)):p(Me,u)??_??(g?`system`:void 0);d(Oe?Ne:void 0),ne({selection:Ae,modePreference:_,slotMode:je,customSeed:Ce,themes:u,enabled:we,ready:Oe}),ge((n!==null||l)&&Oe),pe({preference:g?.appearance?.language,userConfigSynced:de?.synced??!1}),Tu(typeof window<`u`?window.okDesktop:void 0,g?.appearance?.language,de?.synced??!1);let Pe=Me.startsWith(`saved-`)?u.find(e=>e.id===Me)?.scheme:void 0,Fe=Me===`custom`?JSON.stringify(Ce??null):Pe?JSON.stringify(Pe):``;Ou(ke&&typeof window<`u`?window.okDesktop:void 0,ke?_??`system`:void 0,`${Me}:${Fe}`);let Ie=de?.binding??null,Le=de?.synced??!1,Re=me?.binding??null,ze=_e?.binding??null,v=ye?.binding??null,Be=ye?.synced??!1,Ve=de?.config??null,y=me?.config??null,He=me?.synced??!1,Ue=_e?.config??null,We=_e?.synced??!1,b;t[4]!==g||t[5]!==Ve||t[6]!==y||t[7]!==He||t[8]!==Ue||t[9]!==We||t[10]!==Ie||t[11]!==Le||t[12]!==Re||t[13]!==ze||t[14]!==v||t[15]!==Be?(b={userBinding:Ie,userSynced:Le,projectBinding:Re,projectLocalBinding:ze,okignoreBinding:v,okignoreSynced:Be,userConfig:Ve,projectConfig:y,projectSynced:He,projectLocalConfig:Ue,projectLocalSynced:We,merged:g},t[4]=g,t[5]=Ve,t[6]=y,t[7]=He,t[8]=Ue,t[9]=We,t[10]=Ie,t[11]=Le,t[12]=Re,t[13]=ze,t[14]=v,t[15]=Be,t[16]=b):b=t[16];let Ge=b,Ke;return t[17]!==s||t[18]!==Ge?(Ke=(0,Au.jsx)(f,{value:Ge,children:s}),t[17]=s,t[18]=Ge,t[19]=Ke):Ke=t[19],Ke}function Fu(e){return typeof e==`string`&&e.startsWith(`saved-`)}function Iu(e){let t=(0,xe.c)(2),n;return t[0]===e?n=t[1]:(n=(0,Au.jsx)(de,{children:(0,Au.jsx)(Pu,{...e})}),t[0]=e,t[1]=n),n}export{j as $,V as A,L as B,z as C,ha as D,Ba as E,Aa as F,Bn as G,si as H,Va as I,_n as J,jn as K,U as L,Ri as M,Oa as N,pa as O,Ii as P,A as Q,Io as R,Hi as S,Fa as T,N as U,oi as V,Hn as W,an as X,ln as Y,en as Z,js as _,pu as a,_ as at,Ra as b,Xs as c,J as d,T as et,ka as f,Es as g,xs as h,Tu as i,Ie as it,Da as j,ya as k,oc as l,co as m,ku as n,D as nt,nu as o,g as ot,za as p,xn as q,Ou as r,v as rt,q as s,Iu as t,E as tt,Ji as u,ua as v,ja as w,La as x,la as y,hi as z};
@@ -1 +0,0 @@
1
- import"./saved-themes-client-B4QZmuf_.js";
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-BUgB2tll.js";import{t}from"./compiler-runtime-BfE3aGVn.js";import{t as n}from"./utils-CPqDy6Hr.js";import{a as r,c as i,d as a,f as o,i as s,l as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./dist-BzicVdNV.js";import{t as g}from"./check-B2OLRY33.js";import{t as _}from"./chevron-right-Bofu4lib.js";var v=t(),y=e();function b(e){let t=(0,v.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,y.jsx)(i,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function x(e){let t=(0,v.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`select-none`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,y.jsx)(d,{"data-slot":`context-menu-trigger`,className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function S(e){let t=(0,v.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,y.jsx)(f,{"data-slot":`context-menu-group`,...n}),t[2]=n,t[3]=r),r}function C(e){let t=(0,v.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,y.jsx)(h,{"data-slot":`context-menu-sub`,...n}),t[2]=n,t[3]=r),r}function w(e){let t=(0,v.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,y.jsx)(p,{children:(0,y.jsx)(l,{"data-slot":`context-menu-content`,className:a,collisionPadding:8,...i})}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function T(e){let t=(0,v.c)(12),r,i,a,o;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4]):({className:r,inset:i,variant:o,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o);let c=o===void 0?`default`:o,l;t[5]===r?l=t[6]:(l=n(`group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none focus-visible:outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive`,r),t[5]=r,t[6]=l);let u;return t[7]!==i||t[8]!==a||t[9]!==l||t[10]!==c?(u=(0,y.jsx)(s,{"data-slot":`context-menu-item`,"data-inset":i,"data-variant":c,className:l,...a}),t[7]=i,t[8]=a,t[9]=l,t[10]=c,t[11]=u):u=t[11],u}function E(e){let t=(0,v.c)(13),r,i,a,s;t[0]===e?(r=t[1],i=t[2],a=t[3],s=t[4]):({className:i,inset:a,children:r,...s}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=s);let c;t[5]===i?c=t[6]:(c=n(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none focus-visible:outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[5]=i,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,y.jsx)(_,{className:`ml-auto`}),t[7]=l):l=t[7];let u;return t[8]!==r||t[9]!==a||t[10]!==s||t[11]!==c?(u=(0,y.jsxs)(o,{"data-slot":`context-menu-sub-trigger`,"data-inset":a,className:c,...s,children:[r,l]}),t[8]=r,t[9]=a,t[10]=s,t[11]=c,t[12]=u):u=t[12],u}function D(e){let t=(0,v.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let o;t[3]===r?o=t[4]:(o=n(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,r),t[3]=r,t[4]=o);let s;return t[5]!==i||t[6]!==o?(s=(0,y.jsx)(a,{"data-slot":`context-menu-sub-content`,className:o,collisionPadding:8,...i}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s}function O(e){let t=(0,v.c)(15),i,a,o,s,c;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4],c=t[5]):({className:o,children:a,checked:i,inset:s,...c}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=c);let l;t[6]===o?l=t[7]:(l=n(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-none focus-visible:outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,o),t[6]=o,t[7]=l);let u;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,y.jsx)(`span`,{className:`pointer-events-none absolute right-2`,children:(0,y.jsx)(r,{children:(0,y.jsx)(g,{})})}),t[8]=u):u=t[8];let d;return t[9]!==i||t[10]!==a||t[11]!==s||t[12]!==c||t[13]!==l?(d=(0,y.jsxs)(m,{"data-slot":`context-menu-checkbox-item`,"data-inset":s,className:l,checked:i,...c,children:[u,a]}),t[9]=i,t[10]=a,t[11]=s,t[12]=c,t[13]=l,t[14]=d):d=t[14],d}function k(e){let t=(0,v.c)(10),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({className:r,inset:i,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let o;t[4]===r?o=t[5]:(o=n(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,r),t[4]=r,t[5]=o);let s;return t[6]!==i||t[7]!==a||t[8]!==o?(s=(0,y.jsx)(u,{"data-slot":`context-menu-label`,"data-inset":i,className:o,...a}),t[6]=i,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function A(e){let t=(0,v.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`-mx-1 my-1 h-px bg-border`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,y.jsx)(c,{"data-slot":`context-menu-separator`,className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}export{T as a,C as c,x as d,S as i,D as l,O as n,k as o,w as r,A as s,b as t,E as u};
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-BUgB2tll.js";import{t}from"./compiler-runtime-BfE3aGVn.js";import{t as n}from"./utils-CPqDy6Hr.js";import{a as r,c as i,d as a,f as o,h as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _}from"./dist-C0nuYMFu.js";import{t as v}from"./createLucideIcon-DdBzwsHe.js";import{t as y}from"./check-B2OLRY33.js";import{t as b}from"./chevron-right-Bofu4lib.js";var x=v(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),S=t(),C=e();function w(e){let t=(0,S.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,C.jsx)(_,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function T(e){let t=(0,S.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,C.jsx)(h,{"data-slot":`dropdown-menu-portal`,...n}),t[2]=n,t[3]=r),r}function E(e){let t=(0,S.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,C.jsx)(s,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function D(e){let t=(0,S.c)(12),r,i,a,o;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4]):({className:r,align:a,sideOffset:o,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o);let s=a===void 0?`start`:a,c=o===void 0?4:o,l;t[5]===r?l=t[6]:(l=n(`z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,r),t[5]=r,t[6]=l);let u;return t[7]!==s||t[8]!==i||t[9]!==c||t[10]!==l?(u=(0,C.jsx)(h,{children:(0,C.jsx)(d,{"data-slot":`dropdown-menu-content`,sideOffset:c,align:s,className:l,collisionPadding:8,...i})}),t[7]=s,t[8]=i,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function O(e){let t=(0,S.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,C.jsx)(m,{"data-slot":`dropdown-menu-group`,...n}),t[2]=n,t[3]=r),r}function k(e){let t=(0,S.c)(12),r,i,a,o;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4]):({className:r,inset:i,variant:o,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o);let s=o===void 0?`default`:o,l;t[5]===r?l=t[6]:(l=n(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none focus-visible:outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,r),t[5]=r,t[6]=l);let u;return t[7]!==i||t[8]!==a||t[9]!==l||t[10]!==s?(u=(0,C.jsx)(c,{"data-slot":`dropdown-menu-item`,"data-inset":i,"data-variant":s,className:l,...a}),t[7]=i,t[8]=a,t[9]=l,t[10]=s,t[11]=u):u=t[11],u}function A(e){let t=(0,S.c)(15),i,a,o,s,c;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4],c=t[5]):({className:o,children:a,checked:i,inset:s,...c}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=c);let l;t[6]===o?l=t[7]:(l=n(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pe-8 ps-1.5 text-sm outline-none focus-visible:outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-7 data-disabled:pointer-events-none data-disabled:opacity-50 aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,o),t[6]=o,t[7]=l);let u;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,C.jsx)(`span`,{className:`pointer-events-none absolute end-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,C.jsx)(r,{children:(0,C.jsx)(y,{})})}),t[8]=u):u=t[8];let d;return t[9]!==i||t[10]!==a||t[11]!==s||t[12]!==c||t[13]!==l?(d=(0,C.jsxs)(g,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":s,className:l,checked:i,...c,children:[u,a]}),t[9]=i,t[10]=a,t[11]=s,t[12]=c,t[13]=l,t[14]=d):d=t[14],d}function j(e){let t=(0,S.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,C.jsx)(i,{"data-slot":`dropdown-menu-radio-group`,...n}),t[2]=n,t[3]=r),r}function M(e){let t=(0,S.c)(13),i,a,o,s;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4]):({className:a,children:i,inset:o,...s}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s);let c;t[5]===a?c=t[6]:(c=n(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pe-8 ps-1.5 text-sm outline-none focus-visible:outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,a),t[5]=a,t[6]=c);let u;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,C.jsx)(`span`,{className:`pointer-events-none absolute inset-y-0 end-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,C.jsx)(r,{children:(0,C.jsx)(x,{className:`size-2 fill-primary stroke-primary`})})}),t[7]=u):u=t[7];let d;return t[8]!==i||t[9]!==o||t[10]!==s||t[11]!==c?(d=(0,C.jsxs)(l,{"data-slot":`dropdown-menu-radio-item`,"data-inset":o,className:c,...s,children:[u,i]}),t[8]=i,t[9]=o,t[10]=s,t[11]=c,t[12]=d):d=t[12],d}function N(e){let t=(0,S.c)(10),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({className:r,inset:i,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let o;t[4]===r?o=t[5]:(o=n(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:ps-7`,r),t[4]=r,t[5]=o);let s;return t[6]!==i||t[7]!==a||t[8]!==o?(s=(0,C.jsx)(f,{"data-slot":`dropdown-menu-label`,"data-inset":i,className:o,...a}),t[6]=i,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function P(e){let t=(0,S.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let o;t[3]===r?o=t[4]:(o=n(`-mx-1 my-1 h-px bg-border`,r),t[3]=r,t[4]=o);let s;return t[5]!==i||t[6]!==o?(s=(0,C.jsx)(a,{"data-slot":`dropdown-menu-separator`,className:o,...i}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s}function F(e){let t=(0,S.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`ms-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,C.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function I(e){let t=(0,S.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,C.jsx)(o,{"data-slot":`dropdown-menu-sub`,...n}),t[2]=n,t[3]=r),r}function L(e){let t=(0,S.c)(13),r,i,a,o;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4]):({className:i,inset:a,children:r,...o}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o);let s;t[5]===i?s=t[6]:(s=n(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none focus-visible:outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[5]=i,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,C.jsx)(b,{className:`ms-auto text-muted-foreground`}),t[7]=c):c=t[7];let l;return t[8]!==r||t[9]!==a||t[10]!==o||t[11]!==s?(l=(0,C.jsxs)(u,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":a,className:s,...o,children:[r,c]}),t[8]=r,t[9]=a,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}function R(e){let t=(0,S.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,C.jsx)(p,{"data-slot":`dropdown-menu-sub-content`,className:a,collisionPadding:8,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}export{k as a,j as c,F as d,I as f,E as h,O as i,M as l,L as m,A as n,N as o,R as p,D as r,T as s,w as t,P as u};
@@ -1 +0,0 @@
1
- import{n as e}from"./field-controls-pq-AYiCQ.js";export{e as SectionSkeleton};