limixbot 0.3.15 → 0.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ActivityPanel-CrqSA80q.js → ActivityPanel-C764b2Xl.js} +1 -1
- package/dist/assets/{App-Bx6hl9Sg.js → App-CqZbuxyG.js} +10 -10
- package/dist/assets/{AppEventEditor-DLfkpP1d.js → AppEventEditor-BDNA92Yi.js} +1 -1
- package/dist/assets/{BotSettingsDialog-rHcw4pr0.js → BotSettingsDialog-DRG9dnfj.js} +1 -1
- package/dist/assets/{BrowserPanel-BgNsYU3s.js → BrowserPanel-CRXIOcNS.js} +1 -1
- package/dist/assets/{BrowserProfilesManager-ByQtDUyM.js → BrowserProfilesManager-DP7gxh-e.js} +1 -1
- package/dist/assets/{CloudAddDialog-754PKKwo.js → CloudAddDialog-DvjmCLbx.js} +1 -1
- package/dist/assets/{ComputerFilesPane-IP5ib-4w.js → ComputerFilesPane-CigS-meo.js} +1 -1
- package/dist/assets/{ComputerPanel-CndWeumv.js → ComputerPanel-D5-xat8-.js} +2 -2
- package/dist/assets/{DataPanel-BWlfa8L7.js → DataPanel-Bq_FOj_E.js} +1 -1
- package/dist/assets/{DesktopViewer-tgbnWJ7S.js → DesktopViewer-DTBmRKHz.js} +1 -1
- package/dist/assets/{FilesView-PiPhchvH.js → FilesView-Br0MiEk_.js} +1 -1
- package/dist/assets/{GrokMoveDialog-DGBkFh2_.js → GrokMoveDialog-DZyKVak2.js} +1 -1
- package/dist/assets/{InspectorPanel-DMb9KlS1.js → InspectorPanel-C1U7KJir.js} +1 -1
- package/dist/assets/{KeyboardShortcutsModal-DcAnacT0.js → KeyboardShortcutsModal-qzvoh2lp.js} +1 -1
- package/dist/assets/{LiveDesktop-pNuAQp7j.js → LiveDesktop-BctvIhpw.js} +1 -1
- package/dist/assets/{LocalVmWorkspace-rUDRW4sg.js → LocalVmWorkspace-8mTbvw5d.js} +1 -1
- package/dist/assets/{MacLocalControl-D2_QV-or.js → MacLocalControl-B7zdH0bz.js} +1 -1
- package/dist/assets/{MarkdownFilePreview-DNNn-HhY.js → MarkdownFilePreview-BfcZEY3n.js} +1 -1
- package/dist/assets/{MenuMotion-CIhkQGNX.js → MenuMotion-CobYpP7L.js} +1 -1
- package/dist/assets/{NewBotDialog-C1onlYty.js → NewBotDialog-Bnw7Z2rr.js} +1 -1
- package/dist/assets/{PhoneAppDialog-DygQ7EJ1.js → PhoneAppDialog-BZwiksrL.js} +1 -1
- package/dist/assets/{PlacesRail-DC3DtwQy.js → PlacesRail-CUntVv3u.js} +1 -1
- package/dist/assets/{PluginsPanel-BZv6B1JK.js → PluginsPanel-3_XYyEIv.js} +1 -1
- package/dist/assets/{ProIntroduction-DeMFeFxH.js → ProIntroduction-COls1M9l.js} +1 -1
- package/dist/assets/{RemoteAgentSettingsPanel-DyVQB35x.js → RemoteAgentSettingsPanel-DApM-5sE.js} +1 -1
- package/dist/assets/{RoomPanel-DEH49als.js → RoomPanel-Bu0TANTd.js} +1 -1
- package/dist/assets/{RoutinesPage-CRI83T_I.js → RoutinesPage-Cta3AbeW.js} +1 -1
- package/dist/assets/{SettingsModal-Dcdk0Qvv.js → SettingsModal-DQwnnCSu.js} +3 -3
- package/dist/assets/{ShareTeamDialog-D5ML8qDY.js → ShareTeamDialog-KqZ-a3G6.js} +1 -1
- package/dist/assets/{SignedInSites-Bjc69Ty-.js → SignedInSites--BsN5E9C.js} +1 -1
- package/dist/assets/{TeamLibraryPanel-CVcmOn6k.js → TeamLibraryPanel-Dxe1ca4n.js} +1 -1
- package/dist/assets/{TeamMapPage-C3-Cu90W.js → TeamMapPage-p1aMw2x-.js} +1 -1
- package/dist/assets/{TriggersPage-DS2Ceion.js → TriggersPage-DPC0ckiJ.js} +1 -1
- package/dist/assets/{VisibilitySection-DigpYJ5s.js → VisibilitySection-a6qlWv5E.js} +1 -1
- package/dist/assets/{WebhookTrigger-BP28l-Jy.js → WebhookTrigger-2PD7zdj2.js} +1 -1
- package/dist/assets/{WorksOnGrid-dVy5M1Fj.js → WorksOnGrid-Cfuds2SH.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-DE2rjoCc.js → abnfDiagram-YUKMZFIV-DEyDkr0Q.js} +1 -1
- package/dist/assets/{activity-8Dgeq15H.js → activity-CbpNb0MQ.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-DrIn6OKQ.js → architectureDiagram-47P4ROYG-CGTtcA9N.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-BQdVPMCR.js → blockDiagram-E7TT5TSB-DT9DFOL_.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-DFb8MJmm.js → c4Diagram-CRA5TL53-DpERK75F.js} +1 -1
- package/dist/assets/{calendar-days-Bs4Es4HT.js → calendar-days-DE6WL-x2.js} +1 -1
- package/dist/assets/channel-CETDvzTH.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-BXaLRTO9.js → chunk-2Q5K7J3B-wHwpVFi3.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-Cie3uAC2.js → chunk-5VM5RSS4-CfqwqtdU.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-Bw5vFHu9.js → chunk-7TKQ45FW-BRxQFxT-.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-CkxRWzwT.js → chunk-AW2ZBBNX-Ca3w_5Wz.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-7FMS_2yS.js → chunk-FVRAUYC3-CO8Syt2Z.js} +2 -2
- package/dist/assets/{chunk-HTAEGDNF-DQ_kiZYj.js → chunk-HTAEGDNF-Cnx9DnWv.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-DD4AjX_J.js → chunk-JWPE2WC7-DefKEriK.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-DAs7Un1F.js → chunk-KQW6MTUR-B6WWWz_R.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-qEAG8aNp.js → chunk-XXDRQBXY-BFU1-B3X.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-SFDos9_W.js → classDiagram-v2-K4WV4PDN-BePCpZI3.js} +1 -1
- package/dist/assets/{coins-ni7p9MMO.js → coins-D1fhjgas.js} +1 -1
- package/dist/assets/{core-CMus8yJ9.js → core-DHr1c58v.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-BIvnumq9.js → cose-bilkent-JH36ORCC-D8emtvin.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-DEyZ973A.js → cynefin-EF2NZ3EQ-DUEsfFVq.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-DIH2LA6q.js → cynefinDiagram-3GCD6N5R-duonepNA.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-doItNion.js → dagre-W4DXFKR2-D4NywFNB.js} +1 -1
- package/dist/assets/{diagram-2UJZ2QOL-DKfcZ3Fe.js → diagram-2UJZ2QOL-cjiJTdiH.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-BRnKWMs5.js → diagram-OVF4WLC6-D6M8A9DS.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-C3aLszxc.js → diagram-PFPMY2P6-CVAzAz2N.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-DbMKM9Kw.js → diagram-UMYRVEAY-DLvfYJwO.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-BqrhdTTX.js → diagram-YEKJPTXX-D8qCH--0.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-CYnUFm0_.js → diagram-ZIFT7M5P-s55SHvTR.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-CnuOWBxY.js → ebnfDiagram-VR2GEFS7-B93cNJNn.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-BmtbqAAs.js → elk-IJKZMXRS-BsJqO8aU.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-CL6oNmZD.js → erDiagram-O2IAPWRE-BXF1G3Js.js} +1 -1
- package/dist/assets/{file-up-DT7t5NXT.js → file-up-Cg2kYQkd.js} +1 -1
- package/dist/assets/{flowDiagram-OXPTDLAJ-CE9hfMoK.js → flowDiagram-OXPTDLAJ-BKjjYwz9.js} +1 -1
- package/dist/assets/{ganttDiagram-R7TSEDQI-DRU_A2cB.js → ganttDiagram-R7TSEDQI-DhtZJtPm.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-BPkWYlKZ.js → gitGraphDiagram-XJZIOB7I-BfRlcF5z.js} +1 -1
- package/dist/assets/{import-name-DutQXK90.js → import-name-FGve0wxL.js} +1 -1
- package/dist/assets/{index-C6OVbzeZ.js → index-CIXZzqGE.js} +2 -2
- package/dist/assets/{index-CiYcp06m.js → index-DIdugbSs.js} +1 -1
- package/dist/assets/{infoDiagram-5W2HQ5XZ-C4SBhDtT.js → infoDiagram-5W2HQ5XZ-CywmYwco.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-3TlhKRsV.js → ishikawaDiagram-K3B6WC7H-DpXXqau5.js} +1 -1
- package/dist/assets/{journeyDiagram-COXZFDF6-K9dyCbpb.js → journeyDiagram-COXZFDF6-D1uMWGbz.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-Df8i0B0H.js → kanban-definition-P3RFRI5V-Bz0zjqQs.js} +1 -1
- package/dist/assets/{mcp-servers-xuxWmmEV.js → mcp-servers-DQCPuucN.js} +1 -1
- package/dist/assets/{mermaid.core-Dj_sBsXx.js → mermaid.core-Dnv6mcJ4.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-CuBxqBw1.js → mindmap-definition-LZFPQGKD-CFEkTgom.js} +1 -1
- package/dist/assets/{minimize-CuDlETLH.js → minimize-o-OFVasg.js} +1 -1
- package/dist/assets/{monitor-DqFADU6d.js → monitor-7oLB-7rZ.js} +1 -1
- package/dist/assets/{new-bot-DoJRfwOC.js → new-bot-ClXDvQ-4.js} +1 -1
- package/dist/assets/{org-library-B7nhJQxt.js → org-library-DvSsHKGu.js} +1 -1
- package/dist/assets/{package-format-FvzPr9Xd.js → package-format-YYA_dh-7.js} +1 -1
- package/dist/assets/{pegDiagram-BGZESJAR-BDWRqrLr.js → pegDiagram-BGZESJAR-DKt4SMwc.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-BByTBeRn.js → pieDiagram-CAPJLFHJ-B9taKUge.js} +1 -1
- package/dist/assets/{quadrantDiagram-GDMTTRAM-D0SI7j3Y.js → quadrantDiagram-GDMTTRAM-DQjB7Jbz.js} +1 -1
- package/dist/assets/{rail-BEOIK49V.js → rail-BBdJiVR1.js} +1 -1
- package/dist/assets/{railroadDiagram-SM67HX2B-Dz3tUGbx.js → railroadDiagram-SM67HX2B-DQOivC56.js} +1 -1
- package/dist/assets/{remote-desktop-panel-DgZionIJ.js → remote-desktop-panel-B6GmKFRw.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-DrwqW7OV.js → requirementDiagram-X7JNWC4A-BLgwXDEl.js} +1 -1
- package/dist/assets/{sankeyDiagram-UM26HJRW-95WqcM7l.js → sankeyDiagram-UM26HJRW-g2GlJNjj.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-1zoh2EeE.js → sequenceDiagram-ZO4K6R2Y-_08U7Ixl.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-IzBNvZN8.js → sizeCapture-INFHLROL-DZPfU3_U.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-CXdapkBV.js → stateDiagram-v2-TBUQTH76-PXBjCkxd.js} +1 -1
- package/dist/assets/styles-B9SGxFnK.css +1 -0
- package/dist/assets/{swimlanes-N4OXWK64-QK7_rFPB.js → swimlanes-N4OXWK64-q1MhehBF.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-pLYSpGVX.js +8 -0
- package/dist/assets/{team-share-NJEAQGUX.js → team-share-xt--eeM_.js} +1 -1
- package/dist/assets/{timeline-definition-YOQAKGHF-MhSu-mD6.js → timeline-definition-YOQAKGHF-UBKh0GG-.js} +1 -1
- package/dist/assets/{usecaseDiagram-VIAY4XPW-DdZIcDLN.js → usecaseDiagram-VIAY4XPW-CccLioTT.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-DDMi9wJz.js → vennDiagram-BLWOH2XV-3Q39wQgE.js} +1 -1
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-DrZpbJKY.js → wardleyDiagram-YMQ3BMBF-DtgEYK7j.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-__UkZCKS.js → xychartDiagram-TAQBALBS-DLTmsflK.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/rail.html +5 -5
- package/dist-server/package.json +1 -1
- package/package.json +1 -1
- package/dist/assets/channel-1lG6Uyuf.js +0 -1
- package/dist/assets/styles-CSArda2J.css +0 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-B4Zj1xuq.js +0 -8
- /package/dist/assets/{styles-Btbbe7r3.js → styles-BHtUK2qB.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as r1,t as f,j as a,A as Me,aw as ie,H as s1,R as ve,ax as se,M as We,a as L,f as D2,E as Jt,Q as qt,D as Ko,ay as Ho,ab as Go,r as m,X as F2,a2 as Vo,a4 as Jo,am as B2,V as U2,az as qo,e as Yo,at as En,aA as Xo,aB as Qo,aC as e5,aD as t5,aE as n5,a9 as r5,aF as o5,aG as i5,N as s5,K as a5,aH as rt,J as $n,F as c5,aI as l5,L as ot,g as W2,aJ as u5,aK as kt,aL as K2,aM as h1,aN as d5,ac as f5,S as p5,a0 as h5,aO as H2,aP as C5,b as m5,aQ as g5,aR as b5,aS as y5}from"./styles-Btbbe7r3.js";import{M as x5}from"./monitor-DqFADU6d.js";const v5=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],k5=r1("audio-lines",v5);const w5=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],_5=r1("building-2",w5);const S5=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],j5=r1("cloud-upload",S5);const M5=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],N5=r1("copy",M5);const E5=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],$5=r1("ellipsis",E5);const A5=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Yt=r1("external-link",A5);const O5=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Z5=r1("hard-drive",O5);const z5=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],I5=r1("house",z5);const T5=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],x1=r1("loader-circle",T5);const P5=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],G2=r1("lock",P5);const R5=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],L5=r1("log-out",R5);const D5=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],F5=r1("moon",D5);const B5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],V2=r1("plus",B5);const U5=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],W5=r1("power",U5);const K5=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],J2=r1("server",K5);const H5=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],G5=r1("smartphone",H5);const V5=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],J5=r1("timer",V5);const q5=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Xt=r1("user-round",q5),Y5="omb-analytics-opt-out",X5=()=>globalThis.window?.ogb?.desktopAnalytics;function Q5(){const e=X5();if(!(!e?.set||e.enabled()!==null)){try{if(localStorage.getItem(Y5)!=="1")return}catch{return}e.set(!1).catch(()=>{})}}function t6(){return Q5(),Promise.resolve()}function n6(e,t){}const q2="omb-email-gate";function r6(){return!!localStorage.getItem(q2)}function o6(e){localStorage.setItem(q2,e)}const A1=8,ei=new Set(["sso","two-factor","browser"]);function ti(e,t){switch(e){case"invalid-email":return f("cloudBuy.signIn.invalidEmail");case"rate-limited":return f("cloudBuy.signIn.rateLimited");case"wrong-code":return t===1?f("cloudBuy.signIn.wrongCodeOne"):f("cloudBuy.signIn.wrongCode",{count:t??0});case"expired":return f("cloudBuy.signIn.expired");case"signup-closed":return f("cloudBuy.signIn.signupClosed");case"device-limit":return f("cloudBuy.signIn.deviceLimit");case"sso":return f("cloudBuy.signIn.sso");case"two-factor":return f("cloudBuy.signIn.twoFactor");case"browser":return f("cloudBuy.signIn.browser");case"failed":return f("cloudBuy.signIn.failed")}}function de(e){return e.replace(/\D/g,"").slice(0,A1)}const ni=e=>{const t=Math.max(0,Math.ceil(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`};function ri({phase:e,email:t,code:n,profileEmail:r,busy:o,now:i,onBack:s,onEmail:c,onSend:l,onChangeEmail:u,onCode:d,onResend:p,onBrowser:h}){const C=e.step==="done"?null:e.problem,g=C!==null&&ei.has(C),y=e.intent?f("cloudBuy.signIn.title"):f("cloudBuy.signIn.titlePlain"),x=(w,v)=>w.parentElement?.querySelectorAll("input")[v]?.focus(),k=(w,v,A)=>{const Z=de(v);if(Z.length>1){d(de(n.slice(0,w)+Z)),x(A,Math.min(A1-1,w+Z.length));return}const O=(n.slice(0,w)+Z+n.slice(w+1)).slice(0,A1);d(de(O)),Z&&w<A1-1&&x(A,w+1)},_=w=>v=>{v.key==="Backspace"&&!n[w]&&w>0?(v.preventDefault(),d(n.slice(0,w-1)),x(v.currentTarget,w-1)):v.key==="ArrowLeft"&&w>0?(v.preventDefault(),x(v.currentTarget,w-1)):v.key==="ArrowRight"&&w<A1-1&&(v.preventDefault(),x(v.currentTarget,w+1))},M=w=>{const v=de(w.clipboardData.getData("text"));v&&(w.preventDefault(),d(v),x(w.currentTarget,Math.min(A1-1,v.length)))},N=w=>{w.preventDefault(),o||l()};return a.jsxs("div",{"data-cloud-add":`sign-in-${e.step}`,className:Me,children:[a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx(ie,{label:f("cloudBuy.back"),onClick:s}),a.jsx(s1,{title:y,sub:f("cloudBuy.signIn.sub")})]}),e.step==="email"&&a.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:N,noValidate:!0,children:[a.jsx("label",{htmlFor:"cloud-add-email",className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.email")}),a.jsx("input",{id:"cloud-add-email","data-autofocus":!0,type:"email",autoComplete:"email",inputMode:"email",spellCheck:!1,value:t,disabled:o,"aria-invalid":C==="invalid-email"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:w=>c(w.target.value),className:ve}),a.jsxs("button",{type:"submit",className:`${se} mt-2`,disabled:o||!t.trim(),children:[o&&a.jsx(x1,{size:16,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.send")]}),r&&t.trim().toLowerCase()===r.trim().toLowerCase()&&a.jsx("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:f("cloudBuy.signIn.fromProfile")})]}),e.step==="code"&&a.jsxs("div",{className:"flex flex-col gap-2.5",children:[a.jsxs("p",{id:"cloud-add-code-label",className:"text-[13px] leading-[18px] text-ink-secondary",children:[f("cloudBuy.signIn.codeLabel",{email:e.email})," · ",a.jsx("button",{type:"button",className:We,disabled:o,onClick:u,children:f("cloudBuy.signIn.change")})]}),a.jsx("div",{role:"group","aria-labelledby":"cloud-add-code-label",className:"grid grid-cols-8 gap-1.5",dir:"ltr",children:Array.from({length:A1},(w,v)=>a.jsx("input",{"data-autofocus":v===Math.min(n.length,A1-1)||void 0,value:n[v]??"",inputMode:"numeric",pattern:"[0-9]*",maxLength:A1,autoComplete:v===0?"one-time-code":"off","aria-label":f("cloudBuy.signIn.digit",{n:v+1}),disabled:o,"aria-invalid":C==="wrong-code"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:A=>k(v,A.target.value,A.currentTarget),onKeyDown:_(v),onPaste:M,onFocus:A=>A.currentTarget.select(),className:L(ve,"h-11 min-w-0 px-0 text-center text-[20px] font-medium tabular-nums")},v))}),e.signupOpen===!1&&a.jsx("p",{"data-cloud-signup-closed":!0,className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.signupClosedNote")}),a.jsx("div",{className:"flex min-h-6 items-center justify-between gap-3 text-[13px] text-ink-tertiary",children:o?a.jsxs("span",{role:"status",className:"inline-flex items-center gap-1.5",children:[a.jsx(x1,{size:13,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.checking")]}):e.resendAt>i?a.jsx("span",{children:f("cloudBuy.signIn.resendIn",{time:ni(e.resendAt-i)})}):a.jsx("button",{type:"button",className:We,onClick:p,children:f("cloudBuy.signIn.resend")})})]}),e.step==="done"&&a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[14px] leading-5 text-ink",children:[a.jsx("span",{"aria-hidden":"true",className:"grid size-5 shrink-0 place-items-center rounded-full bg-ink text-app",children:a.jsx(D2,{size:12,strokeWidth:2.4})}),e.intent?f("cloudBuy.signIn.done"):f("cloudBuy.signIn.donePlain")]}),C&&a.jsxs("div",{id:"cloud-add-problem",role:"alert",className:"flex flex-col items-start gap-3 rounded-[12px] bg-ink/[0.04] px-4 py-3 text-[13px] leading-[18px] text-ink",children:[a.jsx("p",{children:ti(C,e.step==="code"?e.triesLeft:null)}),g&&a.jsxs("button",{type:"button",className:Jt,onClick:h,children:[f("cloudBuy.signIn.continueBrowser"),a.jsx(Yt,{size:14,"aria-hidden":"true"})]}),C==="expired"&&e.step==="code"&&a.jsx("button",{type:"button",className:qt,disabled:o,onClick:p,children:f("cloudBuy.signIn.newCode")})]}),e.step!=="done"&&!g&&a.jsxs("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:[f("cloudBuy.signIn.ssoHint")," ",a.jsx("button",{type:"button",className:We,onClick:h,children:f("cloudBuy.signIn.continueBrowser")})]})]})}function i6({code:e,checkout:t,trial:n,busy:r,onReopen:o,onCancel:i}){return a.jsxs("div",{"data-cloud-add":"signing-in",className:Me,children:[a.jsx(s1,{title:f("cloudAdd.browserTitle")}),e?a.jsxs("ol",{className:"flex list-decimal flex-col gap-1.5 ps-5 text-[14px] leading-5 text-ink marker:text-ink-tertiary",children:[a.jsx("li",{children:f("cloudAdd.signInStep1")}),a.jsxs("li",{children:[f("cloudAccount.codeCheck"),a.jsx("code",{dir:"ltr",className:"mt-1.5 block w-fit select-all rounded-[8px] bg-ink/[0.05] px-3 py-1.5 font-mono text-[17px] font-medium tracking-[0.12em]",children:e})]}),a.jsx("li",{children:f(t?n?"cloudAdd.signInStep3Trial":"cloudAdd.signInStep3":"cloudAdd.signInStep3Connect")})]}):a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[13px] text-ink-secondary",children:[a.jsx(x1,{size:14,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudAdd.opening")]}),a.jsxs("div",{className:Ko,children:[a.jsx("button",{type:"button",className:qt,disabled:r,onClick:i,children:f("cloudAdd.cancel")}),a.jsxs("button",{type:"button",className:Jt,disabled:r||!e,onClick:o,children:[f("cloudAdd.reopenBrowser"),a.jsx(Yt,{size:14,"aria-hidden":"true"})]})]})]})}var Y2=Ho();const s6=Go(Y2);let oi=0;const fe=[],wt=m.createContext(null),ii=()=>()=>{};function X2({modal:e=!1,children:t}){const[n]=m.useState(()=>++oi);m.useLayoutEffect(()=>{if(e)return fe.push(n),fe.sort((s,c)=>s-c),()=>{fe.splice(fe.indexOf(n),1)}},[e,n]);const r=m.useContext(wt),o=m.useSyncExternalStore(ii,()=>!1,()=>!0),i=a.jsx(wt.Provider,{value:e?n:r,children:t});return o?i:Y2.createPortal(i,document.body)}function si(){const e=m.useContext(wt);return m.useCallback(()=>e===null||fe.at(-1)===e,[e])}const ai="a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]";function ci(e,t){const n=m.useRef(t);n.current=t,m.useEffect(()=>{const r=e.current;if(!r)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null;r.contains(document.activeElement)||r.focus();const i=()=>Array.from(r.querySelectorAll(ai)).filter(c=>c.getAttribute("tabindex")!=="-1"&&!c.closest("[hidden], [inert]")),s=c=>{if(c.defaultPrevented)return;if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),n.current();return}if(c.key!=="Tab")return;const l=i();if(!l.length)return c.preventDefault();const u=l[0],d=l[l.length-1];c.shiftKey&&(document.activeElement===u||!r.contains(document.activeElement)||document.activeElement===r)?(c.preventDefault(),d.focus()):!c.shiftKey&&document.activeElement===d&&(c.preventDefault(),u.focus())};return r.addEventListener("keydown",s),()=>{r.removeEventListener("keydown",s),o?.focus()}},[e])}function Qt(e){switch(e.outcome){case"moving":return f("accounts.moving");case"gone":return f("accounts.gone");case"failed":return f("accounts.failed");default:return null}}function a6(){const e=window.ogb?.remoteClient?.active?void 0:window.ogb?.accounts,t=window.ogb?.accountSheet,n=window.ogb?.app?.ownPage===!0&&!!e,r=B2(),[o,i]=m.useState(null),[s,c]=m.useState(!1),[l,u]=m.useState(null);return m.useEffect(()=>{if(!n)return;const d=()=>{e.list().then(i).catch(()=>{})};return d(),e.onChanged(d)},[n,e]),m.useEffect(()=>{if(n||!t)return;let d=!0;return t.offered().then(p=>{d&&c(p===!0)}).catch(()=>{}),()=>{d=!1}},[n,t]),{view:n?o:null,openSheet:!n&&s&&t?()=>{t.open().catch(()=>{})}:null,noRail:!r.beside&&!r.places.length,signOut:d=>{e?.signOut(d).then(p=>{i(p.view);const h=Qt(p);h&&u({email:null,note:h})}).catch(()=>u({email:null,note:f("accounts.failed")}))},add:d=>u({email:d??"",note:null}),sheet:l,closeSheet:()=>u(null)}}function c6(e){return f(e&&!e.active?"accounts.signIn":"settings.section.cloudAccount")}function l6({view:e,openSheet:t,noRail:n,signOut:r,add:o}){if(t)return[{key:"accounts-sheet",label:f("accounts.manage"),icon:a.jsx(Xt,{size:18}),onSelect:t}];const i=e?.active;return i?[{key:"accounts-active",heading:f("accounts.heading"),label:i.email,title:i.email,checked:!0,icon:a.jsx(D2,{size:18}),disabled:!i.signIn,...i.signIn?{subtitle:f("accounts.needsSignIn")}:{},onSelect:()=>{i.signIn&&o(i.email)}},...n?[{key:"accounts-add",label:f("accounts.add"),icon:a.jsx(V2,{size:18}),onSelect:()=>o()}]:[],{key:"accounts-sign-out",label:f("accounts.signOut"),icon:a.jsx(L5,{size:18}),onSelect:()=>r(i.id)}]:[]}const An={step:"email",intent:!1,problem:null};function li({start:e,onDone:t,onBack:n}){const r=window.ogb?.accounts,[o,i]=m.useState(An),[s,c]=m.useState(e),[l,u]=m.useState(""),[d,p]=m.useState(!1),[h,C]=m.useState(!1),[g,y]=m.useState(Date.now());m.useEffect(()=>{const _=setInterval(()=>y(Date.now()),1e3);return()=>clearInterval(_)},[]),m.useEffect(()=>()=>{r?.addCancel().catch(()=>{})},[r]);const x=()=>{d||!r||(p(!0),r.addStart(s).then(_=>{_.outcome==="sent"?(i({step:"code",intent:!1,email:_.email,resendAt:_.resendAt,problem:null,triesLeft:null,..._.signupOpen===!1?{signupOpen:!1}:{}}),u("")):i({step:"email",intent:!1,problem:_.outcome})},()=>i({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1)))},k=_=>{if(!r||o.step!=="code")return;const M=o;p(!0),r.addVerify(_).then(N=>{N.outcome==="switched"?t(null):N.outcome==="added"?t(f("accounts.added",{email:N.email??s})):N.outcome==="already"?t(f("accounts.already",{email:N.email??s})):(u(""),i({...M,problem:N.outcome,triesLeft:N.outcome==="wrong-code"?N.triesLeft:null}))},()=>i({...M,problem:"failed",triesLeft:null})).finally(()=>p(!1))};return m.useEffect(()=>{if(!h||!r)return;const _=()=>{r.addResult().then(M=>{M&&(M.outcome==="switched"?t(null):M.outcome==="added"?t(f("accounts.added",{email:M.email??s})):M.outcome==="already"?t(f("accounts.already",{email:M.email??s})):(C(!1),i({step:"email",intent:!1,problem:"failed"})))}).catch(()=>{})};return _(),r.onChanged(_)},[h,r,t,s]),h?a.jsxs("div",{"data-accounts-browser":!0,className:Me,children:[a.jsx(s1,{title:f("accounts.browserTitle"),sub:f("accounts.browserBody")}),a.jsx("button",{type:"button",className:qt,onClick:()=>{r?.addReopen().catch(()=>{})},children:f("accounts.browserOpen")})]}):a.jsx(ri,{phase:o,email:s,code:l,profileEmail:null,busy:d,now:g,onBack:n,onEmail:c,onSend:x,onChangeEmail:()=>{i(An),r?.addCancel().catch(()=>{})},onCode:_=>{const M=de(_);u(M),M.length===8&&!d&&k(M)},onResend:x,onBrowser:()=>{p(!0),r?.addBrowser().then(_=>{_.outcome==="browser"?C(!0):i({step:"email",intent:!1,problem:"failed"})},()=>i({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1))}})}function ui({onClose:e,adding:t=null,note:n=null}){const r=window.ogb?.accounts,[o,i]=m.useState(null),[s,c]=m.useState(n),[l,u]=m.useState(t);m.useEffect(()=>{if(!r)return;const C=()=>{r.list().then(i).catch(()=>c(f("accounts.failed")))};return C(),r.onChanged(C)},[r]);const d=C=>{c(null),r?.signOut(C).then(g=>{i(g.view);const y=Qt(g);y?c(y):e()},()=>c(f("accounts.failed")))},p=o?.active??null,h=m.useRef(null);return ci(h,e),a.jsx(X2,{modal:!0,children:a.jsx("div",{className:"ui-scrim fixed inset-0 z-[60] flex items-center justify-center p-4",onMouseDown:C=>C.target===C.currentTarget&&e(),children:a.jsxs("div",{ref:h,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":"cloud-add-title","data-accounts-sheet":!0,className:L(Jo,"relative w-full max-w-[420px] outline-none"),children:[a.jsx("button",{type:"button",onClick:e,"aria-label":f("accounts.close"),className:L(Vo,"absolute end-4 top-4 z-10"),children:a.jsx(F2,{size:16})}),l!==null?a.jsx(li,{start:l,onBack:()=>t!==null?e():u(null),onDone:C=>{u(null),C?c(C):e()}}):a.jsxs("div",{className:Me,children:[a.jsx(s1,{title:f("accounts.title")}),p&&!n&&a.jsxs("p",{"data-accounts-active":!0,className:"truncate text-[14px] text-ink",title:p.email,children:[f("accounts.heading")," ",p.email]}),s&&a.jsx("p",{role:"status","data-accounts-note":!0,className:"text-[13px] leading-5 text-ink-secondary",children:s}),p&&!n&&a.jsx("button",{type:"button","data-accounts-sign-out":!0,className:Jt,onClick:()=>d(p.id),children:f("accounts.signOut")})]})]})})})}function u6(){const e=window.ogb?.accounts,[t,n]=m.useState(!1);return m.useEffect(()=>{if(e)return e.sheetPending().then(r=>{r&&n(!0)}).catch(()=>{}),e.onOpenSheet(()=>n(!0))},[e]),m.useEffect(()=>{t&&window.ogb?.rail?.expand?.(!0)?.catch(()=>{})},[t]),{open:t,close:()=>{n(!1),window.ogb?.rail?.expand?.(!1)?.catch(()=>{}),e?.sheetClosed().catch(()=>{})}}}const me={host:{platform:"other",label:"Browser",session:"unknown",packaged:!1},windowChrome:"native",screenPreview:{available:!1,interaction:"none",reasonCode:"desktop-app-required"},dictation:{available:!1,engine:"none",onDevice:!1,reasonCode:"desktop-app-required"},localComputer:{available:!1,support:"unsupported",enabled:!1,status:"unavailable",reasonCode:"desktop-app-required"}};let D1=null,_t=0;function en(){const e=typeof window>"u"?void 0:window.ogb?.platform;if(!e)return me;const t=e==="darwin",n=e==="win32"||e==="linux",r={available:t||n,engine:t?"apple-speech":n?"fish-audio":"none",onDevice:t};return r.available||(r.reasonCode="unsupported-platform"),{...me,host:{...me.host,platform:e==="darwin"||e==="linux"||e==="win32"?e:"other",label:e==="darwin"?"macOS":e==="linux"?"Linux":e==="win32"?"Windows":"Desktop"},windowChrome:t?"mac-inset":e==="win32"?"win-caption":"native",dictation:r}}async function di(){if(D1)return D1;if(!window.ogb?.getCapabilities)return me;const e=_t;let t;try{t=await window.ogb.getCapabilities()}catch{t=me}return _t!==e&&D1||(D1=t),D1}function d6(){return D1??en()}function fi(e){return _t+=1,D1=e,e}function f6(){return typeof window>"u"||window.ogb?.remoteClient?.active?void 0:window.ogb?.approvals}const Q2=m.createContext({capabilities:en(),ready:typeof window>"u"||!window.ogb});function p6({children:e}){const[t,n]=m.useState(()=>({capabilities:en(),ready:typeof window>"u"||!window.ogb}));return m.useEffect(()=>{let r=!0,o=0;const i=window.ogb?.onCapabilitiesChanged?.(c=>{o+=1,r&&n({capabilities:fi(c),ready:!0})}),s=o;return di().then(c=>{r&&o===s&&n({capabilities:c,ready:!0})}),()=>{r=!1,i?.()}},[]),a.jsx(Q2.Provider,{value:t,children:e})}function er(){return m.useContext(Q2)}function pi(){const{capabilities:e}=er();return gi(e.windowChrome)}const On={WebkitAppRegion:"drag"},hi={WebkitAppRegion:"no-drag"};function Ci(e){return e?.windowChrome==="mac-inset"||e?.windowChrome==="win-caption"}function mi(e){return Ci(e)&&e?.windowFrame!==!1}function gi(e){const t=e==="win-caption",n=t||e==="mac-inset";return{windowsCaption:t,draggable:n,dragProps:n?{"data-window-drag":"",style:On}:{},dragStyle:n?On:void 0,noDragStyle:n?hi:void 0}}function h6(){const{dragProps:e}=pi();return e.style?a.jsx("div",{"aria-hidden":!0,"data-window-drag-strip":!0,...e,className:"pointer-events-none absolute inset-x-0 top-0 h-[52px]"}):null}function bi(e,t,n=Date.now()){const r=Math.max(0,Math.round((n-e)/1e3)),o=new Intl.RelativeTimeFormat(t,{numeric:"auto"});if(r<45)return o.format(0,"second");const i=Math.round(r/60);if(i<60)return o.format(-i,"minute");const s=Math.round(i/60);if(s<24)return o.format(-s,"hour");const c=Math.round(s/24);return c<7?o.format(-c,"day"):new Date(e).toLocaleDateString(t,{month:"short",day:"numeric"})}let ke=null,Zn=!1;const St=new Set,it=()=>typeof window>"u"?void 0:window.ogb?.rail;function ee(e){ke=e;for(const t of St)t(ke)}function yi(){const e=it();Zn||!e?.state||(Zn=!0,e.onState?.(ee),e.state().then(ee,()=>ee(null)))}function C6(){const[e,t]=m.useState(ke);return m.useEffect(()=>(St.add(t),yi(),t(ke),()=>{St.delete(t)}),[]),e}function xi(){const[e,t]=m.useState(!0);return m.useEffect(()=>it()?.onFramed?.(t),[]),e}function m6(e=!0){it()?.drawsFrame?.(e)?.catch(()=>{})}function g6(e){const t=it(),n=ke;!t?.setHidden||!n||(ee({...n,hidden:e}),t.setHidden(e).then(ee,()=>ee(n)))}const tn="popover-surface flex flex-col gap-1 rounded-[var(--radius-menu)] border border-hairline/50 bg-menu p-1.5 shadow-lg [&_svg.lucide]:stroke-[1.5]",b6="flex min-h-[30px] w-full shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-2 py-1.5 text-left text-[14px] leading-[18px] focus-visible:bg-menu-hover",y6="mx-1.5 h-px shrink-0 bg-hairline/50",x6="px-2 pb-1 pt-2 text-[12px] font-medium leading-4 text-ink-secondary",Ne="group flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:h-10",v6="group flex min-h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 py-1 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:min-h-10",k6="min-w-0 max-w-full truncate text-[12px] leading-4 text-ink-tertiary",w6="flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 px-2 text-[13px] leading-[18px] touch:h-10",_6="flex size-4 shrink-0 items-center justify-center",S6="min-w-0 max-w-[45%] shrink truncate text-[12px] leading-4 text-ink-tertiary",j6="flex h-6 shrink-0 items-end gap-2 px-2 pb-0.5 text-[12px] font-medium leading-4 text-ink-tertiary",M6="mx-2 my-[5px] h-[0.5px] shrink-0 bg-ink/10",N6="px-2 py-1 text-[12px] leading-4 text-ink-tertiary",E6="shrink-0 text-ink-secondary",$6="shrink-0 text-ink-tertiary rtl:-scale-x-100",A6=1.75,vi=Object.freeze({empty:"native.connect.empty",codeOnly:"native.connect.codeOnly",emailCode:"native.connect.emailCode",oldCode:"native.connect.oldCode",scriptKey:"native.connect.scriptKey",notACode:"native.connect.notACode",publicHttp:"native.connect.publicHttp",phoneLink:"native.connect.phoneLink",notAnAddress:"native.connect.notAnAddress",unreachable:"native.connect.unreachable",dns:"native.connect.dns",certificate:"native.connect.certificate",notMausBot:"native.connect.notMausBot",desktopApp:"native.connect.desktopApp",desktopAppTailnet:"native.connect.desktopAppTailnet",loopback:"native.connect.loopback",localNetwork:"native.connect.localNetwork",tailscaleOff:"native.connect.tailscaleOff",otherTailnet:"native.connect.otherTailnet",tailnetBlocked:"native.connect.tailnetBlocked",tailnetSilent:"native.connect.tailnetSilent"}),nn=40,tr={blue:"blue",green:"teal",amber:"yellow",rose:"red",violet:"purple",slate:null};function st(e){const t=tr[e];return t?U2(t):"var(--color-raised)"}const jt={blue:"cloudBuy.color.blue",green:"cloudBuy.color.teal",amber:"cloudBuy.color.yellow",rose:"cloudBuy.color.red",violet:"cloudBuy.color.purple",slate:"cloudBuy.color.slate"},F1=Object.keys(jt),nr="blue";function ki(e,{now:t,tier:n=null,failed:r=!1,stop:o=null}){if(e===void 0)return{kind:"checking"};if(e===null)return{kind:"unreachable"};if(!e.signedIn||!e.hasCloud)return{kind:"first"};const i=e.adding&&!e.adding.done?e.adding:null;if(i)return i.status==="ready"?{kind:"ready",adding:i}:i.status==="setting_up"?{kind:"starting",adding:i}:i.status==="problem"?{kind:"problem",adding:i}:{kind:"waiting",adding:i,late:t-i.startedAt>=qo};const s=e.home?.name??null;if(!e.supported)return{kind:"stop",reason:"one",home:s};const c=o??(e.canAdd?null:e.blocked==="cap"||!e.blocked?"one":e.blocked);if(c)return{kind:"stop",reason:c,home:s};if(r)return{kind:"error"};if(!e.offer?.plans.length)return{kind:"unreachable"};const l=n?e.offer.plans.find(u=>u.tier===n):void 0;return l?{kind:"name",plan:l}:{kind:"choose",offer:e.offer}}function wi(e){return e==="signups_closed"||e==="checkout_open"||e==="rate"?e:"one"}const _i=1200,Si=3e3;function ji(e){return new Promise(t=>{let n=!1;const r=i=>{n||(n=!0,clearTimeout(o),t(i))},o=setTimeout(()=>r(!1),Si);try{if(!navigator.clipboard?.writeText)return r(!1);Promise.resolve(navigator.clipboard.writeText(e)).then(()=>r(!0),()=>r(!1))}catch{r(!1)}})}function Mi(e){if(typeof document>"u"||!document.body||typeof document.execCommand!="function")return!1;const t=document.activeElement,n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.position="fixed",n.style.left="-9999px";try{return document.body.appendChild(n),n.select(),n.setSelectionRange(0,e.length),document.execCommand("copy")}catch{return!1}finally{n.remove(),t?.focus?.({preventScroll:!0})}}async function Ni(e){if(!e.trim())return"empty";if(await ji(e))return"copied";try{if(typeof window<"u"&&await window.ogb?.copyText?.(e)===!0)return"copied"}catch{}return Mi(e)?"copied":"failed"}function Ei({copy:e,onChange:t,resetMs:n=_i,setTimer:r=(i,s)=>setTimeout(i,s),clearTimer:o=i=>clearTimeout(i)}){let i=!1,s=!1,c;const l=()=>{c!==void 0&&o(c),c=void 0};return{async click(u){if(i)return"busy";i=!0;let d;try{d=await e(u)}catch{d="failed"}finally{i=!1}return s||d==="empty"||(l(),t(d==="copied"?"copied":"failed"),c=r(()=>{c=void 0,t("idle")},n)),d},dispose(){s=!0,l()}}}function $i(e){const[t,n]=m.useState("idle"),r=m.useRef(null);m.useEffect(()=>{const i=Ei({copy:Ni,onChange:n});return r.current=i,()=>{i.dispose(),r.current=null}},[]);const o=m.useCallback(()=>{r.current?.click(e)},[e]);return{state:t,copy:o}}const Ai={panel:"ring-offset-panel",card:"ring-offset-card",menu:"ring-offset-menu"};function Ee({value:e,onChange:t,label:n,disabled:r=!1,offset:o="panel",none:i=!1}){const s=e??F1[0],c=l=>i&&l==="slate";return a.jsx("div",{role:"radiogroup","aria-label":n,"aria-disabled":r||void 0,className:"flex flex-wrap gap-2.5",children:F1.map(l=>a.jsx("button",{type:"button",role:"radio","aria-checked":l===e,"aria-label":f(c(l)?"placeLook.none":jt[l]),title:f(c(l)?"placeLook.none":jt[l]),"data-swatch":l,disabled:r,onClick:()=>t(l),onKeyDown:u=>{const d=u.key==="ArrowRight"||u.key==="ArrowDown"?1:u.key==="ArrowLeft"||u.key==="ArrowUp"?-1:0;if(!d)return;u.preventDefault();const p=F1[(F1.indexOf(l)+d+F1.length)%F1.length];t(p),u.currentTarget.parentElement?.querySelector(`[data-swatch="${p}"]`)?.focus()},tabIndex:l===s?0:-1,className:L("grid size-8 place-items-center rounded-full border transition-[box-shadow] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-default",c(l)?"border-ink/55 text-ink/55":"border-ink/10",l===e&&L("ring-2 ring-ink/70 ring-offset-2",Ai[o]),r&&l!==e&&"opacity-50"),style:c(l)?void 0:{background:st(l)},children:c(l)&&a.jsx("span",{"aria-hidden":"true",className:"h-[1.5px] w-[60%] -rotate-45 rounded-full bg-current"})},l))})}function Mt(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function zn(e,t="|"){return e.map(n=>ar(n)).join(t)}function Nt(e,t){return typeof t=="bigint"?t.toString():t}class Oi{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function at(e){return new Oi(e)}function Zi(e){return e==null}function rn(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function zi(e,t){const n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function P1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function on(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function I1(e){return on(e._zod.def)??e._zod.def.shape}function rr(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return P1(this,t,r),r},enumerable:!0,configurable:!0})}function or(e,t,n){t in e?P1(e,t,n):e[t]=n}function J1(e,t,n,r){const o=I1(t);for(const i of n){const s=Object.getOwnPropertyDescriptor(o,i);s.enumerable&&(s.get?rr(e,i,()=>{const c=t._zod.def.shape[i];return r?r(c,i):c}):or(e,i,r?r(s.value,i):s.value))}}function Ii(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?rr(e,n,()=>t[n]):or(e,n,r.value))}}function p1(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Ti(e){return JSON.stringify(e)}function Pi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ir="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function we(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ri=at(()=>{if(v1.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function te(e){if(we(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(we(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function sr(e){return te(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Li=new Set(["string","number","symbol"]);function ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function W1(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function S(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function ar(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Di(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const cr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Fi={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Bi(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i={};return J1(i,e,ct(e,t)),W1(e,p1(n,{shape:i,checks:[]}))}function ct(e,t){const n=I1(e),r=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&r.push(o)}return r}function Ui(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=new Set(ct(e,t)),s={};return J1(s,e,Reflect.ownKeys(I1(e)).filter(c=>!i.has(c))),W1(e,p1(n,{shape:s,checks:[]}))}function Wi(e,t){if(!te(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=I1(e);for(const i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return W1(e,p1(e._zod.def,{shape:lr(e,t)}))}function lr(e,t){const n={};return J1(n,e,Reflect.ownKeys(I1(e))),Ii(n,t),n}function Ki(e,t){if(!te(t))throw new Error("Invalid input to safeExtend: expected a plain object");return W1(e,p1(e._zod.def,{shape:lr(e,t)}))}function Hi(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};J1(n,e,Reflect.ownKeys(I1(e))),J1(n,t,Reflect.ownKeys(I1(t)));const r=p1(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return W1(e,r)}function In(e,t,n,r="partial"){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const c=n?new Set(ct(t,n)):void 0,l={};return J1(l,t,Reflect.ownKeys(I1(t)),e&&((u,d)=>c&&!c.has(d)?u:new e({type:"optional",innerType:u}))),W1(t,p1(t._zod.def,{shape:l,checks:[]}))}function Gi(e,t,n){const r=n?new Set(ct(t,n)):void 0,o={};return J1(o,t,Reflect.ownKeys(I1(t)),(i,s)=>r&&!r.has(s)?i:new e({type:"nonoptional",innerType:i})),W1(t,p1(t._zod.def,{shape:o}))}function Z1(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Vi(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Q1(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function le(e){return typeof e=="string"?e:e?.message}function Tn(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&t.push([o,n])}return t}function Et(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function B1(e,t,n){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:le(e.inst?._zod.def?.error?.(e))??le(i?.(e))??le(t?.error?.(e))??le(n.customError?.(e))??le(n.localeError?.(e))??"Invalid input",c={};for(const l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(c[l]=e[l]);return c.path??(c.path=[]),c.message=s,t?.reportInput&&(c.input=e.input),c}const Ji=/[\uD800-\uDBFF]/;function sn(e){const t=e.length;if(!Ji.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function an(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function qi(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function _e(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function Yi(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Xi(e,n,r.value)}}function U1(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function ur(e,t,n){return U1(e,t,n,!1)}function dr(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return U1(this,n,r(this))},set(o){U1(this,n,o)}})}return t}function Xi(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:U1(this,t,n.bind(this))},set(r){U1(this,t,r)}})}function Qi(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let pt,L1=!1;const es={configurable:!0,get(){L1=!0}};function R(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&pt!==e._zod){pt=void 0;return}pt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,es);const o=L1;L1=!1;try{const i=n(this);return L1?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),L1=L1||o,i}catch(i){throw delete this[t],L1=L1||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function ts(e,t,n,r){const o=Qi(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}const ns="~constantCatch";function rs(e){const t=()=>e;return t[ns]=!0,t}var Pn;const ht={value:void 0,enumerable:!1};let Rn="captureStackTrace"in Error?Error:null;function os(e){const t=Rn;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return Rn=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function b(e,t,n,r){const o={};function i(h){this.def=h,this.constr=p,this.traits=new Set}i.prototype=o;const s=n,c=s&&new WeakSet;function l(h,C){if(h._zod){if(h._zod.traits.has(e))return}else{ht.value=new i(C);try{Object.defineProperty(h,"_zod",ht)}finally{ht.value=void 0}}if(h._zod.traits.add(e),t(h,C),c){const y=Object.getPrototypeOf(h),x=h._zod.constr.prototype;let k=y;for(;k&&k!==x;)k=Object.getPrototypeOf(k);const _=k??y;c.has(_)||(c.add(_),Yi(_,s))}const g=p.prototype;for(const y in g)Object.prototype.hasOwnProperty.call(g,y)&&(y in h||(h[y]=g[y].bind(h)))}const u=r?.Parent??Object;class d extends u{}Object.defineProperty(d,"name",{value:e});function p(h){const C=r?.Parent?os(d):this;l(C,h);const g=C._zod.deferred;if(g){for(const x of g)x();C._zod.deferred=void 0}const y=globalThis.__zod_globalConfig?.postProcessor;return y&&y(C),C}return Object.defineProperty(p,"init",{value:l}),Object.defineProperty(p,Symbol.hasInstance,{value:h=>r?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(p,"name",{value:e}),p}class V1 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class fr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Pn=globalThis).__zod_globalConfig??(Pn.__zod_globalConfig={});const v1=globalThis.__zod_globalConfig;function S1(e){return e&&Object.assign(v1,e),v1}function is(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Nt,2)),e.message}function ss(e){this._zod.message=e}const as={get:is,set:ss,enumerable:!0,configurable:!0},Ct={value:void 0,enumerable:!1},Ln=new WeakSet([Object.prototype,Error.prototype]),cs=(e,t)=>{e.name="$ZodError",Ct.value=t,Object.defineProperty(e,"issues",Ct),Ct.value=void 0,Object.defineProperty(e,"message",as);const n=Object.getPrototypeOf(e);Ln.has(n)||(Ln.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},ls=b("$ZodError",cs);function us(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function ds(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?us(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function fs(e,t=n=>n.message){const n={_errors:[]},r=(o,i=[])=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>r({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{const c=[...i,...s.path];if(c.length===0)n._errors.push(t(s));else{let l=n,u=0;for(;u<c.length;){const d=c[u],p=u===c.length-1;if(d==="_errors"){p&&l._errors.push(t(s)),u++;continue}Object.prototype.hasOwnProperty.call(l,d)||Object.defineProperty(l,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const h=l[d];p&&h._errors.push(t(s)),l=h,u++}}}};return r(e),n}function lt(e,t){return{callee:t?.callee??e,Err:t?.Err}}const cn=e=>{const t=(n,r,o,i)=>{const s=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new V1;if(c.issues.length){const l=new(i?.Err??e)(c.issues.map(u=>B1(u,s,S1())));throw ir(l,i?.callee??t),l}return c.value};return t},ln=e=>{const t=async(n,r,o,i)=>{const s=o?{...o,async:!0}:{async:!0};let c=n._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){const l=new(i?.Err??e)(c.issues.map(u=>B1(u,s,S1())));throw ir(l,i?.callee??t),l}return c.value};return t},un=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new V1;return i.issues.length?pr(e,i.issues,o):{success:!0,data:i.value}};function pr(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>B1(o,n,S1()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const dn=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?pr(e,i.issues,o):{success:!0,data:i.value}},ps=Symbol.for("zod.compile.invalid"),hs=Symbol.for("zod.compile.fallback"),Cs=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==ps)return!0;if(r.definite===!0&&n===void 0)return!1}return ms(e,t,n)});function ms(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let i;if(o?(r[hs]=!0,i=o({value:t,issues:[]},r)):i=e._zod.run({value:t,issues:[]},r),i instanceof Promise)throw new V1;return i.issues.length===0}const gs=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},bs=e=>{const t=cn(e),n=(r,o,i,s)=>{const c=i?{...i,direction:"backward"}:{direction:"backward"};return t(r,o,c,lt(n,s))};return n},ys=e=>{const t=cn(e),n=(r,o,i,s)=>t(r,o,i,lt(n,s));return n},xs=e=>{const t=ln(e),n=async(r,o,i,s)=>{const c=i?{...i,direction:"backward"}:{direction:"backward"};return await t(r,o,c,lt(n,s))};return n},vs=e=>{const t=ln(e),n=async(r,o,i,s)=>await t(r,o,i,lt(n,s));return n},ks=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return un(e)(t,n,o)},ws=e=>(t,n,r)=>un(e)(t,n,r),_s=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return dn(e)(t,n,o)},Ss=e=>async(t,n,r)=>dn(e)(t,n,r),js=/^[cC][0-9a-z]{6,}$/,Ms=/^[0-9a-z]+$/,Ns=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Es=/^[0-9a-vA-V]{20}$/,$s=/^[A-Za-z0-9]{27}$/,As=/^[a-zA-Z0-9_-]{21}$/;function Os(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const Zs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zs=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Dn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Is=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ts="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Ps(){return new RegExp(Ts,"u")}const Rs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ls=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ds=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Fs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Bs=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Us=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Ws=/^https?$/,Ks=/^\+[1-9]\d{6,14}$/,hr="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function Hs(e){return new RegExp(`^${e}$`)}const Gs=Hs(hr);function $t(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Vs(e){return new RegExp(`^${$t(e)}$`)}function Js(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${$t({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${$t({precision:e.precision})}`:n;return new RegExp(`^${hr}T(?:${r})$`)}const qs=/^[\s\S]{0,}$/,Ys=/^-?\d+$/,fn=/^-?\d+(?:\.\d+)?$/,Xs=/^(?:true|false)$/i,Qs=/^null$/i,ea=/^undefined$/i,ta=/^[^A-Z]*$/,na=/^[^a-z]*$/,d1=b("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),pn=e=>{const t=e.value;return!Zi(t)&&t.length!==void 0},Ve={number:"number",bigint:"bigint",object:"date"},Cr=b("$ZodCheckLessThan",(e,t)=>{d1.init(e,t);const n=Ve[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Ve[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mr=b("$ZodCheckGreaterThan",(e,t)=>{d1.init(e,t);const n=Ve[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Ve[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ra=b("$ZodCheckMultipleOf",(e,t)=>{d1.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):zi(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),oa=b("$ZodCheckNumberFormat",(e,t)=>{d1.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=cr[t.format];e._zod.check=s=>{const c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),ia=b("$ZodCheckMaxLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=pn),e._zod.check=r=>{const o=r.value,i=o.length;if((typeof o=="string"&&i>t.maximum?sn(o):i)<=t.maximum)return;const c=an(o);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),sa=b("$ZodCheckMinLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=pn),e._zod.check=r=>{const o=r.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?sn(o):i)>=t.minimum)return;const c=an(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),aa=b("$ZodCheckLengthEquals",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=pn),e._zod.check=r=>{const o=r.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?sn(o):i;if(s===t.length)return;const c=an(o),l=s>t.length;r.issues.push({origin:c,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ut=b("$ZodCheckStringFormat",(e,t)=>{var n,r;d1.init(e,t),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ca=b("$ZodCheckRegex",(e,t)=>{ut.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),la=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ta),ut.init(e,t)}),ua=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=na),ut.init(e,t)}),da=b("$ZodCheckIncludes",(e,t)=>{d1.init(e,t);const n=ne(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),fa=b("$ZodCheckStartsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`^${ne(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),pa=b("$ZodCheckEndsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`.*${ne(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),ha=b("$ZodCheckOverwrite",(e,t)=>{d1.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Ca{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
1
|
+
import{c as r1,t as f,j as a,A as Me,aw as ie,H as s1,R as ve,ax as se,M as We,a as L,f as D2,E as Jt,Q as qt,D as Ko,ay as Ho,ab as Go,r as m,X as F2,a2 as Vo,a4 as Jo,am as B2,V as U2,az as qo,e as Yo,at as En,aA as Xo,aB as Qo,aC as e5,aD as t5,aE as n5,a9 as r5,aF as o5,aG as i5,N as s5,K as a5,aH as rt,J as $n,F as c5,aI as l5,L as ot,g as W2,aJ as u5,aK as kt,aL as K2,aM as h1,aN as d5,ac as f5,S as p5,a0 as h5,aO as H2,aP as C5,b as m5,aQ as g5,aR as b5,aS as y5}from"./styles-BHtUK2qB.js";import{M as x5}from"./monitor-7oLB-7rZ.js";const v5=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],k5=r1("audio-lines",v5);const w5=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],_5=r1("building-2",w5);const S5=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],j5=r1("cloud-upload",S5);const M5=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],N5=r1("copy",M5);const E5=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],$5=r1("ellipsis",E5);const A5=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Yt=r1("external-link",A5);const O5=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Z5=r1("hard-drive",O5);const z5=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],I5=r1("house",z5);const T5=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],x1=r1("loader-circle",T5);const P5=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],G2=r1("lock",P5);const R5=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],L5=r1("log-out",R5);const D5=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],F5=r1("moon",D5);const B5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],V2=r1("plus",B5);const U5=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],W5=r1("power",U5);const K5=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],J2=r1("server",K5);const H5=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],G5=r1("smartphone",H5);const V5=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],J5=r1("timer",V5);const q5=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Xt=r1("user-round",q5),Y5="omb-analytics-opt-out",X5=()=>globalThis.window?.ogb?.desktopAnalytics;function Q5(){const e=X5();if(!(!e?.set||e.enabled()!==null)){try{if(localStorage.getItem(Y5)!=="1")return}catch{return}e.set(!1).catch(()=>{})}}function t6(){return Q5(),Promise.resolve()}function n6(e,t){}const q2="omb-email-gate";function r6(){return!!localStorage.getItem(q2)}function o6(e){localStorage.setItem(q2,e)}const A1=8,ei=new Set(["sso","two-factor","browser"]);function ti(e,t){switch(e){case"invalid-email":return f("cloudBuy.signIn.invalidEmail");case"rate-limited":return f("cloudBuy.signIn.rateLimited");case"wrong-code":return t===1?f("cloudBuy.signIn.wrongCodeOne"):f("cloudBuy.signIn.wrongCode",{count:t??0});case"expired":return f("cloudBuy.signIn.expired");case"signup-closed":return f("cloudBuy.signIn.signupClosed");case"device-limit":return f("cloudBuy.signIn.deviceLimit");case"sso":return f("cloudBuy.signIn.sso");case"two-factor":return f("cloudBuy.signIn.twoFactor");case"browser":return f("cloudBuy.signIn.browser");case"failed":return f("cloudBuy.signIn.failed")}}function de(e){return e.replace(/\D/g,"").slice(0,A1)}const ni=e=>{const t=Math.max(0,Math.ceil(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`};function ri({phase:e,email:t,code:n,profileEmail:r,busy:o,now:i,onBack:s,onEmail:c,onSend:l,onChangeEmail:u,onCode:d,onResend:p,onBrowser:h}){const C=e.step==="done"?null:e.problem,g=C!==null&&ei.has(C),y=e.intent?f("cloudBuy.signIn.title"):f("cloudBuy.signIn.titlePlain"),x=(w,v)=>w.parentElement?.querySelectorAll("input")[v]?.focus(),k=(w,v,A)=>{const Z=de(v);if(Z.length>1){d(de(n.slice(0,w)+Z)),x(A,Math.min(A1-1,w+Z.length));return}const O=(n.slice(0,w)+Z+n.slice(w+1)).slice(0,A1);d(de(O)),Z&&w<A1-1&&x(A,w+1)},_=w=>v=>{v.key==="Backspace"&&!n[w]&&w>0?(v.preventDefault(),d(n.slice(0,w-1)),x(v.currentTarget,w-1)):v.key==="ArrowLeft"&&w>0?(v.preventDefault(),x(v.currentTarget,w-1)):v.key==="ArrowRight"&&w<A1-1&&(v.preventDefault(),x(v.currentTarget,w+1))},M=w=>{const v=de(w.clipboardData.getData("text"));v&&(w.preventDefault(),d(v),x(w.currentTarget,Math.min(A1-1,v.length)))},N=w=>{w.preventDefault(),o||l()};return a.jsxs("div",{"data-cloud-add":`sign-in-${e.step}`,className:Me,children:[a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx(ie,{label:f("cloudBuy.back"),onClick:s}),a.jsx(s1,{title:y,sub:f("cloudBuy.signIn.sub")})]}),e.step==="email"&&a.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:N,noValidate:!0,children:[a.jsx("label",{htmlFor:"cloud-add-email",className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.email")}),a.jsx("input",{id:"cloud-add-email","data-autofocus":!0,type:"email",autoComplete:"email",inputMode:"email",spellCheck:!1,value:t,disabled:o,"aria-invalid":C==="invalid-email"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:w=>c(w.target.value),className:ve}),a.jsxs("button",{type:"submit",className:`${se} mt-2`,disabled:o||!t.trim(),children:[o&&a.jsx(x1,{size:16,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.send")]}),r&&t.trim().toLowerCase()===r.trim().toLowerCase()&&a.jsx("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:f("cloudBuy.signIn.fromProfile")})]}),e.step==="code"&&a.jsxs("div",{className:"flex flex-col gap-2.5",children:[a.jsxs("p",{id:"cloud-add-code-label",className:"text-[13px] leading-[18px] text-ink-secondary",children:[f("cloudBuy.signIn.codeLabel",{email:e.email})," · ",a.jsx("button",{type:"button",className:We,disabled:o,onClick:u,children:f("cloudBuy.signIn.change")})]}),a.jsx("div",{role:"group","aria-labelledby":"cloud-add-code-label",className:"grid grid-cols-8 gap-1.5",dir:"ltr",children:Array.from({length:A1},(w,v)=>a.jsx("input",{"data-autofocus":v===Math.min(n.length,A1-1)||void 0,value:n[v]??"",inputMode:"numeric",pattern:"[0-9]*",maxLength:A1,autoComplete:v===0?"one-time-code":"off","aria-label":f("cloudBuy.signIn.digit",{n:v+1}),disabled:o,"aria-invalid":C==="wrong-code"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:A=>k(v,A.target.value,A.currentTarget),onKeyDown:_(v),onPaste:M,onFocus:A=>A.currentTarget.select(),className:L(ve,"h-11 min-w-0 px-0 text-center text-[20px] font-medium tabular-nums")},v))}),e.signupOpen===!1&&a.jsx("p",{"data-cloud-signup-closed":!0,className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.signupClosedNote")}),a.jsx("div",{className:"flex min-h-6 items-center justify-between gap-3 text-[13px] text-ink-tertiary",children:o?a.jsxs("span",{role:"status",className:"inline-flex items-center gap-1.5",children:[a.jsx(x1,{size:13,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.checking")]}):e.resendAt>i?a.jsx("span",{children:f("cloudBuy.signIn.resendIn",{time:ni(e.resendAt-i)})}):a.jsx("button",{type:"button",className:We,onClick:p,children:f("cloudBuy.signIn.resend")})})]}),e.step==="done"&&a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[14px] leading-5 text-ink",children:[a.jsx("span",{"aria-hidden":"true",className:"grid size-5 shrink-0 place-items-center rounded-full bg-ink text-app",children:a.jsx(D2,{size:12,strokeWidth:2.4})}),e.intent?f("cloudBuy.signIn.done"):f("cloudBuy.signIn.donePlain")]}),C&&a.jsxs("div",{id:"cloud-add-problem",role:"alert",className:"flex flex-col items-start gap-3 rounded-[12px] bg-ink/[0.04] px-4 py-3 text-[13px] leading-[18px] text-ink",children:[a.jsx("p",{children:ti(C,e.step==="code"?e.triesLeft:null)}),g&&a.jsxs("button",{type:"button",className:Jt,onClick:h,children:[f("cloudBuy.signIn.continueBrowser"),a.jsx(Yt,{size:14,"aria-hidden":"true"})]}),C==="expired"&&e.step==="code"&&a.jsx("button",{type:"button",className:qt,disabled:o,onClick:p,children:f("cloudBuy.signIn.newCode")})]}),e.step!=="done"&&!g&&a.jsxs("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:[f("cloudBuy.signIn.ssoHint")," ",a.jsx("button",{type:"button",className:We,onClick:h,children:f("cloudBuy.signIn.continueBrowser")})]})]})}function i6({code:e,checkout:t,trial:n,busy:r,onReopen:o,onCancel:i}){return a.jsxs("div",{"data-cloud-add":"signing-in",className:Me,children:[a.jsx(s1,{title:f("cloudAdd.browserTitle")}),e?a.jsxs("ol",{className:"flex list-decimal flex-col gap-1.5 ps-5 text-[14px] leading-5 text-ink marker:text-ink-tertiary",children:[a.jsx("li",{children:f("cloudAdd.signInStep1")}),a.jsxs("li",{children:[f("cloudAccount.codeCheck"),a.jsx("code",{dir:"ltr",className:"mt-1.5 block w-fit select-all rounded-[8px] bg-ink/[0.05] px-3 py-1.5 font-mono text-[17px] font-medium tracking-[0.12em]",children:e})]}),a.jsx("li",{children:f(t?n?"cloudAdd.signInStep3Trial":"cloudAdd.signInStep3":"cloudAdd.signInStep3Connect")})]}):a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[13px] text-ink-secondary",children:[a.jsx(x1,{size:14,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudAdd.opening")]}),a.jsxs("div",{className:Ko,children:[a.jsx("button",{type:"button",className:qt,disabled:r,onClick:i,children:f("cloudAdd.cancel")}),a.jsxs("button",{type:"button",className:Jt,disabled:r||!e,onClick:o,children:[f("cloudAdd.reopenBrowser"),a.jsx(Yt,{size:14,"aria-hidden":"true"})]})]})]})}var Y2=Ho();const s6=Go(Y2);let oi=0;const fe=[],wt=m.createContext(null),ii=()=>()=>{};function X2({modal:e=!1,children:t}){const[n]=m.useState(()=>++oi);m.useLayoutEffect(()=>{if(e)return fe.push(n),fe.sort((s,c)=>s-c),()=>{fe.splice(fe.indexOf(n),1)}},[e,n]);const r=m.useContext(wt),o=m.useSyncExternalStore(ii,()=>!1,()=>!0),i=a.jsx(wt.Provider,{value:e?n:r,children:t});return o?i:Y2.createPortal(i,document.body)}function si(){const e=m.useContext(wt);return m.useCallback(()=>e===null||fe.at(-1)===e,[e])}const ai="a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]";function ci(e,t){const n=m.useRef(t);n.current=t,m.useEffect(()=>{const r=e.current;if(!r)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null;r.contains(document.activeElement)||r.focus();const i=()=>Array.from(r.querySelectorAll(ai)).filter(c=>c.getAttribute("tabindex")!=="-1"&&!c.closest("[hidden], [inert]")),s=c=>{if(c.defaultPrevented)return;if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),n.current();return}if(c.key!=="Tab")return;const l=i();if(!l.length)return c.preventDefault();const u=l[0],d=l[l.length-1];c.shiftKey&&(document.activeElement===u||!r.contains(document.activeElement)||document.activeElement===r)?(c.preventDefault(),d.focus()):!c.shiftKey&&document.activeElement===d&&(c.preventDefault(),u.focus())};return r.addEventListener("keydown",s),()=>{r.removeEventListener("keydown",s),o?.focus()}},[e])}function Qt(e){switch(e.outcome){case"moving":return f("accounts.moving");case"gone":return f("accounts.gone");case"failed":return f("accounts.failed");default:return null}}function a6(){const e=window.ogb?.remoteClient?.active?void 0:window.ogb?.accounts,t=window.ogb?.accountSheet,n=window.ogb?.app?.ownPage===!0&&!!e,r=B2(),[o,i]=m.useState(null),[s,c]=m.useState(!1),[l,u]=m.useState(null);return m.useEffect(()=>{if(!n)return;const d=()=>{e.list().then(i).catch(()=>{})};return d(),e.onChanged(d)},[n,e]),m.useEffect(()=>{if(n||!t)return;let d=!0;return t.offered().then(p=>{d&&c(p===!0)}).catch(()=>{}),()=>{d=!1}},[n,t]),{view:n?o:null,openSheet:!n&&s&&t?()=>{t.open().catch(()=>{})}:null,noRail:!r.beside&&!r.places.length,signOut:d=>{e?.signOut(d).then(p=>{i(p.view);const h=Qt(p);h&&u({email:null,note:h})}).catch(()=>u({email:null,note:f("accounts.failed")}))},add:d=>u({email:d??"",note:null}),sheet:l,closeSheet:()=>u(null)}}function c6(e){return f(e&&!e.active?"accounts.signIn":"settings.section.cloudAccount")}function l6({view:e,openSheet:t,noRail:n,signOut:r,add:o}){if(t)return[{key:"accounts-sheet",label:f("accounts.manage"),icon:a.jsx(Xt,{size:18}),onSelect:t}];const i=e?.active;return i?[{key:"accounts-active",heading:f("accounts.heading"),label:i.email,title:i.email,checked:!0,icon:a.jsx(D2,{size:18}),disabled:!i.signIn,...i.signIn?{subtitle:f("accounts.needsSignIn")}:{},onSelect:()=>{i.signIn&&o(i.email)}},...n?[{key:"accounts-add",label:f("accounts.add"),icon:a.jsx(V2,{size:18}),onSelect:()=>o()}]:[],{key:"accounts-sign-out",label:f("accounts.signOut"),icon:a.jsx(L5,{size:18}),onSelect:()=>r(i.id)}]:[]}const An={step:"email",intent:!1,problem:null};function li({start:e,onDone:t,onBack:n}){const r=window.ogb?.accounts,[o,i]=m.useState(An),[s,c]=m.useState(e),[l,u]=m.useState(""),[d,p]=m.useState(!1),[h,C]=m.useState(!1),[g,y]=m.useState(Date.now());m.useEffect(()=>{const _=setInterval(()=>y(Date.now()),1e3);return()=>clearInterval(_)},[]),m.useEffect(()=>()=>{r?.addCancel().catch(()=>{})},[r]);const x=()=>{d||!r||(p(!0),r.addStart(s).then(_=>{_.outcome==="sent"?(i({step:"code",intent:!1,email:_.email,resendAt:_.resendAt,problem:null,triesLeft:null,..._.signupOpen===!1?{signupOpen:!1}:{}}),u("")):i({step:"email",intent:!1,problem:_.outcome})},()=>i({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1)))},k=_=>{if(!r||o.step!=="code")return;const M=o;p(!0),r.addVerify(_).then(N=>{N.outcome==="switched"?t(null):N.outcome==="added"?t(f("accounts.added",{email:N.email??s})):N.outcome==="already"?t(f("accounts.already",{email:N.email??s})):(u(""),i({...M,problem:N.outcome,triesLeft:N.outcome==="wrong-code"?N.triesLeft:null}))},()=>i({...M,problem:"failed",triesLeft:null})).finally(()=>p(!1))};return m.useEffect(()=>{if(!h||!r)return;const _=()=>{r.addResult().then(M=>{M&&(M.outcome==="switched"?t(null):M.outcome==="added"?t(f("accounts.added",{email:M.email??s})):M.outcome==="already"?t(f("accounts.already",{email:M.email??s})):(C(!1),i({step:"email",intent:!1,problem:"failed"})))}).catch(()=>{})};return _(),r.onChanged(_)},[h,r,t,s]),h?a.jsxs("div",{"data-accounts-browser":!0,className:Me,children:[a.jsx(s1,{title:f("accounts.browserTitle"),sub:f("accounts.browserBody")}),a.jsx("button",{type:"button",className:qt,onClick:()=>{r?.addReopen().catch(()=>{})},children:f("accounts.browserOpen")})]}):a.jsx(ri,{phase:o,email:s,code:l,profileEmail:null,busy:d,now:g,onBack:n,onEmail:c,onSend:x,onChangeEmail:()=>{i(An),r?.addCancel().catch(()=>{})},onCode:_=>{const M=de(_);u(M),M.length===8&&!d&&k(M)},onResend:x,onBrowser:()=>{p(!0),r?.addBrowser().then(_=>{_.outcome==="browser"?C(!0):i({step:"email",intent:!1,problem:"failed"})},()=>i({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1))}})}function ui({onClose:e,adding:t=null,note:n=null}){const r=window.ogb?.accounts,[o,i]=m.useState(null),[s,c]=m.useState(n),[l,u]=m.useState(t);m.useEffect(()=>{if(!r)return;const C=()=>{r.list().then(i).catch(()=>c(f("accounts.failed")))};return C(),r.onChanged(C)},[r]);const d=C=>{c(null),r?.signOut(C).then(g=>{i(g.view);const y=Qt(g);y?c(y):e()},()=>c(f("accounts.failed")))},p=o?.active??null,h=m.useRef(null);return ci(h,e),a.jsx(X2,{modal:!0,children:a.jsx("div",{className:"ui-scrim fixed inset-0 z-[60] flex items-center justify-center p-4",onMouseDown:C=>C.target===C.currentTarget&&e(),children:a.jsxs("div",{ref:h,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":"cloud-add-title","data-accounts-sheet":!0,className:L(Jo,"relative w-full max-w-[420px] outline-none"),children:[a.jsx("button",{type:"button",onClick:e,"aria-label":f("accounts.close"),className:L(Vo,"absolute end-4 top-4 z-10"),children:a.jsx(F2,{size:16})}),l!==null?a.jsx(li,{start:l,onBack:()=>t!==null?e():u(null),onDone:C=>{u(null),C?c(C):e()}}):a.jsxs("div",{className:Me,children:[a.jsx(s1,{title:f("accounts.title")}),p&&!n&&a.jsxs("p",{"data-accounts-active":!0,className:"truncate text-[14px] text-ink",title:p.email,children:[f("accounts.heading")," ",p.email]}),s&&a.jsx("p",{role:"status","data-accounts-note":!0,className:"text-[13px] leading-5 text-ink-secondary",children:s}),p&&!n&&a.jsx("button",{type:"button","data-accounts-sign-out":!0,className:Jt,onClick:()=>d(p.id),children:f("accounts.signOut")})]})]})})})}function u6(){const e=window.ogb?.accounts,[t,n]=m.useState(!1);return m.useEffect(()=>{if(e)return e.sheetPending().then(r=>{r&&n(!0)}).catch(()=>{}),e.onOpenSheet(()=>n(!0))},[e]),m.useEffect(()=>{t&&window.ogb?.rail?.expand?.(!0)?.catch(()=>{})},[t]),{open:t,close:()=>{n(!1),window.ogb?.rail?.expand?.(!1)?.catch(()=>{}),e?.sheetClosed().catch(()=>{})}}}const me={host:{platform:"other",label:"Browser",session:"unknown",packaged:!1},windowChrome:"native",screenPreview:{available:!1,interaction:"none",reasonCode:"desktop-app-required"},dictation:{available:!1,engine:"none",onDevice:!1,reasonCode:"desktop-app-required"},localComputer:{available:!1,support:"unsupported",enabled:!1,status:"unavailable",reasonCode:"desktop-app-required"}};let D1=null,_t=0;function en(){const e=typeof window>"u"?void 0:window.ogb?.platform;if(!e)return me;const t=e==="darwin",n=e==="win32"||e==="linux",r={available:t||n,engine:t?"apple-speech":n?"fish-audio":"none",onDevice:t};return r.available||(r.reasonCode="unsupported-platform"),{...me,host:{...me.host,platform:e==="darwin"||e==="linux"||e==="win32"?e:"other",label:e==="darwin"?"macOS":e==="linux"?"Linux":e==="win32"?"Windows":"Desktop"},windowChrome:t?"mac-inset":e==="win32"?"win-caption":"native",dictation:r}}async function di(){if(D1)return D1;if(!window.ogb?.getCapabilities)return me;const e=_t;let t;try{t=await window.ogb.getCapabilities()}catch{t=me}return _t!==e&&D1||(D1=t),D1}function d6(){return D1??en()}function fi(e){return _t+=1,D1=e,e}function f6(){return typeof window>"u"||window.ogb?.remoteClient?.active?void 0:window.ogb?.approvals}const Q2=m.createContext({capabilities:en(),ready:typeof window>"u"||!window.ogb});function p6({children:e}){const[t,n]=m.useState(()=>({capabilities:en(),ready:typeof window>"u"||!window.ogb}));return m.useEffect(()=>{let r=!0,o=0;const i=window.ogb?.onCapabilitiesChanged?.(c=>{o+=1,r&&n({capabilities:fi(c),ready:!0})}),s=o;return di().then(c=>{r&&o===s&&n({capabilities:c,ready:!0})}),()=>{r=!1,i?.()}},[]),a.jsx(Q2.Provider,{value:t,children:e})}function er(){return m.useContext(Q2)}function pi(){const{capabilities:e}=er();return gi(e.windowChrome)}const On={WebkitAppRegion:"drag"},hi={WebkitAppRegion:"no-drag"};function Ci(e){return e?.windowChrome==="mac-inset"||e?.windowChrome==="win-caption"}function mi(e){return Ci(e)&&e?.windowFrame!==!1}function gi(e){const t=e==="win-caption",n=t||e==="mac-inset";return{windowsCaption:t,draggable:n,dragProps:n?{"data-window-drag":"",style:On}:{},dragStyle:n?On:void 0,noDragStyle:n?hi:void 0}}function h6(){const{dragProps:e}=pi();return e.style?a.jsx("div",{"aria-hidden":!0,"data-window-drag-strip":!0,...e,className:"pointer-events-none absolute inset-x-0 top-0 h-[52px]"}):null}function bi(e,t,n=Date.now()){const r=Math.max(0,Math.round((n-e)/1e3)),o=new Intl.RelativeTimeFormat(t,{numeric:"auto"});if(r<45)return o.format(0,"second");const i=Math.round(r/60);if(i<60)return o.format(-i,"minute");const s=Math.round(i/60);if(s<24)return o.format(-s,"hour");const c=Math.round(s/24);return c<7?o.format(-c,"day"):new Date(e).toLocaleDateString(t,{month:"short",day:"numeric"})}let ke=null,Zn=!1;const St=new Set,it=()=>typeof window>"u"?void 0:window.ogb?.rail;function ee(e){ke=e;for(const t of St)t(ke)}function yi(){const e=it();Zn||!e?.state||(Zn=!0,e.onState?.(ee),e.state().then(ee,()=>ee(null)))}function C6(){const[e,t]=m.useState(ke);return m.useEffect(()=>(St.add(t),yi(),t(ke),()=>{St.delete(t)}),[]),e}function xi(){const[e,t]=m.useState(!0);return m.useEffect(()=>it()?.onFramed?.(t),[]),e}function m6(e=!0){it()?.drawsFrame?.(e)?.catch(()=>{})}function g6(e){const t=it(),n=ke;!t?.setHidden||!n||(ee({...n,hidden:e}),t.setHidden(e).then(ee,()=>ee(n)))}const tn="popover-surface flex flex-col gap-1 rounded-[var(--radius-menu)] border border-hairline/50 bg-menu p-1.5 shadow-lg [&_svg.lucide]:stroke-[1.5]",b6="flex min-h-[30px] w-full shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-2 py-1.5 text-left text-[14px] leading-[18px] focus-visible:bg-menu-hover",y6="mx-1.5 h-px shrink-0 bg-hairline/50",x6="px-2 pb-1 pt-2 text-[12px] font-medium leading-4 text-ink-secondary",Ne="group flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:h-10",v6="group flex min-h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 py-1 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:min-h-10",k6="min-w-0 max-w-full truncate text-[12px] leading-4 text-ink-tertiary",w6="flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 px-2 text-[13px] leading-[18px] touch:h-10",_6="flex size-4 shrink-0 items-center justify-center",S6="min-w-0 max-w-[45%] shrink truncate text-[12px] leading-4 text-ink-tertiary",j6="flex h-6 shrink-0 items-end gap-2 px-2 pb-0.5 text-[12px] font-medium leading-4 text-ink-tertiary",M6="mx-2 my-[5px] h-[0.5px] shrink-0 bg-ink/10",N6="px-2 py-1 text-[12px] leading-4 text-ink-tertiary",E6="shrink-0 text-ink-secondary",$6="shrink-0 text-ink-tertiary rtl:-scale-x-100",A6=1.75,vi=Object.freeze({empty:"native.connect.empty",codeOnly:"native.connect.codeOnly",emailCode:"native.connect.emailCode",oldCode:"native.connect.oldCode",scriptKey:"native.connect.scriptKey",notACode:"native.connect.notACode",publicHttp:"native.connect.publicHttp",phoneLink:"native.connect.phoneLink",notAnAddress:"native.connect.notAnAddress",unreachable:"native.connect.unreachable",dns:"native.connect.dns",certificate:"native.connect.certificate",notMausBot:"native.connect.notMausBot",desktopApp:"native.connect.desktopApp",desktopAppTailnet:"native.connect.desktopAppTailnet",loopback:"native.connect.loopback",localNetwork:"native.connect.localNetwork",tailscaleOff:"native.connect.tailscaleOff",otherTailnet:"native.connect.otherTailnet",tailnetBlocked:"native.connect.tailnetBlocked",tailnetSilent:"native.connect.tailnetSilent"}),nn=40,tr={blue:"blue",green:"teal",amber:"yellow",rose:"red",violet:"purple",slate:null};function st(e){const t=tr[e];return t?U2(t):"var(--color-raised)"}const jt={blue:"cloudBuy.color.blue",green:"cloudBuy.color.teal",amber:"cloudBuy.color.yellow",rose:"cloudBuy.color.red",violet:"cloudBuy.color.purple",slate:"cloudBuy.color.slate"},F1=Object.keys(jt),nr="blue";function ki(e,{now:t,tier:n=null,failed:r=!1,stop:o=null}){if(e===void 0)return{kind:"checking"};if(e===null)return{kind:"unreachable"};if(!e.signedIn||!e.hasCloud)return{kind:"first"};const i=e.adding&&!e.adding.done?e.adding:null;if(i)return i.status==="ready"?{kind:"ready",adding:i}:i.status==="setting_up"?{kind:"starting",adding:i}:i.status==="problem"?{kind:"problem",adding:i}:{kind:"waiting",adding:i,late:t-i.startedAt>=qo};const s=e.home?.name??null;if(!e.supported)return{kind:"stop",reason:"one",home:s};const c=o??(e.canAdd?null:e.blocked==="cap"||!e.blocked?"one":e.blocked);if(c)return{kind:"stop",reason:c,home:s};if(r)return{kind:"error"};if(!e.offer?.plans.length)return{kind:"unreachable"};const l=n?e.offer.plans.find(u=>u.tier===n):void 0;return l?{kind:"name",plan:l}:{kind:"choose",offer:e.offer}}function wi(e){return e==="signups_closed"||e==="checkout_open"||e==="rate"?e:"one"}const _i=1200,Si=3e3;function ji(e){return new Promise(t=>{let n=!1;const r=i=>{n||(n=!0,clearTimeout(o),t(i))},o=setTimeout(()=>r(!1),Si);try{if(!navigator.clipboard?.writeText)return r(!1);Promise.resolve(navigator.clipboard.writeText(e)).then(()=>r(!0),()=>r(!1))}catch{r(!1)}})}function Mi(e){if(typeof document>"u"||!document.body||typeof document.execCommand!="function")return!1;const t=document.activeElement,n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.position="fixed",n.style.left="-9999px";try{return document.body.appendChild(n),n.select(),n.setSelectionRange(0,e.length),document.execCommand("copy")}catch{return!1}finally{n.remove(),t?.focus?.({preventScroll:!0})}}async function Ni(e){if(!e.trim())return"empty";if(await ji(e))return"copied";try{if(typeof window<"u"&&await window.ogb?.copyText?.(e)===!0)return"copied"}catch{}return Mi(e)?"copied":"failed"}function Ei({copy:e,onChange:t,resetMs:n=_i,setTimer:r=(i,s)=>setTimeout(i,s),clearTimer:o=i=>clearTimeout(i)}){let i=!1,s=!1,c;const l=()=>{c!==void 0&&o(c),c=void 0};return{async click(u){if(i)return"busy";i=!0;let d;try{d=await e(u)}catch{d="failed"}finally{i=!1}return s||d==="empty"||(l(),t(d==="copied"?"copied":"failed"),c=r(()=>{c=void 0,t("idle")},n)),d},dispose(){s=!0,l()}}}function $i(e){const[t,n]=m.useState("idle"),r=m.useRef(null);m.useEffect(()=>{const i=Ei({copy:Ni,onChange:n});return r.current=i,()=>{i.dispose(),r.current=null}},[]);const o=m.useCallback(()=>{r.current?.click(e)},[e]);return{state:t,copy:o}}const Ai={panel:"ring-offset-panel",card:"ring-offset-card",menu:"ring-offset-menu"};function Ee({value:e,onChange:t,label:n,disabled:r=!1,offset:o="panel",none:i=!1}){const s=e??F1[0],c=l=>i&&l==="slate";return a.jsx("div",{role:"radiogroup","aria-label":n,"aria-disabled":r||void 0,className:"flex flex-wrap gap-2.5",children:F1.map(l=>a.jsx("button",{type:"button",role:"radio","aria-checked":l===e,"aria-label":f(c(l)?"placeLook.none":jt[l]),title:f(c(l)?"placeLook.none":jt[l]),"data-swatch":l,disabled:r,onClick:()=>t(l),onKeyDown:u=>{const d=u.key==="ArrowRight"||u.key==="ArrowDown"?1:u.key==="ArrowLeft"||u.key==="ArrowUp"?-1:0;if(!d)return;u.preventDefault();const p=F1[(F1.indexOf(l)+d+F1.length)%F1.length];t(p),u.currentTarget.parentElement?.querySelector(`[data-swatch="${p}"]`)?.focus()},tabIndex:l===s?0:-1,className:L("grid size-8 place-items-center rounded-full border transition-[box-shadow] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-default",c(l)?"border-ink/55 text-ink/55":"border-ink/10",l===e&&L("ring-2 ring-ink/70 ring-offset-2",Ai[o]),r&&l!==e&&"opacity-50"),style:c(l)?void 0:{background:st(l)},children:c(l)&&a.jsx("span",{"aria-hidden":"true",className:"h-[1.5px] w-[60%] -rotate-45 rounded-full bg-current"})},l))})}function Mt(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function zn(e,t="|"){return e.map(n=>ar(n)).join(t)}function Nt(e,t){return typeof t=="bigint"?t.toString():t}class Oi{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function at(e){return new Oi(e)}function Zi(e){return e==null}function rn(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function zi(e,t){const n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function P1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function on(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function I1(e){return on(e._zod.def)??e._zod.def.shape}function rr(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return P1(this,t,r),r},enumerable:!0,configurable:!0})}function or(e,t,n){t in e?P1(e,t,n):e[t]=n}function J1(e,t,n,r){const o=I1(t);for(const i of n){const s=Object.getOwnPropertyDescriptor(o,i);s.enumerable&&(s.get?rr(e,i,()=>{const c=t._zod.def.shape[i];return r?r(c,i):c}):or(e,i,r?r(s.value,i):s.value))}}function Ii(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?rr(e,n,()=>t[n]):or(e,n,r.value))}}function p1(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Ti(e){return JSON.stringify(e)}function Pi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ir="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function we(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ri=at(()=>{if(v1.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function te(e){if(we(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(we(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function sr(e){return te(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Li=new Set(["string","number","symbol"]);function ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function W1(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function S(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function ar(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Di(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const cr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Fi={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Bi(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i={};return J1(i,e,ct(e,t)),W1(e,p1(n,{shape:i,checks:[]}))}function ct(e,t){const n=I1(e),r=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&r.push(o)}return r}function Ui(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=new Set(ct(e,t)),s={};return J1(s,e,Reflect.ownKeys(I1(e)).filter(c=>!i.has(c))),W1(e,p1(n,{shape:s,checks:[]}))}function Wi(e,t){if(!te(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=I1(e);for(const i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return W1(e,p1(e._zod.def,{shape:lr(e,t)}))}function lr(e,t){const n={};return J1(n,e,Reflect.ownKeys(I1(e))),Ii(n,t),n}function Ki(e,t){if(!te(t))throw new Error("Invalid input to safeExtend: expected a plain object");return W1(e,p1(e._zod.def,{shape:lr(e,t)}))}function Hi(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};J1(n,e,Reflect.ownKeys(I1(e))),J1(n,t,Reflect.ownKeys(I1(t)));const r=p1(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return W1(e,r)}function In(e,t,n,r="partial"){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const c=n?new Set(ct(t,n)):void 0,l={};return J1(l,t,Reflect.ownKeys(I1(t)),e&&((u,d)=>c&&!c.has(d)?u:new e({type:"optional",innerType:u}))),W1(t,p1(t._zod.def,{shape:l,checks:[]}))}function Gi(e,t,n){const r=n?new Set(ct(t,n)):void 0,o={};return J1(o,t,Reflect.ownKeys(I1(t)),(i,s)=>r&&!r.has(s)?i:new e({type:"nonoptional",innerType:i})),W1(t,p1(t._zod.def,{shape:o}))}function Z1(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Vi(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Q1(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function le(e){return typeof e=="string"?e:e?.message}function Tn(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&t.push([o,n])}return t}function Et(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function B1(e,t,n){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:le(e.inst?._zod.def?.error?.(e))??le(i?.(e))??le(t?.error?.(e))??le(n.customError?.(e))??le(n.localeError?.(e))??"Invalid input",c={};for(const l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(c[l]=e[l]);return c.path??(c.path=[]),c.message=s,t?.reportInput&&(c.input=e.input),c}const Ji=/[\uD800-\uDBFF]/;function sn(e){const t=e.length;if(!Ji.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function an(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function qi(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function _e(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function Yi(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Xi(e,n,r.value)}}function U1(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function ur(e,t,n){return U1(e,t,n,!1)}function dr(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return U1(this,n,r(this))},set(o){U1(this,n,o)}})}return t}function Xi(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:U1(this,t,n.bind(this))},set(r){U1(this,t,r)}})}function Qi(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let pt,L1=!1;const es={configurable:!0,get(){L1=!0}};function R(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&pt!==e._zod){pt=void 0;return}pt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,es);const o=L1;L1=!1;try{const i=n(this);return L1?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),L1=L1||o,i}catch(i){throw delete this[t],L1=L1||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function ts(e,t,n,r){const o=Qi(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}const ns="~constantCatch";function rs(e){const t=()=>e;return t[ns]=!0,t}var Pn;const ht={value:void 0,enumerable:!1};let Rn="captureStackTrace"in Error?Error:null;function os(e){const t=Rn;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return Rn=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function b(e,t,n,r){const o={};function i(h){this.def=h,this.constr=p,this.traits=new Set}i.prototype=o;const s=n,c=s&&new WeakSet;function l(h,C){if(h._zod){if(h._zod.traits.has(e))return}else{ht.value=new i(C);try{Object.defineProperty(h,"_zod",ht)}finally{ht.value=void 0}}if(h._zod.traits.add(e),t(h,C),c){const y=Object.getPrototypeOf(h),x=h._zod.constr.prototype;let k=y;for(;k&&k!==x;)k=Object.getPrototypeOf(k);const _=k??y;c.has(_)||(c.add(_),Yi(_,s))}const g=p.prototype;for(const y in g)Object.prototype.hasOwnProperty.call(g,y)&&(y in h||(h[y]=g[y].bind(h)))}const u=r?.Parent??Object;class d extends u{}Object.defineProperty(d,"name",{value:e});function p(h){const C=r?.Parent?os(d):this;l(C,h);const g=C._zod.deferred;if(g){for(const x of g)x();C._zod.deferred=void 0}const y=globalThis.__zod_globalConfig?.postProcessor;return y&&y(C),C}return Object.defineProperty(p,"init",{value:l}),Object.defineProperty(p,Symbol.hasInstance,{value:h=>r?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(p,"name",{value:e}),p}class V1 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class fr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Pn=globalThis).__zod_globalConfig??(Pn.__zod_globalConfig={});const v1=globalThis.__zod_globalConfig;function S1(e){return e&&Object.assign(v1,e),v1}function is(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Nt,2)),e.message}function ss(e){this._zod.message=e}const as={get:is,set:ss,enumerable:!0,configurable:!0},Ct={value:void 0,enumerable:!1},Ln=new WeakSet([Object.prototype,Error.prototype]),cs=(e,t)=>{e.name="$ZodError",Ct.value=t,Object.defineProperty(e,"issues",Ct),Ct.value=void 0,Object.defineProperty(e,"message",as);const n=Object.getPrototypeOf(e);Ln.has(n)||(Ln.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},ls=b("$ZodError",cs);function us(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function ds(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?us(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function fs(e,t=n=>n.message){const n={_errors:[]},r=(o,i=[])=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>r({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{const c=[...i,...s.path];if(c.length===0)n._errors.push(t(s));else{let l=n,u=0;for(;u<c.length;){const d=c[u],p=u===c.length-1;if(d==="_errors"){p&&l._errors.push(t(s)),u++;continue}Object.prototype.hasOwnProperty.call(l,d)||Object.defineProperty(l,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const h=l[d];p&&h._errors.push(t(s)),l=h,u++}}}};return r(e),n}function lt(e,t){return{callee:t?.callee??e,Err:t?.Err}}const cn=e=>{const t=(n,r,o,i)=>{const s=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new V1;if(c.issues.length){const l=new(i?.Err??e)(c.issues.map(u=>B1(u,s,S1())));throw ir(l,i?.callee??t),l}return c.value};return t},ln=e=>{const t=async(n,r,o,i)=>{const s=o?{...o,async:!0}:{async:!0};let c=n._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){const l=new(i?.Err??e)(c.issues.map(u=>B1(u,s,S1())));throw ir(l,i?.callee??t),l}return c.value};return t},un=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new V1;return i.issues.length?pr(e,i.issues,o):{success:!0,data:i.value}};function pr(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>B1(o,n,S1()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const dn=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?pr(e,i.issues,o):{success:!0,data:i.value}},ps=Symbol.for("zod.compile.invalid"),hs=Symbol.for("zod.compile.fallback"),Cs=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==ps)return!0;if(r.definite===!0&&n===void 0)return!1}return ms(e,t,n)});function ms(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let i;if(o?(r[hs]=!0,i=o({value:t,issues:[]},r)):i=e._zod.run({value:t,issues:[]},r),i instanceof Promise)throw new V1;return i.issues.length===0}const gs=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},bs=e=>{const t=cn(e),n=(r,o,i,s)=>{const c=i?{...i,direction:"backward"}:{direction:"backward"};return t(r,o,c,lt(n,s))};return n},ys=e=>{const t=cn(e),n=(r,o,i,s)=>t(r,o,i,lt(n,s));return n},xs=e=>{const t=ln(e),n=async(r,o,i,s)=>{const c=i?{...i,direction:"backward"}:{direction:"backward"};return await t(r,o,c,lt(n,s))};return n},vs=e=>{const t=ln(e),n=async(r,o,i,s)=>await t(r,o,i,lt(n,s));return n},ks=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return un(e)(t,n,o)},ws=e=>(t,n,r)=>un(e)(t,n,r),_s=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return dn(e)(t,n,o)},Ss=e=>async(t,n,r)=>dn(e)(t,n,r),js=/^[cC][0-9a-z]{6,}$/,Ms=/^[0-9a-z]+$/,Ns=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Es=/^[0-9a-vA-V]{20}$/,$s=/^[A-Za-z0-9]{27}$/,As=/^[a-zA-Z0-9_-]{21}$/;function Os(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const Zs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zs=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Dn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Is=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ts="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Ps(){return new RegExp(Ts,"u")}const Rs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ls=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ds=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Fs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Bs=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Us=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Ws=/^https?$/,Ks=/^\+[1-9]\d{6,14}$/,hr="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function Hs(e){return new RegExp(`^${e}$`)}const Gs=Hs(hr);function $t(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Vs(e){return new RegExp(`^${$t(e)}$`)}function Js(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${$t({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${$t({precision:e.precision})}`:n;return new RegExp(`^${hr}T(?:${r})$`)}const qs=/^[\s\S]{0,}$/,Ys=/^-?\d+$/,fn=/^-?\d+(?:\.\d+)?$/,Xs=/^(?:true|false)$/i,Qs=/^null$/i,ea=/^undefined$/i,ta=/^[^A-Z]*$/,na=/^[^a-z]*$/,d1=b("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),pn=e=>{const t=e.value;return!Zi(t)&&t.length!==void 0},Ve={number:"number",bigint:"bigint",object:"date"},Cr=b("$ZodCheckLessThan",(e,t)=>{d1.init(e,t);const n=Ve[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Ve[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mr=b("$ZodCheckGreaterThan",(e,t)=>{d1.init(e,t);const n=Ve[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Ve[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ra=b("$ZodCheckMultipleOf",(e,t)=>{d1.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):zi(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),oa=b("$ZodCheckNumberFormat",(e,t)=>{d1.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=cr[t.format];e._zod.check=s=>{const c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),ia=b("$ZodCheckMaxLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=pn),e._zod.check=r=>{const o=r.value,i=o.length;if((typeof o=="string"&&i>t.maximum?sn(o):i)<=t.maximum)return;const c=an(o);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),sa=b("$ZodCheckMinLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=pn),e._zod.check=r=>{const o=r.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?sn(o):i)>=t.minimum)return;const c=an(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),aa=b("$ZodCheckLengthEquals",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=pn),e._zod.check=r=>{const o=r.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?sn(o):i;if(s===t.length)return;const c=an(o),l=s>t.length;r.issues.push({origin:c,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ut=b("$ZodCheckStringFormat",(e,t)=>{var n,r;d1.init(e,t),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ca=b("$ZodCheckRegex",(e,t)=>{ut.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),la=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ta),ut.init(e,t)}),ua=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=na),ut.init(e,t)}),da=b("$ZodCheckIncludes",(e,t)=>{d1.init(e,t);const n=ne(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),fa=b("$ZodCheckStartsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`^${ne(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),pa=b("$ZodCheckEndsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`.*${ne(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),ha=b("$ZodCheckOverwrite",(e,t)=>{d1.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Ca{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
2
2
|
`).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
3
3
|
${n.join(`
|
|
4
4
|
`)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as dn,t as n,r as d,j as e,X as es,a9 as ts,a as G,f as Ye,b as Bt,au as ws,S as Ns,i as _t}from"./styles-
|
|
1
|
+
import{c as dn,t as n,r as d,j as e,X as es,a9 as ts,a as G,f as Ye,b as Bt,au as ws,S as Ns,i as _t}from"./styles-BHtUK2qB.js";import{S as un,n as w,u as et,ev as As,ew as Cs,ex as Ss,ey as ht,D as Rs,ez as Es,eA as zs,l as Is,G as Sn,eB as Ts,eC as Os,cM as Bs,T as Ps,ai as Xt,bs as Ms,J as en,eD as Rt,eE as ns,eF as Et,eG as ss,ao as as,eH as zt,eI as Ls,eJ as is,eK as It,eL as os,eM as Us,eN as Rn,eO as $s,a0 as cs,eP as Nt,eQ as Fs,eR as Ks,eS as Ds,eT as Qs,eU as Hs,eV as ct,eW as En,eX as Js,eY as zn,e8 as In,eZ as _s,e_ as Vs,e$ as Gs,f0 as Vt,f1 as qs,f2 as Zs,f3 as Ws,f4 as Ys,f5 as Xs,f6 as ea,f7 as ta,f8 as na,f9 as sa,fa as aa,fb as ia}from"./App-CqZbuxyG.js";import{L as ae,P as rs,Y as oa,a as ca,z as pn,E as ra,a0 as la,B as da}from"./PlacesRail-CUntVv3u.js";import{u as Gt}from"./mcp-servers-DQCPuucN.js";import{C as ls,R as tn}from"./MenuMotion-CobYpP7L.js";import{u as ua}from"./ProIntroduction-COls1M9l.js";import"./index-CIXZzqGE.js";import"./monitor-7oLB-7rZ.js";const pa=[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],ma=dn("phone-call",pa);const ha=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],xa=dn("radio-tower",ha);const fa=[["path",{d:"m10.852 14.772-.383.923",key:"11vil6"}],["path",{d:"M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1v3clb"}],["path",{d:"m13.148 9.228.383-.923",key:"t2zzyc"}],["path",{d:"m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1bxfiv"}],["path",{d:"m14.772 10.852.923-.383",key:"k9m8cz"}],["path",{d:"m14.772 13.148.923.383",key:"1xvhww"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"m9.228 10.852-.923-.383",key:"1wtb30"}],["path",{d:"m9.228 13.148-.923.383",key:"1a830x"}]],qt=dn("server-cog",fa),ga=new Set(["twitter","x"]);function Tn(t,s){return t!=="managed"||!ga.has(s.trim().toLowerCase())?null:"Twitter/X needs your own X Developer app and Composio auth config. Use self-hosted connected apps for now."}const ba=5,ya=3,Tt=4;function ka(t,s=ba,c=[]){const o=new Map;for(const g of t)for(const k of new Set(g.categories??[]))o.set(k,(o.get(k)??0)+1);const r=[...o].sort((g,k)=>k[1]-g[1]||g[0].localeCompare(k[0])).map(([g])=>g),l=c.filter(g=>r.indexOf(g)>=s),y=[...r.slice(0,Math.max(0,s-l.length)),...l];return{inline:y,more:r.filter(g=>!y.includes(g))}}function nn(t,s){return s===null||(t.categories??[]).includes(s)}function ja(t,s,c){const o=[],r=t.filter(l=>s(l.slug));r.length&&o.push({kind:"connected",cards:r});for(const l of c.slice(0,ya)){const y=t.filter(g=>!s(g.slug)&&nn(g,l));y.length&&o.push({kind:"category",category:l,cards:y.slice(0,Tt),more:y.length>Tt})}return o.push({kind:"all",cards:t.filter(l=>!s(l.slug))}),o}const va={productivity:"productivity","developer tools":"developerTools",communication:"communication",files:"files","sales and crm":"salesCrm",design:"design",marketing:"marketing",analytics:"analytics",social:"social"},wa={"google calendar":"googleCalendar","google sheets":"googleSheets","google docs":"googleDocs",notion:"notion",github:"github",linear:"linear",sentry:"sentry",jira:"jira",slack:"slack",gmail:"gmail",discord:"discord","google drive":"googleDrive",posthog:"posthog","x (twitter)":"xTwitter",reddit:"reddit",zapier:"zapier",hubspot:"hubspot",salesforce:"salesforce",asana:"asana",trello:"trello",dropbox:"dropbox",airtable:"airtable",figma:"figma",stripe:"stripe"};function rt(t){const s=va[t.trim().toLowerCase()];return s?n(`apps.category.${s}`):t}function On(t){const s=wa[t.label.trim().toLowerCase()];return s?n(`apps.catalog.${s}.blurb`):t.blurb}function Na({server:t,disabled:s,onSaved:c}){const[o,r]=d.useState(!1),[l,y]=d.useState(null);if(typeof t.apps!="boolean"||t.apps&&t.hasApps!==!0)return null;const g=t.apps,k=async()=>{r(!0),y(null);try{const p=await w(`/api/mcp/servers/${encodeURIComponent(t.name)}`,{method:"PATCH",body:JSON.stringify({apps:!g})});c(p.servers??[])}catch(p){y(p instanceof Error?p.message:String(p))}finally{r(!1)}};return e.jsxs("div",{"data-mcp-apps":t.name,className:"mt-3 flex items-center gap-3 border-t border-hairline/40 pt-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-[13px] font-medium text-ink",children:n("mcp.apps.title")}),e.jsx("div",{role:l?"alert":void 0,className:l?"mt-0.5 text-[12px] text-danger":"mt-0.5 text-[12px] text-ink-secondary",children:l??n("mcp.apps.desc")})]}),o&&e.jsx(ae,{"aria-hidden":"true",size:13,className:"animate-spin text-ink-secondary"}),e.jsx(un,{checked:g,disabled:s||o,onClick:()=>{k()},"aria-label":n("mcp.apps.toggleAria",{name:t.name}),className:"disabled:opacity-40"})]})}function Bn({feature:t,enabled:s,prefix:c}){const{dispatch:o}=et(),[r,l]=d.useState(!1),[y,g]=d.useState(!1),k=async()=>{if(!r){l(!0),g(!1);try{const p=await w("/api/config",{method:"PATCH",body:JSON.stringify({features:{[t]:!s}})});o({type:"configStatus",config:p})}catch{g(!0)}finally{l(!1)}}};return e.jsxs("div",{className:"mt-4 flex items-start justify-between gap-4 rounded-2xl border border-hairline/50 bg-card px-4 py-4 sm:px-5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[14px] font-medium text-ink",children:n(`${c}.title`)}),e.jsx("p",{className:"mt-1 text-[12px] leading-relaxed text-ink-secondary",children:n(`${c}.desc`)}),y&&e.jsx("p",{role:"alert",className:"mt-1 text-[12px] text-danger",children:n("mcp.claude.error")})]}),e.jsx(un,{checked:s,"aria-label":n(`${c}.aria`),disabled:r,onClick:()=>{k()},className:"mt-0.5 shrink-0 disabled:cursor-wait disabled:opacity-50"})]})}function Aa(){const{state:t}=et();return e.jsxs(e.Fragment,{children:[e.jsx(Bn,{feature:"claudeUserMcp",enabled:As(t.config),prefix:"mcp.claude"}),e.jsx(Bn,{feature:"claudeUserSkills",enabled:Cs(t.config),prefix:"mcp.claudeSkills"})]})}function Pn({app:t}){if("image"in t.icon)return e.jsx("img",{src:t.icon.image,alt:"",className:"size-10 shrink-0 rounded-xl object-contain"});const s=t.icon.glyph;return e.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-raised text-ink-secondary",children:e.jsx(s,{size:19,"aria-hidden":"true"})})}class me extends Error{key;constructor(s){super(s),this.key=s}}const sn=/^https?:\/\//i,ds=/^[A-Za-z_][A-Za-z0-9_]*=/,Ca=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+:/,Sa=new Set(["npx","uvx","bunx"]),Ra=new Set(["pnpm","yarn"]);function Ea(t,s=[]){const c=za(t).trim();if(!c)return null;try{const o=/^[{[]/.test(c)?La(c):sn.test(c)&&!/\s/.test(c)?[mn(void 0,c,void 0,[])]:Ia(c);return{ok:!0,servers:Da(o,s)}}catch(o){if(o instanceof me)return{ok:!1,error:o.key};throw o}}function za(t){return t.replace(/[“”„]/g,'"').replace(/[‘’]/g,"'").replace(/(^|\s)[–—](?=[a-z])/g,"$1--")}function us(t){const s=[];let c=[],o="",r=!1;const l=()=>{r&&c.push(o),o="",r=!1},y=()=>{l(),c.length&&s.push(c),c=[]},g=k=>t[k]===`
|
|
2
2
|
`?1:t[k]==="\r"&&t[k+1]===`
|
|
3
3
|
`?2:0;for(let k=0;k<t.length;k+=1){const p=t[k];if(p==="\\"||(p==="`"||p==="^")&&g(k+1)){const h=g(k+1);if(h){k+=h;continue}k+1<t.length&&(o+=t[k+1],r=!0,k+=1);continue}if(p==="'"){const h=t.indexOf("'",k+1);if(h<0)throw new me("mcp.paste.notRecognized");o+=t.slice(k+1,h),r=!0,k=h;continue}if(p==='"'){let h=k+1;for(;h<t.length&&t[h]!=='"';h+=1){if(t[h]==="\\"&&h+1<t.length){const A=g(h+1);if(A){h+=A;continue}if('"\\$`'.includes(t[h+1])){o+=t[h+1],h+=1;continue}}o+=t[h]}if(h>=t.length)throw new me("mcp.paste.notRecognized");r=!0,k=h;continue}if(p==="$"&&t[k+1]==="("){const h=t.indexOf(")",k+2);if(h<0)throw new me("mcp.paste.notRecognized");o+=t.slice(k,h+1),r=!0,k=h;continue}if(p==="#"&&!r){for(;k+1<t.length&&t[k+1]!==`
|
|
4
4
|
`;)k+=1;continue}if(p===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c}from"./styles-
|
|
1
|
+
import{r as c}from"./styles-BHtUK2qB.js";import{u as i}from"./App-CqZbuxyG.js";import"./PlacesRail-CUntVv3u.js";function l(n,o){const t=n&&!window.ogb?.remoteClient?.active?window.ogb?.cloudAccount:void 0,[u,e]=c.useState(null),f=t?.offer?JSON.stringify(o??null):null;return c.useEffect(()=>{if(f===null||!t?.offer)return;let r=!0;return t.offer().then(a=>{r&&e(a)},()=>{}),()=>{r=!1}},[t,f]),t?.offer?u:null}function s(){const n=window.ogb?.remoteClient?.active?void 0:window.ogb?.cloudAccount,[o,t]=c.useState(null);return c.useEffect(()=>{if(!n)return;let u=!0,e=!1;const f=n.onState(r=>{e=!0,u&&t(r)});return n.state().then(r=>{u&&!e&&t(r)}).catch(()=>{}),()=>{u=!1,f()}},[n]),null}function b(){const{dispatch:n}=i(),o=s();return l(o!==null,o?.account?.offer),null}function w({place:n,usage:o=null,upgrade:t}){const{dispatch:u}=i(),e=s();return l(e!==null,e?.account?.offer),null}function v(){const n=s();return l(n!==null,n?.account?.offer),null}export{w as C,b as P,l as a,v as b,s as u};
|
package/dist/assets/{RemoteAgentSettingsPanel-DyVQB35x.js → RemoteAgentSettingsPanel-DApM-5sE.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as e,C as w,t as n,X as C,a as S}from"./styles-
|
|
1
|
+
import{r,j as e,C as w,t as n,X as C,a as S}from"./styles-BHtUK2qB.js";import{u as A,I as z,T,B as p,V as L,k as P,S as B,m as E,n as I}from"./App-CqZbuxyG.js";import{u as R,B as F,L as U,b as V}from"./PlacesRail-CUntVv3u.js";import"./index-CIXZzqGE.js";import"./monitor-7oLB-7rZ.js";import"./MenuMotion-CobYpP7L.js";function M({bot:t,overlay:b=!1}){const{dispatch:f}=A(),{dragProps:k}=R(),[x,g]=r.useState(!1),[h,l]=r.useState(""),[v,j]=r.useState(!1),d=r.useRef(null),o=r.useRef(null),c=r.useRef(null),y=()=>f({type:"toggleSettings",open:!1}),i=a=>{if(o.current={...o.current,...a},c.current)return c.current;g(!0),l("");const s=async()=>{for(;o.current;){const u=o.current;o.current=null,l("");try{const m=await I(`/api/bots/${t.id}/profile`,{method:"PATCH",body:JSON.stringify(u)});f({type:"botPatched",bot:m.bot})}catch(m){l(m instanceof Error?m.message:n("remoteAgent.updateFailed"))}}};return c.current=s().finally(()=>{c.current=null,g(!1)}),c.current},N=async a=>{if(a){j(!0),l("");try{const s=await E(a),u=s?V(s.path):null;if(!u)throw new Error(n("settings.profile.avatar.invalidType"));await i({avatarUrl:u,avatarCrop:t.avatarCrop==="square"?"square":"circle"})}catch(s){l(s instanceof Error?s.message:String(s))}finally{j(!1),d.current&&(d.current.value="")}}};return e.jsxs("aside",{className:S("animate-panel-in absolute inset-0 z-40 flex h-full min-w-0 flex-col border-l border-hairline/40 bg-panel",b?"md:left-auto md:w-[400px] md:shadow-2xl":"md:relative md:z-20 md:w-[400px] md:shrink-0"),children:[e.jsxs("div",{...k,className:"flex items-center justify-between px-4 py-3",children:[e.jsx("button",{onClick:y,"aria-label":n("remoteAgent.collapse"),className:"flex size-10 items-center justify-center rounded-md text-ink-secondary hover:bg-control hover:text-ink",children:e.jsx(w,{size:18})}),e.jsx("span",{className:"text-[15px] font-semibold text-ink",children:n("remoteAgent.title")}),e.jsx("button",{onClick:y,"aria-label":n("remoteAgent.close"),className:"flex size-10 items-center justify-center rounded-md text-ink-secondary hover:bg-control hover:text-ink",children:e.jsx(C,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 pb-5",children:e.jsxs("div",{className:"flex flex-col gap-4 pt-4",children:[e.jsxs("div",{className:"rounded-xl bg-card p-4",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[e.jsx(F,{bot:t,state:"idle",size:64,motion:"none",motionKey:0,animated:!1}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",className:"sr-only",onChange:a=>{N(a.target.files?.[0])}}),e.jsxs("button",{type:"button",disabled:v||x,onClick:()=>d.current?.click(),className:"flex items-center gap-1.5 rounded-lg bg-control px-3 py-2 text-[13px] text-ink hover:bg-raised-hover disabled:opacity-50",children:[v?e.jsx(U,{size:14,className:"animate-spin"}):e.jsx(z,{size:14})," ",n("botIdentity.avatar")]}),t.avatarUrl&&e.jsx("button",{type:"button",disabled:x,onClick:()=>{i({avatarUrl:null,avatarCrop:"mascot"})},"aria-label":n("remoteAgent.removeAvatar"),className:"flex size-9 items-center justify-center rounded-lg text-ink-secondary hover:bg-control hover:text-danger",children:e.jsx(T,{size:14})})]})]}),e.jsxs("label",{className:"block text-[12px] font-medium text-ink-secondary",children:[n("botSettings.identity.name"),e.jsx("input",{defaultValue:t.name,maxLength:p.name,onBlur:a=>{const s=a.currentTarget.value.trim();s&&s!==t.name&&i({name:s})},className:"mt-1 w-full rounded-lg bg-inset px-3 py-2 text-[14px] text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]}),e.jsxs("label",{className:"mt-3 block text-[12px] font-medium text-ink-secondary",children:[n("botSettings.identity.title"),e.jsx("input",{defaultValue:t.title??"",maxLength:p.title,onBlur:a=>{a.currentTarget.value!==(t.title??"")&&i({title:a.currentTarget.value})},className:"mt-1 w-full rounded-lg bg-inset px-3 py-2 text-[14px] text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]}),e.jsxs("label",{className:"mt-3 block text-[12px] font-medium text-ink-secondary",children:[n("remoteAgent.description"),e.jsx("textarea",{defaultValue:t.description??"",maxLength:p.description,rows:4,onBlur:a=>{a.currentTarget.value!==(t.description??"")&&i({description:a.currentTarget.value})},className:"mt-1 w-full resize-y rounded-lg bg-inset px-3 py-2 text-[13px] leading-relaxed text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]})]}),e.jsx(L,{bot:t,workspaceConfigurationLocked:!0,onPatch:a=>{i(a)}}),e.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-xl bg-card p-4",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx(P,{size:16,className:"mt-0.5 shrink-0 text-ink-secondary"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] font-medium text-ink",children:n("notifications.title")}),e.jsx("div",{className:"mt-0.5 text-[12px] leading-relaxed text-ink-secondary",children:n("remoteAgent.notificationsHint")})]})]}),e.jsx(B,{checked:t.notifications,disabled:x,"aria-label":n("remoteAgent.notifications"),onClick:()=>{i({notifications:!t.notifications})}})]}),h?e.jsx("div",{role:"alert",className:"text-[12px] text-danger",children:h}):null]})})]})}export{M as RemoteAgentSettingsPanel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,a as z,t,z as F,r as d,S as L,X as B}from"./styles-
|
|
1
|
+
import{j as e,a as z,t,z as F,r as d,S as L,X as B}from"./styles-BHtUK2qB.js";import{E as O,C as $,T as G,B as E,j as K,u as q,r as H}from"./PlacesRail-CUntVv3u.js";import{ao as U,u as g,ap as A,aq as W,ar as X,as as _,at as J,au as Q,av as V,aw as Y,ax as P,ay as Z,az as ee,aA as ae,P as te,aB as se,aC as ne,aD as oe,aE as re,aF as le,aG as ie,aH as ce,aI as M,aJ as R,aK as de,aL as ue,aM as pe,aN as S,aO as k,aP as me,d as fe,aQ as xe,aR as he,aS as be,aT as je,aU as ye,aV as ke,aW as ge,aX as C,aY as we,ad as ve,aZ as Re}from"./App-CqZbuxyG.js";import{C as Se}from"./MenuMotion-CobYpP7L.js";import"./monitor-7oLB-7rZ.js";import"./index-CIXZzqGE.js";function N(a){return a===60?t("room.panel.hour"):a%60===0?t("room.panel.hours",{hours:a/60}):t("room.panel.minutes",{minutes:a})}function Ce(a){const{dispatch:n}=g(),l=F(),u=A(a.threadId),o=W(a),[p,r]=d.useState(null),f=a.messages,h=f.length>0,s=()=>oe({title:a.name,messages:f,isGroup:!0}),x=l?[]:X(a.tasks??[]),m=_(a.usage);return{items:[{key:"find",label:t("chat.find"),icon:e.jsx(L,{size:16}),active:u,trailing:e.jsx(Q,{id:"find-conversation"}),onSelect:()=>J(a.threadId)},...l?[]:[{key:"new-thread",heading:t("task.list"),separatorBefore:!0,label:t("task.newShort"),icon:e.jsx(V,{size:16}),onSelect:()=>n({type:"newGroupTask",groupId:a.id})}],...x.length<2?[]:[{key:"threads",label:t("task.switch"),icon:e.jsx(P,{size:16}),value:String(x.length),submenu:x.map(i=>({key:`thread:${i.threadId}`,label:Y(i.title||t("task.newShort")),active:i.threadId===a.threadId,onSelect:()=>n({type:"switchGroupTask",groupId:a.id,threadId:i.threadId})})),onSelect:()=>{}}],{key:"copy",heading:t("chat.export.heading"),separatorBefore:!0,label:t("chat.export.copy"),icon:e.jsx($,{size:16}),disabled:!h,keepOpen:!0,trailing:p&&e.jsx("span",{role:"status",className:"text-[11px] text-ink-secondary",children:t(p==="copied"?"chat.export.copied":"chat.export.copyFailed")}),onSelect:()=>{Z(s()).then(i=>r(i?"copied":"failed"))}},{key:"download",label:t("chat.export.download"),icon:e.jsx(te,{size:16}),disabled:!h,onSelect:()=>ee(ae(a.name),s())},{key:"turn-limit",label:t("room.panel.turnLimit"),icon:e.jsx(G,{size:16}),separatorBefore:!0,value:N(o.saved??o.globalMinutes),submenu:[{key:"turn-limit:default",label:t("room.turnLimit.default",{minutes:o.globalMinutes}),active:o.saved===null,onSelect:()=>o.save(null)},...se.map(i=>({key:`turn-limit:${i}`,label:N(i),active:o.saved===i,onSelect:()=>o.save(i)}))],onSelect:()=>{}},...m?[{key:"usage",label:t("chat.usage.menu"),icon:e.jsx(ne,{size:16}),keepOpen:!0,trailing:e.jsx("span",{title:m.title,"data-testid":"group-usage-chip",className:"tabular-nums text-[12px] text-ink-secondary",children:m.short}),onSelect:()=>{}}]:[]],on:u}}function Ne({group:a}){const{items:n,on:l}=Ce(a);return e.jsx(U,{items:n,ariaLabel:t("chat.more"),triggerClassName:"rounded-full",triggerTitle:t("chat.more"),renderTrigger:({open:u})=>e.jsx("span",{"data-testid":"room-more",className:z("flex size-8 items-center justify-center rounded-full bg-raised/50 transition-colors hover:bg-raised","max-md:size-9 max-md:border max-md:border-hairline max-md:bg-card",u||l?"text-accent":"text-ink"),children:e.jsx(O,{size:16})})})}function Te({group:a}){return e.jsx(Ne,{group:a},a.threadId)}function ze({group:a,members:n}){const{state:l,dispatch:u}=g(),o=re(l.config),p=le(a,n),r=ie(p),f=s=>{s!==r&&u({type:"patchGroup",groupId:a.id,patch:{defaultResponder:de(s,p)}})},h=[{choice:"auto",title:t("room.panel.responder.autoOption"),hint:o?void 0:t("room.responder.autoOff",{name:ce(a,n)??t("room.responder.leadFallback")})},{choice:"everyone",title:t("room.panel.responder.everyone")},{choice:"mentions",title:t("room.panel.responder.mentions")}];return e.jsx("div",{role:"radiogroup","aria-label":t("room.panel.whoResponds"),children:e.jsxs(M,{children:[n.map(s=>e.jsx(R,{"data-panel-choice":`member:${s.id}`,title:e.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[e.jsx(E,{bot:s,state:K(s.mascotExpression)??"happy",size:22,animated:!1}),e.jsx("span",{className:"truncate",children:s.name})]}),checked:r===`member:${s.id}`,onClick:()=>f(`member:${s.id}`)},s.id)),h.map(({choice:s,title:x,hint:m})=>e.jsx(R,{"data-panel-choice":s,title:x,hint:m,checked:r===s,onClick:()=>f(s)},s))]})})}const T={responder:{title:"room.panel.whoResponds",intro:"room.panel.responder.intro"},folder:{title:"room.folder.title",intro:"room.folder.detail"}};function Ee({group:a,members:n}){return e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("div",{"data-room-panel-faces":!0,className:"mt-0.5 flex -space-x-3",children:n.slice(0,3).map(l=>e.jsx(E,{bot:l,state:"happy",size:52,animated:!1},l.id))}),e.jsx("h2",{id:"room-panel-title",className:"mt-2.5 max-w-full truncate px-1.5 text-[18px] font-semibold text-ink",children:a.name}),a.description&&e.jsx("p",{className:"mt-px line-clamp-2 max-w-full text-[13px] text-ink-secondary",children:a.description})]})}function Pe({group:a}){const n=ke(a),l=d.useRef(null),u=d.useRef(!1);d.useEffect(()=>{n.open||!u.current||(u.current=!1,l.current?.focus())},[n.open]);const o=r=>{r.key==="Escape"&&(r.preventDefault(),r.stopPropagation()),(r.key==="Escape"||r.key==="Enter"&&(r.metaKey||r.ctrlKey))&&(u.current=!0),n.onKeyDown(r)};if(n.open)return e.jsxs(ge,{"data-panel-row":"instructions",children:[e.jsx(C,{title:t("room.panel.instructions")}),e.jsx("textarea",{autoFocus:!0,dir:"auto","aria-label":t("room.panel.instructions"),value:n.draft,onChange:r=>n.setDraft(r.target.value),onBlur:n.save,onKeyDown:o,placeholder:t("room.bulletin.placeholder"),rows:6,className:"w-full resize-y rounded-lg border border-hairline bg-inset px-2.5 py-2 text-[13px] leading-relaxed text-ink outline-none placeholder:text-ink-tertiary focus:border-accent-border"}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button","data-panel-done":"instructions",onMouseDown:r=>r.preventDefault(),onClick:()=>{u.current=!0,n.save()},className:we,children:t("botSettings.simple.done")})})]});const p=a.bulletin.split(`
|
|
2
2
|
`)[0]?.trim();return e.jsxs("button",{ref:l,type:"button","data-panel-edit":"instructions","aria-label":`${t("botSettings.simple.edit")}: ${t("room.panel.instructions")}`,onClick:n.start,className:z(Re,"w-full text-left hover:bg-ink/[0.03]"),children:[e.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-ink/[0.05] text-ink-secondary max-md:size-8 max-md:rounded-full","aria-hidden":"true",children:e.jsx(ve,{size:15})}),e.jsx(C,{title:t("room.panel.instructions"),hint:e.jsx("span",{dir:"auto",className:"line-clamp-1",children:p||t("room.panel.instructionsHint")})}),e.jsx(Se,{size:15,className:"shrink-0 text-ink-tertiary","aria-hidden":"true"})]})}function Oe({group:a,overlay:n=!1}){const{state:l}=g(),{dragProps:u}=q(),[o,p]=d.useState(null),[r,f]=d.useState(!1),h=d.useRef(null),s=d.useRef(null),x=d.useRef(null),m=d.useRef(null),b=d.useMemo(()=>a.memberIds.map(c=>l.bots.find(y=>y.id===c)).filter(c=>!!c),[a.memberIds,l.bots]),i=ue(a),I=d.useCallback(()=>f(!1),[]),w=c=>{p(c),s.current?.scrollTo({top:0})},v=()=>{m.current=o,p(null)};d.useEffect(()=>{o!==null?s.current?.querySelector("[data-panel-back]")?.focus():m.current&&(s.current?.querySelector(`[data-panel-page="${m.current}"]`)?.focus(),m.current=null)},[o]),d.useEffect(()=>{const c=h.current;c?.focus();const y=j=>{j.key!=="Escape"||j.defaultPrevented||c&&j.target instanceof Node&&!c.contains(j.target)||(j.preventDefault(),S({refocus:!0}))};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[]);const D=c=>{c.key!=="Escape"||c.defaultPrevented||o===null||(c.preventDefault(),c.stopPropagation(),v())};return e.jsxs(e.Fragment,{children:[e.jsxs("aside",{ref:h,role:"dialog","aria-labelledby":"room-panel-title",tabIndex:-1,"data-room-panel":!0,onKeyDown:D,className:je(n,!0),children:[e.jsxs("div",{...u,className:"flex h-[52px] shrink-0 items-center justify-end gap-2 px-3.5",children:[e.jsx(Te,{group:a}),e.jsx("button",{type:"button",onClick:()=>S({refocus:!0}),"aria-label":t("botSettings.simple.close"),className:pe,children:e.jsx(B,{size:16,className:"pointer-events-none"})})]}),e.jsx("div",{ref:s,className:"@container relative min-h-0 flex-1 overflow-y-auto px-5 pb-7",children:o===null?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{group:a,members:b}),e.jsxs(M,{children:[e.jsx(k,{"data-panel-page":"responder",icon:P,title:t("room.panel.whoResponds"),value:me(a,b),onClick:()=>w("responder")}),e.jsx(k,{"data-panel-page":"folder",icon:fe,title:t("room.folder.title"),value:i?.name??t("room.panel.folder.own"),tooltip:i?.path,onClick:()=>w("folder")}),e.jsx(Pe,{group:a}),e.jsx(k,{ref:x,"data-panel-row":"members",icon:xe,title:t("room.panel.members"),value:String(b.length),onClick:()=>f(!0)})]})]}):e.jsxs("div",{"data-panel-page-view":o,children:[e.jsx("span",{id:"room-panel-title",className:"sr-only",children:a.name}),e.jsx(he,{back:a.name,title:t(T[o].title),intro:t(T[o].intro),onBack:v}),e.jsx("div",{className:"mt-4 flex flex-col gap-3",children:o==="responder"?e.jsx(ze,{group:a,members:b}):e.jsx(be,{group:a,heading:!1})})]})})]}),r&&H.createPortal(e.jsx(ye,{group:a,onClose:I,triggerRef:x}),document.body)]})}export{Oe as RoomPanel};
|