@forsion/unit 2.13.2 → 2.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.mjs +25 -3
- package/package.json +1 -1
- package/release.json +5 -5
- package/web/assets/ArtificialView-DLh75dAI.js +1 -0
- package/web/assets/AutomationBuilder-DNWWGnFr.js +1 -0
- package/web/assets/CalendarConfigView-G7je7k9-.js +1 -0
- package/web/assets/{CalendarView-D7ZUE_dr.js → CalendarView-B2MtaOJk.js} +1 -1
- package/web/assets/{CapabilityMenu-CrsaTtDe.js → CapabilityMenu-DJaZ_Cyt.js} +1 -1
- package/web/assets/{CheckboxInput-DVO2-1J7.js → CheckboxInput-FYXLaZke.js} +1 -1
- package/web/assets/{Chrome-BvpbCvo1.js → Chrome-CFonajM4.js} +1 -1
- package/web/assets/{CodeView-CB4kG7Y6.js → CodeView-GZ0BAgoW.js} +3 -3
- package/web/assets/DashboardGridView-D9s9pez_.css +1 -0
- package/web/assets/DashboardGridView-Xgw4wa0_.js +17 -0
- package/web/assets/{EventCard-c6s4uGBu.js → EventCard-_39F_I5M.js} +1 -1
- package/web/assets/ExcalidrawCanvas-rXujil36.js +1 -0
- package/web/assets/{FloatingToc-ldOYWe2C.js → FloatingToc-DNqAkkI0.js} +1 -1
- package/web/assets/GitCloneDialog-Bj9G3o-n.css +1 -0
- package/web/assets/GitCloneDialog-CQx-O4j1.js +1 -0
- package/web/assets/HomepageView-DcWmTPQO.css +1 -0
- package/web/assets/HomepageView-MYEk3RCs.js +3 -0
- package/web/assets/{ImageStudioPanels-DgMYAsHj.js → ImageStudioPanels-4wnb2XF4.js} +2 -2
- package/web/assets/ImageStudioView-qrmW8pfx.js +1 -0
- package/web/assets/InlineAiPanel-B3kd1ob2.js +1 -0
- package/web/assets/InlineAiPanel-DZZijfif.css +1 -0
- package/web/assets/InlineFiles-Clnqh9jD.js +1 -0
- package/web/assets/MarkdownBlock-DQTuoen3.css +1 -0
- package/web/assets/MarkdownBlock-DT_wsaja.js +58 -0
- package/web/assets/ModelPill-JaIH3ffZ.js +2 -0
- package/web/assets/MuseLibraryView-16p1zsxz.css +1 -0
- package/web/assets/MuseLibraryView-DOJVVeU6.js +2 -0
- package/web/assets/{MuseView-3GL4Ltoj.js → MuseView-uxTmjVQa.js} +2 -2
- package/web/assets/{PageHistoryPanel-BMQC-V_l.js → PageHistoryPanel-Bn4-XmdK.js} +2 -2
- package/web/assets/{PdfAnnotator-CyAw8sgq.js → PdfAnnotator-Cq8cklTz.js} +1 -1
- package/web/assets/PenRow-COOYAaxx.js +1 -0
- package/web/assets/ProductView-DPTveulg.js +1 -0
- package/web/assets/RightPanel-BJUacrsf.js +4 -0
- package/web/assets/RightPanel-D0zk1g3I.css +1 -0
- package/web/assets/{SketchCard-DAD0jR0i.js → SketchCard-B_UU5sxV.js} +3 -3
- package/web/assets/{StudioGuestSurface-DlUKXBXv.js → StudioGuestSurface-yBa4QKfX.js} +1 -1
- package/web/assets/TargetHealthNotice-BLzDB-Xl.css +1 -0
- package/web/assets/TargetHealthNotice-CgkdTdhB.js +47 -0
- package/web/assets/{TodoListView-_yFkPUrw.js → TodoListView-CricdCfW.js} +1 -1
- package/web/assets/{Tooltip-DXuy9-1_.js → Tooltip-o8ZqIb3L.js} +1 -1
- package/web/assets/UnifiedPage-BWAyqj65.js +69 -0
- package/web/assets/ViewSelectionBar-35x8TiLA.js +2 -0
- package/web/assets/{amadeus-manual.en-DzRWr4BL.js → amadeus-manual.en-B8J-svqq.js} +1 -1
- package/web/assets/{amadeus-manual.zh-DW32DkL7.js → amadeus-manual.zh-CkCOFnrg.js} +1 -1
- package/web/assets/appStore-CI1_L5OS.js +3357 -0
- package/web/assets/appStore-DQc2marq.css +1 -0
- package/web/assets/{arrow-up-right-KPFbRA41.js → arrow-up-right-BDsMFoNQ.js} +1 -1
- package/web/assets/{astryxBridge-Bupzouso.js → astryxBridge-CH_c5xjo.js} +3 -3
- package/web/assets/automationListSource-CB6AWkL_.js +1 -0
- package/web/assets/{boardSurface-BHuMoQN-.js → boardSurface-CLvEUjbF.js} +1 -1
- package/web/assets/{book-open-CBeNsIpo.js → book-open-BLzEdGfu.js} +1 -1
- package/web/assets/{calendarNavStore-Duyhbmm_.js → calendarNavStore-BHUNxDx8.js} +1 -1
- package/web/assets/{canvasPrefs-CxfyDTMT.js → canvasPrefs-CvE7mgyq.js} +1 -1
- package/web/assets/{chatBoxSurface-OBzO1Z5E.js → chatBoxSurface-CuuHLzs5.js} +1 -1
- package/web/assets/{circle-question-mark-M8QUJJYk.js → circle-question-mark-BM4ZRxQS.js} +1 -1
- package/web/assets/{circle-x-Szwop5L_.js → circle-x-DTcNGZDT.js} +1 -1
- package/web/assets/{client-CPUljePZ.js → client-CaivGZFR.js} +5 -5
- package/web/assets/{code-xml-n9mgGgkv.js → code-xml-AE3mT4T5.js} +1 -1
- package/web/assets/{codeStudioStore-DXMQwRzG.js → codeStudioStore-DhyMazGT.js} +1 -1
- package/web/assets/codingNavigation-B0kVsy4x.js +53 -0
- package/web/assets/codingNavigation-DHCidM4N.css +1 -0
- package/web/assets/{create-C19zqt5N.js → create-1JI2I47p.js} +2 -2
- package/web/assets/dashboardSurface-CIE5HybN.js +1 -0
- package/web/assets/{deskCapture-B_LKZSPt.js → deskCapture-COW7aG5Y.js} +1 -1
- package/web/assets/{diff2html-DrCCWvpR.js → diff2html-Daje9Kkm.js} +1 -1
- package/web/assets/{docx-preview-Bi7wekSM.js → docx-preview-CABR7n30.js} +1 -1
- package/web/assets/emoji-DZ9CA_3l.css +1 -0
- package/web/assets/emoji-DphwSxPx.js +1 -0
- package/web/assets/{floatingTocSurface-rc1ZC7-I.js → floatingTocSurface-BOm2QYBK.js} +1 -1
- package/web/assets/{foldActions-BGocXE-o.js → foldActions-DNbJPlPl.js} +1 -1
- package/web/assets/{folder-CoOsfQ64.js → folder-DotgUhYD.js} +1 -1
- package/web/assets/{folder-plus-d5MwIMlf.js → folder-plus-aJgL9NeP.js} +1 -1
- package/web/assets/gestures-dqncPOwo.js +1 -0
- package/web/assets/git-branch-CwR2qic6.js +1 -0
- package/web/assets/{hand-fuehbnkI.js → hand-XNkzNiW2.js} +1 -1
- package/web/assets/{hard-drive-Bh1DmZg0.js → hard-drive-CfWKRoAE.js} +1 -1
- package/web/assets/i18n-CykmULlm.css +1 -0
- package/web/assets/i18n.generated-BwynSSMk.js +15 -0
- package/web/assets/{imageStudio-Dgl1wZNB.js → imageStudio-CWgLpC_d.js} +2 -2
- package/web/assets/imageStudio-DZ0qGU2s.css +1 -0
- package/web/assets/{index-2tD0kijW.js → index-B65ULikK.js} +1 -1
- package/web/assets/{index-BPqoEOV_.js → index-BGfvNj7R.js} +1 -1
- package/web/assets/{index-38xsQSS9.js → index-BIIeiIap.js} +1 -1
- package/web/assets/{index-B5UW6SaE.js → index-BOzsniE1.js} +89 -89
- package/web/assets/{index-YRWOePBS.js → index-BfrjVzia.js} +1 -1
- package/web/assets/{index-CnDAYLti.js → index-Bi9UtjVz.js} +1 -1
- package/web/assets/{index-fViJsYjM.js → index-C1uilc9i.js} +1 -1
- package/web/assets/{index-CPLtf9Vc.js → index-C3Dc3Ivz.js} +1 -1
- package/web/assets/{index-B8Co6KG3.js → index-CJF_Ld1Y.js} +1 -1
- package/web/assets/{index-lfow5R3O.js → index-CMARP4oV.js} +1 -1
- package/web/assets/{index-Dx9aIoyo.js → index-C_RsQVNm.js} +1 -1
- package/web/assets/{index-D4CSH-v1.js → index-ChyxZMm8.js} +1 -1
- package/web/assets/{index-7kdR1oL8.js → index-CoKcOaZg.js} +1 -1
- package/web/assets/{index-Ce1sNSS8.js → index-CuviSCbk.js} +1 -1
- package/web/assets/{index-Ch0FIsJX.js → index-Cw43kua8.js} +1 -1
- package/web/assets/{index-DvOrTnw2.js → index-D1fu6XQN.js} +1 -1
- package/web/assets/{index-QjVOA7QM.js → index-DG-hXb63.js} +1 -1
- package/web/assets/index-DjnTfJpN.js +1 -0
- package/web/assets/{index-DcRyQ3eU.js → index-Dtw0abst.js} +1 -1
- package/web/assets/{index-Dy07SBfH.js → index-O05r2Ty6.js} +1 -1
- package/web/assets/{index-BCG8Wnc4.js → index-W3ErfZiX.js} +1 -1
- package/web/assets/{index-e-MxdHFO.js → index-Yc56b3XX.js} +1 -1
- package/web/assets/{index-Dff-DL1v.js → index-d4jCdYJH.js} +1 -1
- package/web/assets/{index-Dc8iMctf.js → index-gt5JBIFf.js} +1 -1
- package/web/assets/{index-Df9jregv.js → index-siHtlYTM.js} +1 -1
- package/web/assets/{invitePage-Dgl3-c_m.js → invitePage-Bgveo6Hj.js} +1 -1
- package/web/assets/{ipc-CNlIRMtU.js → ipc-B6hkgxQL.js} +1 -1
- package/web/assets/{jszip.min-tyV0GaJg.js → jszip.min-eU-k-vEy.js} +1 -1
- package/web/assets/{layout-grid-DFmwM9NU.js → layout-grid-CraV7nhh.js} +1 -1
- package/web/assets/linkFollow-BpvDWzUx.js +8 -0
- package/web/assets/{list-tree-i07HsP3D.js → list-tree-cLJw-jYQ.js} +1 -1
- package/web/assets/{listFold-Aea6I0Sa.js → listFold-M8s5JYEC.js} +1 -1
- package/web/assets/{lock-TSDKuCod.js → lock-DBkXXwaI.js} +1 -1
- package/web/assets/lock-open-C-9-AWct.js +1 -0
- package/web/assets/{log-out-DK84lW5n.js → log-out-C8bDXj9P.js} +1 -1
- package/web/assets/main-CMk6twzA.js +20 -0
- package/web/assets/markdownEditorSurface-DgQ0TUWH.js +3 -0
- package/web/assets/{message-square-plus-3wFslIMY.js → message-square-plus-8pfimvem.js} +1 -1
- package/web/assets/{messages-DEAGRsC3.js → messages-CKtabOqy.js} +1 -1
- package/web/assets/minus-CfA9fAN3.js +1 -0
- package/web/assets/mobileEntry-NcMcK0LV.js +13 -0
- package/web/assets/{nativeDownload-B3JGkABw.js → nativeDownload-CNtwSCy0.js} +1 -1
- package/web/assets/pageChrome-BR4cfIaA.js +1 -0
- package/web/assets/pageChrome-BbUhILy0.css +1 -0
- package/web/assets/{pageTree-DZ7Eiro-.js → pageTree-BYYPgZm_.js} +4 -4
- package/web/assets/{pen-tool-ChGmX6g_.js → pen-tool-C5ftHCnm.js} +1 -1
- package/web/assets/{pencil-CJsJD7M_.js → pencil-ehhM9_9k.js} +1 -1
- package/web/assets/phoneList-B6gwUJZF.js +9 -0
- package/web/assets/phoneList-iRdfiKA8.css +1 -0
- package/web/assets/pluginChat-DTTWWiUS.js +2 -0
- package/web/assets/{redo-2-CI57sDFr.js → redo-2-DCEAgQlN.js} +1 -1
- package/web/assets/{rotate-ccw-xgT_0UN9.js → rotate-ccw-DdkrbRAB.js} +1 -1
- package/web/assets/selectionActions-BQD2kox1.js +2 -0
- package/web/assets/selectionBarSurface-CzUZmJDJ.js +1 -0
- package/web/assets/server-Ddu9f1k3.js +1 -0
- package/web/assets/sharePage-CNrm2xTC.js +2 -0
- package/web/assets/{shareViewer-DKPWhTJv.js → shareViewer-BiMqIBxP.js} +2 -2
- package/web/assets/{star-C9KTji9N.js → star-Dxv7XANS.js} +1 -1
- package/web/assets/tableSurface-Bly1iCXc.js +1 -0
- package/web/assets/{terminal-DPZazOQ2.js → terminal-CAmmC9cV.js} +1 -1
- package/web/assets/{terminalView-CsJmxE_m.js → terminalView-lbcBgG0c.js} +1 -1
- package/web/assets/theme-CUWFlazV.css +1 -0
- package/web/assets/{type-C5J875vb.js → type-Dz6rnTvG.js} +1 -1
- package/web/assets/{undo-2-BOUt5qks.js → undo-2-B7izWNb_.js} +1 -1
- package/web/assets/{unitAccount-BIAIxKNp.js → unitAccount-DGwGsmC3.js} +1 -1
- package/web/assets/{unitBridge-b2C6zb3a.js → unitBridge-CE2yAvm0.js} +1 -1
- package/web/assets/{unitCloudTransport-NGtDDKWo.js → unitCloudTransport-BGFwkaDM.js} +1 -1
- package/web/assets/{unitOwnerAccess-CwH9ApZT.js → unitOwnerAccess-D4nKS6Gg.js} +1 -1
- package/web/assets/{unitShim-CY8EVkKD.js → unitShim-2_2hhGxS.js} +3 -3
- package/web/assets/{upload-CrbEAW8C.js → upload-DqpRRAhG.js} +1 -1
- package/web/assets/userSpaces-VFu4s05v.js +1 -0
- package/web/assets/viewportLock-3AOdDmwi.js +631 -0
- package/web/assets/viewportLock-djvL8fUQ.css +1 -0
- package/web/assets/{zoom-in-BcuPvIYd.js → zoom-in-Bf-eKTnH.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/ArtificialView-Bs_6B211.js +0 -1
- package/web/assets/AutomationBuilder-C-IFaaBp.js +0 -1
- package/web/assets/CalendarConfigView-DEsNvVkD.js +0 -1
- package/web/assets/DashboardGridView-hpRmBr9B.css +0 -1
- package/web/assets/DashboardGridView-tgaj9-SM.js +0 -17
- package/web/assets/ExcalidrawCanvas-NdV86AR3.js +0 -1
- package/web/assets/HomepageView-4joJWYlg.js +0 -1
- package/web/assets/HomepageView-Cxf3AWBu.css +0 -1
- package/web/assets/ImageStudioView-_CYHoOoG.js +0 -1
- package/web/assets/InlineFiles-BIfsx3R-.js +0 -1
- package/web/assets/MarkdownBlock--__nPQGh.css +0 -1
- package/web/assets/MarkdownBlock-wYEaBBOr.js +0 -58
- package/web/assets/ModelPill-DveHcLqq.js +0 -2
- package/web/assets/MuseLibraryView-Do9RnKiq.js +0 -2
- package/web/assets/PenRow-BSB-h5Pb.js +0 -1
- package/web/assets/ProductView-B96OeHOP.js +0 -1
- package/web/assets/RightPanel-BgSeCLnw.js +0 -4
- package/web/assets/RunLocationPicker-CEmFio4n.css +0 -1
- package/web/assets/RunLocationPicker-M1UoJyjf.js +0 -38
- package/web/assets/UnifiedPage-EJNWKzxN.js +0 -68
- package/web/assets/appStore-CidPWYa0.js +0 -3254
- package/web/assets/appStore-DeaC1U32.css +0 -1
- package/web/assets/automationListSource-1aOVKBLw.js +0 -1
- package/web/assets/codingNavigation-CCjs1kon.js +0 -53
- package/web/assets/codingNavigation-yp19w6uu.css +0 -1
- package/web/assets/dashboardSurface-BwcH16Qc.js +0 -1
- package/web/assets/emoji-DczIG8SO.js +0 -1
- package/web/assets/gestures-CXFaEydn.js +0 -1
- package/web/assets/i18n-DjziAw8r.css +0 -1
- package/web/assets/i18n.generated-BiQFRL2U.js +0 -15
- package/web/assets/imageStudio--KF9gwHA.css +0 -1
- package/web/assets/index-BqGpbntz.js +0 -1
- package/web/assets/linkFollow-iP2zfbA3.js +0 -8
- package/web/assets/main-D7CEGndC.js +0 -20
- package/web/assets/markdownEditorSurface-DISu_twy.js +0 -3
- package/web/assets/minus-BBdfT_sc.js +0 -1
- package/web/assets/mobileEntry-5UaAITwY.js +0 -13
- package/web/assets/pageChrome-BDHHmRnt.css +0 -1
- package/web/assets/pageChrome-DFi9zs6F.js +0 -1
- package/web/assets/phoneList-DrxIwJxQ.js +0 -9
- package/web/assets/phoneList-DvpzD3zT.css +0 -1
- package/web/assets/pluginChat-0QI9a8Q1.js +0 -2
- package/web/assets/sharePage-C2Yqx0NQ.js +0 -2
- package/web/assets/tableSurface-cYs6dX6B.js +0 -1
- package/web/assets/theme-Dgqst5S9.css +0 -1
- package/web/assets/userSpaces-B_Njvel_.js +0 -1
- package/web/assets/viewportLock-Bi3orrUs.css +0 -1
- package/web/assets/viewportLock-DZ927PNz.js +0 -629
- package/web/assets/workflow-DY2Cnaei.js +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./appStore-CI1_L5OS.js","./index-BOzsniE1.js","./nativeDownload-CNtwSCy0.js","./ipc-B6hkgxQL.js","./client-CaivGZFR.js","./appStore-DQc2marq.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as c,j as t,r as dt,u as ve,t as Vn,_ as Ae,f as Os,L as As}from"./index-BOzsniE1.js";import{c as _s}from"./client-CaivGZFR.js";import{f as Fs,g as Bs,L as Hn,T as $s,C as xn,h as Ws,u as Vs,j as Hs,s as qs,k as Ys,a as Us,b as qn,D as Ks,A as Yn,F as _e,S as Un,M as Kn,c as Xn,B as Xs,P as Gn,d as Gs,N as Zs,l as Js,m as Qs,i as eo,e as to}from"./viewportLock-3AOdDmwi.js";import{J as ke,M as no,K as so,L as oo,N as io,P as ao,R as ro,T as co,U as lo,V as uo,W as mo,X as po,Y as fo,Z as ho,_ as go,$ as bo,a0 as wo,a1 as Lt,a2 as vo,a3 as ko,a4 as xo,a5 as yo,a6 as So,a7 as Zn,a8 as jo,a9 as Eo,m as oe,x as q,aa as Co,ab as Io,ac as Jn,t as B,ad as Le,ae as we,af as yn,ag as No,y as We,ah as Sn,ai as To,aj as Lo,ak as ge,al as Et,am as it,an as Mo,ao as Ro,ap as Do,aq as jn,ar as Po,as as En,at as zo,au as st,av as Cn,aw as Oo,ax as Te,ay as Ao,az as _o,aA as Fo,aB as Bo,aC as Qn,aD as $o,aE as Wo,aF as Vo,aG as Ho,aH as es,S as qo,aI as ut,aJ as Fe,aK as Yo,aL as Uo,aM as Rt,aN as ts,aO as ct,aP as Dt,u as C,aQ as In,aR as Ko,aS as Xo,aT as Go,aU as Nn,aV as Zo,aW as ns,aX as Jo,aY as Qo,aZ as Pt,q as zt,i as mt,j as ei,a_ as ss,a$ as ti,b0 as Tn,b1 as os,g as ni,b2 as si,Q as oi,b3 as is,b4 as ii,O as ai,b5 as Ln,b6 as ri,b7 as Mn,b8 as ci,h as Ot,b9 as li,ba as lt,bb as di,bc as ui,bd as mi,be as pi,bf as fi,bg as hi,bh as gi,bi,z as wi,A as vi,B as ki,C as xi,bj as yi,E as Si,F as ji,G as Ei,I as Ci}from"./appStore-CI1_L5OS.js";import{P as Ii}from"./pen-tool-C5ftHCnm.js";import{T as Ni,R as Ti,V as Li,M as Mi,C as Ri,H as Di,f as Pi}from"./userSpaces-VFu4s05v.js";import{C as zi,P as Oi,W as Ai,H as _i,A as Ne}from"./phoneList-B6gwUJZF.js";import{M as Fi}from"./Chrome-CFonajM4.js";import{T as Bi}from"./terminal-CAmmC9cV.js";import{B as $i}from"./AutomationBuilder-DNWWGnFr.js";import{S as Wi}from"./star-Dxv7XANS.js";import{F as as}from"./folder-DotgUhYD.js";import{F as rs}from"./UnifiedPage-BWAyqj65.js";import{i as Vi,q as Hi,o as Rn,a as qi,c as Yi,A as Ui,p as Ki,d as Xi,E as Gi}from"./codingNavigation-B0kVsy4x.js";import"./i18n.generated-BwynSSMk.js";import{S as Zi,C as Ji}from"./TargetHealthNotice-CgkdTdhB.js";import{R as Qi}from"./RightPanel-BJUacrsf.js";import{n as ea}from"./codeStudioStore-DhyMazGT.js";import"./ModelPill-JaIH3ffZ.js";import"./git-branch-CwR2qic6.js";import"./rotate-ccw-DdkrbRAB.js";import"./upload-DqpRRAhG.js";import"./selectionActions-BQD2kox1.js";import"./hard-drive-CfWKRoAE.js";import"./CapabilityMenu-DJaZ_Cyt.js";import"./book-open-BLzEdGfu.js";import"./folder-plus-aJgL9NeP.js";import"./circle-x-DTcNGZDT.js";import"./layout-grid-CraV7nhh.js";import"./nativeDownload-CNtwSCy0.js";import"./DashboardGridView-Xgw4wa0_.js";import"./FloatingToc-DNqAkkI0.js";import"./MarkdownBlock-DT_wsaja.js";import"./index-DjnTfJpN.js";import"./linkFollow-BpvDWzUx.js";import"./emoji-DphwSxPx.js";import"./listFold-M8s5JYEC.js";import"./pageChrome-BR4cfIaA.js";import"./pageTree-BYYPgZm_.js";import"./pluginExt-Byb64tQO.js";import"./list-tree-cLJw-jYQ.js";import"./pencil-ehhM9_9k.js";import"./type-Dz6rnTvG.js";import"./undo-2-B7izWNb_.js";import"./redo-2-DCEAgQlN.js";import"./code-xml-AE3mT4T5.js";import"./lock-DBkXXwaI.js";import"./ipc-B6hkgxQL.js";import"./lock-open-C-9-AWct.js";import"./canvasPrefs-CvE7mgyq.js";import"./server-Ddu9f1k3.js";import"./circle-question-mark-BM4ZRxQS.js";import"./gestures-dqncPOwo.js";import"./MuseView-uxTmjVQa.js";import"./automationListSource-CB6AWkL_.js";import"./messages-CKtabOqy.js";import"./approvalText-Cy2UAUAQ.js";import"./message-square-plus-8pfimvem.js";import"./SketchCard-B_UU5sxV.js";import"./GitCloneDialog-CQx-O4j1.js";import"./log-out-C8bDXj9P.js";import"./arrow-up-right-BDsMFoNQ.js";import"./index-C3Dc3Ivz.js";/* empty css */import"./StudioGuestSurface-yBa4QKfX.js";import"./minus-CfA9fAN3.js";import"./hand-XNkzNiW2.js";import"./InlineAiPanel-B3kd1ob2.js";import"./foldActions-DNbJPlPl.js";import"./create-1JI2I47p.js";import"./pdf.worker.min-CGb3BKV9.js";import"./zoom-in-Bf-eKTnH.js";import"./InlineFiles-Clnqh9jD.js";import"./ViewSelectionBar-35x8TiLA.js";const ta=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],na=ke("box",ta);const sa=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],oa=ke("calendar",sa);const ia=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],aa=ke("chevron-up",ia);const ra=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],ca=ke("chevrons-left",ra);const la=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],da=ke("chevrons-right",la);const ua=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],ma=ke("tag",ua);const pa=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],fa=ke("user",pa),cs={folder:as,"folder-open":Eo,star:Wi,heart:Di,home:jo,zap:Zn,bookmark:So,bell:$i,tag:ma,flag:yo,pin:Oi,box:na,package:xo,settings:ko,wrench:vo,terminal:Bi,code:Ri,"file-text":Lt,image:wo,music:Mi,video:Li,camera:bo,globe:go,compass:ho,map:Fi,calendar:oa,clock:zi,mail:fo,"message-circle":po,users:mo,user:fa,search:uo,filter:lo,sparkles:co,rocket:Ti,target:Ni,trophy:$s,lightbulb:Hn,coffee:Bs,palette:ro,layers:ao,database:io,"pen-tool":Ii,inbox:oo,bot:so,command:Fs,moon:no},ha=Object.keys(cs),Ct=n=>n?cs[n]:void 0;function ga(n,o,i){const m=n.target.closest("button")??o;let r=!1,v=!1,p,f;const w=parseFloat(getComputedStyle(document.body).zoom)||1,u=n.clientX,g=n.clientY;m.setPointerCapture(n.pointerId);const b=(S=!1)=>{if(v=!0,window.removeEventListener("pointermove",T,!0),window.removeEventListener("pointerup",I,!0),window.removeEventListener("pointercancel",h,!0),window.removeEventListener("keydown",y,!0),window.removeEventListener("blur",h),m.removeEventListener("lostpointercapture",h),m.hasPointerCapture(n.pointerId)&&m.releasePointerCapture(n.pointerId),document.documentElement.classList.remove("rb-pointer-dragging"),p?.remove(),f?.remove(),r){const P=L=>{L.preventDefault(),L.stopImmediatePropagation(),E()},$=()=>{clearTimeout(M),M=window.setTimeout(E,0)},E=()=>{window.removeEventListener("click",P,!0),window.removeEventListener("pointerup",$,!0),clearTimeout(M)};window.addEventListener("click",P,!0),S||window.addEventListener("pointerup",$,{capture:!0,once:!0});let M=window.setTimeout(E,S?0:1e4)}},h=()=>{v||(b(),r&&i.cancel())},y=S=>{S.key==="Escape"&&(S.preventDefault(),S.stopImmediatePropagation(),h())},T=S=>{if(!(S.pointerId!==n.pointerId||v)){if(!(S.buttons&1)){h();return}if(!(!r&&Math.hypot(S.clientX-u,S.clientY-g)<6)){r||(r=!0,document.documentElement.classList.add("rb-pointer-dragging"),f=document.createElement("div"),f.className="rb-pointer-shield",f.style.width=`${window.innerWidth/w}px`,f.style.height=`${window.innerHeight/w}px`,f.setAttribute("aria-hidden","true"),document.body.appendChild(f),p=o.cloneNode(!0),p.removeAttribute("data-id"),p.querySelectorAll("[id]").forEach(P=>P.removeAttribute("id")),p.className="rb-pointer-ghost",p.setAttribute("aria-hidden","true"),p.style.width=`${o.getBoundingClientRect().width/w}px`,document.body.appendChild(p),i.start()),S.preventDefault(),p.style.left=`${(S.clientX+12)/w}px`,p.style.top=`${(S.clientY+12)/w}px`,f.style.pointerEvents="none";try{i.move(S)}finally{f.style.pointerEvents=""}}}},I=S=>{S.pointerId!==n.pointerId||S.button!==0||v||(b(!0),r&&(S.preventDefault(),i.drop(S)))};return window.addEventListener("pointermove",T,!0),window.addEventListener("pointerup",I,!0),window.addEventListener("pointercancel",h,!0),window.addEventListener("keydown",y,!0),window.addEventListener("blur",h),m.addEventListener("lostpointercapture",h),h}const ba=300,wa=150;function va(n){const o=m=>n.known(m.type),i=n.active?n.stash.filter(o):[];return i.length?i:n.defaults.filter(o)}function ka(n){return n.zone==="shell"&&n.buttons===0&&!n.typing}const It=4,Dn=5,Pn=5,xa=1e3,ya=100;function zn(n){if(n>=9)return"";const o=$o({id:`space-slot-${n+1}`,hotkey:`mod+${n+1}`});return o?Wo(o,Vo()):""}function Be({item:n,expanded:o}){if(n.component){const r=n.component;return t.jsx(r,{expanded:o})}const i=n.icon,m=n.tooltip?Te(n.tooltip):"";return t.jsxs("button",{className:"rb-btn","aria-label":m||void 0,"data-rb-tip":o?void 0:m||void 0,onClick:n.onClick,children:[i&&t.jsx(i,{size:18}),o&&t.jsx("span",{className:"rb-label",children:m})]})}function Sa({cmd:n,expanded:o,overrideIcon:i}){const[,m]=c.useReducer(f=>f+1,0),r=i??n.icon??Zn,v=Te(n.title);let p;if(n.checked)try{p=!!n.checked()}catch{p=void 0}return t.jsxs("button",{className:`rb-btn${p?" is-on":""}`,"aria-pressed":p,"aria-label":v,"data-rb-tip":o?void 0:v,onMouseEnter:n.checked?m:void 0,onMouseLeave:n.checked?m:void 0,onClick:()=>{const f=n.run();n.checked&&(m(),f&&typeof f.then=="function"&&f.then(m,m))},children:[t.jsx(r,{size:18}),o&&t.jsx("span",{className:"rb-label",children:v})]})}const ot=24,$e=n=>n.startsWith("space:")?n.slice(6):null,ja=600;function Ea(){const n=oe(e=>e.items),o=oe(e=>e.expanded),i=oe(e=>e.order),m=oe(e=>e.bottomOrder),r=oe(e=>e.folders),v=oe(e=>e.commandItems),p=oe(e=>e.commandIcons),f=oe(e=>e.recentCount),w=q(e=>e.recent),u=Co(e=>e.commands);Io(e=>e.overrides);const{t:g}=Jn(),b=()=>oe.getState(),[h,y]=c.useState(null),T=c.useRef(void 0);c.useEffect(()=>()=>T.current?.(),[]);const[I,S]=c.useState(null),[P,$]=c.useState(null),[E,M]=c.useState(null),[L,ee]=c.useState(null),[K,Y]=c.useState(null),[H,U]=c.useState(null),[W,ce]=c.useState(99),O=c.useRef(null),G=c.useRef(null),le=c.useRef(null),de=c.useRef(null),Z=c.useRef(null),z=c.useRef(null),ue=c.useRef(void 0),ie=c.useRef(null),[ae,me]=c.useState({top:0,bottom:0}),[_,pt]=c.useState(null),[xe,ye]=c.useState({}),x=c.useRef({}),F=c.useRef({});c.useEffect(()=>()=>{for(const e of Object.values(x.current))window.clearTimeout(e?.timer)},[]);const[He,X]=c.useState(!1),pe=c.useRef(void 0);c.useEffect(()=>()=>window.clearTimeout(pe.current),[]);const Se=e=>{for(const a of["top","bottom"]){const d=x.current[a];if(!d)continue;window.clearTimeout(d.timer);const l=F.current[a];l&&(l.style.transform=d.from?`translateY(${-d.from*A}px)`:""),delete x.current[a]}ye({}),window.clearTimeout(pe.current);const s=!window.matchMedia("(prefers-reduced-motion: reduce)").matches;X(s),s&&(pe.current=window.setTimeout(()=>X(!1),240)),pt(e)},[je,qe]=c.useState(null),Me=c.useRef(null),ft=c.useRef(void 0),Ye=c.useRef(!1),At=c.useRef(0),Re=()=>{window.clearTimeout(ft.current),Me.current=null,Ye.current&&(Ye.current=!1,At.current=Date.now()),qe(null)},ws=!B(e=>e.leftVisible),[V,_t]=c.useState(null),Ft=q(e=>V?e.spaces.find(s=>s.id===V.spaceId):void 0),ht=c.useRef(null),Ue=c.useRef(null),Ee=c.useRef(void 0),De=c.useRef(void 0),Bt=c.useRef(null),[,Ke]=c.useReducer(e=>e+1,0),Xe=()=>{window.clearTimeout(De.current),De.current=void 0},fe=()=>{window.clearTimeout(Ee.current),Xe(),_t(null)},gt=!!h||!!K||!!H||!!L,vs=e=>B.getState().leftVisible&&e===q.getState().activeSpaceId,$t=q(e=>!!V&&e.activeSpaceId===V.spaceId)&&!ws;c.useEffect(()=>{(gt||$t)&&fe()},[gt,$t]),c.useEffect(()=>V?Le(()=>{V.views.some(e=>!we(e.type))&&fe()}):void 0,[V]),c.useEffect(()=>()=>{window.clearTimeout(Ee.current),window.clearTimeout(De.current)},[]);const Wt=e=>{if(vs(e)){fe();return}const{spaces:s,activeSpaceId:a}=q.getState(),d=s.find(R=>R.id===e),l=B.getState(),k=e===a,j=d?va({active:k,stash:l.stash.left,defaults:k?l.sidebarDefaults.left:d.sidebarDefaults.left,known:R=>!!we(R)}):[];Xe(),_t(j.length?{spaceId:e,views:j}:null)},ks=e=>{const s=e.target.closest("[data-space-id]")?.dataset.spaceId??null;s!==Ue.current&&(window.clearTimeout(Ee.current),Ue.current=s,s&&(gt||(V?.spaceId===s?Xe():V?Wt(s):Ee.current=window.setTimeout(()=>{Ue.current===s&&Wt(s)},ba))))},Vt=!!V;c.useEffect(()=>{if(!Vt)return;const e=N=>{const D=N instanceof Element?N:null;return D?ht.current?.contains(D)?"card":O.current?.contains(D)&&D.closest("[data-space-id]")?"trigger":D.closest(".shell")?"shell":"overlay":"overlay"},s=()=>{const N=document.activeElement;return!!N&&!!ht.current?.contains(N)&&N.matches('input, textarea, select, [contenteditable]:not([contenteditable="false"])')};let a=null;const d=(N,D)=>{const J=e(N);ka({zone:J,buttons:D,typing:J==="shell"&&s()})?De.current===void 0&&(De.current=window.setTimeout(fe,wa)):Xe()},l=N=>{a=N.target,d(N.target,N.buttons)},k=()=>{window.setTimeout(()=>d(a,0),0)},j=N=>{const D=e(N.target);(D==="shell"||D==="trigger")&&fe()},R=N=>{N.key==="Escape"&&!s()&&fe()};return document.addEventListener("mousemove",l),document.addEventListener("mouseover",l),document.addEventListener("mouseup",l),document.addEventListener("focusout",k),document.addEventListener("mousedown",j,!0),window.addEventListener("keydown",R),window.addEventListener("resize",Ke),window.addEventListener(yn,Ke),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseover",l),document.removeEventListener("mouseup",l),document.removeEventListener("focusout",k),document.removeEventListener("mousedown",j,!0),window.removeEventListener("keydown",R),window.removeEventListener("resize",Ke),window.removeEventListener(yn,Ke)}},[Vt]);const xs=()=>{const e=O.current,s=it(e),a=e?.getBoundingClientRect(),d=e?.parentElement?.querySelector(".shell-work"),l=d?.getBoundingClientRect(),j=(d?.querySelector(".dv-prefix--edge")?.closest(".dv-tabs-and-actions-container")?.getBoundingClientRect()?.bottom??l?.top??0)+4,R=(l?.bottom??window.innerHeight)-8,N=B.getState(),D=Ao((l?.width??1200)/s,"left",{free:N.sideFree.left,saved:N.sideWidths.left,scale:N.sideScale.left}),J=N.leftVisible?N.api?.panels.find(ze=>ze.params?.__loc==="left")?.group.element.getBoundingClientRect():void 0;return J?.height?{left:J.left/s,top:J.top/s,height:J.height/s,width:D,"--rb-peek-lights":"26px"}:{left:((a?.right??44)+4)/s,top:j/s,height:Math.max(160,R-j)/s,width:D}},bt=!!h||!!K||!!H||!!L||!!V;c.useEffect(()=>{(bt||o)&&Re()},[bt,o]),c.useEffect(()=>()=>window.clearTimeout(ft.current),[]);const ys=e=>{const s=e.target.closest("[data-rb-tip]");if(s===Me.current)return;const a=Ye.current||Date.now()-At.current<=ya;if(Re(),!s||bt||o)return;Me.current=s;const d=()=>{if(Me.current!==s||!s.isConnected||!s.dataset.rbTip)return;const l=s.getBoundingClientRect();Ye.current=!0,qe({text:s.dataset.rbTip,mid:l.top+l.height/2})};a?d():ft.current=window.setTimeout(d,xa)},Ss=new Set(r.flatMap(e=>e.items)),Ge=new Map,Ht=e=>{const s=[];for(const d of n)(d.side??"top")===e&&!d.pinned&&s.push({kind:"item",id:d.id,item:d});if(e==="bottom")for(const d of v){const l=u.find(k=>k.id===d);l&&s.push({kind:"cmd",id:`cmd:${d}`,cmd:l})}for(const d of r)d.zone===e&&s.push({kind:"folder",id:d.id,folder:d});for(const d of s)Ge.set(d.id,d);return Po(s.map(d=>d.id),e==="top"?i:m).map(d=>Ge.get(d)).filter(d=>!Ss.has(d.id))},te=Ht("top"),ne=Ht("bottom"),qt=e=>e.items.reduce((s,a)=>s+(Ge.has(a)?1:0),0),js=n.filter(e=>e.side==="bottom"&&e.pinned),Es=n.filter(e=>e.side==="head"),Cs=n.filter(e=>e.side==="home"),A=(o?34:32)+It;c.useLayoutEffect(()=>{const e=O.current;if(!e)return;const s=()=>{const d=getComputedStyle(e),l=(G.current?.offsetHeight??0)+(de.current?.offsetHeight??0),k=e.clientHeight-parseFloat(d.paddingTop)-parseFloat(d.paddingBottom)-l-(le.current?.offsetHeight??0)-2*A-48;ce(Math.max(2,Math.floor(k/A)))};s();const a=new ResizeObserver(s);return a.observe(e),de.current&&a.observe(de.current),()=>a.disconnect()},[o,A,n.length,r.length,v.length,_]);const Yt=(e,s)=>e<=s?e:s+1,Ut=Yt(te.length,Dn),wt=Yt(ne.length,Pn);let re=Ut,he=wt;if(_)_==="top"?re=W:he=W;else if(re+he>W)if(te.length===0)re=0,he=W;else if(ne.length===0)re=W,he=0;else{const e=Math.floor(W/2);re=Math.max(1,Math.min(Ut,Math.max(e,W-wt))),he=Math.max(1,Math.min(wt,W-re))}const Kt=(e,s,a,d,l)=>{if(e.length<=s&&e.length<=l)return{shown:e,tail:[],start:0,max:0};const k=Math.max(0,s-1),j=e.length-k,R=Math.min(Math.max(0,d),j),N=a?e.length-k-R:R;return{shown:e.slice(N,N+k),tail:[...e.slice(0,N),...e.slice(N+k)],start:N,max:j}},Ze=Kt(te,re,!1,ae.top,_==="top"?1/0:Dn),Je=Kt(ne,he,!0,ae.bottom,_==="bottom"?1/0:Pn),Xt=w.map(e=>n.find(s=>s.id===`space:${e}`)).filter(e=>!!e).slice(0,No(f,W,re,he,!!_)),Is=(e,s)=>a=>{const d=F.current[e];if(!s.max||h||!a.deltaY||!d)return;window.clearTimeout(ue.current);let l=x.current[e];l||(l=x.current[e]={px:s.start*A,from:s.start,timer:0},ye(j=>({...j,[e]:!0}))),window.clearTimeout(l.timer);const k=a.deltaMode?Math.sign(a.deltaY)*A:Math.max(-A,Math.min(A,a.deltaY));l.px=Math.max(0,Math.min(s.max*A,l.px+k)),d.style.transform=`translateY(${-l.px}px)`,l.timer=window.setTimeout(()=>Ns(e,s),120)},Ns=(e,s)=>{const a=x.current[e],d=F.current[e];if(!a||!d)return;const l=a.at??a.from,k=a.px-l*A;let j=Math.round(a.px/A);j===l&&k&&(j+=Math.sign(k)),Gt(e,s,Math.max(0,Math.min(s.max,j)))},Gt=(e,s,a)=>{const d=F.current[e];if(!d)return;let l=x.current[e];l||(l=x.current[e]={px:s.start*A,from:s.start,timer:0},ye(k=>({...k,[e]:!0}))),window.clearTimeout(l.timer),l.px=a*A,l.at=a,d.style.transform=a?`translateY(${-a*A}px)`:"",l.timer=window.setTimeout(()=>{delete x.current[e],ye(k=>({...k,[e]:!1})),me(k=>({...k,[e]:e==="top"?a:s.max-a}))},240)};c.useEffect(()=>()=>window.clearTimeout(ue.current),[]);const Zt=c.useRef(()=>{});Zt.current=()=>{if(!h)for(const[e,s]of[["top",Ze],["bottom",Je]])ae[e]&&(s.max&&F.current[e]?Gt(e,s,e==="top"?0:s.max):me(a=>({...a,[e]:0})))};const Jt=!!(ae.top||ae.bottom||xe.top||xe.bottom);c.useEffect(()=>{if(!Jt)return;const e=()=>{En()&&(window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>{En()&&Zt.current()},ja))},s=a=>{const d=a.target;a.button!==0||d?.closest?.(".rb-menu, .rb-iconpick, [data-rb-overlay]")||d&&(O.current?.contains(d)||d.closest(".rb-fly"))&&!d.closest(".rb-btn:not(.rb-more, .rb-plus, .rb-toggle, .rb-folder)")||e()};return window.addEventListener("click",s,!0),window.addEventListener("blur",e),()=>{window.removeEventListener("click",s,!0),window.removeEventListener("blur",e)}},[Jt]);const se=L?.folderId?r.find(e=>e.id===L.folderId):void 0,Qe=()=>{z.current&&(window.clearTimeout(z.current),z.current=null)},Qt=()=>{Qe(),z.current=window.setTimeout(()=>{h||ee(null)},150)},vt=(e,s,a,d)=>{Qe(),ee({key:e,zone:s,folderId:d,top:a.getBoundingClientRect().top})};c.useLayoutEffect(()=>{const e=Z.current;if(!e||!L)return;const s=e.getBoundingClientRect().bottom-(window.innerHeight-8);s>0&&ee({...L,top:Math.max(8,L.top-s)})},[L?.key,se?.items.length]);const en=!!L;c.useEffect(()=>{if(!en)return;const e=a=>{a.key==="Escape"&&ee(null)},s=a=>{const d=a.target;!Z.current?.contains(d)&&!O.current?.contains(d)&&ee(null)};return window.addEventListener("keydown",e),window.addEventListener("mousedown",s),()=>{window.removeEventListener("keydown",e),window.removeEventListener("mousedown",s)}},[en]),c.useEffect(()=>{if(!_)return;const e=()=>Se(null),s=d=>{if(d.button!==0)return;const l=d.target;l?.closest?.(".rb-menu, .rb-iconpick, .rb-fly, [data-rb-overlay]")||l&&O.current?.contains(l)&&l.closest("button")||e()},a=d=>{d.key==="Escape"&&e()};return window.addEventListener("pointerdown",s,!0),window.addEventListener("keydown",a),window.addEventListener("blur",e),()=>{window.removeEventListener("pointerdown",s,!0),window.removeEventListener("keydown",a),window.removeEventListener("blur",e)}},[_,A]);const kt=c.useRef(new Map),tn=c.useRef(()=>{});c.useEffect(()=>{tn.current=e=>{const s=te[e];if(s){if(s.kind==="folder"){const a=kt.current.get(s.id)??O.current;a&&vt(s.id,"top",a,s.id);return}ee(null),s.kind==="cmd"?s.cmd.run():s.id.startsWith("space:")?We(s.id.slice(6)):s.item.onClick?.()}}});const nn=Math.min(9,te.length);c.useEffect(()=>{for(let e=1;e<=9;e++){if(e>nn){Sn(`space-slot-${e}`);continue}To({id:`space-slot-${e}`,title:()=>Lo("lcl.ribbon.switchSpace",{n:e}),keywords:`space switch ${e} 切换 空间`,hotkey:`mod+${e}`,run:()=>tn.current(e-1)})}return()=>{for(let e=1;e<=9;e++)Sn(`space-slot-${e}`)}},[nn]);const sn=(e,s,a,d)=>{e.dataTransfer.effectAllowed="move";const l=e.currentTarget.getBoundingClientRect();e.dataTransfer.setDragImage(e.currentTarget,e.clientX-l.left,e.clientY-l.top),y({id:s,zone:a,from:d})},Ce=()=>{ie.current=null,y(null),S(null),$(null),M(null)},Pe=h&&ge()?.openSpace?$e(h.id):null,on=c.useRef({dropped:!1,gone:!1}),xt=(e,s)=>{const a=O.current?.getBoundingClientRect();if(!a)return!0;const d=k=>e>=k.left-ot&&e<=k.right+ot&&s>=k.top-ot&&s<=k.bottom+ot,l=Z.current?.getBoundingClientRect();return d(a)||!!l&&d(l)},an=e=>{const s=e.target;return!!s&&(!!O.current?.contains(s)||!!Z.current?.contains(s))};c.useLayoutEffect(()=>{if(!Pe)return;const e={dropped:!1,gone:!1};on.current=e;const s=l=>{e.gone=!1,!an(l)&&(l.preventDefault(),l.stopPropagation(),l.dataTransfer&&(l.dataTransfer.dropEffect="move"),$(k=>k&&null),M(k=>k&&null))},a=l=>{e.dropped=!0,!an(l)&&(l.preventDefault(),l.stopPropagation(),xt(l.clientX,l.clientY)||ge()?.openSpace?.(Pe,{screenX:l.screenX,screenY:l.screenY}))},d=l=>{(l.clientX<=0||l.clientY<=0||l.clientX>=window.innerWidth||l.clientY>=window.innerHeight)&&(e.gone=!0)};return window.addEventListener("dragover",s,!0),window.addEventListener("drop",a,!0),window.addEventListener("dragleave",d,!0),()=>{window.removeEventListener("dragover",s,!0),window.removeEventListener("drop",a,!0),window.removeEventListener("dragleave",d,!0)}},[Pe]);const rn=e=>{const s=on.current;if(Pe&&!s.dropped){const{clientX:a,clientY:d}=e,l=a<0||d<0||a>window.innerWidth||d>window.innerHeight,k=!l&&/^(IFRAME|WEBVIEW)$/.test(document.elementFromPoint(a,d)?.tagName??"");(l||!xt(a,d)&&(s.gone||k))&&ge()?.openSpace?.(Pe,e.screenX||e.screenY?{screenX:e.screenX,screenY:e.screenY}:void 0)}Ce()},Ie=(e,s,a)=>{s&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="move",a?.())},cn=(e,s)=>{const a=e.querySelectorAll(".rb-slot"),d=a[0]?.getBoundingClientRect().top??0,l=a.length>1?a[1].getBoundingClientRect().top-d:0;return{top:d,pitch:l,grabDy:s??l/2}},ln=(e,s,a)=>Oo(s,a,ie.current??cn(e)),dn=(e,s)=>{const a=e.parentElement;a&&(ie.current=cn(a,s-e.getBoundingClientRect().top))},et=(e,s,a=h)=>{const d=a;if(Ce(),!d||d.zone!==e||d.id===s)return;d.from&&b().moveOutOfFolder(d.id);const l=e==="top"?b().order:b().bottomOrder,k=zo(l,(e==="top"?te:ne).map(R=>R.id)),j=s?k.indexOf(s):-1;b().setZoneOrder(e,st(k,d.id,j>=0?j:k.length))},tt=(e,s,a=h)=>{const d=a;if(Ce(),!(!d||d.zone!==e.zone||d.id.startsWith("folder:"))){if(d.from===e.id)b().setFolderItems(e.id,st(e.items,d.id,s??e.items.length));else if(b().moveIntoFolder(e.id,d.id),d.from||b().setZoneOrder(e.zone,Cn(e.zone==="top"?b().order:b().bottomOrder,(e.zone==="top"?te:ne).map(l=>l.id),d.id)),s!==void 0){const l=b().folders.find(k=>k.id===e.id);l&&b().setFolderItems(e.id,st(l.items,d.id,s))}}},yt=c.useRef(null);yt.current={target:(e,s)=>{const a=document.elementFromPoint(e.clientX,e.clientY),d=!!a&&(!!O.current?.contains(a)||!!Z.current?.contains(a));if(d){const k=a.closest("[data-rb-folder]")?.dataset.rbFolder,j=r.find(D=>D.id===k);if(j&&j.zone===s.zone){const D=a.closest("[data-rb-folder-index]");return $(null),M(j.id),S(D?.dataset.id??null),D||vt(j.id,j.zone,a.closest("[data-rb-folder]"),j.id),{kind:"folder",folder:j,at:D?Number(D.dataset.rbFolderIndex):void 0}}const R=a.closest("[data-rb-more]")?.dataset.rbMore;if(R===s.zone)return $(null),M(`more:${R}`),{kind:"bar",zone:s.zone,id:s.zone==="bottom"?ne[0]?.id??null:null};const N=a.closest(".rb-top, .rb-bottom");if(N){const D=N.classList.contains("rb-top")?"top":"bottom";if(D!==s.zone)return{kind:"cancel"};const J=(D==="top"?Ze:Je).shown.map(Oe=>Oe.id),ze=ln(N,e.clientY,J.length);return M(null),S(null),$(Oe=>Oe?.zone===D&&Oe.index===ze?Oe:{zone:D,index:ze}),{kind:"bar",zone:D,id:J[ze]??null}}}return $(null),M(null),S(null),{kind:e.clientX<0||e.clientY<0||e.clientX>=window.innerWidth||e.clientY>=window.innerHeight||!d&&!xt(e.clientX,e.clientY)?"tear":"cancel"}},drop:(e,s,a)=>{if(a.kind==="bar")et(a.zone,a.id,s);else if(a.kind==="folder")tt(a.folder,a.at,s);else if(Ce(),a.kind==="tear"){const d=ge(),l=$e(s.id);l&&d?.openSpace?.(l,d.cursorScreenPoint?.()??{screenX:e.screenX,screenY:e.screenY})}}};const un=(e,s,a,d)=>{if(!ge()?.ribbonPointerDrag||!$e(s)||e.button!==0||!e.isPrimary)return;e.stopPropagation(),T.current?.();const l=e.currentTarget,k={id:s,zone:a,from:d};d||dn(l,e.clientY);let j={kind:"cancel"};T.current=ga(e.nativeEvent,l,{start:()=>{Re(),Qe(),y(k)},move:R=>{j=yt.current.target(R,k)},drop:R=>{yt.current.drop(R,k,j)},cancel:Ce})},mn=e=>!(ge()?.ribbonPointerDrag&&$e(e)),pn=Et.prompt??((e,s)=>Promise.resolve(window.prompt(e,s))),Ts=e=>{pn(g("lcl.ribbon.newFolder"),g("lcl.ribbon.folderDefaultName")).then(s=>{const a=s?.trim();a&&b().addFolder(e,a)})},nt=e=>[...e==="top"&&Et.newSpace?[{label:g("lcl.ribbon.newSpace"),onClick:Et.newSpace}]:[],...e==="bottom"?[{label:g("lcl.ribbon.addCommand"),onClick:()=>_o(s=>b().addCommandItem(s))}]:[],{label:g(e==="top"?"lcl.ribbon.newFolderSpaces":"lcl.ribbon.newFolderCommands"),onClick:()=>Ts(e)}],Ls=e=>s=>{s.defaultPrevented||(s.preventDefault(),Y({x:s.clientX,y:s.clientY,entries:nt(e)}))},Ms=e=>{e.defaultPrevented||e.nativeEvent===Bt.current||(e.preventDefault(),Y({x:e.clientX,y:e.clientY,entries:[...nt("top"),...nt("bottom")]}))},fn=(e,s,a,d)=>{Y(null),U({x:e,y:s,current:a,apply:d})},Rs=e=>s=>{s.preventDefault(),s.stopPropagation();const a=s.clientX,d=s.clientY;Y({x:a,y:d,entries:[{label:g("lcl.ribbon.changeIcon"),onClick:()=>fn(a,d,e.icon,l=>b().setFolderIcon(e.id,l))},{label:g("lcl.ribbon.rename"),onClick:()=>{pn(g("lcl.ribbon.renameFolder"),e.name).then(l=>{const k=l?.trim();k&&b().renameFolder(e.id,k)})}},{label:g("lcl.ribbon.dissolveFolder"),onClick:()=>b().removeFolder(e.id)}]})},hn=e=>{const s=$e(e.id),a=ge()?.openSpace;return[...s&&a?[{label:g("lcl.ribbon.openInNewWindow"),onClick:()=>a(s)}]:[],...e.menu?.()??[]]},gn=e=>s=>{if(s.defaultPrevented)return;const a=hn(e);a.length&&(s.preventDefault(),s.stopPropagation(),Y({x:s.clientX,y:s.clientY,entries:a}))},bn=e=>s=>{s.preventDefault(),s.stopPropagation();const a=s.clientX,d=s.clientY;Y({x:a,y:d,entries:[{label:g("lcl.ribbon.setIcon"),onClick:()=>fn(a,d,b().commandIcons[e],l=>b().setCommandIcon(e,l))},{label:g("lcl.ribbon.removeCommand"),onClick:()=>b().removeCommandItem(e)}]})},Ds=e=>{const s=Ct(e.icon)??as;return t.jsxs("button",{ref:a=>{a?kt.current.set(e.id,a):kt.current.delete(e.id)},className:`rb-btn rb-folder${E===e.id?" drag-into":""}`,"data-rb-folder":e.id,"aria-label":`${e.name} (${qt(e)})`,onMouseEnter:a=>vt(e.id,e.zone,a.currentTarget,e.id),onMouseLeave:Qt,onContextMenu:Rs(e),onDragOver:a=>Ie(a,!!h&&h.zone===e.zone&&!h.id.startsWith("folder:"),()=>{$(null),M(e.id)}),onDragLeave:()=>{E===e.id&&M(null)},onDrop:a=>{!h||h.id.startsWith("folder:")||(a.preventDefault(),a.stopPropagation(),tt(e))},children:[t.jsx(s,{size:18}),o&&t.jsx("span",{className:"rb-label",children:e.name})]})},wn=e=>{const s=_===e,a=g(s?"lcl.ribbon.less":"lcl.ribbon.more"),d=s?e==="top"?aa:Qn:Bo;return t.jsxs("button",{className:`rb-btn rb-more${s?" is-open":""}${E===`more:${e}`?" drag-into":""}`,"data-rb-more":e,"aria-label":a,"aria-expanded":s,"data-rb-tip":o?void 0:a,onClick:()=>Se(s?null:e),onDragOver:l=>Ie(l,!!h&&h.zone===e,()=>{$(null),M(`more:${e}`)}),onDragLeave:()=>{E===`more:${e}`&&M(null)},onDrop:l=>{l.preventDefault(),l.stopPropagation(),et(e,e==="bottom"?ne[0]?.id??null:null)},children:[t.jsx(d,{size:18}),o&&t.jsx("span",{className:"rb-label",children:a})]})},St=(e,s)=>{const a=s??o;return e.kind==="item"?t.jsx(Be,{item:e.item,expanded:a}):e.kind==="cmd"?t.jsx(Sa,{cmd:e.cmd,expanded:a,overrideIcon:Ct(p[e.cmd.id])}):Ds(e.folder)},Ps=(e,s,a,d,l,k)=>{const j=d?d.indexOf(e.id):a;return t.jsxs("div",{"data-id":e.id,className:`rb-slot${h?.id===e.id?" dragging":""}${l?" drag-over":""}`,style:j!==a?{transform:`translateY(${(j-a)*A}px)`}:void 0,draggable:mn(e.id),onPointerDown:R=>un(R,e.id,s,null),onDragStart:R=>{dn(R.currentTarget,R.clientY),sn(R,e.id,s,null)},onDragEnd:rn,onContextMenu:e.kind==="cmd"?bn(e.cmd.id):e.kind==="item"?gn(e.item):void 0,children:[St(e),s==="top"&&o&&zn(k)&&t.jsx("span",{className:"rb-key",children:zn(k)})]},e.id)},jt=e=>g(e==="top"?"lcl.ribbon.addSpaceOrFolder":"lcl.ribbon.addCommand"),vn=e=>t.jsxs("button",{className:"rb-btn rb-plus","aria-label":jt(e),"data-rb-tip":o?void 0:jt(e),onClick:s=>{const a=s.currentTarget.getBoundingClientRect();Y({x:a.right+6,y:a.top,entries:nt(e)})},children:[t.jsx(Fo,{size:16}),o&&t.jsx("span",{className:"rb-label",children:jt(e)})]}),kn=(e,s)=>{const a=s.shown.map(l=>l.id),d=h&&P?.zone===e&&a.includes(h.id)?st(a,h.id,P.index):null;return t.jsxs("div",{className:`rb-group rb-${e}`,onContextMenu:Ls(e),onWheel:Is(e,s),onDragOver:l=>{const k=ln(l.currentTarget,l.clientY,a.length);Ie(l,!!h&&h.zone===e,()=>{M(null),$(j=>j?.zone===e&&j.index===k?j:{zone:e,index:k})})},onDrop:l=>{l.preventDefault(),l.stopPropagation(),et(e,(P?.zone===e?a[P.index]:null)??null)},children:[e==="bottom"&&t.jsxs(t.Fragment,{children:[vn(e),(s.tail.length>0||_===e)&&wn(e)]}),t.jsx("div",{className:"rb-strip",style:{height:Math.max(0,s.shown.length*A-It)},children:t.jsx("div",{ref:l=>{F.current[e]=l},className:"rb-strip-in",style:s.start?{transform:`translateY(${-s.start*A}px)`}:void 0,children:(e==="top"?te:ne).map((l,k)=>{const j=k-s.start;return j>=0&&j<s.shown.length?Ps(l,e,j,d,!d&&P?.zone===e&&P.index===j,k):t.jsx("div",{className:"rb-cell","aria-hidden":!0,inert:!0,style:{height:A-It},children:(xe[e]||He)&&St(l)},l.id)})})}),e==="top"&&t.jsxs(t.Fragment,{children:[(s.tail.length>0||_===e)&&wn(e),vn(e)]})]})},zs=(e,s,a,d)=>t.jsx("div",{"data-id":e.id,className:`rb-fly-row${h?.id===e.id?" dragging":""}${I===e.id&&h?.id!==e.id?` drag-over${h&&d.indexOf(h.id)>=0&&d.indexOf(h.id)<a?" below":""}`:""}`,"data-rb-folder":s.id,"data-rb-folder-index":a,draggable:mn(e.id),onPointerDown:l=>un(l,e.id,s.zone,s.id),onDragStart:l=>{l.stopPropagation(),sn(l,e.id,s.zone,s.id)},onDragOver:l=>Ie(l,!!h&&h.zone===s.zone&&h.id!==e.id&&!h.id.startsWith("folder:"),()=>S(e.id)),onDragLeave:()=>{I===e.id&&S(null)},onDrop:l=>{l.preventDefault(),l.stopPropagation(),tt(s,a)},onDragEnd:rn,onContextMenu:e.kind==="cmd"?bn(e.cmd.id):l=>{l.preventDefault(),l.stopPropagation(),Y({x:l.clientX,y:l.clientY,entries:[...e.kind==="item"?hn(e.item):[],{label:g("lcl.ribbon.moveOut"),onClick:()=>{b().moveOutOfFolder(e.id);const k=s.zone==="top"?b().order:b().bottomOrder;b().setZoneOrder(s.zone,[...Cn(k,(s.zone==="top"?te:ne).map(j=>j.id),e.id),e.id])}}]})},children:St(e,!0)},e.id);return t.jsxs("div",{ref:O,className:`rb${o?" rb-expanded":""}${h?" rb-dragging":""}${_?` rb-open-${_}`:""}`,onContextMenu:Ms,onMouseOver:e=>{ys(e),ks(e)},onMouseLeave:()=>{Re(),window.clearTimeout(Ee.current),Ue.current=null},onMouseDownCapture:e=>{Re(),window.clearTimeout(Ee.current),Me.current=e.target.closest("[data-rb-tip]")},onDragOver:e=>Ie(e,!!h),onDrop:e=>{if(!h)return;e.preventDefault();const s=h.zone,a=P?.zone===s?(s==="top"?Ze:Je).shown[P.index]?.id:void 0;if(a===void 0){Ce();return}et(s,a)},children:[t.jsxs("div",{ref:G,className:"rb-head",children:[t.jsxs("button",{className:"rb-btn rb-toggle","aria-label":g(o?"lcl.ribbon.iconsOnly":"lcl.ribbon.showLabels"),"aria-expanded":o,"data-rb-tip":o?void 0:g("lcl.ribbon.showLabels"),onClick:()=>b().toggleExpanded(),children:[o?t.jsx(ca,{size:18}):t.jsx(da,{size:18}),o&&t.jsx("span",{className:"rb-label",children:g("lcl.ribbon.iconsOnly")})]}),Es.map(e=>t.jsx(Be,{item:e,expanded:o},e.id))]}),t.jsx("div",{ref:le,className:"rb-group rb-home",children:Cs.map(e=>t.jsx(Be,{item:e,expanded:o},e.id))}),_!=="bottom"&&kn("top",Ze),Xt.length>0&&t.jsx("div",{className:"rb-group rb-recent",role:"group","aria-label":g("lcl.ribbon.recentSpaces"),children:Xt.map(e=>t.jsx("div",{className:"rb-recent-slot","data-recent-id":e.id,onContextMenu:gn(e),children:t.jsx(Be,{item:e,expanded:o})},e.id))}),_!=="top"&&kn("bottom",Je),t.jsx("div",{ref:de,className:"rb-group rb-pinned",children:js.map(e=>t.jsx(Be,{item:e,expanded:o},e.id))}),L&&se&&t.jsxs("div",{ref:Z,className:"rb-fly","data-rb-folder":se.id,style:(()=>{const e=it(O.current);return{left:((O.current?.getBoundingClientRect().right??44)+4)/e,top:L.top/e}})(),onMouseEnter:Qe,onMouseLeave:Qt,onDragOver:e=>Ie(e,!!h&&h.zone===L.zone&&!h.id.startsWith("folder:")&&e.target===e.currentTarget),onDrop:e=>{e.target===e.currentTarget&&(e.preventDefault(),tt(se))},children:[t.jsx("div",{className:"rb-fly-head",children:se.name}),qt(se)===0&&t.jsx("div",{className:"rb-fly-empty",children:g("lcl.ribbon.folderEmpty")}),se.items.map((e,s)=>{const a=Ge.get(e);return a?zs(a,se,s,se.items):null})]}),V&&Ft&&O.current?.parentElement&&Mo.createPortal(t.jsx(Ro,{ref:ht,space:Ft,views:V.views,style:xs(),onContextMenuCapture:e=>{Bt.current=e.nativeEvent},onBeforeClick:()=>{V.spaceId!==q.getState().activeSpaceId&&Do()},onEnter:V.spaceId===q.getState().activeSpaceId?void 0:()=>{fe(),We(V.spaceId)}}),O.current.parentElement),je&&!o&&t.jsx("div",{className:"rb-tip",role:"tooltip",style:(()=>{const e=it(O.current);return{left:((O.current?.getBoundingClientRect().right??44)+6)/e,top:je.mid/e}})(),children:je.text}),K&&t.jsx("div",{className:"rb-menu-backdrop",onMouseDown:()=>Y(null),onContextMenu:e=>{e.preventDefault(),Y(null)},children:t.jsx(jn,{className:"rb-menu",x:K.x,y:K.y,onMouseDown:e=>e.stopPropagation(),children:K.entries.map((e,s)=>t.jsx("button",{onClick:()=>{Y(null),e.onClick()},children:e.label},s))})}),H&&t.jsx("div",{className:"rb-menu-backdrop",onMouseDown:()=>U(null),onContextMenu:e=>{e.preventDefault(),U(null)},children:t.jsxs(jn,{className:"rb-iconpick",x:H.x,y:H.y,onMouseDown:e=>e.stopPropagation(),children:[t.jsx("button",{className:"rb-iconpick-reset",onClick:()=>{const e=H.apply;U(null),e("")},children:g("lcl.ribbon.defaultIcon")}),t.jsx("div",{className:"rb-iconpick-grid",children:ha.map(e=>{const s=Ct(e);return t.jsx("button",{className:`rb-iconpick-btn${H.current===e?" on":""}`,title:e,onClick:()=>{const a=H.apply;U(null),a(e)},children:t.jsx(s,{size:17})},e)})})]})})]})}const On=8,Ca=n=>n.dataset.lclShift==="end"?On:n.dataset.lclShift==="start"?-On:0;function Ia(){const n=Array.from(document.querySelectorAll(".dv-groupview")).map(i=>({r:i.getBoundingClientRect(),papery:!i.querySelector(".wb-tab--icon")})).filter(i=>i.r.width>0&&i.r.height>0),o=3;for(const i of document.querySelectorAll(".dv-sash")){const m=!!i.closest(".dv-split-view-container.dv-horizontal"),r=i.getBoundingClientRect();if(!r.width&&!r.height)continue;const v=m?r.left+r.width/2:r.top+r.height/2,[p,f]=m?[r.top,r.bottom]:[r.left,r.right];let w=null,u=null;for(const b of n){const[h,y,T,I]=m?[b.r.left,b.r.right,b.r.top,b.r.bottom]:[b.r.top,b.r.bottom,b.r.left,b.r.right];I<=p||T>=f||(w===null&&Math.abs(y-v)<=o&&(w=b.papery),u===null&&Math.abs(h-v)<=o&&(u=b.papery))}const g=w===!1&&u===!0?"end":w===!0&&u===!1?"start":"";g?i.dataset.lclShift=g:delete i.dataset.lclShift}}function Na(){const n=document.createElement("div");n.className="lcl-sash-tick",document.body.appendChild(n);let o=null,i=0;const m=(h,y)=>{const T=!!h.closest(".dv-split-view-container.dv-horizontal"),I=h.getBoundingClientRect(),S=Ca(h);cancelAnimationFrame(i),i=requestAnimationFrame(()=>{n.classList.add("show"),n.classList.toggle("h",!T);const P=it(n);T?(n.style.left=`${(I.left+I.width/2+S)/P}px`,n.style.top=`${Math.min(Math.max(y.clientY,I.top),I.bottom)/P}px`):(n.style.left=`${Math.min(Math.max(y.clientX,I.left),I.right)/P}px`,n.style.top=`${(I.top+I.height/2+S)/P}px`)})},r=h=>h instanceof Element?h.closest(".dv-sash"):null,v=h=>{const y=o instanceof HTMLElement?o:r(h.target);y?m(y,h):n.classList.contains("show")&&(cancelAnimationFrame(i),n.classList.remove("show"))},p=h=>{o=r(h.target)},f=h=>{o&&(o=null,r(h.target)||(cancelAnimationFrame(i),n.classList.remove("show")))};let w=0;const u=()=>{window.clearTimeout(w),w=window.setTimeout(Ia,120)},g=h=>h instanceof Element&&(h.matches(".dv-sash, .dv-view, .dv-groupview")||!!h.querySelector(".dv-sash, .dv-groupview")),b=new MutationObserver(h=>{for(const y of h)for(const T of[...y.addedNodes,...y.removedNodes])if(g(T)){u();return}});return b.observe(document.body,{childList:!0,subtree:!0}),u(),document.addEventListener("pointermove",v,{passive:!0}),document.addEventListener("pointerdown",p,{passive:!0}),document.addEventListener("pointerup",f,{passive:!0}),()=>{b.disconnect(),window.clearTimeout(w),cancelAnimationFrame(i),document.removeEventListener("pointermove",v),document.removeEventListener("pointerdown",p),document.removeEventListener("pointerup",f),n.remove()}}const ls=({dark:n,soft:o,buildDefault:i,header:m,noRibbon:r,footer:v})=>(c.useEffect(()=>Ho(),[]),c.useEffect(()=>Na(),[]),es==="mobile"?t.jsxs(t.Fragment,{children:[t.jsx(qo,{dark:n,soft:o,buildDefault:i}),t.jsx(xn,{})]}):t.jsxs("div",{className:`shell${r?" shell--noribbon":""}`,children:[m,t.jsxs("div",{className:"shell-top",children:[!r&&t.jsx(Ea,{}),t.jsxs("div",{className:"shell-work",children:[t.jsx(Ai,{dark:n,soft:o,buildDefault:i}),v]})]}),t.jsx(xn,{})]})),Ta=["n","s","e","w","ne","nw","se","sw"],Nt=n=>{const o=n.currentTarget,i=o.dataset.edge;if(n.type==="pointerdown"){if(n.button!==0)return;o.setPointerCapture(n.pointerId),window.tangu?.miniResize?.(i,!0)}else n.type==="pointermove"?o.hasPointerCapture(n.pointerId)&&window.tangu?.miniResize?.(i):window.tangu?.miniResize?.(null)},ds=({buildDefault:n,direct:o,resizable:i})=>{const m=q(E=>E.spaces),r=q(E=>E.activeSpaceId),[,v]=c.useReducer(E=>E+1,0);c.useEffect(()=>Le(v),[]);const p=m.filter(ut),f=p.find(E=>E.id===r),w=Fe(E=>E.mainLeaves.find(M=>M.id===E.activeMainId)),[u,g]=c.useState(!1),{t:b}=Jn(),h=f?.icon,y=o?we(o.view.type):void 0,T=c.useRef(!1);y&&(T.current=!0),c.useEffect(()=>{o&&T.current&&!y&&window.tangu?.closeSelf?.()},[o,y]);const I=o?.title||(y?Te(y.displayName):f?Te(f.mini?.name??f.name):"Mini Panel");c.useEffect(()=>{const E=Fe.getState();if(E.setDefaultBuilder(n),!o)if(f)E.getActiveLeaf()?.type!==f.mini.view.type&&E.resetLayout();else{const M=p.find(L=>L.id==="tangu")??p[0];M&&Yo(M.id),E.resetLayout()}},[m,r,f,n,o]),c.useEffect(()=>{const E=M=>{M.key==="Escape"&&g(!1)};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]);const S=w&&(o?w.type===o.view.type:f&&w.type===f.mini.view.type)?Fe.getState().getActiveLeaf():null,P=S?we(S.type):null,$=()=>{if(o){ct({type:o.mainView.type,params:{...o.mainView.params,...Fe.getState().getActiveLeaf()?.params}});return}const E=Dt();E?.mini&&ct({spaceId:E.id,type:E.mini.mainView.type,params:{...E.mini.mainView.params,...Fe.getState().getActiveLeaf()?.params}})};return t.jsxs("div",{className:"mini-card-shell","data-space":o?"direct":f?.id,children:[t.jsxs("header",{className:"mini-card-chrome",children:[t.jsxs("button",{className:"mini-card-space","aria-label":b("lcl.mini.switchSpace"),"aria-expanded":u,disabled:!!o||p.length<2,onClick:()=>g(!u),children:[!o&&h&&t.jsx(h,{size:15}),t.jsx("span",{children:I}),!o&&p.length>1&&t.jsx(Qn,{size:12})]}),t.jsx("div",{className:"mini-card-drag-title"}),t.jsx("button",{className:"mini-card-action","aria-label":b("lcl.mini.showMain"),title:b("lcl.mini.showMain"),disabled:!o&&!f,onClick:$,children:t.jsx(Uo,{size:15})}),t.jsx("button",{className:"mini-card-action mini-card-close","aria-label":b("lcl.mini.close"),onClick:()=>window.tangu?.closeSelf?.(),children:t.jsx(Rt,{size:15})})]}),t.jsx("main",{className:"mini-card-main",children:S&&P?t.jsx("div",{className:"mini-panel-view","data-view":S.type,children:t.jsx(ts,{children:t.jsx(c.Suspense,{fallback:null,children:P.factory({leaf:S,params:S.params})})})},`${S.id}:${S.type}`):t.jsx("div",{className:"mini-panel-empty",children:b("lcl.mini.empty")})}),u&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"mini-card-dismiss","aria-label":b("lcl.mini.closeMenu"),onClick:()=>g(!1)}),t.jsx("section",{className:"mini-card-popover","aria-label":b("lcl.mini.switchSpace"),children:t.jsx("div",{className:"mini-card-popover-list",children:p.map(E=>{const M=E.icon;return t.jsxs("button",{className:`mini-card-row${E.id===r?" active":""}`,onClick:()=>{We(E.id),g(!1)},children:[M&&t.jsx(M,{size:15}),t.jsx("span",{className:"mini-card-row-label",children:Te(E.mini.name??E.name)})]},E.id)})})})]}),i&&Ta.map(E=>t.jsx("div",{className:"mini-card-edge","data-edge":E,onPointerDown:Nt,onPointerMove:Nt,onLostPointerCapture:Nt},E))]})};function La(){return t.jsx("div",{className:"mac-titlebar"})}const Tt=9e3,at=5*1024*1024;function Mt(n){return typeof n=="string"?n.replace(/\bBearer\s+[A-Za-z0-9._~+\/-]+=*/gi,"Bearer [redacted]").replace(/\b(sk-[a-zA-Z0-9_-]{12,})\b/g,"[redacted]").replace(/((?:["']?)(?:api[_-]?key|access[_-]?token|refresh[_-]?token|token|password|secret|authorization|cookie)(?:["']?)\s*[:=]\s*["']?)([^\s,"';&}]+)/gi,"$1[redacted]"):Array.isArray(n)?n.map(Mt):n&&typeof n=="object"?Object.fromEntries(Object.entries(n).map(([o,i])=>[o,/^(?:token|.*api[_-]?key|access[_-]?token|refresh[_-]?token|password|secret|authorization|cookie|set-cookie)$/i.test(o)?"[redacted]":Mt(i)])):n}async function Ma(n,o,i){const m=await Ws(n,o,{...i,maxBytes:at});let r=Mt({...m,feedbackSelection:i});const v=w=>{const u=JSON.stringify(w,null,2);return{json:u,bytes:new TextEncoder().encode(u).byteLength}};let p=v(r);const f=r.messages||[];if(p.bytes>at&&f.length){const w=b=>({...r,messageCount:b,messagesTruncated:!0,messages:f.slice(f.length-b)});let u=0,g=f.length-1;for(;u<g;){const b=Math.ceil((u+g)/2);v(w(b)).bytes<=at?u=b:g=b-1}r=w(u),p=v(r)}return{...p,filename:`tangu-feedback-${o?.id.slice(0,8)||"app"}-${new Date().toISOString().slice(0,10)}.json`,missing:Object.entries(m.sources).filter(([,w])=>w!=="included").map(([w])=>w),truncated:!!r.messagesTruncated||!!r.activityLogTruncated}}dt({"feedback.subtitle":{zh:"告诉我们哪里可以做得更好。",en:"Tell us what could work better."},"feedback.kind":{zh:"反馈类型",en:"Feedback type"},"feedback.bug":{zh:"遇到问题",en:"Report a problem"},"feedback.idea":{zh:"功能建议",en:"Suggest a feature"},"feedback.other":{zh:"其他反馈",en:"Something else"},"feedback.description":{zh:"具体发生了什么?",en:"What happened?"},"feedback.bugPlaceholder":{zh:`你当时在做什么?预期的结果是什么,实际又发生了什么?
|
|
3
|
+
如果可以,请写下重现步骤。`,en:`What were you doing? What did you expect, and what happened instead?
|
|
4
|
+
Include steps to reproduce it if you can.`},"feedback.ideaPlaceholder":{zh:"你想完成什么?哪项改进会对你有帮助?",en:"What are you trying to do? What change would help?"},"feedback.otherPlaceholder":{zh:"分享你的使用体验或想法……",en:"Share your experience or thoughts…"},"feedback.context":{zh:"附带诊断信息",en:"Include diagnostic information"},"feedback.diagnostics":{zh:"应用与运行日志",en:"App and runtime logs"},"feedback.diagnosticsHint":{zh:"版本、界面状态、错误、运行时间线与用量;进程日志可能涉及其他会话。",en:"Version, interface state, errors, run timeline and usage. Process logs may include other sessions."},"feedback.conversation":{zh:"当前会话内容",en:"Current conversation"},"feedback.conversationHint":{zh:"整段对话,包含工具输入与输出;附件超过 5 MB 时保留最新的部分。",en:"The whole conversation, including tool inputs and outputs. If the attachment exceeds 5 MB, the most recent part is kept."},"feedback.activity":{zh:"近期活动记录",en:"Recent activity"},"feedback.activityHint":{zh:"近 2 天内最新 500 行,可能包含文件名与操作路径。",en:"The latest 500 lines from the last 2 days; may contain file names and paths."},"feedback.sessionContext":{zh:"关联会话:{name}",en:"Linked conversation: {name}"},"feedback.withoutSession":{zh:"未关联会话,仍可提交应用问题。",en:"No linked conversation. You can still report an app issue."},"feedback.privacy":{zh:"已过滤常见凭据字段。日志仍可能包含路径或内容片段,请按需选择并预览。",en:"Common credential fields are filtered. Logs may still contain paths or content excerpts; choose what to include and review the preview."},"feedback.preview":{zh:"预览附件",en:"Preview attachment"},"feedback.export":{zh:"导出日志文件",en:"Export log file"},"feedback.backToForm":{zh:"返回反馈",en:"Back to feedback"},"feedback.preparing":{zh:"正在准备诊断信息…",en:"Preparing diagnostics…"},"feedback.sending":{zh:"正在提交…",en:"Sending…"},"feedback.ready":{zh:"诊断附件已就绪 · {size}",en:"Diagnostics ready · {size}"},"feedback.textOnly":{zh:"仅提交反馈文字",en:"Only your feedback text will be sent"},"feedback.partial":{zh:"部分诊断来源不可用:{sources}。将提交已获取的内容。",en:"Some diagnostic sources are unavailable: {sources}. Available information will be sent."},"feedback.source.appVersion":{zh:"应用版本",en:"app version"},"feedback.source.messages":{zh:"会话内容",en:"conversation"},"feedback.source.agentConfig":{zh:"会话设置",en:"session settings"},"feedback.source.backendLogs":{zh:"运行输出",en:"runtime output"},"feedback.source.connection":{zh:"连接信息",en:"connection details"},"feedback.source.backendStatus":{zh:"引擎状态",en:"engine status"},"feedback.source.usage":{zh:"用量",en:"usage"},"feedback.source.timeline":{zh:"运行时间线",en:"run timeline"},"feedback.source.activityLog":{zh:"活动记录",en:"activity"},"feedback.truncated":{zh:"较早的部分记录因达到上限未附带,附件内已标记。",en:"Some older records were left out because of collection limits; this is marked in the attachment."},"feedback.tooLarge":{zh:"附件超过 5 MB,请减少勾选的内容后再提交。",en:"The attachment exceeds 5 MB. Deselect some information before sending."},"feedback.prepareFailed":{zh:"诊断信息准备失败。请重试,或取消勾选后仅提交文字。",en:"Could not prepare diagnostics. Retry, or deselect the options to send text only."},"feedback.refresh":{zh:"重新收集",en:"Collect again"},"feedback.successTitle":{zh:"反馈已收到",en:"Feedback received"},"feedback.successHint":{zh:"感谢你帮助我们改进 Tangu。你可以在账户中心查看回复。",en:"Thanks for helping improve Tangu. You can view replies in your account center."},"feedback.ticket":{zh:"反馈编号:{id}",en:"Reference: {id}"},"feedback.viewFeedback":{zh:"查看我的反馈",en:"View my feedback"},"feedback.done":{zh:"完成",en:"Done"},"feedback.limit":{zh:"反馈内容不能超过 {max} 字。",en:"Feedback cannot exceed {max} characters."},"feedback.retry":{zh:"重试提交",en:"Try again"},"feedback.diagnosePrompt":{zh:`我在使用 Tangu 时遇到一个问题,想请你帮我诊断:
|
|
5
|
+
|
|
6
|
+
{description}
|
|
7
|
+
|
|
8
|
+
请结合当前会话的上下文分析可能的原因,并给出排查步骤。`,en:`I ran into a problem while using Tangu and would like your help diagnosing it:
|
|
9
|
+
|
|
10
|
+
{description}
|
|
11
|
+
|
|
12
|
+
Using the context of this session, analyze the likely causes and suggest troubleshooting steps.`}});function us(n){C.getState().setPendingDraft(n),B.getState().openView("chat",{followActive:!0,reuseKey:"primary"},"main")}const ms=({cfg:n,activeSession:o,onClose:i,surface:m="modal"})=>{const{t:r}=ve(),[v]=c.useState(()=>({cfg:n,session:o})),p=C(x=>x.feedbackDraft),[f,w]=c.useState("bug"),[u,g]=c.useState(!0),[b,h]=c.useState(!1),[y,T]=c.useState(!1),[I,S]=c.useState(0),[P,$]=c.useState(null),[E,M]=c.useState(!1),[L,ee]=c.useState(!1),[K,Y]=c.useState(null),[H,U]=c.useState(""),W=c.useRef(null),ce=c.useRef(!1),O=c.useRef(i);O.current=i;const G=u||b||y,le=`${u}:${b}:${y}:${I}`,de=P?.key===le?P:null,Z=G&&!de,z=G?de?.report:void 0,ue=!!z&&z.bytes>at,ie=p.trim().length>Tt,ae=!!p.trim()&&!ie&&!L&&!K&&!Z&&!ue&&(!G||!!z),me=()=>{ce.current||O.current()};c.useEffect(()=>{if(!G)return;let x=!0;return Ma(v.cfg,v.session,{diagnostics:u,conversation:b,activity:y}).then(F=>{x&&$({key:le,report:F})}).catch(()=>{x&&$({key:le,failed:!0})}),()=>{x=!1}},[v,u,b,y,I,le,G]),c.useEffect(()=>{const x=document.activeElement,F=requestAnimationFrame(()=>W.current?.querySelector("textarea")?.focus()),He=X=>{if(X.key==="Escape"&&(X.preventDefault(),X.stopImmediatePropagation(),ce.current||O.current()),X.key==="Tab"){const pe=Array.from(W.current?.querySelectorAll('button:not(:disabled), textarea:not(:disabled), input:not(:disabled), [tabindex="0"]')||[]).filter(qe=>qe.getClientRects().length>0),Se=pe[0],je=pe[pe.length-1];if(!Se){X.preventDefault(),W.current?.focus();return}X.shiftKey&&(document.activeElement===Se||!W.current?.contains(document.activeElement))?(X.preventDefault(),je.focus()):!X.shiftKey&&(document.activeElement===je||!W.current?.contains(document.activeElement))&&(X.preventDefault(),Se.focus())}};return document.addEventListener("keydown",He,!0),()=>{cancelAnimationFrame(F),document.removeEventListener("keydown",He,!0),x?.focus()}},[]);const _=async()=>{if(!(!ae||ce.current)){if(!window.tangu?.submitFeedback){U(r("feedback.errUnavailable"));return}ce.current=!0,ee(!0),U("");try{const x=await window.tangu.submitFeedback({description:`[Tangu · ${r(`feedback.${f}`)}]
|
|
13
|
+
|
|
14
|
+
${p.trim()}`,...z?{sessionLogJson:z.json,sessionLogName:z.filename}:{}});x.ok?(Y(x),C.setState({feedbackDraft:""})):U(x.error==="attachment-too-large"?r("feedback.tooLarge"):r("feedback.errFail",{err:x.error==="not-logged-in"?r("feedback.errNotLoggedIn"):x.error||"Unknown error"}))}catch(x){U(r("feedback.errFail",{err:String(x?.message||x)}))}finally{ce.current=!1,ee(!1)}}},pt=()=>{if(!p.trim()||L)return;const x=r("feedback.diagnosePrompt",{description:p.trim()});window.tangu?.requestMainAction?window.tangu.requestMainAction("chat-draft",x):us(x),me()},xe=z?`${(z.bytes/1024).toFixed(1)} KB`:"",ye=()=>{if(!z)return;const x=URL.createObjectURL(new Blob([z.json],{type:"application/json;charset=utf-8"})),F=document.createElement("a");F.href=x,F.download=z.filename,F.click(),setTimeout(()=>URL.revokeObjectURL(x),1e4)};return t.jsx("div",{className:m==="panel"?"feedback-panel-surface":"memv-modal feedback-overlay",onClick:x=>{m==="modal"&&x.target===x.currentTarget&&me()},children:t.jsxs("div",{ref:W,className:"modal feedback-modal",role:"dialog","aria-modal":"true","aria-labelledby":"feedback-title",tabIndex:-1,onKeyDown:x=>{(x.metaKey||x.ctrlKey)&&x.key==="Enter"&&!x.nativeEvent.isComposing&&(x.preventDefault(),_())},children:[t.jsxs("div",{className:"modal-head feedback-head",children:[t.jsxs("div",{className:"feedback-heading",children:[t.jsx(In,{size:19}),t.jsxs("div",{children:[t.jsx("h2",{id:"feedback-title",children:r("feedback.title")}),t.jsx("p",{children:r("feedback.subtitle")})]})]}),t.jsx("button",{className:"icon-btn",onClick:me,disabled:L,"aria-label":r("settings.btn.cancel"),children:t.jsx(Rt,{size:18})})]}),K?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"modal-body feedback-success",role:"status",children:[t.jsx("span",{className:"feedback-success-icon",children:t.jsx(Ko,{size:28})}),t.jsx("h3",{children:r("feedback.successTitle")}),t.jsx("p",{children:r("feedback.successHint")}),K.id&&t.jsx("code",{children:r("feedback.ticket",{id:K.id})}),K.attachmentSkipped&&t.jsx("p",{className:"feedback-warning",children:r("feedback.okNoLog")}),H&&t.jsx("p",{className:"feedback-warning",role:"alert",children:H})]}),t.jsxs("div",{className:"feedback-footer",children:[window.tangu?.openAccountCenter&&t.jsx("button",{className:"btn ghost",onClick:()=>{U(""),window.tangu.openAccountCenter("feedback").catch(()=>U(r("feedback.errUnavailable")))},children:r("feedback.viewFeedback")}),t.jsx("span",{className:"grow"}),t.jsx("button",{autoFocus:!0,className:"btn primary",onClick:me,children:r("feedback.done")})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"modal-body feedback-body",children:[E?t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn ghost sm feedback-back",onClick:()=>M(!1),children:[t.jsx(Xo,{size:14}),r("feedback.backToForm")]}),t.jsxs("div",{className:"feedback-file",children:[t.jsx(Lt,{size:15}),t.jsx("span",{children:z?.filename}),t.jsx("span",{children:xe})]}),t.jsx("pre",{className:"feedback-preview",tabIndex:0,children:z?.json})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"feedback-kinds",role:"group","aria-label":r("feedback.kind"),children:[{id:"bug",Icon:Go},{id:"idea",Icon:Hn},{id:"other",Icon:In}].map(({id:x,Icon:F})=>t.jsxs("button",{className:"btn ghost","aria-pressed":f===x,disabled:L,onClick:()=>w(x),children:[t.jsx(F,{size:15}),r(`feedback.${x}`)]},x))}),t.jsxs("div",{className:"feedback-description",children:[t.jsx("label",{htmlFor:"feedback-description",children:r(f==="bug"?"feedback.description":"feedback.label")}),t.jsx("textarea",{id:"feedback-description",value:p,onChange:x=>{C.setState({feedbackDraft:x.target.value}),U("")},placeholder:r(`feedback.${f}Placeholder`),disabled:L,"aria-invalid":ie,"aria-describedby":"feedback-count"}),t.jsxs("span",{id:"feedback-count",className:ie?"feedback-warning":"feedback-count",children:[p.trim().length.toLocaleString()," / ",Tt.toLocaleString()]})]}),t.jsxs("section",{className:"feedback-context","aria-labelledby":"feedback-context-title",children:[t.jsxs("div",{className:"feedback-section-heading",children:[t.jsx("h3",{id:"feedback-context-title",children:r("feedback.context")}),t.jsx("code",{children:"/feedback"})]}),t.jsx("p",{className:"feedback-session",children:v.session?r("feedback.sessionContext",{name:v.session.title||v.session.id.slice(0,8)}):r("feedback.withoutSession")}),[{id:"diagnostics",checked:u,change:g,unavailable:!1},{id:"conversation",checked:b,change:h,unavailable:!v.session},{id:"activity",checked:y,change:T,unavailable:!window.tangu?.exportActivity}].map(x=>t.jsxs("label",{className:"feedback-option","data-disabled":x.unavailable||void 0,children:[t.jsx("input",{type:"checkbox",checked:x.checked,onChange:F=>x.change(F.target.checked),disabled:L||x.unavailable}),t.jsxs("span",{children:[t.jsx("strong",{children:r(`feedback.${x.id}`)}),t.jsx("small",{children:r(`feedback.${x.id}Hint`)})]})]},x.id))]}),t.jsxs("div",{className:"feedback-report-status",role:"status",children:[t.jsx("span",{children:Z?t.jsxs(t.Fragment,{children:[t.jsx(Nn,{size:13,className:"spin"}),r("feedback.preparing")]}):z?t.jsxs(t.Fragment,{children:[t.jsx(Lt,{size:13}),r("feedback.ready",{size:xe})]}):r(G?"feedback.prepareFailed":"feedback.textOnly")}),t.jsxs("div",{children:[z&&t.jsx("button",{className:"btn ghost sm",onClick:()=>M(!0),disabled:L,children:r("feedback.preview")}),z&&t.jsxs("button",{className:"btn ghost sm",onClick:ye,disabled:L,children:[t.jsx(Zo,{size:13}),r("feedback.export")]}),G&&t.jsx("button",{className:"icon-btn",onClick:()=>S(x=>x+1),disabled:L||Z,"aria-label":r("feedback.refresh"),title:r("feedback.refresh"),children:t.jsx(ns,{size:13})})]})]}),!!z?.missing.length&&t.jsx("p",{className:"feedback-warning",children:r("feedback.partial",{sources:z.missing.map(x=>r(`feedback.source.${x}`)).join(", ")})}),z?.truncated&&t.jsx("p",{className:"feedback-note",children:r("feedback.truncated")}),G&&t.jsx("p",{className:"feedback-note",children:r("feedback.privacy")})]}),ue&&t.jsx("p",{className:"feedback-warning",role:"alert",children:r("feedback.tooLarge")}),ie&&t.jsx("p",{className:"feedback-warning",role:"alert",children:r("feedback.limit",{max:Tt})}),H&&t.jsx("p",{className:"feedback-warning",role:"alert",children:H})]}),t.jsxs("div",{className:"feedback-footer",children:[t.jsxs("button",{className:"btn ghost feedback-diagnose",onClick:pt,disabled:L||!p.trim(),title:r("feedback.diagnoseViaChatHint"),children:[t.jsx(Jo,{size:15}),r("feedback.diagnoseViaChat")]}),t.jsx("span",{className:"grow"}),t.jsxs("button",{className:"btn primary",onClick:()=>{_()},disabled:!ae,children:[L&&t.jsx(Nn,{size:14,className:"spin"}),r(L?"feedback.sending":H?"feedback.retry":"feedback.submit")]})]})]})]})})};function An(n){return Array.from(n.dataTransfer?.types??[]).includes("Files")}function Ve(){const n=i=>{!An(i)||i.defaultPrevented||(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},o=i=>{An(i)&&!i.defaultPrevented&&i.preventDefault()};return document.addEventListener("dragover",n),document.addEventListener("drop",o),()=>{document.removeEventListener("dragover",n),document.removeEventListener("drop",o)}}function ps({target:n,onUnavailable:o}){const[,i]=c.useReducer(u=>u+1,0),[m,r]=c.useState(()=>({...n.params??{}})),v=c.useRef(m);v.current=m;const p=c.useRef(!1);c.useEffect(()=>Le(i),[]),c.useEffect(()=>r({...n.params??{}}),[n]);const f=we(n.type);f&&(p.current=!0),c.useEffect(()=>{p.current&&!f&&o?.()},[f,o]);const w=c.useMemo(()=>({id:`floating:${n.type}`,type:n.type,loc:"main",get params(){return v.current},setTitle:u=>{document.title=u},setParams:u=>r({...u}),close:()=>o?.()}),[n.type,o]);return f?t.jsx("div",{className:"floating-plugin-view","data-view":n.type,children:t.jsx(ts,{children:t.jsx(c.Suspense,{fallback:null,children:f.factory({leaf:w,params:m})})})}):t.jsx("div",{className:"floating-panel-empty",children:"Loading panel…"})}const Ra=[[390,"iPhone"],[414,"Max"],[768,"iPad"]];function Da({children:n}){const[o,i]=c.useState(390);return es!=="mobile"?t.jsx(t.Fragment,{children:n}):window.innerWidth<=820?t.jsx(t.Fragment,{children:n}):t.jsxs("div",{className:"sc-frame",children:[t.jsx("div",{className:"sc-bar",children:Ra.map(([m,r])=>t.jsxs("button",{className:`sc-size${o===m?" on":""}`,onClick:()=>i(m),children:[r," · ",m]},m))}),t.jsx("div",{className:"sc-device",style:{width:o},children:n})]})}function Pa(){Vs(),c.useEffect(()=>Ve(),[]),c.useEffect(()=>{Hs(),Vi()},[]),c.useEffect(()=>window.tangu?.onMainAction?.((u,g)=>{u==="onboarding"&&C.getState().setOnboarding(!0),u==="dev-commands"&&qs(),u==="test-notification"&&Ys(),u==="reset-layout"&&B.getState().resetLayout({undoable:!0}),u==="achievement-toast"&&Qo(),u==="space-removed"&&g&&Pi(g),u==="chat-draft"&&g&&us(g),u==="chat-quote"&&g&&Hi(g),u==="agents-changed"&&(C.getState().refreshAgents(),window.dispatchEvent(new Event("forsion:agents-changed"))),u==="skills-changed"&&(Pt(zt()).then(b=>C.setState({skillsList:b})).catch(()=>{}),window.dispatchEvent(new Event("forsion:skills-changed"))),u==="open-agents"&&Rn(C.getState().defaultAgentSlug||""),u==="open-agent"&&g&&/^[a-z0-9][a-z0-9-]{0,63}$/.test(g)&&Rn(g)}),[]);const n=mt(),o=ei();Us();const i=C(ss(u=>({sessions:u.sessions,archivedSessions:u.archivedSessions,activeId:u.activeId,settingsOpen:u.settingsOpen,settingsTab:u.settingsTab,settingsSkillKey:u.settingsSkillKey,settingsNonce:u.settingsNonce,onboarding:u.onboarding,feedbackOpen:u.feedbackOpen,marketOpen:u.marketOpen,closeMarket:u.closeMarket,achievementsOpen:u.achievementsOpen,cfg:u.cfg,tr:u.tr,openSettings:u.openSettings,closeSettings:u.closeSettings,patchConfig:u.patchConfig,connect:u.connect,setOnboarding:u.setOnboarding,closeFeedback:u.closeFeedback}))),m=i.sessions.find(u=>u.id===i.activeId)||i.archivedSessions.find(u=>u.id===i.activeId)||null,r=c.useSyncExternalStore(ti,Tn,Tn),[v,p]=c.useState(!1),f=c.useRef(i.onboarding);c.useEffect(()=>{const u=f.current;if(f.current=i.onboarding,u&&!i.onboarding){p(!0);const g=setTimeout(()=>p(!1),650);return()=>clearTimeout(g)}},[i.onboarding]);const w=i.settingsOpen||i.marketOpen||i.achievementsOpen||i.feedbackOpen||!!r||i.onboarding;return t.jsxs(Da,{children:[t.jsx("div",{className:`shell-host${v?" main-enter":""}`,style:i.onboarding?{visibility:"hidden"}:void 0,children:t.jsx(ls,{dark:o.mode==="dark",soft:!!os(o.lang)?.manifest.panelGap,buildDefault:qn,header:t.jsx(La,{}),footer:t.jsx(Ks,{})})}),ni()&&t.jsx(Yn,{}),t.jsx(si,{}),t.jsx(oi,{}),t.jsx(rs,{}),t.jsx(_i,{}),t.jsx(Ne,{children:i.settingsOpen&&t.jsx(_e,{title:i.tr("settings.title"),onClose:()=>i.closeSettings(),children:t.jsx(Un,{open:!0,initialTab:i.settingsTab??void 0,initialSkillKey:i.settingsSkillKey??void 0,cfg:i.cfg,activeSession:m,themeLang:n.lang,themeSkin:n.skin,themeMode:n.mode,themeModePref:n.modePref,flatOn:n.flat,glassOn:n.glass,themeSeed:n.seed,onClose:()=>i.closeSettings(),onConfigChange:i.patchConfig,onThemeChange:(u,g,b)=>n.setTheme(u,g,n.bg,b),onFlatChange:n.setFlat,onGlassChange:u=>n.setGlass(u),onSeedChange:u=>n.setSeedValue(u),onReloadThemes:()=>n.reloadThemes(),onReconnect:u=>{i.connect({...i.cfg,...u||{}})},onRelaunchOnboarding:()=>{i.closeSettings();try{localStorage.removeItem(is)}catch{}i.setOnboarding(!0)}},i.settingsNonce)},"settings")}),t.jsx(Ne,{children:i.onboarding&&t.jsx(ii.div,{style:{position:"fixed",inset:0,zIndex:60,background:"var(--bg)"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,scale:1.06},transition:{duration:.45,ease:[.2,.8,.2,1]},children:t.jsx(ai,{themeLang:n.lang,themeSkin:n.skin,themeMode:n.mode,themeModePref:n.modePref,themeSeed:n.seed,onThemeChange:(u,g,b)=>n.setTheme(u,g,n.bg,b),onSeedChange:u=>n.setSeedValue(u),onReconnect:()=>{window.tangu?.getConfig().then(u=>{const g={backendUrl:u.backendUrl,token:u.token,modelId:u.modelId};C.setState({cfg:g,desktopMode:"managed"}),C.getState().connect(g)})},onFinish:()=>{i.setOnboarding(!1),window.tangu?.getConfig().then(u=>{const g={backendUrl:u.backendUrl,token:u.token,modelId:u.modelId};C.setState({cfg:g,homeDir:u.homeDir,defaultWsDir:u.defaultWorkspaceDir||""}),C.getState().connect(g)})}})},"onboarding")}),t.jsx(Ne,{children:i.marketOpen&&t.jsx(_e,{title:i.tr("market.title"),onClose:()=>i.closeMarket(),children:t.jsx(Kn,{onClose:()=>i.closeMarket()})},"market")}),t.jsx(Ne,{children:i.achievementsOpen&&t.jsx(_e,{title:i.tr("achievements.title"),onClose:()=>C.getState().closeAchievements(),children:t.jsx(Xn,{onClose:()=>C.getState().closeAchievements()})},"achievements")}),t.jsx(Ne,{children:i.feedbackOpen&&t.jsx(_e,{compact:!0,title:i.tr("feedback.title"),onClose:()=>i.closeFeedback(),children:t.jsx(ms,{surface:"panel",cfg:i.cfg,activeSession:m,onClose:()=>i.closeFeedback()})},"feedback")}),t.jsx(Xs,{}),t.jsx(Ne,{children:r?.view&&t.jsx(_e,{title:r.title,onClose:Ln,children:t.jsx(ps,{target:r.view,onUnavailable:Ln})},r.id)}),!w&&t.jsx(Gn,{}),!w&&t.jsx(Gs,{onOpen:()=>C.getState().openAchievements()}),!i.onboarding&&t.jsx(Zs,{})]})}dt({"chatpreview.msg.ask":{zh:"帮我把 LCL 的 hash 路由分支理一下,再决定要不要抽成表。",en:"Walk me through the hash route branches in LCL, then decide whether to pull them into a table."},"chatpreview.msg.reasoning":{zh:"先看 main.tsx 的 hash 分支顺序,确认 #/aion 与 #/tangu 不会被前面的 frame 分支吞掉,再决定是否抽一个 routes 表。整体规模还小,优先可读性。",en:"Start with the order of the hash branches in main.tsx, confirm that #/aion and #/tangu are not swallowed by the earlier frame branch, then decide whether to extract a routes table. The whole thing is still small, so readability wins."},"chatpreview.todo.read":{zh:"读 main.tsx 路由分支",en:"Read the route branches in main.tsx"},"chatpreview.todo.addRoute":{zh:"加 #/tangu 分支",en:"Add the #/tangu branch"},"chatpreview.todo.navLink":{zh:"补 Navigator 链接",en:"Add the Navigator link"},"chatpreview.todo.build":{zh:"跑 tsc / build",en:"Run tsc / build"},"chatpreview.plan":{zh:`1. 检查 hash 分支顺序
|
|
15
|
+
2. 补路由与导航
|
|
16
|
+
3. 运行 typecheck / build`,en:`1. Check the order of the hash branches
|
|
17
|
+
2. Add the route and the navigation link
|
|
18
|
+
3. Run typecheck / build`},"chatpreview.msg.answer":{zh:"看完了。当前是 5 条 `if (route.view === …)` 顺序分支,`frame` 在前、`aion/tangu` 在后,互不吞。\n\n```ts\nif (route.view === 'frame') return <Frame/>\nif (route.view === 'tangu') return <Tangu/>\n```\n\n规模还小,**暂不必抽表**——超过 ~8 条再说。",en:"Had a look. Right now there are 5 sequential `if (route.view === …)` branches — `frame` first, then `aion/tangu` — and none of them swallows another.\n\n```ts\nif (route.view === 'frame') return <Frame/>\nif (route.view === 'tangu') return <Tangu/>\n```\n\nAt this size a table is **not worth extracting yet** — revisit past ~8 branches."},"chatpreview.msg.buildFirst":{zh:"我先跑一遍构建确认。",en:"Let me run a build first to confirm."},"chatpreview.plan.question":{zh:"计划已就绪。是否批准?",en:"The plan is ready. Approve it?"},"chatpreview.inquiry.question":{zh:"路由是抽成表驱动,还是保持 if 分支?",en:"Should routing become table-driven, or stay as if branches?"},"chatpreview.inquiry.optTable":{zh:"抽成 routes 表",en:"Extract a routes table"},"chatpreview.inquiry.optIf":{zh:"保持 if 分支",en:"Keep the if branches"},"chatpreview.session.routing":{zh:"重构 LCL 路由层",en:"Refactor the LCL routing layer"},"chatpreview.session.weekly":{zh:"周报整理",en:"Compile the weekly report"},"chatpreview.session.scraper":{zh:"爬虫脚本调试",en:"Debug the scraper script"},"chatpreview.session.design":{zh:"设计系统对照",en:"Design system comparison"}});function za(n){const o=Date.now()-6e4;return[{id:"u1",role:"user",content:n("chatpreview.msg.ask"),attachments:[{name:"routes.md",mimeType:"text/markdown",data:"",size:128}],status:"done",timestamp:o+1},{id:"a1",role:"assistant",agentName:"Tangu",status:"done",timestamp:o+2,systemPrompt:"You are Tangu, a coding agent. Keep changes scoped and verify them.",reasoning:n("chatpreview.msg.reasoning"),toolEvents:[{id:"t1",name:"read_file",arguments:"src/main.tsx",done:!0,elapsedMs:400},{id:"t2",name:"run_shell",arguments:"npx tsc --noEmit",done:!0,isError:!0,elapsedMs:1200}],todos:[{status:"completed",content:n("chatpreview.todo.read")},{status:"in_progress",content:n("chatpreview.todo.addRoute")},{status:"pending",content:n("chatpreview.todo.navLink")},{status:"pending",content:n("chatpreview.todo.build")}],planProposal:n("chatpreview.plan"),inquiries:[{inquiryId:"iqp",runId:"r1",question:n("chatpreview.plan.question"),options:[],status:"pending",kind:"plan"}],content:n("chatpreview.msg.answer")},{id:"a2",role:"assistant",agentName:"Tangu",status:"done",timestamp:o+3,content:n("chatpreview.msg.buildFirst"),approvals:[{approvalId:"ap1",runId:"r1",name:"run_bash",arguments:JSON.stringify({command:"npm run build && npx tsc --noEmit"}),preview:"$ npm run build && npx tsc --noEmit",status:"pending",reason:{kind:"mode",mode:"auto-edit"}},{approvalId:"ap2",runId:"r1",name:"write_file",arguments:JSON.stringify({path:"/etc/hosts",content:`127.0.0.1 tangu.local
|
|
19
|
+
`}),preview:"⚠ Write outside the workspace · write /etc/hosts (22 chars)",status:"pending",reason:{kind:"escalate",mode:"auto-edit"}}]},{id:"a3",role:"assistant",agentName:"Tangu",status:"done",timestamp:o+4,content:"",inquiries:[{inquiryId:"iq1",runId:"r1",question:n("chatpreview.inquiry.question"),options:[n("chatpreview.inquiry.optTable"),n("chatpreview.inquiry.optIf")],status:"pending"}]}]}const _n=new Date().toISOString(),Oa=["chatpreview.session.routing","chatpreview.session.weekly","chatpreview.session.scraper","chatpreview.session.design"];function Aa(n){return Oa.map((o,i)=>({id:`s${i+1}`,title:n(o),model_id:null,archived:!1,emoji:null,agent_config:null,project_path:"/tangu",project_name:n("app.defaultWorkspace"),created_at:_n,updated_at:_n}))}function _a(n){return[{key:"__cloud__",name:n("app.cloudWorkspace"),kind:"cloud",path:null,system:!0},{key:"/tangu",name:n("app.defaultWorkspace"),kind:"local",path:"/tangu",system:!0}]}const Fn={backendUrl:"http://localhost:8787",token:"",modelId:""};function Fa(){const{t:n}=ve(),[o,i]=c.useState(!1),[m,r]=c.useState(""),v=c.useRef(null),p=c.useMemo(()=>za(n),[n]),f=c.useMemo(()=>Aa(n),[n]),w=c.useMemo(()=>_a(n),[n]);return t.jsxs("div",{className:"t2-preview-shell",children:[t.jsx("div",{className:"t2-preview-side",children:t.jsx(Zi,{collapsed:!1,sessions:f,archivedSessions:[],activeId:"s1",runningIds:new Set(["s2"]),unreadIds:new Set(["s3"]),cfg:Fn,modelId:"",activeSession:f[0],workspaces:w,onSelect:()=>{},onNewInWorkspace:()=>{},onAddWorkspace:()=>{},onRenameWorkspace:()=>{},onRemoveWorkspace:()=>{},onRename:()=>{},onArchive:()=>{},onDelete:()=>{},onOpenSettings:()=>{},showSpecial:!0,onNewChat:()=>i(!0),onOpenWorkspace:()=>{}})}),t.jsxs("div",{className:"t2-preview-main t2-chat-view",children:[t.jsxs("div",{className:"t2-toolbar",children:[t.jsx("div",{className:"t2-toolbar-title",children:f[0].title}),t.jsx("span",{className:"t2-toolbar-grow"}),t.jsx("button",{className:"t2-pill",onClick:()=>i(!1),style:{fontWeight:o?400:600},children:n("workbench.chat")}),t.jsx("button",{className:"t2-pill",onClick:()=>i(!0),style:{fontWeight:o?600:400},children:n("chat.emptyHint")}),m&&t.jsx("span",{className:"t2-toolbar-pill","data-preview-action":!0,children:m})]}),o?t.jsx(qi,{}):t.jsx("div",{className:"t2-stream",ref:v,children:t.jsx("div",{className:"t2-stream-inner","data-has-messages":"",children:p.map(u=>t.jsx(Yi,{msg:u},u.id))})}),t.jsx(Ji,{approvalTray:o?void 0:t.jsx(Ui,{items:Ki(p),onDecide:(u,g,b,h)=>(r(`approval:${b}:${String(h?.command||"")}`),!1),onAnswer:(u,g,b)=>(r(`inquiry:${b}`),!1)}),disabled:!1,running:!1,execConfig:{execMode:"host",approvalMode:"auto-edit"},models:null,modelId:"",onModelChange:()=>{},planMode:!1,onPlanModeChange:()=>{},onExecConfigChange:()=>{},onSend:async()=>!0,onStop:()=>{},contextWindow:2e5,ctxTokens:84e3,sessionTokens:12e3,onCompact:()=>{}})]}),t.jsxs("div",{className:"t2-preview-right",children:[t.jsx("div",{className:"t2-preview-right-title",children:n("panel.tab.toc")}),t.jsx(Qi,{view:"toc",cfg:Fn,sessionId:"s1",sessionConfig:{},running:!1,messages:o?[]:p,chatScrollRef:v,onToast:()=>{},onOpenPreview:()=>{},subChats:[]})]})]})}function Ba(){B.getState().openView("home",{},"main")}dt({"spaceWindow.stuck":{zh:"这个 Space 还没准备好。它所属的插件可能还在加载,或已被停用、卸载。准备好后这里会自动打开,也可以直接关掉这扇窗。",en:"This Space is not ready yet. Its plugin may still be loading, or may have been disabled or removed. It will open here once it is ready, or you can close this window."}});const Bn=6e3;function $a(){const[n,o]=c.useState(Mn?"wait":"plain");return c.useEffect(()=>{const i=Mn;if(!i)return;const m=Date.now();let r=null,v=!1;const p=()=>{const g=q.getState().spaces.find(h=>h.id===i);if(r){g!==r&&!v&&(v=!0,location.reload());return}if(!g||!ci()&&Date.now()-m<Bn)return;r=g;const b=B.getState();b.setSidebarDefaults(g.sidebarDefaults),b.setSideProfile(g.id,g.resizableSides??{},g.sideDefaultScale,g.bottomSpan),b.setPinned(g.pinned),document.title=Te(g.name),o("ready")};p();const f=q.subscribe(p),w=Le(p),u=window.setTimeout(()=>{p(),r||o("stuck")},Bn+50);return()=>{f(),w(),window.clearTimeout(u)}},[]),n}function Wa(){const{t:n}=ve(),o=mt(),i=$a();c.useEffect(()=>{C.getState().setTr((r,v)=>n(r,v))},[n]),c.useEffect(()=>{C.getState().boot()},[]),c.useEffect(()=>Ve(),[]),c.useEffect(()=>window.tangu?.onMainAction?.(r=>{r==="agents-changed"&&(C.getState().refreshAgents(),window.dispatchEvent(new Event("forsion:agents-changed"))),r==="skills-changed"&&(Pt(zt()).then(v=>C.setState({skillsList:v})).catch(()=>{}),window.dispatchEvent(new Event("forsion:skills-changed")))}),[]),c.useEffect(()=>{window.tangu?.detachedReady?.(ri()).then(r=>{if(!r?.length)return;const v=B.getState();for(const p of r)v.openView(p.type,p.params??{},"main")})},[]);const m=(()=>{try{return window.tangu?.platform==="darwin"}catch{return!1}})();return i==="wait"||i==="stuck"?t.jsxs("div",{className:"shell-host",style:{display:"flex",flexDirection:"column"},children:[m&&t.jsx("div",{style:{height:38,flex:"0 0 auto",WebkitAppRegion:"drag"}}),i==="stuck"&&t.jsx("div",{className:"space-window-wait",role:"status",style:{flex:1,display:"grid",placeItems:"center",padding:32,textAlign:"center",color:"var(--text-muted)",fontSize:"var(--ui-font-body, 13px)",lineHeight:1.6},children:t.jsx("span",{style:{maxWidth:420},children:n("spaceWindow.stuck")})})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"shell-host",children:t.jsx(ls,{noRibbon:!0,dark:o.mode==="dark",soft:!!os(o.lang)?.manifest.panelGap,buildDefault:i==="ready"?qn:Ba})}),window.amadeus&&t.jsx(Yn,{}),t.jsx(rs,{})]})}dt({"dock.pickTitle":{zh:"贴到哪个窗口旁边",en:"Dock beside a window"},"dock.pickHint":{zh:"选一个窗口,对话面板会贴在它旁边,一起移动和缩放。",en:"Pick a window. The chat panel docks beside it and moves and resizes with it."},"dock.loading":{zh:"正在查找窗口…",en:"Looking for windows…"},"dock.empty":{zh:"屏幕上没有可以贴靠的窗口。",en:"No windows on screen to dock beside."},"dock.refresh":{zh:"刷新",en:"Refresh"},"dock.close":{zh:"关闭",en:"Close"},"dock.selectedIn":{zh:"在 {app} 里选中的:",en:"Selected in {app}:"},"dock.err.helper_not_installed":{zh:"还没装好「电脑操作」的本机 helper。让 Agent 用一次电脑操作,它会自动装好。",en:"The Computer Use helper is not installed yet. Ask the agent to use Computer Use once and it installs itself."},"dock.err.helper_not_running":{zh:"「电脑操作」的本机 helper 没有启动。",en:"The Computer Use helper is not running."},"dock.err.unsupported_helper":{zh:"本机的「电脑操作」helper 是旧版,不支持侧边拼接。让 Agent 用一次电脑操作,它会自动更新。",en:"The Computer Use helper is out of date and cannot dock. Ask the agent to use Computer Use once and it updates itself."},"dock.err.window_gone":{zh:"这个窗口已经关了。",en:"That window has been closed."},"dock.err.generic":{zh:"没能贴过去({code})。",en:"Could not dock ({code})."}});const Va=new Set(["helper_not_installed","helper_not_running","unsupported_helper","window_gone"]);function Ha(n,o,i){return n?.text?n.text:n?.items?.length?[i("dock.selectedIn",{app:o}),...n.items.map(m=>`- ${m}`)].join(`
|
|
20
|
+
`):""}function qa(){const{t:n}=ve(),[o,i]=c.useState(!1),[m,r]=c.useState(null);c.useEffect(()=>{C.getState().setTr((p,f)=>n(p,f))},[n]),c.useEffect(()=>{C.getState().boot().finally(()=>{C.setState({sessionMode:"work"}),i(!0)});const p=window.tangu?.onAppDockState?.(f=>r(f.target));return window.tangu?.appDockReady?.().then(f=>r(f.target)),()=>p?.()},[]),c.useEffect(()=>{window.amadeus&&Ot()},[]),c.useEffect(()=>Ve(),[]),c.useEffect(()=>{if(!o||!m)return;const p={type:"chat",params:{miniSurface:!0,appRef:m}};Ua({view:p,mainView:{type:"chat"}}),C.getState().setActiveId(null),B.getState().openView("chat",p.params,"main")},[o,m?.pid,m?.windowId]);const v=c.useRef(n);return v.current=n,c.useEffect(()=>{if(!m)return;let p="";const f=async()=>{const w=Ha(await window.tangu?.appDockSelection?.(),m.app,v.current);!w||w===p||(p=w,C.getState().setPendingChatQuote("chat",w))};return window.addEventListener("focus",f),()=>window.removeEventListener("focus",f)},[m?.pid,m?.windowId]),m?t.jsx(ds,{buildDefault:()=>{},direct:{title:m.app,view:{type:"chat",params:{miniSurface:!0,appRef:m}},mainView:{type:"chat"}}}):t.jsx(Ya,{})}function Ya(){const{t:n}=ve(),[o,i]=c.useState(null),[m,r]=c.useState(""),v=async()=>{i(null),r("");const w=await window.tangu?.appDockCandidates?.();i(w?.windows??[]),w?.error&&r(w.error)};c.useEffect(()=>{v()},[]);const p=async w=>{r("");const u=await window.tangu?.appDockAttach?.({pid:w.pid,windowId:w.windowId,app:w.app,bundleId:w.bundleId,title:w.title});u&&!u.ok&&u.error!=="superseded"&&r(u.error||"unavailable")},f=m?Va.has(m)?n(`dock.err.${m}`):n("dock.err.generic",{code:m}):"";return t.jsxs("div",{className:"mini-card-shell","data-space":"dock",children:[t.jsxs("header",{className:"mini-card-chrome",children:[t.jsx("div",{className:"mini-card-drag-title dock-picker-title",children:n("dock.pickTitle")}),t.jsx("button",{className:"mini-card-action","aria-label":n("dock.refresh"),title:n("dock.refresh"),onClick:()=>{v()},children:t.jsx(ns,{size:15})}),t.jsx("button",{className:"mini-card-action mini-card-close","aria-label":n("dock.close"),onClick:()=>window.tangu?.closeSelf?.(),children:t.jsx(Rt,{size:15})})]}),t.jsxs("main",{className:"mini-card-main dock-picker",children:[t.jsx("p",{className:"dock-picker-hint",children:n("dock.pickHint")}),f&&t.jsx("p",{className:"dock-picker-error",role:"alert",children:f}),o===null?t.jsx("div",{className:"mini-panel-empty",children:n("dock.loading")}):o.length===0?!f&&t.jsx("div",{className:"mini-panel-empty",children:n("dock.empty")}):t.jsx("div",{className:"dock-picker-list",children:o.map(w=>t.jsxs("button",{className:"mini-card-row dock-picker-row","data-window-id":w.windowId,onClick:()=>{p(w)},children:[t.jsx(li,{size:15}),t.jsxs("span",{className:"mini-card-row-label",children:[t.jsx("span",{className:"dock-picker-app",children:w.app}),w.title&&t.jsx("span",{className:"dock-picker-window",children:w.title})]})]},`${w.pid}:${w.windowId}`))})]})]})}let Q=null;function Ua(n){Q=n}lt()==="mini"&&(ui(async n=>{n.type==="amadeus-editor"&&await pi();const o={...n.params};delete o.miniSurface,n.type==="chat"&&(o.sessionId||=C.getState().activeId||void 0,o.followActive=!o.sessionId),window.tangu?.showMainPanel?.({...n,params:o})}),mi(n=>{if(Q?.view)return n.type===Q.view.type?n:n.type===(Q.mainView?.type||Q.view.type)?{type:Q.view.type,params:{...Q.view.params,...n.params}}:(ct({...n}),null);const o=Dt();if(!o||!ut(o))return null;const i=o.mini;return n.type===i.view.type?n:n.type===i.mainView.type?{type:i.view.type,params:{...i.view.params,...n.params}}:(ct({...n}),null)}));function Ka(){const n=Dt();n&&ut(n)&&B.getState().openView(n.mini.view.type,n.mini.view.params??{},"main")}function Xa(){return di()?t.jsx(qa,{}):t.jsx(Ga,{})}function Ga(){const{t:n}=ve(),[o,i]=c.useState(null);return c.useEffect(()=>{C.getState().setTr((m,r)=>n(m,r))},[n]),c.useEffect(()=>{let m=!1,r=!1;const v=new URLSearchParams(location.search);let p=v.get("sessionId")?{sessionId:v.get("sessionId")}:null;const f=()=>{if(!m||!p)return;if(p.view){const I=p.view;if(!we(I.type)){r&&window.tangu?.closeSelf?.();return}r=!0;const S=p;p=null,Q=S,i(S),B.getState().openView(I.type,{...I.params,...S.params},"main");return}const b=p.spaceId||(p.sessionId?"tangu":void 0),h=q.getState().spaces.find(I=>I.id===b);if(!h||!ut(h))return;const y=p;p=null,Q=null,i(null),We(h.id);const T={...h.mini.view.params,...y.params,...y.sessionId?{sessionId:y.sessionId,followActive:!1}:{}};B.getState().openView(h.mini.view.type,T,"main"),y.sessionId&&C.getState().setActiveId(y.sessionId)},w=window.tangu?.onMiniTarget?.(b=>{p=b,f()});window.tangu?.miniReady?.();const u=q.subscribe(f),g=Le(f);return C.getState().boot().finally(()=>{m=!0,f()}),()=>{w?.(),u(),g(),m=!1,Q=null}},[]),c.useEffect(()=>{window.amadeus&&Ot()},[]),c.useEffect(()=>Ve(),[]),t.jsx(ds,{buildDefault:Ka,resizable:!!window.tangu?.miniResize&&!new URLSearchParams(location.search).has("transient"),direct:o?.view?{title:o.title,view:o.view,mainView:o.mainView??o.view}:null})}const Za={settings:"settings.title",market:"market.title",achievements:"achievements.title",feedback:"feedback.title",btw:"btw.title"};function Ja(n,o){return n.builtin?o(Za[n.builtin]):n.title}function Qa(){const{t:n}=ve(),o=mt(),[i,m]=c.useState(null),r=C(ss(y=>({cfg:y.cfg,cfgLoaded:y.cfgLoaded,closeSettings:y.closeSettings,closeMarket:y.closeMarket,closeAchievements:y.closeAchievements,closeFeedback:y.closeFeedback,patchConfig:y.patchConfig,connect:y.connect}))),v=i?.params?.session?.id?i.params.session:null,p=()=>window.tangu?.closeSelf?.(),f=i?.builtin==="btw"?Xi(i.params):null,w=i?Ja(i,n):"";if(c.useEffect(()=>{i?.builtin&&w&&(document.title=w)},[i?.builtin,w]),c.useEffect(()=>{C.getState().setTr((y,T)=>n(y,T))},[n]),c.useEffect(()=>{C.getState().boot()},[]),c.useEffect(()=>{window.amadeus&&Ot()},[]),c.useEffect(()=>Ve(),[]),c.useEffect(()=>window.tangu?.onMainAction?.(y=>{y==="agents-changed"&&(C.getState().refreshAgents(),window.dispatchEvent(new Event("forsion:agents-changed"))),y==="skills-changed"&&(Pt(zt()).then(T=>C.setState({skillsList:T})).catch(()=>{}),window.dispatchEvent(new Event("forsion:skills-changed")))}),[]),c.useEffect(()=>{const y=fi(),T=window.tangu?.onFloatingTarget?.(m);return window.tangu?.floatingReady?.(y).then(I=>{I&&m(I)}),()=>T?.()},[]),c.useEffect(()=>{i?.builtin==="feedback"&&typeof i.params?.description=="string"&&C.setState({feedbackDraft:i.params.description})},[i]),!i)return t.jsx("div",{className:"floating-native-root"});const u=()=>{r.closeSettings(),p()},g=()=>{r.closeMarket(),p()},b=()=>{r.closeAchievements(),p()},h=()=>{r.closeFeedback(),p()};return t.jsxs("div",{className:"floating-native-root",children:[window.tangu?.platform==="darwin"&&t.jsx("header",{className:"floating-native-chrome",children:t.jsx("span",{title:w,children:w})}),t.jsxs("main",{className:"floating-native-content",children:[i.builtin==="settings"&&t.jsx(Un,{open:!0,initialTab:typeof i.params?.tab=="string"?i.params.tab:void 0,initialSkillKey:typeof i.params?.skillKey=="string"?i.params.skillKey:void 0,cfg:r.cfg,activeSession:v,themeLang:o.lang,themeSkin:o.skin,themeMode:o.mode,themeModePref:o.modePref,flatOn:o.flat,glassOn:o.glass,themeSeed:o.seed,onClose:u,onConfigChange:r.patchConfig,onThemeChange:(y,T,I)=>o.setTheme(y,T,o.bg,I),onFlatChange:o.setFlat,onGlassChange:o.setGlass,onSeedChange:o.setSeedValue,onReloadThemes:o.reloadThemes,onReconnect:y=>{r.connect({...r.cfg,...y||{}})},onRelaunchOnboarding:()=>{try{localStorage.removeItem(is)}catch{}window.tangu?.requestMainAction?.("onboarding"),p()}},JSON.stringify(i.params??{})),i.builtin==="market"&&t.jsx(Kn,{initialQuery:typeof i.params?.q=="string"?i.params.q:void 0,onClose:g},String(i.params?.q??"")),i.builtin==="achievements"&&t.jsx(Xn,{onClose:b}),i.builtin==="feedback"&&r.cfgLoaded&&t.jsx(ms,{surface:"panel",cfg:r.cfg,activeSession:v,onClose:h},v?.id||""),i.builtin==="btw"&&r.cfgLoaded&&f&&t.jsx(Js,{seed:f,onClose:p}),i.view&&t.jsx(ps,{target:i.view,onUnavailable:p})]}),(i.builtin==="settings"||i.builtin==="market")&&t.jsx(Gn,{})]})}let be=null;function $n(n){if(!n){be&&(be.style.display="none");return}be||(be=document.createElement("div"),Object.assign(be.style,{position:"fixed",inset:"0",pointerEvents:"none",zIndex:"99998",boxSizing:"border-box",border:"3px solid var(--accent, #4d8794)",background:"color-mix(in srgb, var(--accent, #4d8794) 8%, transparent)"}),document.body.appendChild(be)),be.style.display="block"}function er(){const n=window.tangu;if(n?.openDetached){if(lt()==="main"){let o="";const i=()=>{const p=C.getState(),f=p.activeId,w={sessionId:f,runId:f?p.runningBySession[f]??null:null},u=JSON.stringify(w);u!==o&&(o=u,n.reportMiniSession?.(w))};C.subscribe(i),i();let m=null;const r=()=>{if(!B.getState().api||!m||!we(m.type))return;const f=m;m=null,f.spaceId&&We(f.spaceId);const w=B.getState().openView(f.type,f.params??{},"main");w&&f.params&&w.setParams({...w.params,...f.params})};n.onMainPanelTarget?.(p=>{m=p,r()}),Le(r);let v=!1;B.subscribe(p=>{p.api&&(v||(v=!0,n.mainPanelReady?.()),r())})}hi({ribbonPointerDrag:n.platform==="win32",cursorScreenPoint:n.cursorScreenPoint,detach:(o,i)=>{n.openDetached?.(o,i)},openSpace:(o,i)=>{lt()==="main"&&gi()===o&&q.getState().activeSpaceId===o&&B.getState().saveNamed(bi(o)),n.openDetached?.([],i,{space:o})},dragUpdate:(o,i,m)=>n.dragUpdate?.(o,i,m),drop:async(o,i,m)=>(await n.dropView?.(o,i,m))?.routed??!1}),n.onAcceptView?.(o=>{$n(null),B.getState().openView(o.type,o.params??{},"main")}),n.onDragPreview?.(o=>$n(o))}}function tr(){const n=window.tangu;if(!n?.reportRunningSessions)return;const o=i=>n.reportRunningSessions(Object.keys(i).length);o(C.getState().runningBySession),C.subscribe((i,m)=>{i.runningBySession!==m.runningBySession&&o(i.runningBySession)})}const Wn=n=>ea(n).toLowerCase(),fs=(n,o)=>n.configBySession[o]?.cwd||n.sessions.find(i=>i.id===o)?.project_path||"",hs=(n,o)=>Object.keys(n.runningBySession).some(i=>Wn(fs(n,i))===Wn(o));function nr(){const n=window.tangu;if(!(!n?.codeStudioGitCommit||!n.codeStudioGitStatus||!n.productsIsCreation))return C.subscribe((o,i)=>{if(o.runningBySession!==i.runningBySession)for(const m of Object.keys(i.runningBySession)){if(o.runningBySession[m])continue;const r=fs(o,m);!r||hs(o,r)||sr(r,m)}})}async function sr(n,o){try{if(!await window.tangu.productsIsCreation(n))return;const i=await window.tangu.codeStudioGitStatus(n);if(!(i?.auto??i?.writable)||hs(C.getState(),n))return;const m=Qs(C.getState().messagesBySession[o]||[]);await window.tangu.codeStudioGitCommit(n,{name:m,auto:!0,untitled:Vn("studio.history.untitled")})}catch(i){console.warn("[creations] 自动存版本失败",i)}}function or(){if(!window.tangu?.onAuthWillChange)return()=>{};let n=!1,o=null,i=!1,m=0,r=Promise.resolve(),v=!1;const p=()=>{o&&(o.inert=i),o=null},f=window.tangu.onAuthWillChange(async()=>{const u=++m;o||(o=document.body,i=o?.inert??!1,o&&(o.inert=!0));try{if(await r,u!==m||v||!window.amadeus)return;const[{flushAllScopes:g,resetAllScopeDocs:b,usePageStore:h},{useDbStore:y},{useDrawStore:T},I]=await Promise.all([Ae(()=>import("./appStore-CI1_L5OS.js").then(S=>S.tG),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Ae(()=>import("./appStore-CI1_L5OS.js").then(S=>S.tH),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Ae(()=>import("./appStore-CI1_L5OS.js").then(S=>S.tJ),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Ae(()=>import("./index-BOzsniE1.js").then(S=>S.cB),[],import.meta.url)]);if(await Promise.all([g(!0),y.getState().flushAll(!0),T.getState().flushAll(!0)]),u!==m)return;n=h.getState().vaultSide==="cloud",n&&(I.retireAllUnifiedScopes(),b(),h.setState({vaultRoot:null,pages:[],folders:[],files:[],icons:{}}))}catch(g){throw u===m&&p(),g}}),w=window.tangu.onAuthChanged?.(()=>{const u=++m;if(!n){r.finally(()=>{u===m&&p()});return}n=!1,r=r.then(async()=>{const{usePageStore:g}=await Ae(async()=>{const{usePageStore:b}=await import("./appStore-CI1_L5OS.js").then(h=>h.tG);return{usePageStore:b}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);v||(await g.getState().restoreVault(),await g.getState().initVaultSide())}).catch(g=>console.error("[auth] Cannot restore vault after account change:",g)).finally(()=>{u===m&&p()})});return()=>{v=!0,++m,f(),w?.(),p()}}or();window.addEventListener("error",n=>{console.error("[tangu] window error:",n.error||n.message)});window.addEventListener("unhandledrejection",n=>{console.error("[tangu] unhandledrejection:",n.reason)});const ir=(()=>{try{return location.hash==="#preview"}catch{return!1}})(),rt=lt();try{document.documentElement.dataset.window=rt}catch{}try{document.documentElement.lang=Os()==="zh"?"zh-CN":"en"}catch{}try{window.tangu?.platform==="darwin"&&(document.documentElement.dataset.platform="mac")}catch{}let gs,bs=null;try{gs=localStorage.getItem("forsion_theme_seed")||void 0}catch{}try{bs=localStorage.getItem("forsion_theme_lang")}catch{}try{wi(vi(),ki(),xi(),yi(),{customColor:gs}),Si(),document.documentElement.style.removeProperty("background"),mt.getState().initThemes(bs),C.getState().setTr(Vn),eo(),er(),tr(),nr(),ji(),to(),Ei()}catch(n){console.error("[tangu] init failed, continue to mount:",n),Ci("init",n)}_s.createRoot(document.getElementById("root")).render(t.jsx(As,{children:t.jsx(Gi,{children:ir?t.jsx(Fa,{}):rt==="mini"?t.jsx(Xa,{}):rt==="floating"?t.jsx(Qa,{}):rt==="detached"?t.jsx(Wa,{}):t.jsx(Pa,{})})}));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{Z as O,$ as z,O as A,a0 as H,j as b,Q as V,u as W,d as j,r as F}from"./index-BOzsniE1.js";import{lP as B,lQ as I,nX as _,gy as T}from"./appStore-CI1_L5OS.js";import{P as N}from"./MarkdownBlock-DT_wsaja.js";import"./nativeDownload-CNtwSCy0.js";import"./ipc-B6hkgxQL.js";import"./client-CaivGZFR.js";import"./index-DjnTfJpN.js";import"./linkFollow-BpvDWzUx.js";import"./selectionActions-BQD2kox1.js";import"./emoji-DphwSxPx.js";import"./listFold-M8s5JYEC.js";import"./book-open-BLzEdGfu.js";const G=O().use(z).use(A,{singleTilde:!1}).use(H,["yaml"]).use(B).use(I,{singleTilde:!1}),o=t=>String(t??"").replace(/[&<>"']/g,m=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[m]);function L(t,m=!1){if(!t||/[\u0000-\u0020\u007f\\]/.test(t)||t.startsWith("//"))return null;if(t.startsWith("/")||t.startsWith("#"))return t;try{const n=new URL(t);if(n.protocol==="https:"||n.protocol==="http:"||!m&&n.protocol==="mailto:")return n.href}catch{}return!t.includes(":")&&!t.startsWith(".")?t:null}function C(t){return t.value??(t.children??[]).map(C).join("")}function M(t){return t.type!=="paragraph"?null:/^!\[\[([^\]\n]+)\]\]$/.exec(C(t).trim())?.[1]?.replace(/\|\d+$/,"")??null}function Q(t){return t.type==="paragraph"&&t.children?.length===1&&t.children[0].type==="image"?t.children[0]:null}function X(t,m={}){const n=G.parse(t),c=m.locale==="zh",d=(e,l=!1)=>{const r=L(e,l);if(!r||!m.baseUrl||r.startsWith("#"))return r;try{return L(new URL(r,m.baseUrl).href,l)}catch{return r}};let v=!0;const $=()=>{const e=!!m.priorityFirstImage&&v;return v=!1,e?'loading="eager" fetchpriority="high"':'loading="lazy"'},s=new Map((n.children??[]).filter(e=>e.type==="definition").map(e=>[e.identifier,e]));let f=0;const h=e=>(e.children??[]).map(i).join(""),y=(e,l)=>{const r=_(e),a=d(r?.provider==="Bilibili"&&/^BV[\w]{10}$/i.test(e.trim())?"https://www.bilibili.com/video/"+e.trim():e,!0);if(!a)return null;let g=a;try{g=new URL(a,"https://forsion.example").pathname}catch{}const x=/\.(mp4|webm|mov|m4v|ogv)$/i.test(g),E=/\.(mp3|m4a|ogg|wav|flac)$/i.test(g);if(!r&&!x&&!E)return null;const q=l?.alt||r?.provider||(c?E?"音频":"视频演示":E?"Audio":"Video demo"),P=l?.url?d(l.url,!0):null,w=/^(\d{1,4})[:/](\d{1,4})$/.exec(l?.title||""),R=w&&+w[1]>0&&+w[2]>0?` style="aspect-ratio:${+w[1]}/${+w[2]}"`:"",U=P?`<img src="${o(P)}" alt="${o(q)}" ${$()} decoding="async">`:`<div class="md-media-placeholder"><span>${o(q)}</span></div>`;return`<figure class="md-media" data-amadeus-media="${r?"platform":E?"audio":"video"}" data-src="${o(r?.src||a)}"><div class="md-media-stage${P?" has-poster":""}"${R}>${U}</div><figcaption><span>${o(q)}</span><button type="button" class="play-button">${c?"播放":"Play"}${r?` · ${r.provider}`:""}</button><a href="${o(a)}" target="_blank" rel="noopener noreferrer">${c?"打开原视频":"Open original"} ↗</a></figcaption><p class="md-media-error" role="status" hidden>${c?"暂时无法播放,请打开原视频。":"Playback is unavailable. Open the original video."}</p></figure>`};function i(e){const l=()=>h(e);switch(e.type){case"text":return o(e.value);case"strong":return`<strong>${l()}</strong>`;case"emphasis":return`<em>${l()}</em>`;case"delete":return`<del>${l()}</del>`;case"inlineCode":return`<code>${o(e.value)}</code>`;case"break":return"<br>";case"heading":{const r=Math.min(6,(e.depth??2)+(m.headingOffset??0));return`<h${r} id="${o(m.idPrefix||"md")}-${++f}">${l()}</h${r}>`}case"paragraph":{const r=M(e);if(r){const a=d(r,!0);if(a&&/\.(?:png|jpe?g|gif|webp|avif|svg)(?:[?#]|$)/i.test(a))return`<figure class="md-image"><img src="${o(a)}" alt="${o(r)}" ${$()} decoding="async"></figure>`;const g=y(r);if(g)return g;const x=d(r);return x?`<p class="md-bookmark"><a href="${o(x)}" target="_blank" rel="noopener noreferrer">${o(r)} ↗</a></p>`:`<p>${o(C(e))}</p>`}return`<p>${l()}</p>`}case"link":case"linkReference":{const r=e.url??s.get(e.identifier)?.url??"",a=d(r);return a?`<a href="${o(a)}"${/^https?:/.test(a)?' target="_blank" rel="noopener noreferrer"':""}>${l()}</a>`:l()}case"image":case"imageReference":{const r=s.get(e.identifier),a=d(e.url??r?.url??"",!0);return a?`<img src="${o(a)}" alt="${o(e.alt||"")}" ${$()} decoding="async">`:o(e.alt||"")}case"list":return`<${e.ordered?"ol":"ul"}${e.ordered&&e.start?` start="${e.start}"`:""}>${l()}</${e.ordered?"ol":"ul"}>`;case"listItem":return`<li>${e.checked!=null?`<input type="checkbox" disabled aria-label="${c?"清单项":"Checklist item"}"${e.checked?" checked":""}>`:""}${l()}</li>`;case"blockquote":{const r=e.children?.[0],a=r?.type==="paragraph"?/^\[!([\w-]+)\]([+-])?\s*(.*)/.exec(C(r)):null;if(!a)return`<blockquote>${l()}</blockquote>`;const g=(e.children??[]).slice(1).map(i).join(""),x=o(a[3]||a[1]);return a[2]?`<details class="md-callout md-fold"${a[2]==="+"?" open":""}><summary>${x}</summary><div>${g}</div></details>`:`<aside class="md-callout"><p class="md-callout-title">${x}</p>${g}</aside>`}case"table":return`<div class="md-table-wrap"><table>${(e.children??[]).map((r,a)=>`<${a?"tbody":"thead"}><tr>${(r.children??[]).map(g=>`<${a?"td":"th"}>${h(g)}</${a?"td":"th"}>`).join("")}</tr></${a?"tbody":"thead"}>`).join("")}</table></div>`;case"code":return`<pre><code${e.lang?` class="language-${o(e.lang.replace(/[^\w-]/g,""))}"`:""}>${o(e.value)}</code></pre>`;case"thematicBreak":return"<hr>";case"html":case"yaml":case"definition":return"";default:return e.children?l():o(e.value)}}const p=(n.children??[]).filter(e=>!["yaml","html","definition"].includes(e.type));let k="";p[0]?.type==="heading"&&p[0].depth===1&&(k=C(p.shift()));let u="",S=!1;for(let e=0;e<p.length;e++){const l=p[e];l.type==="heading"&&l.depth===2&&(S&&(u+="</section>"),u+='<section class="md-feature">',S=!0);const r=Q(l),a=p[e+1]&&M(p[e+1]),g=r&&a?y(a,r):null;if(g){u+=g,e++;continue}u+=i(l)}return S&&(u+="</section>"),{title:k,html:u}}function Z(t,m="en"){const n=m==="zh",c=Array.from(t.querySelectorAll("[data-amadeus-media]")),d=new AbortController,v=s=>{c.forEach(f=>{f!==s&&f.querySelector("video,audio")?.pause()})};for(const s of c){const f=s.querySelector("button"),h=s.querySelector(".md-media-stage");f.addEventListener("click",()=>{const y=s.querySelector(".md-media-error");if(y.hidden=!0,s.dataset.amadeusMedia==="platform"){if(h.querySelector("iframe")){h.querySelector("iframe").remove(),h.classList.remove("playing"),f.textContent=n?"播放":"Play";return}v(s);const p=document.createElement("iframe");p.src=s.dataset.src,p.title=s.querySelector("figcaption span")?.textContent||"Video",p.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",p.allowFullscreen=!0,p.referrerPolicy="strict-origin-when-cross-origin",h.appendChild(p),h.classList.add("playing"),f.textContent=n?"关闭播放器":"Close player";return}let i=h.querySelector("video,audio");if(i||(i=document.createElement(s.dataset.amadeusMedia==="audio"?"audio":"video"),i.setAttribute("controls",""),i.setAttribute("playsinline",""),i.preload="none",i.src=s.dataset.src,h.appendChild(i),i.addEventListener("playing",()=>{h.classList.add("playing"),f.textContent=n?"暂停":"Pause"},{signal:d.signal}),i.addEventListener("pause",()=>{f.textContent=i.ended?n?"重播":"Replay":n?"继续播放":"Resume"},{signal:d.signal}),i.addEventListener("loadedmetadata",()=>{i instanceof HTMLVideoElement&&i.videoHeight&&(h.style.aspectRatio=`${i.videoWidth}/${i.videoHeight}`)},{signal:d.signal})),!i.paused){i.pause();return}v(s),i.play().catch(()=>{y.hidden=!1,h.classList.remove("playing")})},{signal:d.signal})}const $=()=>{c.forEach(s=>s.querySelector("video,audio")?.pause())};return document.addEventListener("visibilitychange",()=>{document.hidden&&$()},{signal:d.signal}),()=>{d.abort(),$(),c.forEach(s=>s.querySelector("iframe")?.remove())}}F({"publishing.visual":{zh:"Amadeus 编辑",en:"Amadeus editor"},"publishing.source":{zh:"Markdown 源码",en:"Markdown source"},"publishing.preview":{zh:"预览",en:"Preview"}});function D({options:t,revision:m,alive:n}){const{t:c,locale:d}=W(),[v,$]=j.useState(t.value),[s,f]=j.useState("visual"),h=t.modes!==!1,y=h?s:"visual",i=j.useRef(null);j.useEffect(()=>{$(t.value)},[t.value,m]);const p=u=>{n()&&(t.value=u,$(u),t.onChange?.(u))};j.useEffect(()=>i.current?Z(i.current,d):void 0,[y,v,d,t.previewBaseUrl]);const k=y==="preview"?X(v,{locale:d,baseUrl:t.previewBaseUrl}):null;return b.jsxs("div",{className:"am-app amx-publishing-editor","aria-label":t.label,children:[h&&b.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,padding:"8px 0"},children:["visual","source","preview"].map(u=>b.jsx("button",{className:"btn",type:"button","aria-pressed":y===u,onClick:()=>f(u),children:c(`publishing.${u}`)},u))}),y==="visual"&&b.jsx(N,{initial:v,onChange:p,readOnly:t.readOnly,immediate:!0}),y==="source"&&b.jsx("textarea",{"aria-label":t.label||c("publishing.source"),value:v,readOnly:t.readOnly,onChange:u=>p(u.target.value),style:{width:"100%",minHeight:420,resize:"vertical",padding:12,font:"inherit",fontFamily:"var(--font-mono)",color:"var(--text)",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)"}}),k&&b.jsx("div",{ref:i,className:"amadeus-published",dangerouslySetInnerHTML:{__html:(k.title?`<h1>${k.title.replace(/[&<>"']/g,u=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[u])}</h1>`:"")+k.html}})]})}function ce(t,m){const n={...m};let c=!0,d=0;const v=()=>b.jsx(V,{children:b.jsx(D,{options:n,revision:d++,alive:()=>c})}),$=T(t,v(),()=>{c=!1}),s=()=>$.render(v());return{getValue(){return n.value},update(f){c&&(Object.assign(n,f),s())},insertMarkdown(f){c&&!n.readOnly&&(n.value+=`
|
|
2
|
+
|
|
3
|
+
`+f,n.onChange?.(n.value),s())},focus(){c&&t.querySelector('[contenteditable="true"],textarea')?.focus()},dispose:$.dispose}}export{ce as mountPluginMarkdownEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{J as a}from"./appStore-CI1_L5OS.js";const e=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],o=a("message-square-plus",e);export{o as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t}from"./index-
|
|
1
|
+
import{r as t}from"./index-BOzsniE1.js";t({"automation.deleted":{zh:"已删除「{name}」",en:"Deleted “{name}”"},"automation.deleteConfirm":{zh:"删除「{name}」?此操作无法撤销。",en:"Delete “{name}”? This can’t be undone."},"automation.undo":{zh:"撤销",en:"Undo"},"automation.ux.actions":{zh:"更多操作",en:"More actions"},"automation.ux.help":{zh:"使用说明",en:"Workflow help"},"automation.ux.properties":{zh:"规则配置",en:"Rule configuration"},"automation.ux.myWorkflows":{zh:"我的自动化",en:"My workflows"},"automation.ux.noRules":{zh:"从入门模板创建第一条自动化。",en:"Create your first workflow from a starter template."},"automation.ux.workspace":{zh:"自动化工作台",en:"Automation studio"},"automation.ux.welcome":{zh:"把重复的事,交给流程",en:"Turn repeat work into a workflow"},"automation.ux.intro":{zh:"从一个触发条件开始,连接 Agent、笔记和多维表,随时查看每一步的结果。",en:"Start with a trigger, connect your agents, notes and databases, and see what each step did."},"automation.ux.guide.trigger":{zh:"选择触发方式",en:"Choose a trigger"},"automation.ux.guide.triggerHint":{zh:"定时、事件、表格变化,或手动点击。",en:"A schedule, an event, a database change, or a click."},"automation.ux.guide.actions":{zh:"连接要做的事",en:"Connect your actions"},"automation.ux.guide.actionsHint":{zh:"在画布添加步骤,选中节点完成配置。",en:"Add steps on the canvas, then select a node to configure it."},"automation.ux.guide.test":{zh:"试运行,再启用",en:"Test, then enable"},"automation.ux.guide.testHint":{zh:"先保存为暂停状态,检查结果后开启。",en:"Save paused, review a test run, then enable it."},"automation.ux.startWith":{zh:"从场景开始",en:"Start with a use case"},"automation.ux.blank":{zh:"自定义流程",en:"Custom workflow"},"automation.ux.draftHint":{zh:"模板只填入草稿。保存前,你可以修改所有配置。",en:"Templates only fill a draft. Review and change anything before saving."},"automation.ux.native":{zh:"和 Forsion 一起工作",en:"Works with Forsion"},"automation.ux.nativeHint":{zh:"笔记按钮负责手动启动,多维表提供触发数据,Agent 处理任务,通知送达收件箱。Muse 和 Historian 的系统自动化也可在左侧单独管理。",en:"Note buttons start manual workflows, databases supply trigger data, agents handle tasks, and notifications arrive in your inbox. Manage Muse and Historian separately in the sidebar."},"automation.ux.reminder.name":{zh:"每日提醒",en:"Daily reminder"},"automation.ux.reminder.hint":{zh:"每天固定时间,把提醒送进收件箱。",en:"Send a reminder to your inbox at a set time each day."},"automation.ux.reminder.flow":{zh:"每天 09:00 → 发通知",en:"Daily at 09:00 → Notify"},"automation.ux.reminder.body":{zh:"今天有哪些值得优先处理的事?",en:"What deserves your attention today?"},"automation.ux.briefing.name":{zh:"Agent 每日简报",en:"Daily agent briefing"},"automation.ux.briefing.hint":{zh:"选一个 Agent,定时整理你关心的信息。",en:"Choose an agent to prepare a scheduled briefing."},"automation.ux.briefing.flow":{zh:"定时 → 跑 Agent",en:"Schedule → Run agent"},"automation.ux.briefing.prompt":{zh:"整理一份今日工作简报,总结当前待办和需要关注的事项。",en:"Prepare a daily briefing of current tasks and items that need attention."},"automation.ux.table.name":{zh:"新增记录提醒",en:"New record notification"},"automation.ux.table.hint":{zh:"多维表新增一行时,通知你及时跟进。",en:"Get notified when a new row is added to a database."},"automation.ux.table.flow":{zh:"新增记录 → 发通知",en:"Row added → Notify"},"automation.ux.table.body":{zh:"多维表新增了记录:{{row.id}}",en:"A new database row was added: {{row.id}}"},"automation.ux.button.name":{zh:"一键交给 Agent",en:"One click to an agent"},"automation.ux.button.hint":{zh:"手动执行常用任务,也能绑定到笔记按钮。",en:"Run a repeat task manually or attach it to a note button."},"automation.ux.button.flow":{zh:"手动点击 → 跑 Agent",en:"Manual click → Run agent"},"automation.ux.button.prompt":{zh:"检查我的待办,整理接下来最值得推进的三件事。",en:"Review my tasks and identify the three most useful next actions."},"automation.ux.overview":{zh:"入门与模板",en:"Guide and templates"},"automation.ux.search":{zh:"搜索自动化",en:"Search automations"},"automation.ux.noMatches":{zh:"没有匹配的自动化",en:"No matching automations"},"automation.ux.enable":{zh:"启用",en:"Enable"},"automation.ux.pause":{zh:"暂停",en:"Pause"},"automation.ux.on":{zh:"已启用",en:"Enabled"},"automation.ux.off":{zh:"已暂停",en:"Paused"},"automation.ux.flow":{zh:"工作流画布",en:"Workflow canvas"},"automation.ux.canvasHint":{zh:"拖动排列 · 点击配置",en:"Drag to arrange · Click to configure"},"automation.ux.canvasOrder":{zh:"按连线顺序执行。拖动只调整布局,步骤顺序在配置中调整。",en:"Steps run in connected order. Dragging changes the layout; use the step controls to reorder execution."},"automation.ux.zoomIn":{zh:"放大画布",en:"Zoom in"},"automation.ux.zoomOut":{zh:"缩小画布",en:"Zoom out"},"automation.ux.fit":{zh:"适应视图",en:"Fit to view"},"automation.ux.arrange":{zh:"自动排列",en:"Auto arrange"},"automation.ux.ready":{zh:"已配置",en:"Configured"},"automation.ux.incomplete":{zh:"待配置",en:"Needs setup"},"automation.ux.finish":{zh:"保存与启用",en:"Save and enable"},"automation.ux.finishHint":{zh:"检查配置与启动方式",en:"Review setup and activation"},"automation.ux.addStep":{zh:"添加步骤",en:"Add a step"},"automation.ux.maxSteps":{zh:"最多添加 24 个步骤",en:"Up to 24 steps"},"automation.ux.setup":{zh:"节点配置",en:"Node configuration"},"automation.ux.setupHint":{zh:"选中画布节点,配置触发条件或动作。",en:"Select a canvas node to configure its trigger or action."},"automation.ux.savePaused":{zh:"保存为暂停",en:"Save paused"},"automation.ux.saveEnabled":{zh:"保存并启用",en:"Save and enable"},"automation.ux.enabledLabel":{zh:"保存后启用",en:"Enable after saving"},"automation.ux.enableHint":{zh:"暂停状态仍可试运行;启用后才响应触发条件。",en:"Paused workflows can still be tested. Enable them to respond to triggers."},"automation.ux.saved":{zh:"自动化已保存",en:"Automation saved"},"automation.ux.checklist":{zh:"还需完成",en:"Complete the setup"},"automation.ux.allReady":{zh:"配置已完成,可以保存",en:"Ready to save"},"automation.ux.review":{zh:"检查并保存",en:"Review and save"},"automation.ux.issue.name":{zh:"填写自动化名称",en:"Enter a workflow name"},"automation.ux.issue.trigger":{zh:"补全触发条件",en:"Complete the trigger settings"},"automation.ux.issue.steps":{zh:"至少添加一个动作",en:"Add at least one action"},"automation.ux.issue.notify":{zh:"填写通知标题",en:"Enter a notification title"},"automation.ux.issue.agent":{zh:"选择执行任务的 Agent",en:"Choose an agent"},"automation.ux.issue.prompt":{zh:"说明 Agent 需要完成的任务",en:"Describe the task for the agent"},"automation.ux.issue.table":{zh:"选择目标多维表",en:"Choose a database"},"automation.ux.issue.cells":{zh:"至少指定一个要写入的字段",en:"Add at least one field to write"},"automation.ux.issue.row":{zh:"指定记录 ID 或按列值匹配目标记录",en:"Set a row ID or match target rows by a column value"},"automation.ux.issue.match":{zh:"填写记录匹配值",en:"Enter a row matching value"},"automation.ux.issue.tool":{zh:"选择一个可用工具",en:"Choose an available tool"},"automation.ux.issue.args":{zh:"补全工具的必填参数",en:"Complete the required tool arguments"},"automation.ux.issue.json":{zh:"填写有效的 JSON 参数",en:"Enter valid JSON arguments"},"automation.ux.issue.cooldown":{zh:"填写有效的冷却时长",en:"Enter a valid cooldown duration"},"automation.ux.variables":{zh:"插入变量",en:"Insert variable"},"automation.ux.insertVariable":{zh:"为「{field}」插入变量",en:"Insert a variable into {field}"},"automation.ux.today":{zh:"今天的日期",en:"Today"},"automation.ux.now":{zh:"当前时间",en:"Current time"},"automation.ux.triggerRow":{zh:"触发记录",en:"Trigger row"},"automation.ux.rowId":{zh:"记录 ID",en:"Row ID"},"automation.ux.runHint":{zh:"试运行会真实执行已保存的动作。",en:"Testing executes the saved actions."},"automation.ux.dbRunHint":{zh:"表格规则试运行不携带触发行数据;行变量与默认触发行目标需要真实表格事件。",en:"Database tests have no triggering row. Row variables and default row targets require a real database event."},"automation.ux.runResults":{zh:"运行结果",en:"Run results"},"automation.ux.runEmpty":{zh:"还没有运行记录。可以先试运行一次,或等待触发条件满足。",en:"No runs yet. Test the workflow or wait for its trigger."},"automation.ux.runLoading":{zh:"正在读取运行记录…",en:"Loading runs…"},"automation.ux.runError":{zh:"无法读取运行记录,请重试。",en:"Could not load runs. Please retry."},"automation.ux.retry":{zh:"重试",en:"Retry"},"automation.ux.done":{zh:"已完成",en:"Completed"},"automation.ux.failed":{zh:"失败",en:"Failed"},"automation.ux.running":{zh:"运行中",en:"Running"},"automation.ux.queued":{zh:"排队中",en:"Queued"},"automation.ux.autoOrigin":{zh:"自动触发",en:"Automatic"},"automation.ux.manualOrigin":{zh:"手动执行",en:"Manual"},"automation.ux.stepResult":{zh:"步骤 {n} · {type}",en:"Step {n} · {type}"},"automation.ux.latestResults":{zh:"每步执行结果",en:"Step results"},"automation.ux.noSteps":{zh:"这次执行没有步骤结果。",en:"No step results were recorded for this run."},"automation.ux.systemHint":{zh:"系统助理",en:"System assistants"},"automation.ux.loadError":{zh:"自动化加载失败,请重试。",en:"Could not load automations. Please retry."}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{J as o}from"./appStore-CI1_L5OS.js";const s=[["path",{d:"M5 12h14",key:"1ays0h"}]],e=o("minus",s);export{e as M};
|