@futdevpro/ccap 1.1.2771 → 1.1.2863
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/client-dist/{agent-instances.module-I4BSGDNA.js → agent-instances.module-SRVXVWB4.js} +2 -2
- package/client-dist/{ca.module-4FWP2XY4.js → ca.module-ZAYCRAK6.js} +2 -2
- package/client-dist/cc-usage-dashboard.component-TNMEIWMI.js +2 -0
- package/client-dist/cc-usage-dashboard.component-TNMEIWMI.js.map +7 -0
- package/client-dist/{cc.module-G2GSNVFJ.js → cc.module-BF2AOAIM.js} +2 -2
- package/client-dist/{chunk-WBMES66O.js → chunk-23GMPVB5.js} +2 -2
- package/client-dist/{chunk-DVGKMXHM.js → chunk-2DJBCAHJ.js} +2 -2
- package/client-dist/{chunk-LUIH5IH4.js → chunk-2LOFMRCO.js} +2 -2
- package/client-dist/{chunk-6VSHLGVD.js → chunk-2X5MWPDN.js} +2 -2
- package/client-dist/{chunk-HDPOKOM5.js → chunk-2Y7GYEOT.js} +2 -2
- package/client-dist/{chunk-WYRNU54S.js → chunk-34XFCTVF.js} +2 -2
- package/client-dist/{chunk-E6RJBEUN.js → chunk-4RT7LOTQ.js} +2 -2
- package/client-dist/{chunk-NWNWKLLW.js → chunk-4TEHGQ5C.js} +2 -2
- package/client-dist/{chunk-7DKTD4P6.js → chunk-4XEPGDZH.js} +2 -2
- package/client-dist/{chunk-7NPTBX4Y.js → chunk-52JG2IIG.js} +2 -2
- package/client-dist/{chunk-JVO3EHGB.js → chunk-77HGZO43.js} +2 -2
- package/client-dist/{chunk-YURXOU4U.js → chunk-7JFONJTJ.js} +2 -2
- package/client-dist/{chunk-7AQGRHMA.js → chunk-7JW45JC5.js} +2 -2
- package/client-dist/{chunk-7V3LRQAZ.js → chunk-7MSQD5HV.js} +2 -2
- package/client-dist/{chunk-64BJ5ZPJ.js → chunk-AFF37OKI.js} +2 -2
- package/client-dist/{chunk-XT2TWSB3.js → chunk-B7WQ5TK3.js} +2 -2
- package/client-dist/{chunk-ZVNHBXJU.js → chunk-CBIUSRE5.js} +2 -2
- package/client-dist/{chunk-YJEHCUWB.js → chunk-CUUDVYOC.js} +2 -2
- package/client-dist/{chunk-ZQ4GFPEN.js → chunk-DHIVAX2C.js} +2 -2
- package/client-dist/{chunk-ASQEQSVO.js → chunk-DU3IYPGM.js} +2 -2
- package/client-dist/{chunk-IPOJA4NQ.js → chunk-DUN7ICUI.js} +2 -2
- package/client-dist/{chunk-DI7UBKC5.js → chunk-DZ74YN25.js} +2 -2
- package/client-dist/{chunk-23UH5S6I.js → chunk-EDQWK2Q5.js} +2 -2
- package/client-dist/{chunk-P7FDJL6S.js → chunk-EIT3LSQO.js} +2 -2
- package/client-dist/{chunk-CDKFHI2N.js → chunk-ELFCSLIP.js} +2 -2
- package/client-dist/{chunk-CDKFHI2N.js.map → chunk-ELFCSLIP.js.map} +1 -1
- package/client-dist/{chunk-WE3IF6CE.js → chunk-EMVGFT6L.js} +2 -2
- package/client-dist/{chunk-AVBSYCMH.js → chunk-EUY2HZZV.js} +2 -2
- package/client-dist/{chunk-MZ3LRP25.js → chunk-EZNIJZBL.js} +2 -2
- package/client-dist/{chunk-KCEYLL24.js → chunk-FYXUOXRP.js} +2 -2
- package/client-dist/{chunk-X2KATA6U.js → chunk-GODWUWRO.js} +2 -2
- package/client-dist/{chunk-WWZOAP46.js → chunk-HSAGX22H.js} +2 -2
- package/client-dist/{chunk-WHRKP7CF.js → chunk-I6OBHW45.js} +8 -8
- package/client-dist/{chunk-WHRKP7CF.js.map → chunk-I6OBHW45.js.map} +1 -1
- package/client-dist/{chunk-6VFHL63I.js → chunk-L7PQ72ZG.js} +2 -2
- package/client-dist/{chunk-LYCDXEA4.js → chunk-NI4AZWY2.js} +2 -2
- package/client-dist/{chunk-FTVB36SW.js → chunk-O7U4KV25.js} +2 -2
- package/client-dist/{chunk-M7S54EWW.js → chunk-OIBDRASW.js} +2 -2
- package/client-dist/{chunk-737N2QOC.js → chunk-PZMEVMSF.js} +2 -2
- package/client-dist/{chunk-EXE26RV4.js → chunk-Q7GDEJL2.js} +2 -2
- package/client-dist/{chunk-T4N37SRP.js → chunk-QHLRSGQG.js} +2 -2
- package/client-dist/{chunk-CNZUTJXV.js → chunk-QTRIOR6Z.js} +2 -2
- package/client-dist/{chunk-4CUQDHAH.js → chunk-QUEQSNIS.js} +2 -2
- package/client-dist/{chunk-PQIHFZG3.js → chunk-SO3QL2U5.js} +2 -2
- package/client-dist/{chunk-C43VIJCY.js → chunk-SX22WHCZ.js} +2 -2
- package/client-dist/{chunk-2HJ74DSG.js → chunk-TUKCFE3B.js} +2 -2
- package/client-dist/{chunk-3FRNDMIC.js → chunk-UI6N7Y2P.js} +2 -2
- package/client-dist/{chunk-V42OZMBH.js → chunk-VLMQV3OI.js} +2 -2
- package/client-dist/{chunk-AKOD5HPA.js → chunk-VXJF6N32.js} +2 -2
- package/client-dist/{chunk-3FRRZGAB.js → chunk-WQIBGXGU.js} +2 -2
- package/client-dist/{chunk-7MOSEOQF.js → chunk-WYTT3YHQ.js} +2 -2
- package/client-dist/{chunk-5QT5PZ2B.js → chunk-X2FIFUXZ.js} +2 -2
- package/client-dist/{chunk-D2TMY72D.js → chunk-XSP7NLZB.js} +2 -2
- package/client-dist/{chunk-4HEHXXDL.js → chunk-XXO2YNDP.js} +2 -2
- package/client-dist/{chunk-SXP4YJY5.js → chunk-YGTNCGIU.js} +2 -2
- package/client-dist/{chunk-KYI7S4JV.js → chunk-YU32GIMP.js} +2 -2
- package/client-dist/{chunk-TKE33F7W.js → chunk-ZGWUDLYU.js} +2 -2
- package/client-dist/{chunk-BV54ST5B.js → chunk-ZMZ462V7.js} +2 -2
- package/client-dist/{consultant.module-ACB352FM.js → consultant.module-3PAIPMAH.js} +2 -2
- package/client-dist/{crd.module-XN253YIG.js → crd.module-PJO2UJEG.js} +2 -2
- package/client-dist/{dashboard.module-F43GCOJ6.js → dashboard.module-TJMYHTHX.js} +2 -2
- package/client-dist/{do.module-OHJBGMDT.js → do.module-SBE6P3B7.js} +2 -2
- package/client-dist/{document-library.module-WDOKDFTM.js → document-library.module-YH7IF4EP.js} +2 -2
- package/client-dist/{embedding-eval.module-ECD7QXRH.js → embedding-eval.module-STWWCUD7.js} +2 -2
- package/client-dist/{embedding-registry.module-764ZU57G.js → embedding-registry.module-XX6725DX.js} +2 -2
- package/client-dist/{err.module-R2ATIMSQ.js → err.module-SL2IYMTF.js} +2 -2
- package/client-dist/{feedback.module-ALGNJKOG.js → feedback.module-RMRL65YC.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-Z3D57LRD.js → host-runtime-mcp.module-OJORUP2R.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-EHZPO24W.js → live-dev-pipeline.module-AMBMFVIH.js} +2 -2
- package/client-dist/{logs.module-QNMNIVLO.js → logs.module-3CQ6KLLB.js} +2 -2
- package/client-dist/{main-IYPXSS3O.js → main-RCFMPV3V.js} +5 -5
- package/client-dist/main-RCFMPV3V.js.map +7 -0
- package/client-dist/{master-control-remote-poc.module-BVKFRRZN.js → master-control-remote-poc.module-FD3E5JB7.js} +2 -2
- package/client-dist/{mobile-app.module-WUZGYVG6.js → mobile-app.module-LHVADRFV.js} +2 -2
- package/client-dist/{model-registry.module-WDC3LG3H.js → model-registry.module-ZTKOWGAN.js} +2 -2
- package/client-dist/{oc.module-K5COGX5N.js → oc.module-GLPSVTAT.js} +2 -2
- package/client-dist/{orc.module-EA5J6IGA.js → orc.module-BKMJC5YX.js} +2 -2
- package/client-dist/{project-management.module-UI36OFRI.js → project-management.module-QEIXJONY.js} +2 -2
- package/client-dist/project-source-routed.module-LSFQT5DK.js +2 -0
- package/client-dist/{scheduler.module-AOWDLFVH.js → scheduler.module-TD4G2WNF.js} +2 -2
- package/client-dist/{session.module-2FLZRRCE.js → session.module-YCITR6BG.js} +2 -2
- package/client-dist/{set.module-B7XMMVTO.js → set.module-JIWXIF2C.js} +2 -2
- package/client-dist/{setup.module-O26UCVEY.js → setup.module-ZWL33O7N.js} +2 -2
- package/client-dist/{terminals.module-LTV6MFUG.js → terminals.module-MKXQLASR.js} +2 -2
- package/client-dist/{voice-notes-poc.module-VXD3G3TV.js → voice-notes-poc.module-7LUIU7P5.js} +2 -2
- package/client-dist/{wfs.module-B2UGRMKL.js → wfs.module-2BMXPFAL.js} +2 -2
- package/package.json +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/account/cc-account-discovery.util.d.ts +25 -3
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/account/cc-account-discovery.util.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/account/cc-account-discovery.util.js +23 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/account/cc-account-discovery.util.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/account/cc-account-discovery.util.spec.js +56 -3
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/account/cc-account-discovery.util.spec.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.d.ts +20 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.js +98 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_models/data-models/cc-account-usage-state.data-model.d.ts +51 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_models/data-models/cc-account-usage-state.data-model.d.ts.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_models/data-models/cc-account-usage-state.data-model.js +72 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_models/data-models/cc-account-usage-state.data-model.js.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_models/data-models/cc-account-usage-state.data-model.spec.d.ts +2 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_models/data-models/cc-account-usage-state.data-model.spec.d.ts.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_models/data-models/cc-account-usage-state.data-model.spec.js +67 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_models/data-models/cc-account-usage-state.data-model.spec.js.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account-route.control-service.d.ts +33 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account-route.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account-route.control-service.js +56 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account-route.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account-route.control-service.spec.js +38 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account-route.control-service.spec.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account.controller.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account.controller.js +29 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/cc-account/cc-account.controller.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-pool.control-service.d.ts +6 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-pool.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-pool.control-service.js +48 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-pool.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-pool.control-service.spec.js +55 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-pool.control-service.spec.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-usage-state.data-service.d.ts +53 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-usage-state.data-service.d.ts.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-usage-state.data-service.js +168 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-usage-state.data-service.js.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-usage-state.data-service.spec.d.ts +2 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-usage-state.data-service.spec.d.ts.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-usage-state.data-service.spec.js +156 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/account/cc-account-usage-state.data-service.spec.js.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.js +9 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/claude-code.data-service.d.ts +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/claude-code.data-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/claude-code.data-service.js +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/claude-code.data-service.js.map +1 -1
- package/server/build/src/_modules/messaging/_collections/consts/msg.const.d.ts +17 -0
- package/server/build/src/_modules/messaging/_collections/consts/msg.const.d.ts.map +1 -1
- package/server/build/src/_modules/messaging/_collections/consts/msg.const.js +19 -1
- package/server/build/src/_modules/messaging/_collections/consts/msg.const.js.map +1 -1
- package/server/build/src/app.server.d.ts +2 -8
- package/server/build/src/app.server.d.ts.map +1 -1
- package/server/build/src/app.server.js +6 -14
- package/server/build/src/app.server.js.map +1 -1
- package/client-dist/main-IYPXSS3O.js.map +0 -7
- package/client-dist/project-source-routed.module-ADAJCFPE.js +0 -2
- /package/client-dist/{agent-instances.module-I4BSGDNA.js.map → agent-instances.module-SRVXVWB4.js.map} +0 -0
- /package/client-dist/{ca.module-4FWP2XY4.js.map → ca.module-ZAYCRAK6.js.map} +0 -0
- /package/client-dist/{cc.module-G2GSNVFJ.js.map → cc.module-BF2AOAIM.js.map} +0 -0
- /package/client-dist/{chunk-WBMES66O.js.map → chunk-23GMPVB5.js.map} +0 -0
- /package/client-dist/{chunk-DVGKMXHM.js.map → chunk-2DJBCAHJ.js.map} +0 -0
- /package/client-dist/{chunk-LUIH5IH4.js.map → chunk-2LOFMRCO.js.map} +0 -0
- /package/client-dist/{chunk-6VSHLGVD.js.map → chunk-2X5MWPDN.js.map} +0 -0
- /package/client-dist/{chunk-HDPOKOM5.js.map → chunk-2Y7GYEOT.js.map} +0 -0
- /package/client-dist/{chunk-WYRNU54S.js.map → chunk-34XFCTVF.js.map} +0 -0
- /package/client-dist/{chunk-E6RJBEUN.js.map → chunk-4RT7LOTQ.js.map} +0 -0
- /package/client-dist/{chunk-NWNWKLLW.js.map → chunk-4TEHGQ5C.js.map} +0 -0
- /package/client-dist/{chunk-7DKTD4P6.js.map → chunk-4XEPGDZH.js.map} +0 -0
- /package/client-dist/{chunk-7NPTBX4Y.js.map → chunk-52JG2IIG.js.map} +0 -0
- /package/client-dist/{chunk-JVO3EHGB.js.map → chunk-77HGZO43.js.map} +0 -0
- /package/client-dist/{chunk-YURXOU4U.js.map → chunk-7JFONJTJ.js.map} +0 -0
- /package/client-dist/{chunk-7AQGRHMA.js.map → chunk-7JW45JC5.js.map} +0 -0
- /package/client-dist/{chunk-7V3LRQAZ.js.map → chunk-7MSQD5HV.js.map} +0 -0
- /package/client-dist/{chunk-64BJ5ZPJ.js.map → chunk-AFF37OKI.js.map} +0 -0
- /package/client-dist/{chunk-XT2TWSB3.js.map → chunk-B7WQ5TK3.js.map} +0 -0
- /package/client-dist/{chunk-ZVNHBXJU.js.map → chunk-CBIUSRE5.js.map} +0 -0
- /package/client-dist/{chunk-YJEHCUWB.js.map → chunk-CUUDVYOC.js.map} +0 -0
- /package/client-dist/{chunk-ZQ4GFPEN.js.map → chunk-DHIVAX2C.js.map} +0 -0
- /package/client-dist/{chunk-ASQEQSVO.js.map → chunk-DU3IYPGM.js.map} +0 -0
- /package/client-dist/{chunk-IPOJA4NQ.js.map → chunk-DUN7ICUI.js.map} +0 -0
- /package/client-dist/{chunk-DI7UBKC5.js.map → chunk-DZ74YN25.js.map} +0 -0
- /package/client-dist/{chunk-23UH5S6I.js.map → chunk-EDQWK2Q5.js.map} +0 -0
- /package/client-dist/{chunk-P7FDJL6S.js.map → chunk-EIT3LSQO.js.map} +0 -0
- /package/client-dist/{chunk-WE3IF6CE.js.map → chunk-EMVGFT6L.js.map} +0 -0
- /package/client-dist/{chunk-AVBSYCMH.js.map → chunk-EUY2HZZV.js.map} +0 -0
- /package/client-dist/{chunk-MZ3LRP25.js.map → chunk-EZNIJZBL.js.map} +0 -0
- /package/client-dist/{chunk-KCEYLL24.js.map → chunk-FYXUOXRP.js.map} +0 -0
- /package/client-dist/{chunk-X2KATA6U.js.map → chunk-GODWUWRO.js.map} +0 -0
- /package/client-dist/{chunk-WWZOAP46.js.map → chunk-HSAGX22H.js.map} +0 -0
- /package/client-dist/{chunk-6VFHL63I.js.map → chunk-L7PQ72ZG.js.map} +0 -0
- /package/client-dist/{chunk-LYCDXEA4.js.map → chunk-NI4AZWY2.js.map} +0 -0
- /package/client-dist/{chunk-FTVB36SW.js.map → chunk-O7U4KV25.js.map} +0 -0
- /package/client-dist/{chunk-M7S54EWW.js.map → chunk-OIBDRASW.js.map} +0 -0
- /package/client-dist/{chunk-737N2QOC.js.map → chunk-PZMEVMSF.js.map} +0 -0
- /package/client-dist/{chunk-EXE26RV4.js.map → chunk-Q7GDEJL2.js.map} +0 -0
- /package/client-dist/{chunk-T4N37SRP.js.map → chunk-QHLRSGQG.js.map} +0 -0
- /package/client-dist/{chunk-CNZUTJXV.js.map → chunk-QTRIOR6Z.js.map} +0 -0
- /package/client-dist/{chunk-4CUQDHAH.js.map → chunk-QUEQSNIS.js.map} +0 -0
- /package/client-dist/{chunk-PQIHFZG3.js.map → chunk-SO3QL2U5.js.map} +0 -0
- /package/client-dist/{chunk-C43VIJCY.js.map → chunk-SX22WHCZ.js.map} +0 -0
- /package/client-dist/{chunk-2HJ74DSG.js.map → chunk-TUKCFE3B.js.map} +0 -0
- /package/client-dist/{chunk-3FRNDMIC.js.map → chunk-UI6N7Y2P.js.map} +0 -0
- /package/client-dist/{chunk-V42OZMBH.js.map → chunk-VLMQV3OI.js.map} +0 -0
- /package/client-dist/{chunk-AKOD5HPA.js.map → chunk-VXJF6N32.js.map} +0 -0
- /package/client-dist/{chunk-3FRRZGAB.js.map → chunk-WQIBGXGU.js.map} +0 -0
- /package/client-dist/{chunk-7MOSEOQF.js.map → chunk-WYTT3YHQ.js.map} +0 -0
- /package/client-dist/{chunk-5QT5PZ2B.js.map → chunk-X2FIFUXZ.js.map} +0 -0
- /package/client-dist/{chunk-D2TMY72D.js.map → chunk-XSP7NLZB.js.map} +0 -0
- /package/client-dist/{chunk-4HEHXXDL.js.map → chunk-XXO2YNDP.js.map} +0 -0
- /package/client-dist/{chunk-SXP4YJY5.js.map → chunk-YGTNCGIU.js.map} +0 -0
- /package/client-dist/{chunk-KYI7S4JV.js.map → chunk-YU32GIMP.js.map} +0 -0
- /package/client-dist/{chunk-TKE33F7W.js.map → chunk-ZGWUDLYU.js.map} +0 -0
- /package/client-dist/{chunk-BV54ST5B.js.map → chunk-ZMZ462V7.js.map} +0 -0
- /package/client-dist/{consultant.module-ACB352FM.js.map → consultant.module-3PAIPMAH.js.map} +0 -0
- /package/client-dist/{crd.module-XN253YIG.js.map → crd.module-PJO2UJEG.js.map} +0 -0
- /package/client-dist/{dashboard.module-F43GCOJ6.js.map → dashboard.module-TJMYHTHX.js.map} +0 -0
- /package/client-dist/{do.module-OHJBGMDT.js.map → do.module-SBE6P3B7.js.map} +0 -0
- /package/client-dist/{document-library.module-WDOKDFTM.js.map → document-library.module-YH7IF4EP.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-ECD7QXRH.js.map → embedding-eval.module-STWWCUD7.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-764ZU57G.js.map → embedding-registry.module-XX6725DX.js.map} +0 -0
- /package/client-dist/{err.module-R2ATIMSQ.js.map → err.module-SL2IYMTF.js.map} +0 -0
- /package/client-dist/{feedback.module-ALGNJKOG.js.map → feedback.module-RMRL65YC.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-Z3D57LRD.js.map → host-runtime-mcp.module-OJORUP2R.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-EHZPO24W.js.map → live-dev-pipeline.module-AMBMFVIH.js.map} +0 -0
- /package/client-dist/{logs.module-QNMNIVLO.js.map → logs.module-3CQ6KLLB.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-BVKFRRZN.js.map → master-control-remote-poc.module-FD3E5JB7.js.map} +0 -0
- /package/client-dist/{mobile-app.module-WUZGYVG6.js.map → mobile-app.module-LHVADRFV.js.map} +0 -0
- /package/client-dist/{model-registry.module-WDC3LG3H.js.map → model-registry.module-ZTKOWGAN.js.map} +0 -0
- /package/client-dist/{oc.module-K5COGX5N.js.map → oc.module-GLPSVTAT.js.map} +0 -0
- /package/client-dist/{orc.module-EA5J6IGA.js.map → orc.module-BKMJC5YX.js.map} +0 -0
- /package/client-dist/{project-management.module-UI36OFRI.js.map → project-management.module-QEIXJONY.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-ADAJCFPE.js.map → project-source-routed.module-LSFQT5DK.js.map} +0 -0
- /package/client-dist/{scheduler.module-AOWDLFVH.js.map → scheduler.module-TD4G2WNF.js.map} +0 -0
- /package/client-dist/{session.module-2FLZRRCE.js.map → session.module-YCITR6BG.js.map} +0 -0
- /package/client-dist/{set.module-B7XMMVTO.js.map → set.module-JIWXIF2C.js.map} +0 -0
- /package/client-dist/{setup.module-O26UCVEY.js.map → setup.module-ZWL33O7N.js.map} +0 -0
- /package/client-dist/{terminals.module-LTV6MFUG.js.map → terminals.module-MKXQLASR.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-VXD3G3TV.js.map → voice-notes-poc.module-7LUIU7P5.js.map} +0 -0
- /package/client-dist/{wfs.module-B2UGRMKL.js.map → wfs.module-2BMXPFAL.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-EZNIJZBL.js";import{p as m}from"./chunk-ELFCSLIP.js";import{G as i,h as s}from"./chunk-TBMJSIBB.js";var l=(()=>{class r{transform(n){return p.getDurationBand(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapDurationBand",type:r,pure:!0,standalone:!0})}return r})();var f=s(m()),a=f.second,u=60*a,c=60*u,o=class{static formatGenerationTimeMs(e){if(e==null||typeof e!="number"||Number.isNaN(e))return"\u2013";if(e<a)return`${Math.round(e)} ms`;if(e<u){let t=e/a;return t>=10||t%1===0?`${Math.round(t)} s`:`${t.toFixed(1)} s`}if(e<c){let t=e/u;return t>=10||t%1===0?`${Math.round(t)} min`:`${t.toFixed(1)} min`}let n=e/c;return n>=10||n%1===0?`${Math.round(n)} h`:`${n.toFixed(1)} h`}};var $=(()=>{class r{transform(n){return o.formatGenerationTimeMs(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapGenerationTime",type:r,pure:!0,standalone:!0})}return r})();export{l as a,$ as b};
|
|
2
|
+
//# sourceMappingURL=chunk-2Y7GYEOT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as c}from"./chunk-B7WQ5TK3.js";import{I as d,p as h}from"./chunk-ELFCSLIP.js";import{C as l,aa as o,h as u,k as r,y as s}from"./chunk-TBMJSIBB.js";var e=function(t){return t.idle="idle",t.downloading="downloading",t.installing="installing",t.completed="completed",t.failed="failed",t}(e||{});var p=u(h());function m(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}function w(){let a=window.Capacitor?.Plugins?.AppUpdater;return a||null}var y=(()=>{class t{versionCheck_CS=l(c);downloadUrl=d.api.baseUrl+"/mobile/download";phase_$=o(e.idle);lastError_$=o("");startUpdate(){return r(this,null,function*(){let n=this.phase_$();if(!(n===e.downloading||n===e.installing)){this.lastError_$.set(""),this.phase_$.set(e.downloading);try{let i=w();if(i){this.phase_$.set(e.installing),yield i.downloadAndInstall({downloadUrl:this.downloadUrl}),this.phase_$.set(e.completed);return}this.openInSystemBrowser(this.downloadUrl),this.phase_$.set(e.completed)}catch(i){let f=i instanceof Error?i.message:String(i);this.lastError_$.set(f),this.phase_$.set(e.failed),p.DyFM_Error.logSimple("CCAP_MobileAppUpdater | startUpdate failed",i)}}})}autoUpdateIfAvailable(){return r(this,null,function*(){m()&&(yield this.versionCheck_CS.checkNow(),this.versionCheck_CS.updateAvailable_$()&&(yield this.startUpdate()))})}openInSystemBrowser(n){window.open(n,"_system")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{e as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-34XFCTVF.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-7MSQD5HV.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
|
|
2
2
|
`).length}};export{a,u as b,d as c,s as d};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-4RT7LOTQ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-DUN7ICUI.js";import{a as K}from"./chunk-DZ74YN25.js";import{e as F}from"./chunk-I6OBHW45.js";import{h as f,j as U}from"./chunk-2LOFMRCO.js";import{I as D,p as H}from"./chunk-ELFCSLIP.js";import{C as _,R as L,a as w,aa as p,b as $,d as k,h as O,k as h,p as d,vb as g,xb as P,y as M}from"./chunk-TBMJSIBB.js";var C=O(H());var I=(()=>{class l{static GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES=["timestamp","createdAt","updatedAt","ts","time","sentAt","messageTimestamp","created_at","updated_at","lastMessageAt","last_message_at","startedAt","started_at","lastActivityAt","last_activity_at"];static GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES=["lastActivityAt","updatedAt","lastMessageAt","updated_at","last_activity_at","last_message_at","startedAt","started_at","createdAt","created_at"];static GATEWAY_SESSION_STARTED_FIELD_NAMES=["startedAt","started_at","createdAt","created_at"];static GATEWAY_OUTPUT_ONLY_TIMESTAMP_FIELD_NAMES=["lastMessageAt","last_message_at","lastOutputAt","last_output_at"];static extractTimestamp(t,s){for(let e of s){let n=t[e];if(typeof n=="string"&&n)return n;if(typeof n=="number"&&n>0){let o=n<1e12?n*1e3:n;return new Date(o).toISOString()}}}}return l})();var E=class l{static buildGatewaySessionsFetch(y){let t=y.response._firstSessionKeys,s=Array.isArray(t)?t:[],e=Array.isArray(y.response.sessions)?y.response.sessions:[],n=e.map(i=>l.mapRawSessionToListItem({raw:i,gatewayUrl:y.response.gatewayUrl}));return{listItems:l.sortListItemsByLastActivityDesc({items:n}),rawSessions:e,gatewayUrl:y.response.gatewayUrl,source:y.response.source,instanceId:y.response.instanceId,firstSessionKeys:s}}static mapRawSessionToListItem(y){let t=y.raw;return{sessionId:typeof t.key=="string"?t.key:typeof t.sessionId=="string"?t.sessionId:typeof t.id=="string"?t.id:String(t.key??t.sessionId??t.id??""),label:typeof t.label=="string"?t.label:typeof t.name=="string"?t.name:typeof t.title=="string"?t.title:void 0,workspacePath:typeof t.workspacePath=="string"?t.workspacePath:typeof t.cwd=="string"?t.cwd:"",status:typeof t.status=="string"?t.status:"unknown",statusMessage:typeof t.statusMessage=="string"?t.statusMessage:void 0,gatewayUrl:y.gatewayUrl,openclawAgentName:typeof t.agentName=="string"?t.agentName:typeof t.agent=="string"?t.agent:void 0,promptCount:typeof t.promptCount=="number"?t.promptCount:typeof t.messageCount=="number"?t.messageCount:0,toolCallCount:typeof t.toolCallCount=="number"?t.toolCallCount:0,lastActivityAt:I.extractTimestamp(t,I.GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES),startedAt:I.extractTimestamp(t,I.GATEWAY_SESSION_STARTED_FIELD_NAMES),lastPrompt:typeof t.lastPrompt=="string"?t.lastPrompt:void 0,mode:typeof t.mode=="string"?t.mode:void 0,reasoningEffort:typeof t.reasoningEffort=="string"?t.reasoningEffort:typeof t.thinking=="string"?t.thinking:void 0,isArchived:typeof t.isArchived=="boolean"?t.isArchived:!1}}static sortListItemsByLastActivityDesc(y){return[...y.items].sort((t,s)=>{let e=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(s.lastActivityAt?new Date(s.lastActivityAt).getTime():0)-e})}};var N=(()=>{class l{baseUrl=`${D.api.baseUrl}/oc-session`;http=_(P);peiContext_DS=_(K);withCcapId(t){let s=this.peiContext_DS.activeCcapId_$();return s?t.set("ccapId",s):t}createSession(t){let s=this.withCcapId(new g);return d(this.http.post(this.baseUrl,t,{params:s}))}listSessions(t){let s=this.withCcapId(new g);return t?.status&&(s=s.set("status",t.status)),t?.workspacePath&&(s=s.set("workspacePath",t.workspacePath)),t?.gatewayUrl&&(s=s.set("gatewayUrl",t.gatewayUrl)),t?.includeArchived&&(s=s.set("includeArchived","1")),t?.limit!=null&&(s=s.set("limit",String(t.limit))),t?.offset!=null&&(s=s.set("offset",String(t.offset))),d(this.http.get(this.baseUrl,{params:s}))}listGatewaySessions(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.get(`${this.baseUrl}/gateway-sessions`,{params:s}))}getGatewaySessionHistory(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.get(`${this.baseUrl}/gateway-sessions/${t.sessionId}/history`,{params:s}))}sendGatewayPrompt(t){return d(this.http.post(`${this.baseUrl}/gateway-sessions/${t.sessionId}/send`,{instanceId:t.instanceId,content:t.content,agentName:t.agentName}))}abortGatewaySession(t){return d(this.http.post(`${this.baseUrl}/gateway-sessions/${t.sessionId}/abort`,{instanceId:t.instanceId}))}deleteGatewaySession(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.delete(`${this.baseUrl}/gateway-sessions/${t.sessionId}`,{params:s}))}getSession(t){let s=this.withCcapId(new g);return d(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:s}))}sendPrompt(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,{content:t.content},{params:s}))}reconnectSession(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/reconnect`,{},{params:s}))}stopExecution(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:s}))}terminateSession(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:s}))}updateSessionConfig(t){let o=t,{sessionId:s}=o,e=k(o,["sessionId"]),n=this.withCcapId(new g);return d(this.http.patch(`${this.baseUrl}/${s}/config`,e,{params:n}))}setSessionArchived(t){let s=this.withCcapId(new g);return d(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:s}))}getSessionEvents(t){let s=this.withCcapId(new g);return t.eventType&&(s=s.set("eventType",t.eventType)),t.since&&(s=s.set("since",t.since)),t.sinceSequence!=null&&(s=s.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(s=s.set("limit",String(t.limit))),t.offset!=null&&(s=s.set("offset",String(t.offset))),t.latest&&(s=s.set("latest","1")),d(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:s}))}getSessionEventStreamUrl(t){let s=`${this.baseUrl}/${t.sessionId}/events/stream`,e=this.peiContext_DS.activeCcapId_$();return e?`${s}?ccapId=${encodeURIComponent(e)}`:s}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var lt=(()=>{class l{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);consoleMessages_$=p([]);assembledMessages_$=p([]);lastStatusUpdate_$=p(null);sessionUsage_$=p({inputTokens:0,outputTokens:0,costUsd:0});activeSessionId_$=p("");activeInstanceId_$=p("");gatewayFilter_$=p(null);extSessionMsg_AS=_(G);ocSession_AS=_(N);globalError_CS=_(U);socket_CS=_(F);ngZone=_(L);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;chatPollHandle=null;detailPollHandle=null;lastPolledHistoryFingerprint="";constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{this.handleSocketEvent(t)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(t=>{if(t){let s=this.activeSessionId_$();s&&(this.socket_CS.emit("oc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{})),this.backfillMissedEvents()}})}ngOnDestroy(){this.stopChatPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}setGatewayFilter(t){this.gatewayFilter_$.set(t),this.loadSessions().catch(()=>{})}setGatewayFilterOnly(t){this.gatewayFilter_$.set(t)}loadSessions(t){return h(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let e=[...(yield this.ocSession_AS.listSessions({status:t?.status,workspacePath:t?.workspacePath,gatewayUrl:this.gatewayFilter_$()??void 0,includeArchived:t?.includeArchived})).sessions].sort((n,o)=>{let i=n.lastActivityAt?new Date(n.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(e)}catch(s){this.sessionsLoadError_$.set(s),this.pushConsoleMessage({type:"error",text:`Load sessions failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.sessionsLoading_$.set(!1)}})}fetchGatewaySessionsForInstance(t){return h(this,null,function*(){let s=yield this.ocSession_AS.listGatewaySessions({instanceId:t.instanceId});return E.buildGatewaySessionsFetch({response:s})})}loadGatewaySessions(t){return h(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let s=yield this.fetchGatewaySessionsForInstance({instanceId:t.instanceId});!s.listItems.length&&s.rawSessions.length>0&&this.pushConsoleMessage({type:"error",text:`Gateway returned ${s.rawSessions.length} sessions but mapping produced 0.
|
|
2
2
|
First session keys: ${s.firstSessionKeys.join(", ")}`}),this.sessions_$.set(s.listItems)}catch(s){this.sessionsLoadError_$.set(s),this.pushConsoleMessage({type:"error",text:`Load gateway sessions failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.sessionsLoading_$.set(!1)}})}loadSessionDetail(t){return h(this,null,function*(){let s=t.isSilent===!0;s||this.selectedSessionLoading_$.set(!0);try{let e=yield this.ocSession_AS.getSession({sessionId:t.sessionId});this.selectedSession_$.set(e),this.loadAssembledMessages({sessionId:t.sessionId}).catch(()=>{})}catch(e){if(!s){this.selectedSession_$.set(null);let n=e instanceof Error?e.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${n}`})}}finally{s||this.selectedSessionLoading_$.set(!1)}})}loadGatewaySessionHistory(t){return h(this,null,function*(){this.selectedSessionLoading_$.set(!0),this.consoleMessages_$.set([]);try{let s=yield this.ocSession_AS.getGatewaySessionHistory({sessionId:t.sessionId,instanceId:t.instanceId}),e=s,n=Array.isArray(e._rawKeys)?e._rawKeys:[],o=Array.isArray(s.history)?s.history:[],i=this.parseGatewayHistory(o),a=typeof e.messageCount=="number"?e.messageCount:0,r=Array.isArray(e._firstMessageKeys)?e._firstMessageKeys:[];i.length?this.consoleMessages_$.set(i):a>0?this.consoleMessages_$.set([{listKey:this.allocateConsoleListKey(),type:"error",text:`Gateway session has ${a} messages, but mapping failed.
|
|
3
3
|
Message keys: ${r.join(", ")||"unknown"}
|
|
4
4
|
Gateway response keys: ${n.join(", ")||"none"}`,timestamp:new Date().toISOString()}]):this.consoleMessages_$.set([{listKey:this.allocateConsoleListKey(),type:"info",text:"Gateway session loaded \u2014 session has no messages yet.",timestamp:new Date().toISOString()}]),this.selectedSession_$.set({session:{sessionId:t.sessionId,workspacePath:"",status:"unknown",promptCount:0,toolCallCount:0,isArchived:!1},runtime:{isLive:!1,runtimeStatus:null,outputBufferLength:0}}),this.lastPolledHistoryFingerprint=this.computeGatewayHistoryFingerprint(o),this.startChatPolling()}catch(s){this.selectedSession_$.set(null),this.pushConsoleMessage({type:"error",text:`Load gateway session history failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.selectedSessionLoading_$.set(!1)}})}loadSessionEvents(t){return h(this,null,function*(){try{let s=yield this.ocSession_AS.getSessionEvents({sessionId:t.sessionId,eventType:t.eventType,limit:t.limit??500,latest:!0});this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let e of s.events)this.pushConsoleMessageFromEvent(e)}catch(s){this.selectedSessionEvents_$.set([]),this.pushConsoleMessage({type:"error",text:`Load events failed: ${f.getErrorMessageForDisplay(s)}`})}})}createSession(t){return h(this,null,function*(){try{let s=yield this.ocSession_AS.createSession(t),e=String(s.session.sessionId||"");return yield this.loadSessions(),e}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(t){return h(this,null,function*(){this.pushConsoleMessage({type:"prompt",text:t.content});try{let s=this.activeInstanceId_$();s?yield this.ocSession_AS.sendGatewayPrompt({sessionId:t.sessionId,instanceId:s,content:t.content}):yield this.ocSession_AS.sendPrompt(t)}catch(s){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}reconnectSession(t){return h(this,null,function*(){try{yield this.ocSession_AS.reconnectSession(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Reconnect failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(t){return h(this,null,function*(){try{yield this.ocSession_AS.stopExecution(t)}catch(s){throw this.pushConsoleMessage({type:"error",text:`Stop execution failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}terminateSession(t){return h(this,null,function*(){try{yield this.ocSession_AS.terminateSession(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Terminate failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}setSessionArchived(t){return h(this,null,function*(){try{yield this.ocSession_AS.setSessionArchived(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(t){return h(this,null,function*(){try{yield this.ocSession_AS.updateSessionConfig(t);let s=this.selectedSession_$();if(s?.session.sessionId===t.sessionId){let e=w({},s.session);t.mode!=null&&(e.mode=t.mode),t.reasoningEffort!=null&&(e.reasoningEffort=t.reasoningEffort),t.openclawAgentName!=null&&(e.openclawAgentName=t.openclawAgentName),this.selectedSession_$.set($(w({},s),{session:e}))}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(t){let s=this.activeSessionId_$();s&&s!==t&&this.socket_CS.emit("oc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(t),t&&this.socket_CS.emit("oc-session:subscribe",{sessionId:t})}clearLiveOutput(){this.stopChatPolling(),this.consoleMessages_$.set([]),this.sessionUsage_$.set({inputTokens:0,outputTokens:0,costUsd:0}),this.lastKnownEventSequence=-1}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pushConsoleMessage(t){let s=t.type==="assistant"||t.type==="prompt"?t.text.trim():t.text,e={listKey:t.listKey??this.allocateConsoleListKey(),type:t.type,text:s,timestamp:t.timestamp??new Date().toISOString(),expandableContent:t.expandableContent,rawData:t.rawData},n=this.consoleMessages_$();this.consoleMessages_$.set([...n,e])}static CHAT_POLL_INTERVAL_MS=5*C.second;static DETAIL_POLL_INTERVAL_MS=10*C.second;startChatPolling(){this.stopChatPolling(),this.chatPollHandle=setInterval(()=>{this.pollChatHistory()},l.CHAT_POLL_INTERVAL_MS),this.detailPollHandle=setInterval(()=>{let t=this.activeSessionId_$();t&&this.loadSessionDetail({sessionId:t,isSilent:!0})},l.DETAIL_POLL_INTERVAL_MS)}stopChatPolling(){this.chatPollHandle&&(clearInterval(this.chatPollHandle),this.chatPollHandle=null),this.detailPollHandle&&(clearInterval(this.detailPollHandle),this.detailPollHandle=null),this.lastPolledHistoryFingerprint=""}computeGatewayHistoryFingerprint(t){let s=t.length;if(!s)return"0";let e=t[s-1],n=typeof e.id=="string"?e.id:typeof e.messageId=="string"?e.messageId:"",o=l.extractGatewayChatMessageTimestamp(e),i=this.extractTextFromMessage(e),a=400,r=i.length>a?i.slice(0,a):i;return`${s}${n}${o}${r}`}pollChatHistory(){return h(this,null,function*(){let t=this.activeSessionId_$(),s=this.activeInstanceId_$();if(!(!t||!s))try{let e=yield this.ocSession_AS.getGatewaySessionHistory({sessionId:t,instanceId:s}),n=Array.isArray(e.history)?e.history:[],o=this.computeGatewayHistoryFingerprint(n);if(o===this.lastPolledHistoryFingerprint)return;this.lastPolledHistoryFingerprint=o;let i=this.parseGatewayHistory(n);this.ngZone.run(()=>{this.consoleMessages_$.set(i)})}catch{}})}parseGatewayHistory(t){let s=[],e=new Map,n=[];for(let i of t){let a=i.content;if(Array.isArray(a))for(let r of a){let u=typeof r.type=="string"?r.type:"";if(u==="tool_use"||u==="toolCall"){let S=typeof r.id=="string"?r.id:"";S&&n.push(S)}if(u==="tool_result"){let S=typeof r.tool_use_id=="string"?r.tool_use_id:"";S&&e.set(S,this.extractTextFromContentBlock(r))}}}let o=0;for(let i of t){let a=typeof i.role=="string"?i.role:"";if(a==="toolResult"||a==="tool_result"){let r=this.extractTextFromMessage(i);o<n.length&&(e.set(n[o],r),o++)}}for(let i of t){let a=typeof i.role=="string"?i.role:"unknown",r=i.content,u=l.extractGatewayChatMessageTimestamp(i);if(a==="toolResult"||a==="tool_result")continue;if(typeof r=="string"){s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":a==="assistant"?"assistant":"info",text:r,timestamp:u,rawData:i});continue}if(Array.isArray(r)){for(let c of r){let v=typeof c.type=="string"?c.type:"";if(v==="text")s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":"assistant",text:typeof c.text=="string"?c.text:"",timestamp:u,rawData:{_block:c,_message:{role:a,timestamp:u,contentBlockCount:r.length}}});else if(v==="tool_use"||v==="toolCall"){let b=typeof c.name=="string"?c.name:"unknown tool",T=typeof c.id=="string"?c.id:"",m=c.input??c.arguments,A=e.get(T);s.push({listKey:this.allocateConsoleListKey(),type:"tool",text:`${b}
|
|
@@ -6,4 +6,4 @@ ${JSON.stringify(m,null,2)}`,timestamp:u,expandableContent:A,rawData:{_block:c,_
|
|
|
6
6
|
`):A=JSON.stringify(c,null,2),s.push({listKey:this.allocateConsoleListKey(),type:"tool-result",text:A,timestamp:u,rawData:{_block:c}})}}else v==="thinking"?s.push({listKey:this.allocateConsoleListKey(),type:"info",text:typeof c.thinking=="string"?c.thinking:JSON.stringify(c,null,2),timestamp:u,rawData:{_block:c}}):s.push({listKey:this.allocateConsoleListKey(),type:"info",text:JSON.stringify(c,null,2),timestamp:u,rawData:{_block:c}})}continue}let S=typeof i.text=="string"?i.text:typeof i.message=="string"?i.message:JSON.stringify(i,null,2);s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":a==="assistant"?"assistant":a==="tool"||a==="tool_result"||a==="tool_use"?"tool":"info",text:S,timestamp:u,rawData:i})}return s}backfillMissedEvents(){return h(this,null,function*(){let t=this.activeSessionId_$();if(!(!t||this.lastKnownEventSequence<0))try{let e=(yield this.ocSession_AS.getSessionEvents({sessionId:t,sinceSequence:this.lastKnownEventSequence})).events;if(!e.length)return;this.ngZone.run(()=>{let n=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...n,...e]);for(let o of e)this.pushConsoleMessageFromEvent(o);this.updateLastKnownSequence(e)})}catch(s){C.DyFM_Log.warn("CCAP_OcSession_DS | backfill failed",s)}})}updateLastKnownSequence(t){for(let s of t)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}handleSocketEvent(t){let s=t.event,e=t.payload;try{this.ngZone.run(()=>{switch(s){case"oc-session:status":this.handleStatusUpdate(e);break;case"oc-session:output":this.handleOutputChunk(e);break;case"oc-session:event":this.handleSessionEvent(e);break;case"oc-session:list-update":this.handleListUpdate(e);break;case"ext-session-msg:message":this.handleAssembledMessage(e);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(e);break}})}catch(n){C.DyFM_Log.error(`CCAP_OcSession_DS | socket event error | event: ${s}`,n)}}handleStatusUpdate(t){let s=t.sessionId??"",e=t.status??"",n=t.statusMessage;this.lastStatusUpdate_$.set({sessionId:s,status:e,statusMessage:n});let i=this.sessions_$().map(r=>r.sessionId===s?$(w({},r),{status:e,statusMessage:n}):r);this.sessions_$.set(i);let a=this.selectedSession_$();if(a?.session.sessionId===s){let r=e==="running"||e==="waiting-input";this.selectedSession_$.set($(w({},a),{session:$(w({},a.session),{status:e,statusMessage:n}),runtime:$(w({},a.runtime),{isLive:r,runtimeStatus:e})}))}if(e==="errored"){let r=n?`OC Session error (${s}): ${n}`:`OC Session error (${s}): session entered errored state`;this.globalError_CS.showError(new Error(r),"oc-session-status")}}handleOutputChunk(t){let s=t.sessionId??"";if(s&&s!==this.activeSessionId_$())return;let e=t.content??"",n=t.type??"response";e&&this.pushConsoleMessage({type:n==="error"?"error":"assistant",text:e})}handleSessionEvent(t){let s=t.sessionId??"";if(s&&s!==this.activeSessionId_$())return;let e=t.event??{},n={sessionId:s,eventType:e.eventType??"",timestamp:e.timestamp??"",data:e.data??{},sequence:e.sequence??0};if(n.sequence<=this.lastKnownEventSequence)return;this.lastKnownEventSequence=n.sequence;let o=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...o,n]),this.pushConsoleMessageFromEvent(n)}handleListUpdate(t){this.loadSessions().catch(()=>{})}extractTextFromContentBlock(t){let s=t.content;return typeof s=="string"?s:Array.isArray(s)?s.map(e=>typeof e.text=="string"?e.text:JSON.stringify(e,null,2)).join(`
|
|
7
7
|
`):typeof t.text=="string"?t.text:JSON.stringify(t,null,2)}extractTextFromMessage(t){let s=t.content;return typeof s=="string"?s:Array.isArray(s)?s.map(e=>typeof e.text=="string"?e.text:JSON.stringify(e,null,2)).join(`
|
|
8
8
|
`):JSON.stringify(t,null,2)}pushConsoleMessageFromEvent(t){let s=t.data;switch(t.eventType){case"response-chunk":{let e=typeof s.content=="string"?s.content:"";e&&this.pushConsoleMessage({type:"assistant",text:e});break}case"response-complete":{let e=s.usage;if(e&&typeof e=="object"){let n=e,o=this.sessionUsage_$();this.sessionUsage_$.set({inputTokens:o.inputTokens+(typeof n.inputTokens=="number"?n.inputTokens:0),outputTokens:o.outputTokens+(typeof n.outputTokens=="number"?n.outputTokens:0),costUsd:o.costUsd+(typeof n.costUsd=="number"?n.costUsd:0)})}break}case"tool-call-start":{let e=typeof s.name=="string"?s.name:"unknown",n=s.input,o=n?this.summarizeToolInput(n):"",i=o?`${e}: ${o}`:e;this.pushConsoleMessage({type:"tool",text:i,rawData:s});break}case"tool-call-end":{let e=s.content??s.output,n=typeof e=="string"?e:JSON.stringify(e??{});this.pushConsoleMessage({type:"tool-result",text:n.length>200?n.substring(0,200)+"\u2026":n,expandableContent:n.length>200?n:void 0,rawData:s});break}case"error":{let e=s.message??s.content;typeof e=="string"&&e&&this.pushConsoleMessage({type:"error",text:e});break}case"connection-change":{let e=typeof s.state=="string"?s.state:"";e&&this.pushConsoleMessage({type:"info",text:`Gateway connection: ${e}`,rawData:s});break}default:break}}summarizeToolInput(t){if(typeof t=="string")return t.length>80?t.substring(0,80)+"\u2026":t;if(typeof t=="object"&&t!==null){let s=JSON.stringify(t);return s.length>80?s.substring(0,80)+"\u2026":s}return""}static extractGatewayChatMessageTimestamp(t){return I.extractTimestamp(t,I.GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES)??""}loadAssembledMessages(t){return h(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:t.sessionId,latest:!0});this.assembledMessages_$.set(s.messages)}catch(s){C.DyFM_Log.error(`CCAP_OcSession_DS | loadAssembledMessages failed | sessionId: ${t.sessionId}`,s)}})}handleAssembledMessage(t){let s=typeof t.sessionId=="string"?t.sessionId:"";if(!s||s!==this.activeSessionId_$())return;let e=t.message;if(!e||typeof e!="object")return;let n=e,o=this.assembledMessages_$();this.assembledMessages_$.set([...o,n])}handleAssembledMessageUpdate(t){let s=typeof t.sessionId=="string"?t.sessionId:"";if(!s||s!==this.activeSessionId_$())return;let e=typeof t.messageKey=="string"?t.messageKey:"";if(!e)return;let n=t.update;if(!n||typeof n!="object")return;let o=n,i=this.assembledMessages_$(),a=i.findIndex(S=>S.messageKey===e);if(a<0)return;let r=w({},i[a]);typeof o.bodyText=="string"&&(r.bodyText=o.bodyText),o.toolResult!==void 0&&(r.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(r.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(r.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let u=[...i];u[a]=r,this.assembledMessages_$.set(u)}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();export{I as a,lt as b};
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
9
|
+
//# sourceMappingURL=chunk-4TEHGQ5C.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
1
|
+
import{a as S}from"./chunk-EDQWK2Q5.js";import{M as m,t as g}from"./chunk-ELFCSLIP.js";import{C as y,N as h,a as i,aa as u,b as c,k as d,y as f}from"./chunk-TBMJSIBB.js";function I(){return{instanceId:crypto.randomUUID(),label:"default",gatewayUrl:"ws://127.0.0.1:18789",authToken:void 0,isPrimary:!1,autoConnect:!1,testState:"idle"}}function p(o){let l=[],s=o.gatewayUrl??"",t=(o.message??"").toLowerCase(),e=o.failureType??"";return s.startsWith("wss://")&&(e==="ws-error"||e==="ws-close")&&l.push('A gateway wss:// (TLS) protokollt haszn\xE1l \u2014 ha self-signed certificate-et haszn\xE1l, enged\xE9lyezd az "Allow self-signed TLS" opci\xF3t.'),s.startsWith("ws://")&&!s.startsWith("wss://")&&(e==="ws-error"||e==="ws-close")&&l.push("Ha a gateway TLS-t (wss://) haszn\xE1l, cser\xE9ld az URL-t ws:// helyett wss://-re."),e==="timeout"&&l.push("A gateway nem v\xE1laszolt id\u0151ben. Ellen\u0151rizd, hogy fut-e a gateway process \xE9s el\xE9rhet\u0151-e a megadott c\xEDmen."),e==="ws-error"&&!l.length&&l.push("Nem siker\xFClt csatlakozni. Ellen\u0151rizd: 1) fut-e a gateway, 2) helyes-e az URL \xE9s port, 3) nincs-e t\u0171zfal az \xFAtban."),(t.includes("econnrefused")||t.includes("connection refused"))&&l.push("A kapcsolat visszautas\xEDtva \u2014 a gateway nem hallgat a megadott c\xEDmen/porton."),(t.includes("certificate")||t.includes("cert")||t.includes("ssl")||t.includes("tls"))&&l.push('TLS tan\xFAs\xEDtv\xE1ny hiba \u2014 self-signed certificate eset\xE9n enged\xE9lyezd az "Allow self-signed TLS" opci\xF3t.'),l.length?`
|
|
2
2
|
|
|
3
3
|
`+l.join(`
|
|
4
4
|
`):""}var _=(()=>{class o extends m{ociData_AS=y(S);section_$=u({form:{instances:[]}});updateForm(s){this.section_$.update(t=>c(i({},t),{form:i(i({},t.form),s)}))}setSection(s){this.section_$.set(s)}getSectionId(){return g.openclawRegistry}getSection_$(){return this.section_$}doLoad(){return d(this,null,function*(){let s=new Map;for(let a of this.section_$().form.instances)s.set(a.instanceId,{testState:a.testState,testLatencyMs:a.testLatencyMs,testError:a.testError,testResultMessage:a.testResultMessage,authTokenEditMode:a.authTokenEditMode,pairState:a.pairState,pairError:a.pairError,pairMessage:a.pairMessage,pairResultMessage:a.pairResultMessage,connectionStatus:a.connectionStatus,lastConnectedAt:a.lastConnectedAt});let e=(yield this.settings_AS.getSection(g.openclawRegistry)).instances,n=Array.isArray(e)?e.map(a=>{let r=s.get(a.instanceId);return c(i({},a),{authToken:void 0,testState:r?.testState??"idle",testLatencyMs:r?.testLatencyMs,testError:r?.testError,testResultMessage:r?.testResultMessage,authTokenEditMode:r?.authTokenEditMode??!1,pairState:r?.pairState??"idle",pairError:r?.pairError,pairMessage:r?.pairMessage,pairResultMessage:r?.pairResultMessage,connectionStatus:r?.connectionStatus,lastConnectedAt:r?.lastConnectedAt})}):[];this.section_$.set({form:{instances:n}}),this.enrichWithOciStatus().catch(()=>{})})}enrichWithOciStatus(){return d(this,null,function*(){let s=yield this.ociData_AS.listInstances(),t=new Map;for(let e of s.list)t.set(e.instanceId,e);this.section_$.update(e=>c(i({},e),{form:{instances:e.form.instances.map(n=>{let a=t.get(n.instanceId);return a?c(i({},n),{connectionStatus:a.connectionStatus,lastConnectedAt:a.lastConnectedAt}):n})}}))})}buildSaveBody(){return{instances:this.section_$().form.instances.map(t=>({instanceId:t.instanceId,label:t.label,gatewayUrl:t.gatewayUrl,authToken:t.authToken,isPrimary:t.isPrimary,autoConnect:t.autoConnect,allowSelfSignedTls:t.allowSelfSignedTls}))}}savingInstanceId_$=u(null);buildSaveBodyForInstance(s){let t=this.section_$().form.instances.find(e=>e.instanceId===s);return t?{openclawRegistrySaveScope:"instance",targetInstanceId:s,instances:[{instanceId:t.instanceId,label:t.label,gatewayUrl:t.gatewayUrl,authToken:t.authToken,isPrimary:t.isPrimary,autoConnect:t.autoConnect,allowSelfSignedTls:t.allowSelfSignedTls}]}:{}}saveInstance(s){return d(this,null,function*(){this.savingInstanceId_$.set(s),this.saveError_$.set(null);try{let t=this.buildSaveBodyForInstance(s);yield this.doSave(t),yield this.load()}catch(t){this.saveError_$.set(o.getErrorMessage(t))}finally{this.savingInstanceId_$.set(null)}})}addInstance(){let s=I();this.section_$().form.instances.length||(s.isPrimary=!0),this.section_$.update(t=>c(i({},t),{form:{instances:[...t.form.instances,s]}}))}removeInstance(s){this.section_$.update(t=>{let e=t.form.instances.filter((a,r)=>r!==s);return(t.form.instances[s]?.isPrimary??!1)&&e.length>0&&(e[0]=c(i({},e[0]),{isPrimary:!0})),c(i({},t),{form:{instances:e}})})}updateInstance(s,t){this.section_$.update(e=>{let n=e.form.instances.map((a,r)=>r!==s?a:i(i({},a),t));return c(i({},e),{form:{instances:n}})})}setPrimary(s){this.section_$.update(t=>{let e=t.form.instances.map((n,a)=>c(i({},n),{isPrimary:a===s}));return c(i({},t),{form:{instances:e}})})}testConnection(s){return d(this,null,function*(){let t=this.section_$().form.instances[s];if(t){this.updateInstance(s,{testState:"testing",testLatencyMs:void 0,testError:void 0,testResultMessage:void 0});try{let e=yield this.settings_AS.testOpenclawConnection({gatewayUrl:t.gatewayUrl,authToken:t.authToken,allowSelfSignedTls:t.allowSelfSignedTls,instanceId:t.instanceId});if(e.success){let n=e.checks,a=n?" | WS: OK | v3 Handshake: OK | Sessions: OK"+(typeof n.sessionCount=="number"?` (${n.sessionCount} session)`:""):"";this.updateInstance(s,{testState:"ok",testLatencyMs:e.latencyMs,testError:void 0,testResultMessage:`Gateway el\xE9rhet\u0151 \u2014 v\xE1laszid\u0151: ${e.latencyMs}ms${a}`})}else{let n=e.error?.context?.failureType?String(e.error.context.failureType):"unknown",a=p({failureType:n,gatewayUrl:typeof e.error?.context?.gatewayUrl=="string"?e.error.context.gatewayUrl:t.gatewayUrl,message:e.error?.message});this.updateInstance(s,{testState:"error",testLatencyMs:void 0,testError:e.error??new Error("Connection failed"),testResultMessage:`Kapcsol\xF3d\xE1s sikertelen (${n}): ${e.error?.message??"ismeretlen hiba"}${a}`})}}catch(e){let n=e&&typeof e=="object"&&"error"in e?e.error:void 0,a=n?.message?String(n.message):e instanceof Error?e.message:String(e),r=p({gatewayUrl:t.gatewayUrl,message:a});this.updateInstance(s,{testState:"error",testError:n??e,testResultMessage:`Teszt hiba: ${a}${r}`})}}})}pairingInstanceId_$=u(null);pairInstance(s){return d(this,null,function*(){let t=this.section_$().form.instances[s];if(t){this.pairingInstanceId_$.set(t.instanceId),this.updateInstance(s,{pairState:"pairing",pairError:void 0,pairMessage:void 0});try{let e=yield this.settings_AS.pairOpenclawInstance({instanceId:t.instanceId});if(e.status==="paired")this.updateInstance(s,{pairState:"paired",pairingStatus:"paired",pairedAt:e.pairedAt,deviceTokenMasked:e.deviceTokenMasked,ccapDeviceId:e.ccapDeviceId,pairMessage:e.message,pairError:void 0,pairResultMessage:`Sikeresen p\xE1ros\xEDtva \u2014 device token megkapva${e.pairedAt?" ("+e.pairedAt+")":""}`});else if(e.status==="pending")this.updateInstance(s,{pairState:"pending",pairingStatus:"pending",ccapDeviceId:e.ccapDeviceId,pairingRequestId:e.pairingRequestId,pairMessage:e.message,pairError:void 0,pairResultMessage:`J\xF3v\xE1hagy\xE1sra v\xE1r a gateway-en \u2014 Device ID: ${e.ccapDeviceId??"N/A"}`});else if(e.status==="rejected")this.updateInstance(s,{pairState:"rejected",pairingStatus:"rejected",ccapDeviceId:e.ccapDeviceId,pairMessage:e.message,pairError:void 0,pairResultMessage:`A gateway elutas\xEDtotta a p\xE1ros\xEDt\xE1st: ${e.message??"ismeretlen ok"}`});else{let n=e.error?.context,a=p({failureType:typeof n?.failureType=="string"?n.failureType:void 0,gatewayUrl:typeof n?.gatewayUrl=="string"?n.gatewayUrl:t.gatewayUrl,message:e.message??e.error?.message});this.updateInstance(s,{pairState:"error",pairError:e.error??new Error(e.message??"Pairing failed"),pairMessage:e.message,pairResultMessage:`P\xE1ros\xEDt\xE1s hiba: ${e.message??e.error?.message??"ismeretlen hiba"}${a}`})}yield this.load()}catch(e){let n=e&&typeof e=="object"&&"error"in e?e.error:void 0,a=n?.message?String(n.message):e instanceof Error?e.message:String(e),r=n?.context,w=p({failureType:typeof r?.failureType=="string"?r.failureType:void 0,gatewayUrl:typeof r?.gatewayUrl=="string"?r.gatewayUrl:t.gatewayUrl,message:a});this.updateInstance(s,{pairState:"error",pairError:n??e,pairMessage:void 0,pairResultMessage:`P\xE1ros\xEDt\xE1s hiba: ${a}${w}`})}finally{this.pairingInstanceId_$.set(null)}}})}static \u0275fac=(()=>{let s;return function(e){return(s||(s=h(o)))(e||o)}})();static \u0275prov=f({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{_ as a};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-4XEPGDZH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-77HGZO43.js";import{K as p,L as S}from"./chunk-ELFCSLIP.js";import{C as i,k as e,wb as a,y as u}from"./chunk-TBMJSIBB.js";var h=(()=>{class n{setup_AS=i(c);settings_AS=i(S);static getErrorMessageForConfig(t){if(t instanceof a){let s=t.error,o=null;if(s!==null&&typeof s=="object"){let r=s;typeof r.error=="string"?o=r.error:r.error!=null?o=String(r.error):typeof r.message=="string"&&(o=r.message)}else typeof s=="string"&&(o=s);return p.getHttpErrorMessage(t,o)}return t instanceof Error?t.message||"Bet\xF6lt\xE9s sikertelen.":String(t)||"Bet\xF6lt\xE9s sikertelen."}getSetupStatus(){return e(this,null,function*(){return this.setup_AS.getSetupStatus()})}getVaultStatus(){return e(this,null,function*(){return this.setup_AS.getVaultStatus()})}getVaultKeyGenerate(){return e(this,null,function*(){return this.setup_AS.getVaultKeyGenerate()})}postVaultKey(t){return e(this,null,function*(){return this.setup_AS.postVaultKey(t)})}postProviderAccessAllow(t){return e(this,null,function*(){return this.settings_AS.postProviderAccessAllow(t)})}getSoulStatus(){return e(this,null,function*(){return this.settings_AS.getSoulStatus()})}getSoulContent(){return e(this,null,function*(){return this.settings_AS.getSoulContent()})}postGenerateSoul(t){return e(this,null,function*(){return this.settings_AS.postGenerateSoul(t)})}postSetup(t){return e(this,null,function*(){return this.setup_AS.postSetup(t)})}postTestLlmProvider(t){return e(this,null,function*(){return this.settings_AS.postTestLlmProvider(t)})}postListLlmModels(t){return e(this,null,function*(){return this.settings_AS.postListLlmModels(t)})}postTestMessagingProvider(t){return e(this,null,function*(){return this.settings_AS.postTestMessagingProvider(t)})}postMcpSync(t){return e(this,null,function*(){return this.settings_AS.postMcpSync(t)})}getSection(t){return e(this,null,function*(){return this.settings_AS.getSection(t)})}putSetupConfig(t){return e(this,null,function*(){return this.setup_AS.putSetupConfig(t)})}static \u0275fac=function(s){return new(s||n)};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-52JG2IIG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as a}from"./chunk-ELFCSLIP.js";import{C as n,p as t,xb as o,y as i}from"./chunk-TBMJSIBB.js";var m=(()=>{class r{baseUrl=`${a.api.baseUrl}/setup`;http=n(o);getSetupStatus(){return t(this.http.get(`${this.baseUrl}/status`))}getVaultStatus(){return t(this.http.get(`${this.baseUrl}/vault-status`))}getVaultKeyGenerate(){return t(this.http.get(`${this.baseUrl}/vault-key/generate`))}postVaultKey(e){return t(this.http.post(`${this.baseUrl}/vault-key`,{vaultKey:e}))}postSetup(e){return t(this.http.post(this.baseUrl,e))}putSetupConfig(e){let s=`${a.api.baseUrl}/settings`;return t(this.http.put(`${s}/config`,e))}static \u0275fac=function(s){return new(s||r)};static \u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-77HGZO43.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as R,b as O}from"./chunk-
|
|
1
|
+
import{a as R,b as O}from"./chunk-L7PQ72ZG.js";import{a as q}from"./chunk-DUN7ICUI.js";import{a as g}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-DZ74YN25.js";import{e as P}from"./chunk-I6OBHW45.js";import{h as y,j as L}from"./chunk-2LOFMRCO.js";import{p as D}from"./chunk-ELFCSLIP.js";import{C as v,R as T,a as h,aa as p,b as f,h as E,k as d,y as A}from"./chunk-TBMJSIBB.js";var S=E(D());var _=class u{static compareAsc(C,e){let s=(C.sequence??0)-(e.sequence??0);if(s!==0)return s;let n=typeof C.timestamp=="string"?C.timestamp:"",t=typeof e.timestamp=="string"?e.timestamp:"",o=n.localeCompare(t);if(o!==0)return o;let i=typeof C.messageKey=="string"?C.messageKey:"",r=typeof e.messageKey=="string"?e.messageKey:"";return i.localeCompare(r)}static sortAsc(C){return[...C].sort(u.compareAsc)}};var M=E(D());var x=(()=>{class u{parent;agentToolUseIds=new Set;activeSubAgentId="";toolUseIdToName=new Map;init(e){this.parent=e}resetTrackingState(){this.toolUseIdToName.clear(),this.agentToolUseIds.clear(),this.activeSubAgentId=""}handleSocketEvent(e,s){let n=e.event,t=e.payload;try{let o=typeof t.ccapId=="string"?t.ccapId:"";if(n!=="cc:rate-limit-update"&&n!=="ext-session-msg:message"&&n!=="ext-session-msg:update"&&o&&s.selectedCcapId&&o!==s.selectedCcapId){M.DyFM_Log.info(`CCAP_CcSession_DS | socket event dropped by instance filter | event: ${n} | eventCcapId: ${o} | selectedCcapId: ${s.selectedCcapId}`);return}switch(n){case"cc-session:status":this.handleStatusUpdate(t);break;case"cc-session:output":this.handleOutputChunk(t);break;case"cc-session:event":this.handleSessionEvent(t);break;case"cc-session:list-update":this.handleListUpdate(t);break;case"cc-session:session-update":this.handleSessionItemUpdate(t);break;case"agent-events":this.handleAgentEvent(t);break;case"ext-session-msg:message":this.handleAssembledMessage(t);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(t);break;case"cc:rate-limit-update":this.handleRateLimitBroadcast(t);break}}catch(o){let i=o instanceof Error?o.message:String(o);M.DyFM_Log.error(`CCAP_CcSession_DS | socket event error | event: ${n}`,o),s.globalErrorShowError(o instanceof Error?o:new Error(`CC Session socket event processing failed: ${n} \u2014 ${i}`),"cc-session-socket-event")}}pushConsoleMessageFromEvent(e,s,n){let t=e.data;switch(e.eventType){case"response-chunk":{this.pushResponseChunkBlocks(t);break}case"tool-call-start":{let o=t.name??t.tool_name??"unknown",i=typeof t.id=="string"?t.id:"";i&&this.toolUseIdToName.set(i,o),o==="Agent"&&i&&this.agentToolUseIds.add(i);let r=t.input,a=r?u.summarizeToolInput(r):"",l=a?`${o}: ${a}`:o,c=o==="Edit"?u.buildEditExpandableContent(r):void 0,m=o==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:l,expandableContent:c,rawData:t,parentAgentId:m||void 0});break}case"tool-call-end":{let o=t.content??t.output,i=typeof o=="string"?o:"",r=i.length>200?i.substring(0,200)+"\u2026":i;if(r){let a=i.length>200?i:void 0;this.parent.pushConsoleMessage({type:"tool-result",text:r,expandableContent:a,rawData:t,parentAgentId:this.activeSubAgentId||void 0})}break}case"response-complete":{this.activeSubAgentId="";let o=t.cost_usd,i=typeof o=="number"?` ($${o.toFixed(4)})`:"",r=typeof t.model=="string"?` \xB7 ${t.model}`:"";this.parent.pushConsoleMessage({type:"result",text:`Response complete${r}${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)}),this.accumulateUsage(t);break}case"prompt-sent":{let o=typeof t.content=="string"?t.content:"";o&&(this.parent.consoleMessages_$().some(a=>a.type==="prompt"&&a.text===o.trim())||this.parent.pushConsoleMessage({type:"prompt",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}));break}case"status-change":{let o=typeof t.from=="string"?t.from:"",i=typeof t.to=="string"?t.to:"";if(i){let r=typeof t.statusMessage=="string"?t.statusMessage:void 0,a=o?`${o} \u2192 ${i}`:i,l=r?`${a} \u2014 ${r}`:a;this.parent.pushConsoleMessage({type:"status",text:l,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)})}break}case"config-change":{let o=t.update,i=o&&typeof o=="object"?Object.keys(o).join(", "):"unknown";this.parent.pushConsoleMessage({type:"info",text:`Config updated: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"error":{let o=typeof t.message=="string"?t.message:"Unknown error";this.parent.pushConsoleMessage({type:"error",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}),s&&n(new Error(`CC Session error: ${o}`),"cc-session-event");break}case"usage-update":{this.accumulateUsage(t);break}case"cli-chunk":{this.handleCliChunkEvent(t);break}case"runner-overflow":{let i=`Runner buffer overflow: ${typeof t.droppedCount=="number"?t.droppedCount:0} output items lost during server disconnect`;this.parent.pushConsoleMessage({type:"error",text:i,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"interrupted-prompt":{let o=typeof t.reason=="string"?t.reason:"",i=typeof t.lastPrompt=="string"?t.lastPrompt:"",r=i.length>80?i.substring(0,80)+"\u2026":i,a=r?`Prompt interrupted (${o}): "${r}"`:`Prompt interrupted${o?" ("+o+")":""}`;this.parent.pushConsoleMessage({type:"status",text:a,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"session-init":{let o=typeof t.model=="string"?t.model:"",i=typeof t.claudeCodeVersion=="string"?t.claudeCodeVersion:"",r=typeof t.permissionMode=="string"?t.permissionMode:"",a=[];o&&a.push(o),r&&a.push(r),i&&a.push(`v${i}`);let l=a.length>0?`CLI init: ${a.join(" \xB7 ")}`:"CLI initialized",c=JSON.stringify(t,null,2);this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:c});break}case"config-mismatch":{let o=t.mismatches,i=Array.isArray(o)?o.map(r=>`${r.field}: requested "${r.requested}" \u2192 actual "${r.actual}"`).join(", "):"unknown mismatch";this.parent.pushConsoleMessage({type:"error",text:`Config mismatch: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"cli-args-record":{let o=typeof t.model=="string"?t.model:"default",i=typeof t.reasoningEffort=="string"?t.reasoningEffort:"default",r=typeof t.mode=="string"?t.mode:"normal",a=typeof t.permissionPolicy=="string"?t.permissionPolicy:"default",l=`CLI spawn: model=${o} \xB7 effort=${i} \xB7 mode=${r} \xB7 permission=${a}`;this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"stdout-line":case"stderr-line":break;default:{let o=e.eventType;this.parent.pushConsoleMessage({type:"raw",text:o,rawData:t});break}}}handleStatusUpdate(e){let s=e.sessionId??"",n=e.status??"",t=e.statusMessage;this.parent.lastStatusUpdate_$.set({sessionId:s,status:n,statusMessage:t});let i=this.parent.sessions_$().map(a=>a.sessionId===s?f(h({},a),{status:n,statusMessage:t}):a);this.parent.sessions_$.set(i);let r=this.parent.selectedSession_$();if(r?.session.sessionId===s){let a=u.isLiveCcSessionStatus(n);this.parent.selectedSession_$.set(f(h({},r),{session:f(h({},r.session),{status:n,statusMessage:t}),runtime:f(h({},r.runtime),{isLive:a,runtimeStatus:n})}))}if(n==="errored"){let a=(t??"").trim();if(a.startsWith("Auto-recovery: terminal runner dropped silently")||a.startsWith("Exit code:"))M.DyFM_Log.warn(`CCAP_CcSession | user-task-fail diagnostic (NOT recorded to /errors) | sessionId: ${s} | statusMessage: ${a}`);else{let c=t?`CC Session error (${s}): ${t}`:`CC Session error (${s}): session entered errored state`;this.parent.showGlobalError(new Error(c),"cc-session-status")}}this.parent.evaluateSessionEventsPolling()}handleOutputChunk(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.content??"",t=e.type??"stdout",o=this.parent.liveOutput_$(),i=n.split(`
|
|
2
2
|
`),r=3e3;if(t==="stderr"){let c=new Set(this.parent.liveStderrLines_$()),m=o.length;for(let b=0;b<i.length;b++)c.add(m+b);this.parent.liveStderrLines_$.set(c)}let l=[...o,...i];if(l.length>r){let c=l.length-r,m=l.slice(c),b=this.parent.liveStderrLines_$(),I=new Set;for(let w of b){let $=w-c;$>=0&&I.add($)}this.parent.liveStderrLines_$.set(I),this.parent.liveOutput_$.set(m)}else this.parent.liveOutput_$.set(l)}handleSessionEvent(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.event??{},t={sessionId:s,eventType:n.eventType??"",timestamp:n.timestamp??"",data:n.data??{},sequence:n.sequence??0,eventSource:typeof n.eventSource=="string"?n.eventSource:void 0};if(t.sequence<=this.parent.getLastKnownEventSequence())return;this.parent.setLastKnownEventSequence(t.sequence);let o=this.parent.selectedSessionEvents_$();this.parent.selectedSessionEvents_$.set([...o,t]),this.pushConsoleMessageFromEvent(t,!0,(i,r)=>{this.parent.showGlobalError(i,r)})}handleAgentEvent(e){let s=typeof e.phase=="string"?e.phase:void 0;if(s)switch(s){case g.runInitialization:this.parent.pushConsoleMessage({type:"status",text:"RUN initialization",isStatus:!0});break;case g.analyze:this.parent.pushConsoleMessage({type:"status",text:"Analyzing incoming message",isStatus:!0});break;case g.analyzeResult:{let n=typeof e.runIntent=="string"?e.runIntent:"";n&&this.parent.pushConsoleMessage({type:"run-intent",text:n,isStatus:!1});break}case g.assemble:this.parent.pushConsoleMessage({type:"status",text:"Refreshing Context",isStatus:!0});break;case g.executionStart:this.parent.pushConsoleMessage({type:"status",text:"Starting Agent",isStatus:!0});break;case g.llmAgenticLoop:this.parent.pushConsoleMessage({type:"status",text:"Selecting next move",isStatus:!0});break;case g.agenticLoopIteration:{let n=typeof e.action=="string"?e.action:"",t=typeof e.tool=="string"?e.tool:"",o=typeof e.intent=="string"?e.intent:"",i=[];n&&i.push(n),t&&i.push(t),o&&i.push(o);let r=i.join(" \xB7 ");r&&this.parent.pushConsoleMessage({type:"iteration",text:r,isStatus:!1});break}case g.llmToolDescription:this.parent.pushConsoleMessage({type:"status",text:"Assembling tool inputs",isStatus:!0});break;case g.llmToolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Figuring out what's wrong",isStatus:!0});break;case g.toolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Trying to fix inputs",isStatus:!0});break;case g.executionEnd:this.parent.pushConsoleMessage({type:"status",text:"Finishing run",isStatus:!0});break;case g.finalization:case g.llmRunFinalization:this.parent.pushConsoleMessage({type:"status",text:"Gathering what we've done",isStatus:!0});break;case g.postFinalization:this.parent.pushConsoleMessage({type:"status",text:"Memorizing stuff",isStatus:!0});break;case g.runFlowComplete:this.parent.pushConsoleMessage({type:"status",text:"Getting back to user",isStatus:!0});break}}handleRateLimitBroadcast(e){let s=e.rate_limit_info;if(!s||typeof s!="object")return;let n=s,t={status:typeof n.status=="string"?n.status:"",resetsAt:typeof n.resetsAt=="number"?n.resetsAt:0,rateLimitType:typeof n.rateLimitType=="string"?n.rateLimitType:"",utilization:typeof n.utilization=="number"?n.utilization:0,surpassedThreshold:typeof n.surpassedThreshold=="number"?n.surpassedThreshold:0,isUsingOverage:n.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(t)}handleListUpdate(e){let s=e.sessions??[],o=[...this.parent.sessions_$().some(i=>i.isArchived===!0)?s:s.filter(i=>!i.isArchived)].sort((i,r)=>{let a=i.lastActivityAt?new Date(i.lastActivityAt).getTime():0;return(r.lastActivityAt?new Date(r.lastActivityAt).getTime():0)-a});this.parent.sessions_$.set(o),this.mergeActiveSessionDetail(s)}handleSessionItemUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s)return;let n=typeof e.update=="object"&&e.update!==null?e.update:{},o=this.parent.sessions_$().map(r=>r.sessionId!==s?r:u.applySessionFieldUpdate(r,n));this.parent.sessions_$.set(o);let i=this.parent.selectedSession_$();i?.session.sessionId===s&&this.parent.selectedSession_$.set(f(h({},i),{session:u.applySessionFieldUpdate(i.session,n)}))}static applySessionFieldUpdate(e,s){let n=h({},e);return typeof s.toolCallCountIncrement=="number"&&(n.toolCallCount=(n.toolCallCount??0)+s.toolCallCountIncrement),typeof s.promptCountIncrement=="number"&&(n.promptCount=(n.promptCount??0)+s.promptCountIncrement),typeof s.inputTokensIncrement=="number"&&(n.inputTokensTotal=(n.inputTokensTotal??0)+s.inputTokensIncrement),typeof s.outputTokensIncrement=="number"&&(n.outputTokensTotal=(n.outputTokensTotal??0)+s.outputTokensIncrement),typeof s.costUsdIncrement=="number"&&(n.costUsdTotal=(n.costUsdTotal??0)+s.costUsdIncrement),typeof s.status=="string"&&(n.status=s.status),(typeof s.statusMessage=="string"||s.statusMessage===void 0)&&(n.statusMessage=s.statusMessage),typeof s.lastActivityAt=="string"&&(n.lastActivityAt=s.lastActivityAt),typeof s.lastPrompt=="string"&&(n.lastPrompt=s.lastPrompt),typeof s.activeModel=="string"&&(n.activeModel=s.activeModel),n}mergeActiveSessionDetail(e){let s=this.parent.activeSessionId_$();if(!s)return;let n=this.parent.selectedSession_$();if(!n)return;let t=e.find(o=>o.sessionId===s);t&&this.parent.selectedSession_$.set(f(h({},n),{session:h(h({},n.session),t)}))}handleAssembledMessage(e){let s=typeof e.sessionId=="string"?e.sessionId:"",n=this.parent.activeSessionId_$();if(!s||s!==n)return;let t=e.message;if(!t||typeof t!="object"){M.DyFM_Log.warn("CCAP_CcSession_DS | handleAssembledMessage dropped: invalid message payload",{sessionId:s,payloadKeys:Object.keys(e)});return}let o=t,i=this.parent.assembledMessages_$(),r=typeof o.messageKey=="string"?o.messageKey:"";r&&i.some(a=>a.messageKey===r)||this.parent.assembledMessages_$.set(_.sortAsc([...i,o]))}handleAssembledMessageUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s||s!==this.parent.activeSessionId_$())return;let n=typeof e.messageKey=="string"?e.messageKey:"";if(!n)return;let t=e.update;if(!t||typeof t!="object")return;let o=t,i=this.parent.assembledMessages_$(),r=i.findIndex(c=>c.messageKey===n);if(r<0)return;let a=h({},i[r]);typeof o.bodyText=="string"&&(a.bodyText=o.bodyText),o.toolResult!==void 0&&(a.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(a.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(a.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let l=[...i];l[r]=a,this.parent.assembledMessages_$.set(l)}handleCliChunkEvent(e){let s=typeof e.type=="string"?e.type:"";if(s==="rate_limit_event"){let n=e.rate_limit_info;if(n&&typeof n=="object"){let t=n,o={status:typeof t.status=="string"?t.status:"",resetsAt:typeof t.resetsAt=="number"?t.resetsAt:0,rateLimitType:typeof t.rateLimitType=="string"?t.rateLimitType:"",utilization:typeof t.utilization=="number"?t.utilization:0,surpassedThreshold:typeof t.surpassedThreshold=="number"?t.surpassedThreshold:0,isUsingOverage:t.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(o)}return}if(s==="system"){this.handleCliChunkSystemEvent(e);return}this.handleCliChunkToolResults(e)||this.parent.pushConsoleMessage({type:"raw",text:s||"cli-chunk",rawData:e})}handleCliChunkSystemEvent(e){let s=typeof e.subtype=="string"?e.subtype:"",n=typeof e.description=="string"?e.description:u.buildSystemEventBrief({subtype:s,data:e}),t=typeof e.tool_use_id=="string"?e.tool_use_id:"";t&&this.agentToolUseIds.has(t)&&(this.activeSubAgentId=t);let o=t&&this.agentToolUseIds.has(t)?t:this.activeSubAgentId||void 0,i=typeof e.last_tool_name=="string"?e.last_tool_name:"";if(s==="task_progress"&&i){this.parent.pushConsoleMessage({type:"tool",text:`${i}: ${n}`,isStatus:!1,rawData:e,parentAgentId:o});return}this.parent.pushConsoleMessage({type:"status-update",text:n,subtype:s,isStatus:!1,rawData:e,parentAgentId:o})}pushResponseChunkBlocks(e){let s=e.message,n=s&&typeof s=="object"?s.content:e.content;if(Array.isArray(n)){for(let t of n){if(!t||typeof t!="object")continue;let o=t,i=typeof o.type=="string"?o.type:"";if(i==="text"){let r=typeof o.text=="string"?o.text:"";r&&(this.activeSubAgentId="",this.parent.pushConsoleMessage({type:"assistant",text:r,rawData:e}))}else if(i==="tool_use")this.handleResponseChunkToolUse(o,e);else if(i==="tool_result")this.handleResponseChunkToolResult(o);else if(i==="thinking"){let r=typeof o.thinking=="string"?o.thinking:"";r&&this.parent.pushConsoleMessage({type:"thinking",text:r,rawData:o,parentAgentId:this.activeSubAgentId||void 0})}else i&&this.parent.pushConsoleMessage({type:"raw",text:i,rawData:o})}return}if(typeof n=="string"&&n){this.parent.pushConsoleMessage({type:"assistant",text:n,rawData:e});return}this.parent.pushConsoleMessage({type:"raw",text:"response-chunk",rawData:e})}handleResponseChunkToolUse(e,s){let n=typeof e.name=="string"?e.name:"unknown",t=typeof e.id=="string"?e.id:"";t&&this.toolUseIdToName.set(t,n),n==="Agent"&&t&&this.agentToolUseIds.add(t);let o=e.input,i=o?u.summarizeToolInput(o):"",r=i?`${n}: ${i}`:n,a=n==="Edit"?u.buildEditExpandableContent(o):void 0,l=n==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:r,expandableContent:a,rawData:e,parentAgentId:l||void 0})}handleResponseChunkToolResult(e){let s=typeof e.tool_use_id=="string"?e.tool_use_id:"",n=s&&this.agentToolUseIds.has(s)?s:this.activeSubAgentId||"",t=e.content??e.output,o=typeof t=="string"?t:"",i=o.length>200?o.substring(0,200)+"\u2026":o||"tool_result";this.parent.pushConsoleMessage({type:"tool-result",text:i,expandableContent:o.length>200?o:void 0,rawData:e,parentAgentId:n||void 0})}handleCliChunkToolResults(e){if((typeof e.type=="string"?e.type:"")!=="user")return!1;let n=e.message,t=n&&typeof n=="object"?n.content:null;if(!Array.isArray(t))return!1;let o=typeof e.parent_tool_use_id=="string"?e.parent_tool_use_id:"",i=!1;for(let r of t){if(!r||typeof r!="object")continue;let a=r,l=typeof a.type=="string"?a.type:"";if(l==="tool_result"){let c=typeof a.tool_use_id=="string"?a.tool_use_id:"",m=c?this.toolUseIdToName.get(c)??"":"",b=a.content,I=typeof b=="string"?b:"",w=a.is_error===!0,$=m?`${m}: `:"",k=I.length>200?I.substring(0,200)+"\u2026":I||"tool result",F=w?`${$}ERROR \u2014 ${k}`:`${$}${k}`;this.parent.pushConsoleMessage({type:"tool-result",text:F,expandableContent:I.length>200?I:void 0,rawData:f(h({},a),{parent_tool_use_id:o||void 0}),parentAgentId:o||void 0}),i=!0}else if(l==="text"&&o){let c=typeof a.text=="string"?a.text:"";if(c){let m=c.length>200?c.substring(0,200)+"\u2026":c;this.parent.pushConsoleMessage({type:"tool-result",text:m,expandableContent:c.length>200?c:void 0,rawData:{tool_use_id:o,type:"sub-agent-prompt",text:c},parentAgentId:o}),i=!0}}}return i}static isLiveCcSessionStatus(e){return e==="running"||e==="waiting-input"||e==="starting"}static buildSystemEventBrief(e){switch(e.subtype){case"init":{let s=typeof e.data.cwd=="string"?e.data.cwd:"",n=typeof e.data.model=="string"?e.data.model:"",t=["init"];return s&&t.push(s),n&&t.push(n),t.join(" \xB7 ")}case"task_updated":{let s=e.data.patch,n=s&&typeof s=="object"&&typeof s.status=="string"?s.status:"";return n?`task ${n}`:"task updated"}case"task_notification":{let s=typeof e.data.status=="string"?e.data.status:"";return s?`task ${s}`:"task notification"}default:return e.subtype||"system"}}static buildEditExpandableContent(e){if(!e||typeof e!="object")return;let s=e,n=s.old_string,t=s.new_string;if(typeof n!="string"||typeof t!="string")return;let o=500,i=n.length>o?n.substring(0,o)+"\u2026":n,r=t.length>o?t.substring(0,o)+"\u2026":t;return JSON.stringify({old:i,new:r})}static summarizeToolInput(e){if(typeof e=="string")return e.length>120?e.substring(0,120)+"\u2026":e;if(e&&typeof e=="object"){let s=e,n=s.file_path??s.path,t=s.command,o=s.pattern;if(typeof n=="string")return n;if(typeof t=="string")return t.length>120?t.substring(0,120)+"\u2026":t;if(typeof o=="string")return o}return""}accumulateUsage(e){let s=e.usage,n=typeof e.cost_usd=="number"?e.cost_usd:0,t=0,o=0;if(s&&typeof s=="object"){let r=s;t=typeof r.input_tokens=="number"?r.input_tokens:typeof r.promptTokens=="number"?r.promptTokens:0,o=typeof r.output_tokens=="number"?r.output_tokens:typeof r.completionTokens=="number"?r.completionTokens:0}let i=this.parent.sessionUsage_$();this.parent.sessionUsage_$.set({promptTokens:i.promptTokens+t,completionTokens:i.completionTokens+o,totalTokens:i.totalTokens+t+o,costUsd:i.costUsd+n})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();var ne=(()=>{class u{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);liveOutput_$=p([]);liveStderrLines_$=p(new Set);consoleMessages_$=p([]);assembledMessages_$=p([]);assembledMessagesHasMore_$=p(!1);isLoadingOlderMessages_$=p(!1);assembledMessagesLoaded_$=p(!1);lastStatusUpdate_$=p(null);sessionUsage_$=p({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0});rateLimitInfo_$=p(null);activeSessionId_$=p("");ccSession_AS=v(R);extSessionMsg_AS=v(q);globalError_CS=v(L);socket_CS=v(P);ngZone=v(T);peiContext_DS=v(U);socketEventHandler_CS=v(x);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;static SESSION_EVENTS_POLL_INTERVAL_MS=5*S.second;sessionEventsPollHandle=null;isSessionEventsPollInFlight=!1;constructor(){this.socketEventHandler_CS.init(this),this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.ngZone.run(()=>{this.socketEventHandler_CS.handleSocketEvent(e,{selectedCcapId:this.peiContext_DS.activeCcapId_$(),globalErrorShowError:(s,n)=>{this.globalError_CS.showError(s,n)}})})}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(!e)return;let s=this.activeSessionId_$();s&&(this.socket_CS.emit("cc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{}),this.loadSessionDetail({sessionId:s}).catch(()=>{})),this.loadSessions().catch(()=>{}),this.backfillMissedEvents()})}ngOnDestroy(){this.stopSessionEventsPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}showGlobalError(e,s){this.globalError_CS.showError(e,s)}getLastKnownEventSequence(){return this.lastKnownEventSequence}setLastKnownEventSequence(e){this.lastKnownEventSequence=e}evaluateSessionEventsPolling(){let e=this.activeSessionId_$(),s=this.resolveActiveSessionStatusForEventsPolling();!!(e&&this.lastKnownEventSequence>=0&&s!=null&&x.isLiveCcSessionStatus(s))?this.ensureSessionEventsPollingStarted():this.stopSessionEventsPolling()}loadSessions(e){return d(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let n=[...(yield this.ccSession_AS.listSessions({status:e?.status,workspacePath:e?.workspacePath,includeArchived:e?.includeArchived})).sessions].sort((t,o)=>{let i=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(n)}catch(s){this.sessionsLoadError_$.set(s)}finally{this.sessionsLoading_$.set(!1)}})}loadPersistedRateLimitState(e){return d(this,null,function*(){let s=e.ccapId?.trim()??"";if(s)try{let n=yield this.ccSession_AS.getRateLimitState({ccapId:s});this.mergePersistedRateLimitState(n.items)}catch(n){S.DyFM_Log.warn(`ClaudeCode_DS | loadPersistedRateLimitState failed (non-blocking) | ccapId: ${s} | ${n instanceof Error?n.message:String(n)}`)}})}mergePersistedRateLimitState(e){if(this.rateLimitInfo_$()!==null)return;let s=O.mapServerItemsToClientInfo(e);s!==null&&this.rateLimitInfo_$.set(s)}loadSessionDetail(e){return d(this,null,function*(){this.selectedSessionLoading_$.set(!0);try{let s=yield this.ccSession_AS.getSession({sessionId:e.sessionId}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionDetail stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSession_$.set(s)}catch(s){let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSession_$.set(null);let t=s instanceof Error?s.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${t}`})}finally{this.selectedSessionLoading_$.set(!1),this.evaluateSessionEventsPolling()}})}loadSessionEvents(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.getSessionEvents({sessionId:e.sessionId,eventType:e.eventType,limit:e.limit??500,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionEvents stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let t of s.events)this.socketEventHandler_CS.pushConsoleMessageFromEvent(t,!1,(o,i)=>{this.globalError_CS.showError(o,i)});this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{})}catch{let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSessionEvents_$.set([])}finally{this.evaluateSessionEventsPolling()}})}createSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.createSession(e),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(e){return d(this,null,function*(){let s=e.attachments?.filter(n=>n.isImage&&!!n.base64).map(n=>`data:${n.mimeType};base64,${n.base64}`);this.pushConsoleMessage({type:"prompt",text:e.content,imageDataUrls:s?.length?s:void 0});try{let n=yield this.ccSession_AS.sendPrompt(e);n.relayed&&(n.targetOnline?this.pushConsoleMessage({type:"info",text:`Prompt relayed to remote instance (task: ${n.taskId?.substring(0,8)}\u2026)`}):this.pushConsoleMessage({type:"error",text:`\u26A0 A t\xE1voli instance jelenleg offline \u2014 a prompt queue-ban v\xE1rakozik (task: ${n.taskId?.substring(0,8)}\u2026) \xE9s csak akkor k\xE9zbes\xEDt\u0151dik, ha a target instance online lesz. Ellen\u0151rizd, hogy mindk\xE9t instance fut, \xE9s a Settings \u2192 Cluster sharedSecret azonos.`})),this.evaluateSessionEventsPolling()}catch(n){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${y.getErrorMessageForDisplay(n)}`}),this.globalError_CS.showError(n,"CC Session sendPrompt"),n}})}forkSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.forkSession({sessionId:e.sessionId,label:e.label}),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Fork session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}resumeSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.resumeSession(e);s.relayed&&this.pushConsoleMessage({type:"info",text:s.targetOnline?"Resume relayed to remote instance":"Resume queued for offline remote instance"}),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Resume failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.stopExecution(e);if(s.relayed){this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Stop execution relayed to remote instance":"Stop execution queued for offline remote instance",role:"info"});return}let n=s.message||"Execution stopped";this.pushSystemAssembledMessage({sessionId:e.sessionId,text:n,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Stop execution failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}terminateSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.terminateSession(e);s.relayed?this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Terminate relayed to remote instance":"Terminate queued for offline remote instance",role:"info"}):this.pushSystemAssembledMessage({sessionId:e.sessionId,text:"Session terminated",role:"status"}),yield this.loadSessions()}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Terminate failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}restartRunner(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.restartRunner(e);this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restarted (new terminalId: ${s.newTerminalId.slice(0,8)}\u2026). New terminal window should open shortly.`,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restart failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}setSessionArchived(e){return d(this,null,function*(){try{yield this.ccSession_AS.setSessionArchived(e),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(e){return d(this,null,function*(){try{yield this.ccSession_AS.updateSessionConfig(e);let s=this.selectedSession_$();if(s?.session.sessionId===e.sessionId){let n=h({},s.session);e.label!=null&&(n.label=e.label),e.mode!=null&&(n.mode=e.mode),e.permissionPolicy!=null&&(n.permissionPolicy=e.permissionPolicy),e.reasoningEffort!=null&&(n.reasoningEffort=e.reasoningEffort),e.model!=null&&(n.model=e.model),e.isDebugMode!=null&&(n.isDebugMode=e.isDebugMode),this.selectedSession_$.set(f(h({},s),{session:n}))}if(e.label!=null){let n=this.sessions_$(),t=n.findIndex(o=>o.sessionId===e.sessionId);if(t>=0){let o=[...n];o[t]=f(h({},o[t]),{label:e.label}),this.sessions_$.set(o)}}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(e){let s=this.activeSessionId_$();s!==e&&this.stopSessionEventsPolling(),s&&s!==e&&this.socket_CS.emit("cc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("cc-session:subscribe",{sessionId:e})}clearLiveOutput(){this.stopSessionEventsPolling(),this.liveOutput_$.set([]),this.liveStderrLines_$.set(new Set),this.consoleMessages_$.set([]),this.assembledMessages_$.set([]),this.assembledMessagesHasMore_$.set(!1),this.isLoadingOlderMessages_$.set(!1),this.assembledMessagesLoaded_$.set(!1),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.lastStatusUpdate_$.set(null),this.sessionUsage_$.set({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0}),this.lastKnownEventSequence=-1,this.socketEventHandler_CS.resetTrackingState()}pushConsoleMessage(e){let s=e.type==="assistant"||e.type==="prompt"?e.text.trim():e.text,n={listKey:e.listKey??this.allocateConsoleListKey(),type:e.type,text:s,timestamp:e.timestamp??new Date().toISOString(),isStatus:e.isStatus??!1,expandableContent:e.expandableContent,rawData:e.rawData,subtype:e.subtype,parentAgentId:e.parentAgentId,imageDataUrls:e.imageDataUrls},t=this.consoleMessages_$();this.consoleMessages_$.set([...t,n])}loadAssembledMessages(e){return d(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadAssembledMessages stale \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n} | restMessageCount: ${s.messages.length}`);return}let t=this.assembledMessages_$(),o=new Set(s.messages.map(r=>r.messageKey).filter(r=>typeof r=="string"&&r.length>0)),i=t.filter(r=>!o.has(r.messageKey));this.assembledMessages_$.set(_.sortAsc([...s.messages,...i])),this.assembledMessagesHasMore_$.set(s.hasMore)}catch(s){S.DyFM_Log.error(`CCAP_CcSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,s)}finally{this.assembledMessagesLoaded_$.set(!0)}})}loadOlderAssembledMessages(e){return d(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let s=this.assembledMessages_$();if(!s.length)return;let n=s.reduce((t,o)=>(o.sequence??0)<t?o.sequence??0:t,s[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,beforeSequence:n,limit:e.limit??50});t.messages.length&&this.assembledMessages_$.set(_.sortAsc([...t.messages,...s])),this.assembledMessagesHasMore_$.set(t.hasMore)}catch(t){S.DyFM_Log.error(`CCAP_CcSession_DS | loadOlderAssembledMessages failed | sessionId: ${e.sessionId}`,t)}finally{this.isLoadingOlderMessages_$.set(!1)}})}pushSystemAssembledMessage(e){let s=this.assembledMessages_$(),n=s.length?s.reduce((o,i)=>(i.sequence??0)>o?i.sequence??0:o,0):0,t={messageKey:`sys-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,sessionId:e.sessionId,sessionType:"cc",messageRole:e.role,bodyText:e.text,timestamp:new Date().toISOString(),sequence:n+1};this.assembledMessages_$.set(_.sortAsc([...s,t])),this.pushConsoleMessage({type:e.role==="error"?"error":e.role==="status"?"status":"info",text:e.text,isStatus:e.role==="status"})}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pullEventsSinceLastKnownSequence(e){return d(this,null,function*(){let s=this.activeSessionId_$();if(!(!s||this.lastKnownEventSequence<0))try{let t=(yield this.ccSession_AS.getSessionEvents({sessionId:s,sinceSequence:this.lastKnownEventSequence})).events;if(!t.length)return;this.ngZone.run(()=>{let o=this.activeSessionId_$();if(o!==s){S.DyFM_Log.info(`CCAP_CcSession_DS | pull(${e}) stale \u2014 discarded | requestedSessionId: ${s} | currentActiveSessionId: ${o} | newEventCount: ${t.length}`);return}let i=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...i,...t]);for(let r of t)this.socketEventHandler_CS.pushConsoleMessageFromEvent(r,!0,(a,l)=>{this.globalError_CS.showError(a,l)});this.updateLastKnownSequence(t)})}catch(n){let t=e==="poll"?"session events poll failed":"backfill failed";S.DyFM_Log.warn(`CCAP_CcSession_DS | ${t}`,n)}})}backfillMissedEvents(){return d(this,null,function*(){yield this.pullEventsSinceLastKnownSequence("backfill")})}updateLastKnownSequence(e){for(let s of e)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}resolveActiveSessionStatusForEventsPolling(){let e=this.activeSessionId_$();if(!e)return null;let s=this.selectedSession_$();if(s?.session.sessionId===e)return s.session.status;let n=this.lastStatusUpdate_$();return n?.sessionId===e?n.status:this.sessions_$().find(o=>o.sessionId===e)?.status??null}ensureSessionEventsPollingStarted(){this.sessionEventsPollHandle===null&&(this.sessionEventsPollHandle=setInterval(()=>{this.onSessionEventsPollTick()},u.SESSION_EVENTS_POLL_INTERVAL_MS))}stopSessionEventsPolling(){this.sessionEventsPollHandle!==null&&(clearInterval(this.sessionEventsPollHandle),this.sessionEventsPollHandle=null),this.isSessionEventsPollInFlight=!1}onSessionEventsPollTick(){return d(this,null,function*(){if(!this.isSessionEventsPollInFlight){this.isSessionEventsPollInFlight=!0;try{yield this.pullEventsSinceLastKnownSequence("poll");let e=this.activeSessionId_$();e&&(yield this.loadAssembledMessages({sessionId:e}))}finally{this.isSessionEventsPollInFlight=!1}}})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();export{ne as a};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-7JFONJTJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as H,b as Ae}from"./chunk-NWNWKLLW.js";import{a as we}from"./chunk-UFBTR2BG.js";import{a as te,b as p}from"./chunk-6Y7O2W4H.js";import{a as Ie,b as ge,c as ve,d as Re}from"./chunk-WBMES66O.js";import{a as Ce}from"./chunk-23UH5S6I.js";import{e as ye}from"./chunk-WHRKP7CF.js";import{L as he,p as ee,t as ae}from"./chunk-CDKFHI2N.js";import{C as x,a as R,aa as P,b as A,d as Se,h as J,hb as D,jb as me,k as $,wb as fe,y as Z}from"./chunk-TBMJSIBB.js";var M=function(i){return i.standing="standing",i.working="working",i.sitting="sitting",i.walkingIn="walking-in",i.walkingOut="walking-out",i.walkingBetween="walking-between",i.idleWalking="idle-walking",i}(M||{});var O=function(i){return i.workstation="workstation",i.rest="rest",i.meeting="meeting",i}(O||{});var C=function(i){return i.ccap="ccap",i.openclaw="openclaw",i.ccSession="cc-session",i.caSession="ca-session",i}(C||{});var X=function(i){return i.average="average",i.slim="slim",i.stocky="stocky",i.athletic="athletic",i}(X||{});var Y=function(i){return i.casual="casual",i.formal="formal",i.hoodie="hoodie",i.tshirt="tshirt",i}(Y||{});var j=function(i){return i.short="short",i.long="long",i.spiky="spiky",i.curly="curly",i.bald="bald",i.mohawk="mohawk",i}(j||{});var it=["#f5c592","#e8a96e","#d4845a","#c06a3c","#9b5930","#7a3d1c","#4a2412"],ot=["#1a1006","#3b2505","#6b3d11","#9b6720","#c9a227","#e8d5a3","#f0f0f0","#a0a0a0","#2a4080","#8b1a2a"],at=["#1e40af","#166534","#7f1d1d","#4c1d95","#134e4a","#713f12","#374151","#6b21a8","#0f766e","#1e3a5f","#b45309","#be185d","#475569"],rt=["#1e293b","#374151","#292524","#1e3a5f","#1a2e05","#2d1b69","#3b1a08","#1a1a2e"],ct=["#1a1a1a","#3b5998","#2d8a4e","#8b4513","#4b0082","#5f9ea0"],b={skinColor:"#e8a96e",hairColor:"#1a1006",hairStyle:j.short,shirtColor:"#1e40af",clothingStyle:Y.casual,pantsColor:"#1e293b",eyeColor:"#1a1a1a",bodyType:X.average,displayName:""},_={skinColor:"#b0bec5",hairColor:"#37474f",hairStyle:j.short,shirtColor:"#0288d1",clothingStyle:Y.tshirt,pantsColor:"#263238",eyeColor:"#00bcd4",bodyType:X.average,displayName:""},L={skinColor:"#d4c4a8",hairColor:"#2d1b0e",hairStyle:j.short,shirtColor:"#5b21b6",clothingStyle:Y.casual,pantsColor:"#312e81",eyeColor:"#4338ca",bodyType:X.average,displayName:""},N={skinColor:"#e2e8f0",hairColor:"#0f172a",hairStyle:j.short,shirtColor:"#0d9488",clothingStyle:Y.casual,pantsColor:"#134e4a",eyeColor:"#14b8a6",bodyType:X.average,displayName:""};var Me=2e3;var F=(()=>{class i{static officeInstanceIdPrefix="cai:";static build(e){return`${i.officeInstanceIdPrefix}${e.ccapId.trim()}`}static parseCcapId(e){let t=e.trim();if(!t.startsWith(i.officeInstanceIdPrefix))return null;let s=t.slice(i.officeInstanceIdPrefix.length).trim();return s.length>0?s:null}}return i})();var U=(()=>{class i{static officeInstanceIdPrefix="cci:";static build(e){return`${i.officeInstanceIdPrefix}${e.ccapId.trim()}`}static parseCcapId(e){let t=e.trim();if(!t.startsWith(i.officeInstanceIdPrefix))return null;let s=t.slice(i.officeInstanceIdPrefix.length).trim();return s.length>0?s:null}}return i})();var E=class i{static clampGrid(n){return{workstationCols:i.clampDim(n.workstationCols),workstationRows:i.clampDim(n.workstationRows),restCols:i.clampDim(n.restCols),restRows:i.clampDim(n.restRows),meetingCols:i.clampDim(n.meetingCols),meetingRows:i.clampDim(n.meetingRows)}}static computeDerived(n){let e=i.clampGrid(n),t=4*32,s=3*32,a=i.computeWorkspaceWidthPx(e.workstationCols),o=i.computeLoungeWidthPx(e.restCols),r=6*32,c=a+r+o,u=8*32,l=c+u,d=e.workstationRows*6*32,f=3*32+e.meetingRows*5*32+3*32,h=Math.max(2*32,Math.round(f/2)),I=s+d,S=2*32,m=I+h+32,g=t-32,w=S,y=c+2*32,v=m-w,k=m+3*32,T={x:t,y:s,w:a,h:d},G={x:t+a,y:s,w:r,h:m-s},B={x:t+a+r,y:s,w:o,h:m-s},oe={x:t,y:I,w:a,h},De=t+a,ue=t+a+r,Oe=I,be={x:G.x+Math.round(G.w/2),y:m-2*32},_e=i.buildWorkstationSlots(e,T),de=i.buildMeetingSlots(e,oe),Le=i.buildWorkstationDesks(e,T),pe=i.buildLoungeSeatingLayout(e,B),Ne=pe.restSlots,We=pe.loungeSofas,$e=i.buildConferenceFurniture(oe,de),Fe=t+Math.round(a/2),Ue=ue+Math.round(o/2),Ve=t+Math.round(a/2),Ge=s+32,Xe=S+32/2;return{worldW:l,worldH:k,environmentOverflowPx:3e3,buildingOuter:{x:g,y:w,w:y,h:v},floorWorkspace:T,floorLobby:G,floorLounge:B,floorConference:oe,zoneSplitX:De,zoneSplitLobbyLoungeX:ue,topFloorBottomY:Oe,door:be,workstationSlots:_e,restSlots:Ne,meetingSlots:de,workstationDesks:Le,loungeSofas:We,conference:$e,windowsNorthY:Xe,labelWorkspaceX:Fe,labelLoungeX:Ue,labelConferenceX:Ve,ceilingNeonY:Ge}}static workstationCapacity(n){let e=i.clampGrid(n);return e.workstationCols*e.workstationRows}static restCapacity(n){let e=i.clampGrid(n);return e.restCols*e.restRows*2}static meetingCapacity(n){return 2*i.clampGrid(n).meetingCols+2}static clampDim(n){if(!Number.isFinite(n))return 1;let e=Math.floor(n);return e<1?1:e>12?12:e}static computeWorkspaceWidthPx(n){let s=128+n*256;return Math.max(896,s)}static computeLoungeWidthPx(n){return 140+n*170}static buildWorkstationSlots(n,e){let t=[],s=i.workstationPitchX(n.workstationCols,e.w),a=e.x+64,o=i.workstationRowFeetY(n.workstationRows,e);for(let r=0;r<n.workstationRows;r++)for(let c=0;c<n.workstationCols;c++)t.push({x:Math.round(a+c*s),y:o[r]});return t}static workstationPitchX(n,e){return n<=1?0:n===3&&e===896?96:Math.max(96,Math.round((e-192)/(n-1)))}static workstationRowFeetY(n,e){if(n===3)return[e.y+112,e.y+250,e.y+452];let t=[],s=48,o=e.h-s-48,r=n<=1?0:o/(n-1);for(let c=0;c<n;c++)t.push(Math.round(e.y+s+c*r));return t}static buildWorkstationDesks(n,e){let t=[],s=i.workstationPitchX(n.workstationCols,e.w),a=e.x+64,o=i.workstationDeskTopY(n.workstationRows,e);for(let r=0;r<n.workstationRows;r++)for(let c=0;c<n.workstationCols;c++){let l=Math.round(a+c*s)-32,d=o[r],f=(r+c)%2===0;t.push({trackId:`ws-${r}-${c}`,x:l,y:d,monitorIsCyan:f})}return t}static workstationDeskTopY(n,e){return n===3?[e.y+64,e.y+256,e.y+404]:i.workstationRowFeetY(n,e).map(s=>s-48)}static buildLoungeSeatingLayout(n,e){let t=[],s=[],h=e.w-32,S=(e.h-2*18)/Math.max(1,n.restRows);for(let m=0;m<n.restRows;m++){let g=e.y+18+m*S,w=S-14;if(n.restCols<=1){let y=Math.min(188,Math.max(120,e.w-32)),v=e.x+Math.round((e.w-y)/2),k=Math.round(g+w*.12);t.push({trackId:`lounge-${m}-0`,x:v,y:k,w:y,h:36});let T=k+36+14;s.push({x:v+Math.round(y*.33),y:T}),s.push({x:v+Math.round(y*.67),y:T})}else{let y=(n.restCols-1)*12,v=Math.max(96,Math.round((h-y)/n.restCols));for(let k=0;k<n.restCols;k++){let T=e.x+16+k*(v+12),G=Math.round(g+w*.12);t.push({trackId:`lounge-${m}-${k}`,x:T,y:G,w:v,h:36});let B=G+36+14;s.push({x:T+Math.round(v*.33),y:B}),s.push({x:T+Math.round(v*.67),y:B})}}}return{restSlots:s,loungeSofas:t}}static buildMeetingSlots(n,e){return i.computeConferenceChairPositions(n,e)}static computeConferenceChairPositions(n,e){let t=[],s=Math.min(420,e.w-80),a=56,o=e.x+Math.round((e.w-s)/2),r=e.y+Math.round(e.h/2)-Math.round(a/2),c=26,u=Math.max(1,n.meetingCols);for(let d=0;d<u;d++){let f=o+Math.round((d+1)*s/(u+1));t.push({x:f,y:r-c})}for(let d=0;d<u;d++){let f=o+Math.round((d+1)*s/(u+1));t.push({x:f,y:r+a+c})}let l=r+Math.round(a/2);return t.push({x:o-c,y:l}),t.push({x:o+s+c,y:l}),t}static buildConferenceFurniture(n,e){let t=Math.min(420,n.w-80),s=56,a={x:n.x+Math.round((n.w-t)/2),y:n.y+Math.round(n.h/2)-Math.round(s/2),w:t,h:s},o=e.map((r,c)=>({trackId:`conf-chair-${c}`,x:r.x,y:r.y}));return{table:a,chairs:o}}};var se={workstationCols:3,workstationRows:3,restCols:2,restRows:3,meetingCols:2,meetingRows:2,maxEverWorkstationCols:3,maxEverWorkstationRows:3,maxEverRestCols:2,maxEverRestRows:3,maxEverMeetingCols:2,maxEverMeetingRows:2},ke=(()=>{class i{settings_AS=x(he);layoutPersisted_$=P(se);saveTimerId;grid_$=D(()=>{let e=this.layoutPersisted_$();return{workstationCols:e.workstationCols,workstationRows:e.workstationRows,restCols:e.restCols,restRows:e.restRows,meetingCols:e.meetingCols,meetingRows:e.meetingRows}});derived_$=D(()=>E.computeDerived(this.grid_$()));workstationCapacity_$=D(()=>E.workstationCapacity(this.grid_$()));restCapacity_$=D(()=>E.restCapacity(this.grid_$()));meetingCapacity_$=D(()=>E.meetingCapacity(this.grid_$()));maxEverDisplay_$=D(()=>this.layoutPersisted_$());constructor(){this.loadFromServer()}loadFromServer(){return $(this,null,function*(){try{let e=yield this.settings_AS.getSection(ae.darkOfficeLayout);if(e==null||Object.keys(e).length===0){this.layoutPersisted_$.set(se);return}let t=i.parsePayload(e);this.layoutPersisted_$.set(t)}catch{this.layoutPersisted_$.set(se)}})}ensureMinCapacitiesFromSceneCharacters(e){let t=0,s=0,a=0;for(let c of e)c.scenePlacement===O.meeting?a++:c.presence===p.working?t++:s++;let o=this.layoutPersisted_$(),r=R({},o);r=i.expandGridToFit(r,t,s,a),!i.isSamePersisted(o,r)&&(this.layoutPersisted_$.set(r),this.scheduleDebouncedSave())}applyPersistedFromUser(e){return $(this,null,function*(){this.layoutPersisted_$.set(R({},e)),yield this.saveNow()})}validateProposedGridAgainstSceneCharacters(e){let t=E.clampGrid(e.grid),s=0,a=0,o=0;for(let l of e.characters)l.scenePlacement===O.meeting?o++:l.presence===p.working?s++:a++;let r=E.workstationCapacity(t),c=E.restCapacity(t),u=E.meetingCapacity(t);return s<=r&&a<=c&&o<=u?null:`Dark office layout rejected: scene occupancy exceeds proposed capacity. workstation=${s}/${r}, rest=${a}/${c}, meeting=${o}/${u}.`}getWorkstationSlots(){return this.derived_$().workstationSlots}getRestSlots(){return this.derived_$().restSlots}getMeetingSlots(){return this.derived_$().meetingSlots}getDoorPosition(){return this.derived_$().door}scheduleDebouncedSave(){this.saveTimerId!==void 0&&clearTimeout(this.saveTimerId),this.saveTimerId=setTimeout(()=>{this.saveTimerId=void 0,this.saveNow()},500)}saveNow(){return $(this,null,function*(){let e={workstationCols:this.layoutPersisted_$().workstationCols,workstationRows:this.layoutPersisted_$().workstationRows,restCols:this.layoutPersisted_$().restCols,restRows:this.layoutPersisted_$().restRows,meetingCols:this.layoutPersisted_$().meetingCols,meetingRows:this.layoutPersisted_$().meetingRows,maxEverWorkstationCols:this.layoutPersisted_$().maxEverWorkstationCols,maxEverWorkstationRows:this.layoutPersisted_$().maxEverWorkstationRows,maxEverRestCols:this.layoutPersisted_$().maxEverRestCols,maxEverRestRows:this.layoutPersisted_$().maxEverRestRows,maxEverMeetingCols:this.layoutPersisted_$().maxEverMeetingCols,maxEverMeetingRows:this.layoutPersisted_$().maxEverMeetingRows};try{yield this.settings_AS.saveSection(ae.darkOfficeLayout,e)}catch{}})}static parsePayload(e){let t=(o,r)=>{let c=e[o];return typeof c=="number"&&Number.isFinite(c)?Math.floor(c):r},s=se,a={workstationCols:t("workstationCols",s.workstationCols),workstationRows:t("workstationRows",s.workstationRows),restCols:t("restCols",s.restCols),restRows:t("restRows",s.restRows),meetingCols:t("meetingCols",s.meetingCols),meetingRows:t("meetingRows",s.meetingRows),maxEverWorkstationCols:t("maxEverWorkstationCols",s.maxEverWorkstationCols),maxEverWorkstationRows:t("maxEverWorkstationRows",s.maxEverWorkstationRows),maxEverRestCols:t("maxEverRestCols",s.maxEverRestCols),maxEverRestRows:t("maxEverRestRows",s.maxEverRestRows),maxEverMeetingCols:t("maxEverMeetingCols",s.maxEverMeetingCols),maxEverMeetingRows:t("maxEverMeetingRows",s.maxEverMeetingRows)};return i.clampPersisted(a)}static clampPersisted(e){let t=a=>{if(!Number.isFinite(a))return 1;let o=Math.floor(a);return o<1?1:o>12?12:o},s={workstationCols:t(e.workstationCols),workstationRows:t(e.workstationRows),restCols:t(e.restCols),restRows:t(e.restRows),meetingCols:t(e.meetingCols),meetingRows:t(e.meetingRows),maxEverWorkstationCols:t(e.maxEverWorkstationCols),maxEverWorkstationRows:t(e.maxEverWorkstationRows),maxEverRestCols:t(e.maxEverRestCols),maxEverRestRows:t(e.maxEverRestRows),maxEverMeetingCols:t(e.maxEverMeetingCols),maxEverMeetingRows:t(e.maxEverMeetingRows)};return s.maxEverWorkstationCols=Math.max(s.maxEverWorkstationCols,s.workstationCols),s.maxEverWorkstationRows=Math.max(s.maxEverWorkstationRows,s.workstationRows),s.maxEverRestCols=Math.max(s.maxEverRestCols,s.restCols),s.maxEverRestRows=Math.max(s.maxEverRestRows,s.restRows),s.maxEverMeetingCols=Math.max(s.maxEverMeetingCols,s.meetingCols),s.maxEverMeetingRows=Math.max(s.maxEverMeetingRows,s.meetingRows),s}static isSamePersisted(e,t){return e.workstationCols===t.workstationCols&&e.workstationRows===t.workstationRows&&e.restCols===t.restCols&&e.restRows===t.restRows&&e.meetingCols===t.meetingCols&&e.meetingRows===t.meetingRows&&e.maxEverWorkstationCols===t.maxEverWorkstationCols&&e.maxEverWorkstationRows===t.maxEverWorkstationRows&&e.maxEverRestCols===t.maxEverRestCols&&e.maxEverRestRows===t.maxEverRestRows&&e.maxEverMeetingCols===t.maxEverMeetingCols&&e.maxEverMeetingRows===t.maxEverMeetingRows}static expandGridToFit(e,t,s,a){let o=e.workstationCols,r=e.workstationRows,c=e.restCols,u=e.restRows,l=e.meetingCols,d=e.meetingRows;for(;o*r<t&&(o<12||r<12);)o<=r?o=Math.min(12,o+1):r=Math.min(12,r+1);for(;c*u<s&&(c<12||u<12);)c<=u?c=Math.min(12,c+1):u=Math.min(12,u+1);for(;l*d<a&&(l<12||d<12);)l<=d?l=Math.min(12,l+1):d=Math.min(12,d+1);let f={workstationCols:o,workstationRows:r,restCols:c,restRows:u,meetingCols:l,meetingRows:d,maxEverWorkstationCols:Math.max(e.maxEverWorkstationCols,o),maxEverWorkstationRows:Math.max(e.maxEverWorkstationRows,r),maxEverRestCols:Math.max(e.maxEverRestCols,c),maxEverRestRows:Math.max(e.maxEverRestRows,u),maxEverMeetingCols:Math.max(e.maxEverMeetingCols,l),maxEverMeetingRows:Math.max(e.maxEverMeetingRows,d)};return i.clampPersisted(f)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Z({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ie=J(ee());var K=function(i){return i.connected="connected",i.disconnected="disconnected",i.error="error",i.unreachable="unreachable",i}(K||{});var W=class{static pickCcapPrimary(n){if(!n.length)return null;let e=(o,r)=>new Date(r.lastActivityAt).getTime()-new Date(o.lastActivityAt).getTime(),t=n.filter(o=>o.hasActiveRun===!0||o.presence===p.working);return t.length>0?[...t].sort(e)[0]??null:[...n].sort(e)[0]??null}static pickCciPrimary(n){if(!n.length)return null;let e=(o,r)=>new Date(r.lastActivityAt).getTime()-new Date(o.lastActivityAt).getTime(),t=n.filter(o=>o.hasActiveSession===!0||o.presence===p.working);return t.length>0?[...t].sort(e)[0]??null:[...n].sort(e)[0]??null}static pickCaiPrimary(n){if(!n.length)return null;let e=(o,r)=>new Date(r.lastActivityAt).getTime()-new Date(o.lastActivityAt).getTime(),t=n.filter(o=>o.hasActiveSession===!0||o.presence===p.working);return t.length>0?[...t].sort(e)[0]??null:[...n].sort(e)[0]??null}};var z=class{static pickPrimary(n){if(!n.length)return null;let e=(o,r)=>new Date(r.lastActivityAt).getTime()-new Date(o.lastActivityAt).getTime(),t=n.filter(o=>o.hasActiveSession);return t.length>0?[...t].sort(e)[0]??null:[...n].sort(e)[0]??null}};var xe=J(ee()),Pe=2*xe.minute;var ne=class i{static mapGatewaySessionsResponse(n){let e=[];for(let t of n.sessions){let s=i.mapOneSession(t);s!==null&&e.push(s)}return e}static mapOneSession(n){let e=typeof n.key=="string"?n.key:typeof n.sessionId=="string"?n.sessionId:typeof n.id=="string"?n.id:"";if(!e.trim())return null;let t=typeof n.status=="string"?n.status.trim().toLowerCase():"",s=i.resolvePresenceFromGatewaySession({statusLower:t,raw:n}),a=s===p.working,o=H.extractTimestamp(n,H.GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES)??new Date().toISOString(),r=typeof n.label=="string"?n.label:typeof n.name=="string"?n.name:typeof n.title=="string"?n.title:void 0,u=(typeof n.statusMessage=="string"?n.statusMessage:void 0)?.trim()||(t.length>0?t:"OpenClaw session"),l=typeof n.lastPrompt=="string"?n.lastPrompt:void 0;return{sessionId:e,sessionName:r,presence:s,lastActivityAt:o,hasActiveSession:a,activitySummary:u,lastMessage:l}}static resolvePresenceFromGatewaySession(n){let e=n.statusLower;return e==="connecting"?p.working:i.hasRecentGatewayOutputTimestamp(n.raw)?p.working:e?p.idle:p.idle}static hasRecentGatewayOutputTimestamp(n){let e=H.extractTimestamp(n,H.GATEWAY_OUTPUT_ONLY_TIMESTAMP_FIELD_NAMES);if(!e?.length)return!1;let t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t<=Pe}};var re=function(i){return i.creating="creating",i.connecting="connecting",i.waitingInput="waiting-input",i.running="running",i.errored="errored",i.completed="completed",i.terminated="terminated",i.disconnected="disconnected",i}(re||{});var Ee=J(ee()),ce=(()=>{class i{static INTERESTING_SESSION_WINDOW_MS=5*Ee.minute;static prune(e,t){if(e.length===0)return[];let s=t.nowMs,a=t.recentWindowMs,o=[];for(let u of e){let l=new Date(u.lastActivityAt).getTime();Number.isNaN(l)||o.push({row:u,ms:l})}if(o.length===0)return[];let r=o.filter(u=>s-u.ms<=a),c=u=>{let d=[...u].sort((f,h)=>{let I=h.ms-f.ms;return I!==0?I:f.row.sessionId.localeCompare(h.row.sessionId)})[0];if(!d)throw new Error("DO_InstanceTrackerSessionStatuses_Prune_Util | empty sort");return d.row};if(r.length>0){let u=new Map;for(let l of r){let d=u.get(l.row.sessionId);(!d||l.ms>=d.ms)&&u.set(l.row.sessionId,l)}return[...u.values()].sort((l,d)=>d.ms-l.ms).map(l=>l.row)}return[c(o)]}}return i})();var V=class i{static resolveCcapSessionStatuses(n){let e=i.mapRawToCcapSessionStatuses(n.inst.rawSessionStatuses),t=e.length>0?e:i.snapshotCcapSessionStatuses({darkOffice_DS:n.darkOffice_DS,instanceId:n.inst.instanceId});return i.applyInterestingSessionWindow(t)}static resolveOciSessionStatuses(n){let e=i.mapRawToOciSessionStatuses(n.inst.rawSessionStatuses),t=e.length>0?e:i.snapshotOciSessionStatuses({darkOffice_DS:n.darkOffice_DS,instanceId:n.inst.instanceId});return i.applyInterestingSessionWindow(t)}static resolveCciSessionStatuses(n){let e=U.parseCcapId(n.inst.instanceId);if(!e)return[];let t=i.mapRawToCciSessionStatuses(n.inst.rawSessionStatuses),s=t.length>0?t:i.snapshotCciSessionStatuses({darkOffice_DS:n.darkOffice_DS,ccapId:e});return i.applyInterestingSessionWindow(s)}static resolveCaiSessionStatuses(n){let e=F.parseCcapId(n.inst.instanceId);if(!e)return[];let t=i.mapRawToCaiSessionStatuses(n.inst.rawSessionStatuses),s=t.length>0?t:i.snapshotCaiSessionStatuses({darkOffice_DS:n.darkOffice_DS,ccapId:e});return i.applyInterestingSessionWindow(s)}static applyInterestingSessionWindow(n){return ce.prune(n,{nowMs:Date.now(),recentWindowMs:ce.INTERESTING_SESSION_WINDOW_MS})}static snapshotCcapSessionStatuses(n){let t=n.darkOffice_DS.getCcapInstanceDataSnapshot(n.instanceId)?.sessionStatuses;return Array.isArray(t)?t:[]}static snapshotOciSessionStatuses(n){let t=n.darkOffice_DS.getOciInstanceDataSnapshot(n.instanceId)?.sessionStatuses;return Array.isArray(t)?t:[]}static snapshotCciSessionStatuses(n){let t=n.darkOffice_DS.getCciInstanceDataSnapshot(n.ccapId)?.sessionStatuses;return Array.isArray(t)?t:[]}static snapshotCaiSessionStatuses(n){let t=n.darkOffice_DS.getCaiInstanceDataSnapshot(n.ccapId)?.sessionStatuses;return Array.isArray(t)?t:[]}static mapRawToCcapSessionStatuses(n){if(!Array.isArray(n)||n.length===0)return[];let e=[];for(let t of n){if(!("hasActiveRun"in t))continue;let s=t.hasActiveRun;if(typeof s!="boolean")continue;let a=t.sessionId;if(typeof a!="string")continue;let o=t.presence;if(!i.isPresenceEnum(o))continue;let r=t.lastActivityAt;if(typeof r!="string")continue;let c=t.activitySummary;if(typeof c!="string")continue;let u=t.sessionName,l=t.lastMessage,d;if("activeRunPhase"in t){let h=t.activeRunPhase;if(h==null)d=void 0;else if(i.isRunFlowPhaseValue(h))d=h;else continue}let f;if("activeRunId"in t){let h=t.activeRunId;if(typeof h=="string")f=h;else if(h!=null)continue}e.push({sessionId:a,sessionName:typeof u=="string"?u:void 0,presence:o,lastActivityAt:r,hasActiveRun:s,activeRunId:f,activeRunPhase:d,activitySummary:c,lastMessage:typeof l=="string"?l:void 0})}return e}static mapRawToCaiSessionStatuses(n){if(!Array.isArray(n)||n.length===0)return[];let e=[];for(let t of n){if("hasActiveRun"in t||!("hasActiveSession"in t)||!("currentCaSessionStatus"in t))continue;let s=i.tryMapToOciOrCciShape(t);if(s===null)continue;let a=Reflect.get(t,"currentCaSessionStatus"),o;i.isCaSessionStatusValue(a)&&(o=a),e.push({sessionId:s.sessionId,sessionName:s.sessionName,presence:s.presence,lastActivityAt:s.lastActivityAt,hasActiveSession:s.hasActiveSession,currentCaSessionStatus:o,activitySummary:s.activitySummary,lastMessage:s.lastMessage})}return e}static mapRawToOciSessionStatuses(n){if(!Array.isArray(n)||n.length===0)return[];let e=[];for(let t of n){if("hasActiveRun"in t||!("hasActiveSession"in t))continue;let s=i.tryMapToOciOrCciShape(t);s!==null&&e.push(s)}return e}static mapRawToCciSessionStatuses(n){if(!Array.isArray(n)||n.length===0)return[];let e=[];for(let t of n){if("hasActiveRun"in t||!("hasActiveSession"in t))continue;let s=i.tryMapToOciOrCciShape(t);if(s===null)continue;let a;if("currentCcSessionStatus"in t){let o=t.currentCcSessionStatus;typeof o=="string"&&(a=o)}e.push({sessionId:s.sessionId,sessionName:s.sessionName,presence:s.presence,lastActivityAt:s.lastActivityAt,hasActiveSession:s.hasActiveSession,currentCcSessionStatus:a,activitySummary:s.activitySummary,lastMessage:s.lastMessage})}return e}static tryMapToOciOrCciShape(n){if(!("hasActiveSession"in n))return null;let e=Reflect.get(n,"hasActiveSession");if(typeof e!="boolean")return null;let t=n.sessionId;if(typeof t!="string")return null;let s=n.presence;if(!i.isPresenceEnum(s))return null;let a=n.lastActivityAt;if(typeof a!="string")return null;let o=n.activitySummary;if(typeof o!="string")return null;let r=n.sessionName,c=n.lastMessage;return{sessionId:t,sessionName:typeof r=="string"?r:void 0,presence:s,lastActivityAt:a,hasActiveSession:e,activitySummary:o,lastMessage:typeof c=="string"?c:void 0}}static isPresenceEnum(n){return typeof n!="string"?!1:Object.values(p).includes(n)}static isRunFlowPhaseValue(n){if(typeof n!="string")return!1;let e=Object.values(we);for(let t of e)if(t===n)return!0;return!1}static isCaSessionStatusValue(n){if(typeof n!="string")return!1;let e=Object.values(re);for(let t of e)if(t===n)return!0;return!1}};var Te=72,q=class i{static buildLastMessageDerivedStatusLabel(n){let e=n.trim();return e&&e.startsWith("[QUEUE]")?"Message queued":""}static buildPanelActiveSessionRows(n){let e=n.rawSessionStatuses;if(!e||e.length===0)return[];let t=n.characterType,s;return t===C.openclaw||t===C.ccSession||t===C.caSession?s=i.collectActiveOciOrCciFromUnion(e):s=i.collectActiveCcapFromUnion(e),s.length<=1?[]:s}static buildSessionDisplayLabel(n,e){let t=e?.trim();return t||i.shortenSessionId(n)}static truncateLastMessagePreview(n){let e=n.trim();return e?e.length<=Te?e:`${e.slice(0,Te-1)}\u2026`:""}static isCcapSessionRow(n){return"hasActiveRun"in n}static isOciOrCciSessionRow(n){return"hasActiveSession"in n}static isCcapSessionActive(n){return n.hasActiveRun===!0?!0:n.presence===p.working}static isOciOrCciSessionActive(n){return n.hasActiveSession===!0?!0:n.presence===p.working}static isSessionActiveForSceneDuplication(n){if(n.row.presence===p.offline)return!1;let e=n.characterType;return e===C.openclaw||e===C.ccSession||e===C.caSession?i.isOciOrCciSessionRow(n.row)?i.isOciOrCciSessionActive(n.row):!1:i.isCcapSessionRow(n.row)?i.isCcapSessionActive(n.row):!1}static shortenSessionId(n){return n.length<=10?n:`${n.slice(0,8)}\u2026`}static collectActiveCcapFromUnion(n){let e=[];for(let t of n){if(!i.isCcapSessionRow(t)||!i.isCcapSessionActive(t))continue;let s=i.truncateLastMessagePreview(t.lastMessage??"");e.push({sessionId:t.sessionId,displayLabel:i.buildSessionDisplayLabel(t.sessionId,t.sessionName),presence:t.presence,activitySummary:t.activitySummary,lastMessagePreview:s})}return e}static collectActiveOciOrCciFromUnion(n){let e=[];for(let t of n){if(!i.isOciOrCciSessionRow(t)||!i.isOciOrCciSessionActive(t))continue;let s=i.truncateLastMessagePreview(t.lastMessage??"");e.push({sessionId:t.sessionId,displayLabel:i.buildSessionDisplayLabel(t.sessionId,t.sessionName),presence:t.presence,activitySummary:t.activitySummary,lastMessagePreview:s})}return e}};var le=J(ee());var Q=(()=>{class i{static sceneRecentActivityWindowMs=5*le.minute;static sceneIdleWalkActivityWindowMs=15*le.minute;static parseLastActivityMs(e){let t=Date.parse(e);return Number.isNaN(t)?Number.NaN:t}static isSessionRecentAndOnline(e){if(e.presence===p.offline)return!1;let t=i.parseLastActivityMs(e.lastActivityAtIso);return Number.isNaN(t)?!1:e.nowMs-t<=e.windowMs}static rowLastActivityIso(e){return e.lastActivityAt??""}static isSessionWorkingForSceneCharacter(e){return e.presence===p.working||"hasActiveRun"in e&&e.hasActiveRun===!0||"hasActiveSession"in e&&e.hasActiveSession===!0}static isWorkingSessionRecentAndOnline(e){return i.isSessionWorkingForSceneCharacter(e.row)?i.isSessionRecentAndOnline({lastActivityAtIso:i.rowLastActivityIso(e.row),presence:e.row.presence,nowMs:e.nowMs,windowMs:e.windowMs}):!1}static isSessionInIdleWalkWindow(e){if(e.row.presence===p.offline||i.isWorkingSessionRecentAndOnline({row:e.row,nowMs:e.nowMs,windowMs:e.recentWindowMs}))return!1;let t=i.parseLastActivityMs(i.rowLastActivityIso(e.row));return Number.isNaN(t)?!1:e.nowMs-t<=e.idleWalkWindowMs}static pickNewestSessionByLastActivity(e){let t=e.sessions;return t.length===0?null:[...t].sort((o,r)=>{let c=i.parseLastActivityMs(i.rowLastActivityIso(o)),u=i.parseLastActivityMs(i.rowLastActivityIso(r)),l=!Number.isNaN(c),d=!Number.isNaN(u);return l&&d&&u!==c?u-c:l!==d?l?-1:1:o.sessionId.localeCompare(r.sessionId)})[0]??null}}return i})();var je="instance-data:session-status-updated",Be="openclaw-instance-data:status-updated",He="cci-instance-data:status-updated",Ke="cai-instance-data:status-updated",ys=(()=>{class i{instances_$=P([]);characters_$=D(()=>{let e=this.expandInstancesToCharacters(this.instances_$());return this.assignDistinctSlotsForScene(e)});loading_$=P(!1);loadError_$=P(null);isServerUnreachable_$=P(!1);selectedInstanceId_$=P(null);chatPopupSessionId_$=P(null);chatPopupSessionType_$=P(null);instanceStatusDetailInstanceId_$=P(null);instanceData_AS=x(ve);ociInstanceData_AS=x(Ce);cciInstanceData_AS=x(ge);caiInstanceData_AS=x(Ie);runtimeInstances_DS=x(Re);socket_CS=x(ye);ocSession_DS=x(Ae);darkOfficeLayout_DS=x(ke);constructor(){me(()=>{this.darkOfficeLayout_DS.ensureMinCapacitiesFromSceneCharacters(this.characters_$())},{allowSignalWrites:!0}),this.socket_CS.event$.subscribe(e=>{e.event===je?this.handleInstanceStatusUpdate(e.payload):e.event===Be?this.handleOciInstanceStatusUpdate(e.payload):e.event===He?this.handleCciInstanceStatusUpdate(e.payload):e.event===Ke&&this.handleCaiInstanceStatusUpdate(e.payload)})}workstationSlotMap=new Map;restSlotMap=new Map;patchTimerMap=new Map;meetingRoomLingerMs=2*ie.minute;sessionMeetingRoomUntilByKey=new Map;loadInstanceData(){return $(this,null,function*(){this.loading_$.set(!0),this.loadError_$.set(null);try{yield this.runtimeInstances_DS.loadCcapInstanceList();let e=this.runtimeInstances_DS.ccapInstanceListError_$();if(e){e instanceof fe&&e.status===0?this.isServerUnreachable_$.set(!0):this.loadError_$.set(e);return}yield this.runtimeInstances_DS.loadOciInstanceListAllowEmpty(),yield this.runtimeInstances_DS.loadCciInstanceListAllowEmpty(),yield this.runtimeInstances_DS.loadCaiInstanceListAllowEmpty(),this.isServerUnreachable_$.set(!1);let s=this.runtimeInstances_DS.ccapInstanceList_$().filter(d=>d.status===te.active),a=this.runtimeInstances_DS.ociInstanceList_$(),o=yield this.enrichOciListWithGatewaySessions({list:a}),c=this.runtimeInstances_DS.cciInstanceList_$().filter(d=>d.status===te.active),l=this.runtimeInstances_DS.caiInstanceList_$().filter(d=>d.status===te.active);this.applyAllInstanceData(s,o,c,l)}finally{this.loading_$.set(!1)}})}enrichOciListWithGatewaySessions(e){return $(this,null,function*(){return yield Promise.all(e.list.map(s=>$(this,null,function*(){let a=s.sessionStatuses??[];if(!(s.connectionStatus===K.connected)||a.length>0)return s;try{let r=yield this.ocSession_DS.fetchGatewaySessionsForInstance({instanceId:s.instanceId}),c=ne.mapGatewaySessionsResponse({sessions:r.rawSessions});return c.length===0?s:A(R({},s),{sessionStatuses:c})}catch(r){return ie.DyFM_Error.logSimple("CCAP_DarkOffice_DS | enrichOciListWithGatewaySessions failed",r),s}})))})}saveVisuals(e,t){this.instances_$.update(s=>s.map(a=>a.instanceId===e?A(R({},a),{visuals:t}):a)),this.schedulePatch(e,t)}dismissError(){this.loadError_$.set(null)}openChatPopup(e,t=null){this.chatPopupSessionId_$.set(e),this.chatPopupSessionType_$.set(t)}closeChatPopup(){this.chatPopupSessionId_$.set(null),this.chatPopupSessionType_$.set(null)}selectInstance(e){this.selectedInstanceId_$.set(e)}openInstanceStatusDetail(e){this.instanceStatusDetailInstanceId_$.set(e)}closeInstanceStatusDetail(){this.instanceStatusDetailInstanceId_$.set(null)}getCcapInstanceDataSnapshot(e){return this.runtimeInstances_DS.ccapInstanceList_$().find(t=>t.ccapId===e)}getOciInstanceDataSnapshot(e){return this.runtimeInstances_DS.ociInstanceList_$().find(t=>t.instanceId===e)}getCciInstanceDataSnapshot(e){return this.runtimeInstances_DS.cciInstanceList_$().find(t=>t.ccapId===e)}getCaiInstanceDataSnapshot(e){return this.runtimeInstances_DS.caiInstanceList_$().find(t=>t.ccapId===e)}resolveOfficeInstanceById(e){return e?this.instances_$().find(a=>a.instanceId===e)??null:null}resolveModalCcapSessionStatuses(e){return V.resolveCcapSessionStatuses({inst:e,darkOffice_DS:this})}resolveModalOciSessionStatuses(e){return V.resolveOciSessionStatuses({inst:e,darkOffice_DS:this})}resolveModalCciSessionStatuses(e){return V.resolveCciSessionStatuses({inst:e,darkOffice_DS:this})}resolveModalCaiSessionStatuses(e){return V.resolveCaiSessionStatuses({inst:e,darkOffice_DS:this})}buildInstanceStatusDetailRuntimeHint(e){let t=e.characterType??C.ccap;if(t===C.openclaw)return this.resolveModalOciSessionStatuses(e).length>0||this.getOciInstanceDataSnapshot(e.instanceId)?"":"No matching OCI row in runtime list (last load only; socket updates may not refresh this list).";if(t===C.ccSession){let o=U.parseCcapId(e.instanceId);return!o||this.resolveModalCciSessionStatuses(e).length>0||this.getCciInstanceDataSnapshot(o)?"":"No matching CCI row in runtime list (last load only; socket updates may not refresh this list)."}if(t===C.caSession){let o=F.parseCcapId(e.instanceId);return!o||this.resolveModalCaiSessionStatuses(e).length>0||this.getCaiInstanceDataSnapshot(o)?"":"No matching CAI row in runtime list (last load only; socket updates may not refresh this list)."}return this.resolveModalCcapSessionStatuses(e).length>0||this.getCcapInstanceDataSnapshot(e.instanceId)?"":"No matching CCAP row in runtime list (last load only; socket updates may not refresh this list)."}pruneExpiredMeetingRoomKeys(e){for(let t of[...this.sessionMeetingRoomUntilByKey.keys()]){let s=this.sessionMeetingRoomUntilByKey.get(t);s!==void 0&&s<=e&&this.sessionMeetingRoomUntilByKey.delete(t)}}applyMeetingRoomTransitionForSessionDiff(e){let t=Date.now();this.pruneExpiredMeetingRoomKeys(t);let s=new Map;for(let a of e.previousRows??[])s.set(a.sessionId,a.presence);for(let a of e.nextRows??[]){let o=s.get(a.sessionId),r=`${e.baseInstanceId}::${a.sessionId}`;o===p.working&&a.presence===p.idle&&this.sessionMeetingRoomUntilByKey.set(r,t+this.meetingRoomLingerMs)}}resolveScenePlacementForSessionKey(e){let t=`${e.baseInstanceId}::${e.sessionId}`,s=this.sessionMeetingRoomUntilByKey.get(t);if(s!==void 0&&Date.now()<s)return O.meeting}handleInstanceStatusUpdate(e){let t=typeof e.ccapId=="string"?e.ccapId:void 0,s=e.sessionStatuses,a=Array.isArray(s)?s:void 0;if(!t||!a)return;let o=this.instances_$(),r=o.findIndex(h=>h.instanceId===t);if(r<0){this.loadInstanceData();return}let c=o[r];this.applyMeetingRoomTransitionForSessionDiff({baseInstanceId:t,previousRows:c.rawSessionStatuses,nextRows:a});let u=this.resolveSessionInfoFromStatuses(a),l=this.assignSlot(t,u.presence,c),d=this.resolveAnimState(u.presence,c.presence),f=this.applyPanelCardProjection(A(R({},c),{presence:u.presence,activitySummary:u.activitySummary,currentRunFlowPhase:u.currentRunFlowPhase,latestSessionId:u.latestSessionId,lastMessage:u.lastMessage,animState:d,previousPresence:c.presence,assignedSlotIndex:l,rawSessionStatuses:a}));this.instances_$.update(h=>h.map(I=>I.instanceId===t?f:I))}resolveSessionInfoFromStatuses(e){if(e.length===0)return{presence:p.idle,activitySummary:"No CCAP Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let s=W.pickCcapPrimary(e)??e[0];return{presence:s.presence,activitySummary:s.activitySummary,currentRunFlowPhase:s.activeRunPhase??null,latestSessionId:s.sessionId,lastMessage:s.lastMessage??""}}applyPanelCardProjection(e){let t=e.sessionName??"";if(!t&&e.latestSessionId&&e.rawSessionStatuses){for(let s of e.rawSessionStatuses)if(s.sessionId===e.latestSessionId){t=s.sessionName??"";break}}return A(R({},e),{sessionName:t,lastMessageDerivedStatusLabel:q.buildLastMessageDerivedStatusLabel(e.lastMessage),panelActiveSessionRows:q.buildPanelActiveSessionRows({characterType:e.characterType,rawSessionStatuses:e.rawSessionStatuses})})}applyAllInstanceData(e,t,s,a){let o=this.instances_$(),r=new Map(o.map(S=>[S.instanceId,S])),c=e.map(S=>{let m=r.get(S.ccapId),g=m?.visuals??this.mapToVisuals(S),w=this.resolveSessionInfo(S),y=this.assignSlot(S.ccapId,w.presence,m),v=this.resolveAnimState(w.presence,m?.presence??null);return this.applyPanelCardProjection({instanceId:S.ccapId,presence:w.presence,activitySummary:w.activitySummary,currentRunFlowPhase:w.currentRunFlowPhase,latestSessionId:w.latestSessionId,lastMessage:w.lastMessage,visuals:g,animState:v,previousPresence:m?.presence??null,assignedSlotIndex:y,characterType:C.ccap,connectionStatus:null,rawSessionStatuses:S.sessionStatuses??[],lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]})}),u=t.map(S=>{let m=r.get(S.instanceId),g=m?.visuals??this.mapOciToVisuals(S),w=this.resolveOciSessionInfo(S),y=this.assignSlot(S.instanceId,w.presence,m),v=this.resolveAnimState(w.presence,m?.presence??null);return this.applyPanelCardProjection({instanceId:S.instanceId,presence:w.presence,activitySummary:w.activitySummary,currentRunFlowPhase:null,latestSessionId:w.latestSessionId,lastMessage:w.lastMessage,visuals:g,animState:v,previousPresence:m?.presence??null,assignedSlotIndex:y,characterType:C.openclaw,connectionStatus:S.connectionStatus??null,rawSessionStatuses:S.sessionStatuses??[],lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]})}),l=s.map(S=>{let m=U.build({ccapId:S.ccapId}),g=r.get(m),w=g?.visuals??this.mapCciToVisuals(S),y=this.resolveCciSessionInfo(S),v=this.assignSlot(m,y.presence,g),k=this.resolveAnimState(y.presence,g?.presence??null);return this.applyPanelCardProjection({instanceId:m,presence:y.presence,activitySummary:y.activitySummary,currentRunFlowPhase:y.currentRunFlowPhase,latestSessionId:y.latestSessionId,lastMessage:y.lastMessage,visuals:w,animState:k,previousPresence:g?.presence??null,assignedSlotIndex:v,characterType:C.ccSession,connectionStatus:null,rawSessionStatuses:S.sessionStatuses??[],lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]})}),d=a.map(S=>{let m=F.build({ccapId:S.ccapId}),g=r.get(m),w=g?.visuals??this.mapCaiToVisuals(S),y=this.resolveCaiSessionInfo(S),v=this.assignSlot(m,y.presence,g),k=this.resolveAnimState(y.presence,g?.presence??null);return this.applyPanelCardProjection({instanceId:m,presence:y.presence,activitySummary:y.activitySummary,currentRunFlowPhase:y.currentRunFlowPhase,latestSessionId:y.latestSessionId,lastMessage:y.lastMessage,visuals:w,animState:k,previousPresence:g?.presence??null,assignedSlotIndex:v,characterType:C.caSession,connectionStatus:null,rawSessionStatuses:S.sessionStatuses??[],lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]})}),f=[...c,...u,...l,...d];for(let S of f){let m=r.get(S.instanceId);this.applyMeetingRoomTransitionForSessionDiff({baseInstanceId:S.instanceId,previousRows:m?.rawSessionStatuses,nextRows:S.rawSessionStatuses})}let h=new Set(f.map(S=>S.instanceId)),I=o.filter(S=>!h.has(S.instanceId)&&S.animState!==M.walkingOut).map(S=>this.applyPanelCardProjection(A(R({},S),{animState:M.walkingOut})));this.instances_$.set([...f,...I]),I.length>0&&setTimeout(()=>{this.instances_$.update(S=>S.filter(m=>h.has(m.instanceId)))},Me+200)}mapToVisuals(e){let t=e.darkOfficeVisuals;return{skinColor:t?.skinColor??b.skinColor,hairColor:t?.hairColor??b.hairColor,hairStyle:t?.hairStyle??b.hairStyle,shirtColor:t?.shirtColor??b.shirtColor,clothingStyle:t?.clothingStyle??b.clothingStyle,pantsColor:t?.pantsColor??b.pantsColor,eyeColor:t?.eyeColor??b.eyeColor,bodyType:t?.bodyType??b.bodyType,displayName:e.name??""}}resolveSessionInfo(e){let t=e.sessionStatuses;if(!t||t.length===0)return{presence:p.idle,activitySummary:"No CCAP Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let a=W.pickCcapPrimary(t)??t[0];return{presence:a.presence,activitySummary:a.activitySummary,currentRunFlowPhase:a.activeRunPhase??null,latestSessionId:a.sessionId,lastMessage:a.lastMessage??""}}mapOciToVisuals(e){let t=e.darkOfficeVisuals;return{skinColor:t?.skinColor??_.skinColor,hairColor:t?.hairColor??_.hairColor,hairStyle:t?.hairStyle??_.hairStyle,shirtColor:t?.shirtColor??_.shirtColor,clothingStyle:t?.clothingStyle??_.clothingStyle,pantsColor:t?.pantsColor??_.pantsColor,eyeColor:t?.eyeColor??_.eyeColor,bodyType:t?.bodyType??_.bodyType,displayName:e.label??""}}mapCaiToVisuals(e){let t=e.darkOfficeVisuals;return{skinColor:t?.skinColor??N.skinColor,hairColor:t?.hairColor??N.hairColor,hairStyle:t?.hairStyle??N.hairStyle,shirtColor:t?.shirtColor??N.shirtColor,clothingStyle:t?.clothingStyle??N.clothingStyle,pantsColor:t?.pantsColor??N.pantsColor,eyeColor:t?.eyeColor??N.eyeColor,bodyType:t?.bodyType??N.bodyType,displayName:e.name??""}}resolveCaiSessionInfo(e){let t=e.sessionStatuses??[];if(t.length===0)return{presence:p.idle,activitySummary:"No CA Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let a=W.pickCaiPrimary(t)??t[0];return{presence:a.presence,activitySummary:a.activitySummary,currentRunFlowPhase:a.currentCaSessionStatus??null,latestSessionId:a.sessionId,lastMessage:a.lastMessage??""}}mapCciToVisuals(e){let t=e.darkOfficeVisuals;return{skinColor:t?.skinColor??L.skinColor,hairColor:t?.hairColor??L.hairColor,hairStyle:t?.hairStyle??L.hairStyle,shirtColor:t?.shirtColor??L.shirtColor,clothingStyle:t?.clothingStyle??L.clothingStyle,pantsColor:t?.pantsColor??L.pantsColor,eyeColor:t?.eyeColor??L.eyeColor,bodyType:t?.bodyType??L.bodyType,displayName:e.name??""}}resolveCciSessionInfo(e){let t=e.sessionStatuses??[];if(t.length===0)return{presence:p.idle,activitySummary:"No CC Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let a=W.pickCciPrimary(t)??t[0];return{presence:a.presence,activitySummary:a.activitySummary,currentRunFlowPhase:a.currentCcSessionStatus??null,latestSessionId:a.sessionId,lastMessage:a.lastMessage??""}}resolveOciSessionInfo(e){if(!(e.connectionStatus===K.connected))return{presence:p.offline,activitySummary:"Gateway disconnected",latestSessionId:null,lastMessage:""};let s=e.sessionStatuses??[];if(s.length===0)return{presence:p.idle,activitySummary:"Connected",latestSessionId:null,lastMessage:""};let a=z.pickPrimary(s);return a?{presence:a.presence,activitySummary:a.activitySummary,latestSessionId:a.sessionId,lastMessage:a.lastMessage??""}:{presence:p.idle,activitySummary:"Connected",latestSessionId:null,lastMessage:""}}handleOciInstanceStatusUpdate(e){let t=typeof e.instanceId=="string"?e.instanceId:void 0,s=e.sessionStatuses,a=Array.isArray(s)?s:void 0,o=typeof e.connectionStatus=="string"?e.connectionStatus:void 0;if(!t)return;let r=this.instances_$(),c=r.findIndex(m=>m.instanceId===t);if(!(o===K.connected)&&c>=0){let m=r[c],g=this.assignSlot(t,p.offline,m),w=this.resolveAnimState(p.offline,m.presence);this.instances_$.update(y=>y.map(v=>v.instanceId===t?this.applyPanelCardProjection(A(R({},v),{presence:p.offline,activitySummary:"Gateway disconnected",lastMessage:"",animState:w,previousPresence:m.presence,assignedSlotIndex:g,connectionStatus:o??v.connectionStatus})):v));return}if(c<0){this.loadInstanceData();return}let l=r[c],d=a??[];this.applyMeetingRoomTransitionForSessionDiff({baseInstanceId:t,previousRows:l.rawSessionStatuses,nextRows:d});let f;if(d.length>0){let m=z.pickPrimary(d);m?f={presence:m.presence,activitySummary:m.activitySummary,latestSessionId:m.sessionId,lastMessage:m.lastMessage??""}:f={presence:p.idle,activitySummary:"Connected",latestSessionId:null,lastMessage:""}}else f={presence:p.idle,activitySummary:"Connected",latestSessionId:null,lastMessage:""};let h=this.assignSlot(t,f.presence,l),I=this.resolveAnimState(f.presence,l.presence),S=this.applyPanelCardProjection(A(R({},l),{presence:f.presence,activitySummary:f.activitySummary,latestSessionId:f.latestSessionId,lastMessage:f.lastMessage,animState:I,previousPresence:l.presence,assignedSlotIndex:h,connectionStatus:o??l.connectionStatus,rawSessionStatuses:d}));this.instances_$.update(m=>m.map(g=>g.instanceId===t?S:g))}handleCciInstanceStatusUpdate(e){let t=typeof e.officeInstanceId=="string"?e.officeInstanceId:void 0,s=e.sessionStatuses,a=Array.isArray(s)?s:void 0;if(!t)return;let o=this.instances_$(),r=o.findIndex(I=>I.instanceId===t);if(r<0){this.loadInstanceData();return}let c=o[r],u=a??[];this.applyMeetingRoomTransitionForSessionDiff({baseInstanceId:t,previousRows:c.rawSessionStatuses,nextRows:u});let l=this.resolveSessionInfoFromCciStatuses(u),d=this.assignSlot(t,l.presence,c),f=this.resolveAnimState(l.presence,c.presence),h=this.applyPanelCardProjection(A(R({},c),{presence:l.presence,activitySummary:l.activitySummary,currentRunFlowPhase:l.currentRunFlowPhase,latestSessionId:l.latestSessionId,lastMessage:l.lastMessage,animState:f,previousPresence:c.presence,assignedSlotIndex:d,rawSessionStatuses:u}));this.instances_$.update(I=>I.map(S=>S.instanceId===t?h:S))}handleCaiInstanceStatusUpdate(e){let t=typeof e.officeInstanceId=="string"?e.officeInstanceId:void 0,s=e.sessionStatuses,a=Array.isArray(s)?s:void 0;if(!t)return;let o=this.instances_$(),r=o.findIndex(I=>I.instanceId===t);if(r<0){this.loadInstanceData();return}let c=o[r],u=a??[];this.applyMeetingRoomTransitionForSessionDiff({baseInstanceId:t,previousRows:c.rawSessionStatuses,nextRows:u});let l=this.resolveSessionInfoFromCaiStatuses(u),d=this.assignSlot(t,l.presence,c),f=this.resolveAnimState(l.presence,c.presence),h=this.applyPanelCardProjection(A(R({},c),{presence:l.presence,activitySummary:l.activitySummary,currentRunFlowPhase:l.currentRunFlowPhase,latestSessionId:l.latestSessionId,lastMessage:l.lastMessage,animState:f,previousPresence:c.presence,assignedSlotIndex:d,rawSessionStatuses:u}));this.instances_$.update(I=>I.map(S=>S.instanceId===t?h:S))}resolveSessionInfoFromCciStatuses(e){if(e.length===0)return{presence:p.idle,activitySummary:"No CC Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let s=W.pickCciPrimary(e)??e[0];return{presence:s.presence,activitySummary:s.activitySummary,currentRunFlowPhase:s.currentCcSessionStatus??null,latestSessionId:s.sessionId,lastMessage:s.lastMessage??""}}resolveSessionInfoFromCaiStatuses(e){if(e.length===0)return{presence:p.idle,activitySummary:"No CA Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let s=W.pickCaiPrimary(e)??e[0];return{presence:s.presence,activitySummary:s.activitySummary,currentRunFlowPhase:s.currentCaSessionStatus??null,latestSessionId:s.sessionId,lastMessage:s.lastMessage??""}}schedulePatch(e,t){let s=this.patchTimerMap.get(e);s!==void 0&&clearTimeout(s);let a=setTimeout(()=>{this.patchTimerMap.delete(e);let d=t,{displayName:o}=d,r=Se(d,["displayName"]),c=this.instances_$().find(f=>f.instanceId===e),u=F.parseCcapId(e),l=U.parseCcapId(e);u!==null?this.caiInstanceData_AS.patchByCcapId({ccapId:u,name:o||void 0,darkOfficeVisuals:r}):l!==null?this.cciInstanceData_AS.patchByCcapId({ccapId:l,name:o||void 0,darkOfficeVisuals:r}):c?.characterType===C.openclaw?this.ociInstanceData_AS.patchVisuals({instanceId:e,label:o||void 0,darkOfficeVisuals:r}):this.instanceData_AS.patchByCcapId({ccapId:e,name:o||void 0,darkOfficeVisuals:r})},300);this.patchTimerMap.set(e,a)}assignSlot(e,t,s){let a=t===p.working,o=a?this.workstationSlotMap:this.restSlotMap,r=a?this.darkOfficeLayout_DS.workstationCapacity_$():this.darkOfficeLayout_DS.restCapacity_$();if(o.has(e))return o.get(e);this.workstationSlotMap.delete(e),this.restSlotMap.delete(e);let c=new Set(o.values());for(let l=0;l<r;l++)if(!c.has(l))return o.set(e,l),l;let u=r;for(;c.has(u);)u++;return o.set(e,u),u}resolveAnimState(e,t){return t===p.offline&&e!==p.offline?M.walkingIn:t!==null&&t!==p.offline&&e===p.offline?M.walkingOut:t!==null&&t!==p.offline&&e!==p.offline&&t!==e?M.walkingBetween:e===p.working?M.working:e===p.idle?M.sitting:M.standing}assignDistinctSlotsForScene(e){let t=0,s=0,a=0;return e.map(o=>{let r;return o.scenePlacement===O.meeting?r=a++:o.presence===p.working?r=t++:r=s++,A(R({},o),{assignedSlotIndex:r})})}expandInstancesToCharacters(e){let t=[],s=Date.now(),a=Q.sceneRecentActivityWindowMs,o=Q.sceneIdleWalkActivityWindowMs,r=new Map;for(let c of e)c.characterType===C.ccap&&r.set(c.instanceId,c.presence);for(let c of e){if(c.presence===p.offline)continue;if(c.characterType===C.ccSession||c.characterType===C.caSession){let l=c.characterType===C.ccSession?U.parseCcapId(c.instanceId):F.parseCcapId(c.instanceId),d=l?r.get(l):void 0;if(d===void 0||d===p.offline)continue}t.push(this.buildInstanceBaselineCharacter(c));let u=c.rawSessionStatuses??[];for(let l of u){if(Q.isWorkingSessionRecentAndOnline({row:l,nowMs:s,windowMs:a})){t.push(this.buildPerSessionOfficeCharacter(c,l));continue}Q.isSessionInIdleWalkWindow({row:l,nowMs:s,recentWindowMs:a,idleWalkWindowMs:o})&&t.push(this.buildIdleWalkSessionCharacter(c,l))}}return t}buildIdleWalkSessionCharacter(e,t){let s=`${e.instanceId}::${t.sessionId}`;return this.applyPanelCardProjection(A(R({},e),{instanceId:s,sessionId:t.sessionId,sessionName:t.sessionName??"",presence:p.idle,activitySummary:t.activitySummary,lastMessage:t.lastMessage??"",latestSessionId:t.sessionId,currentRunFlowPhase:i.resolveSessionRunFlowPhaseLabel(t),assignedSlotIndex:0,animState:M.idleWalking,previousPresence:null,scenePlacement:void 0,rawSessionStatuses:void 0,lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]}))}buildInstanceBaselineCharacter(e){return this.applyPanelCardProjection(A(R({},e),{instanceId:e.instanceId,sessionId:void 0,sessionName:"",presence:p.idle,activitySummary:e.activitySummary,lastMessage:"",latestSessionId:null,currentRunFlowPhase:null,assignedSlotIndex:0,animState:M.sitting,previousPresence:null,scenePlacement:void 0,rawSessionStatuses:e.rawSessionStatuses,lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]}))}buildPerSessionOfficeCharacter(e,t){let s=`${e.instanceId}::${t.sessionId}`,o=(t.presence===p.working?void 0:this.resolveScenePlacementForSessionKey({baseInstanceId:e.instanceId,sessionId:t.sessionId}))===O.meeting?O.meeting:void 0;return this.applyPanelCardProjection(A(R({},e),{instanceId:s,sessionId:t.sessionId,sessionName:t.sessionName??"",presence:t.presence,activitySummary:t.activitySummary,lastMessage:t.lastMessage??"",latestSessionId:t.sessionId,currentRunFlowPhase:i.resolveSessionRunFlowPhaseLabel(t),assignedSlotIndex:0,animState:t.presence===p.working?M.working:M.sitting,previousPresence:null,scenePlacement:o,rawSessionStatuses:void 0,lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]}))}static resolveSessionRunFlowPhaseLabel(e){return"activeRunPhase"in e?e.activeRunPhase??null:"currentCcSessionStatus"in e?e.currentCcSessionStatus??null:"currentCaSessionStatus"in e?e.currentCaSessionStatus??null:null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Z({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{M as a,O as b,C as c,K as d,X as e,Y as f,j as g,it as h,ot as i,at as j,rt as k,ct as l,F as m,U as n,Q as o,ke as p,ys as q};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as H,b as Ae}from"./chunk-4TEHGQ5C.js";import{a as we}from"./chunk-UFBTR2BG.js";import{a as te,b as p}from"./chunk-6Y7O2W4H.js";import{a as Ie,b as ge,c as ve,d as Re}from"./chunk-23GMPVB5.js";import{a as Ce}from"./chunk-EDQWK2Q5.js";import{e as ye}from"./chunk-I6OBHW45.js";import{L as he,p as ee,t as ae}from"./chunk-ELFCSLIP.js";import{C as x,a as R,aa as P,b as A,d as Se,h as J,hb as D,jb as me,k as $,wb as fe,y as Z}from"./chunk-TBMJSIBB.js";var M=function(i){return i.standing="standing",i.working="working",i.sitting="sitting",i.walkingIn="walking-in",i.walkingOut="walking-out",i.walkingBetween="walking-between",i.idleWalking="idle-walking",i}(M||{});var O=function(i){return i.workstation="workstation",i.rest="rest",i.meeting="meeting",i}(O||{});var C=function(i){return i.ccap="ccap",i.openclaw="openclaw",i.ccSession="cc-session",i.caSession="ca-session",i}(C||{});var X=function(i){return i.average="average",i.slim="slim",i.stocky="stocky",i.athletic="athletic",i}(X||{});var Y=function(i){return i.casual="casual",i.formal="formal",i.hoodie="hoodie",i.tshirt="tshirt",i}(Y||{});var j=function(i){return i.short="short",i.long="long",i.spiky="spiky",i.curly="curly",i.bald="bald",i.mohawk="mohawk",i}(j||{});var it=["#f5c592","#e8a96e","#d4845a","#c06a3c","#9b5930","#7a3d1c","#4a2412"],ot=["#1a1006","#3b2505","#6b3d11","#9b6720","#c9a227","#e8d5a3","#f0f0f0","#a0a0a0","#2a4080","#8b1a2a"],at=["#1e40af","#166534","#7f1d1d","#4c1d95","#134e4a","#713f12","#374151","#6b21a8","#0f766e","#1e3a5f","#b45309","#be185d","#475569"],rt=["#1e293b","#374151","#292524","#1e3a5f","#1a2e05","#2d1b69","#3b1a08","#1a1a2e"],ct=["#1a1a1a","#3b5998","#2d8a4e","#8b4513","#4b0082","#5f9ea0"],b={skinColor:"#e8a96e",hairColor:"#1a1006",hairStyle:j.short,shirtColor:"#1e40af",clothingStyle:Y.casual,pantsColor:"#1e293b",eyeColor:"#1a1a1a",bodyType:X.average,displayName:""},_={skinColor:"#b0bec5",hairColor:"#37474f",hairStyle:j.short,shirtColor:"#0288d1",clothingStyle:Y.tshirt,pantsColor:"#263238",eyeColor:"#00bcd4",bodyType:X.average,displayName:""},L={skinColor:"#d4c4a8",hairColor:"#2d1b0e",hairStyle:j.short,shirtColor:"#5b21b6",clothingStyle:Y.casual,pantsColor:"#312e81",eyeColor:"#4338ca",bodyType:X.average,displayName:""},N={skinColor:"#e2e8f0",hairColor:"#0f172a",hairStyle:j.short,shirtColor:"#0d9488",clothingStyle:Y.casual,pantsColor:"#134e4a",eyeColor:"#14b8a6",bodyType:X.average,displayName:""};var Me=2e3;var F=(()=>{class i{static officeInstanceIdPrefix="cai:";static build(e){return`${i.officeInstanceIdPrefix}${e.ccapId.trim()}`}static parseCcapId(e){let t=e.trim();if(!t.startsWith(i.officeInstanceIdPrefix))return null;let s=t.slice(i.officeInstanceIdPrefix.length).trim();return s.length>0?s:null}}return i})();var U=(()=>{class i{static officeInstanceIdPrefix="cci:";static build(e){return`${i.officeInstanceIdPrefix}${e.ccapId.trim()}`}static parseCcapId(e){let t=e.trim();if(!t.startsWith(i.officeInstanceIdPrefix))return null;let s=t.slice(i.officeInstanceIdPrefix.length).trim();return s.length>0?s:null}}return i})();var E=class i{static clampGrid(n){return{workstationCols:i.clampDim(n.workstationCols),workstationRows:i.clampDim(n.workstationRows),restCols:i.clampDim(n.restCols),restRows:i.clampDim(n.restRows),meetingCols:i.clampDim(n.meetingCols),meetingRows:i.clampDim(n.meetingRows)}}static computeDerived(n){let e=i.clampGrid(n),t=4*32,s=3*32,a=i.computeWorkspaceWidthPx(e.workstationCols),o=i.computeLoungeWidthPx(e.restCols),r=6*32,c=a+r+o,u=8*32,l=c+u,d=e.workstationRows*6*32,f=3*32+e.meetingRows*5*32+3*32,h=Math.max(2*32,Math.round(f/2)),I=s+d,S=2*32,m=I+h+32,g=t-32,w=S,y=c+2*32,v=m-w,k=m+3*32,T={x:t,y:s,w:a,h:d},G={x:t+a,y:s,w:r,h:m-s},B={x:t+a+r,y:s,w:o,h:m-s},oe={x:t,y:I,w:a,h},De=t+a,ue=t+a+r,Oe=I,be={x:G.x+Math.round(G.w/2),y:m-2*32},_e=i.buildWorkstationSlots(e,T),de=i.buildMeetingSlots(e,oe),Le=i.buildWorkstationDesks(e,T),pe=i.buildLoungeSeatingLayout(e,B),Ne=pe.restSlots,We=pe.loungeSofas,$e=i.buildConferenceFurniture(oe,de),Fe=t+Math.round(a/2),Ue=ue+Math.round(o/2),Ve=t+Math.round(a/2),Ge=s+32,Xe=S+32/2;return{worldW:l,worldH:k,environmentOverflowPx:3e3,buildingOuter:{x:g,y:w,w:y,h:v},floorWorkspace:T,floorLobby:G,floorLounge:B,floorConference:oe,zoneSplitX:De,zoneSplitLobbyLoungeX:ue,topFloorBottomY:Oe,door:be,workstationSlots:_e,restSlots:Ne,meetingSlots:de,workstationDesks:Le,loungeSofas:We,conference:$e,windowsNorthY:Xe,labelWorkspaceX:Fe,labelLoungeX:Ue,labelConferenceX:Ve,ceilingNeonY:Ge}}static workstationCapacity(n){let e=i.clampGrid(n);return e.workstationCols*e.workstationRows}static restCapacity(n){let e=i.clampGrid(n);return e.restCols*e.restRows*2}static meetingCapacity(n){return 2*i.clampGrid(n).meetingCols+2}static clampDim(n){if(!Number.isFinite(n))return 1;let e=Math.floor(n);return e<1?1:e>12?12:e}static computeWorkspaceWidthPx(n){let s=128+n*256;return Math.max(896,s)}static computeLoungeWidthPx(n){return 140+n*170}static buildWorkstationSlots(n,e){let t=[],s=i.workstationPitchX(n.workstationCols,e.w),a=e.x+64,o=i.workstationRowFeetY(n.workstationRows,e);for(let r=0;r<n.workstationRows;r++)for(let c=0;c<n.workstationCols;c++)t.push({x:Math.round(a+c*s),y:o[r]});return t}static workstationPitchX(n,e){return n<=1?0:n===3&&e===896?96:Math.max(96,Math.round((e-192)/(n-1)))}static workstationRowFeetY(n,e){if(n===3)return[e.y+112,e.y+250,e.y+452];let t=[],s=48,o=e.h-s-48,r=n<=1?0:o/(n-1);for(let c=0;c<n;c++)t.push(Math.round(e.y+s+c*r));return t}static buildWorkstationDesks(n,e){let t=[],s=i.workstationPitchX(n.workstationCols,e.w),a=e.x+64,o=i.workstationDeskTopY(n.workstationRows,e);for(let r=0;r<n.workstationRows;r++)for(let c=0;c<n.workstationCols;c++){let l=Math.round(a+c*s)-32,d=o[r],f=(r+c)%2===0;t.push({trackId:`ws-${r}-${c}`,x:l,y:d,monitorIsCyan:f})}return t}static workstationDeskTopY(n,e){return n===3?[e.y+64,e.y+256,e.y+404]:i.workstationRowFeetY(n,e).map(s=>s-48)}static buildLoungeSeatingLayout(n,e){let t=[],s=[],h=e.w-32,S=(e.h-2*18)/Math.max(1,n.restRows);for(let m=0;m<n.restRows;m++){let g=e.y+18+m*S,w=S-14;if(n.restCols<=1){let y=Math.min(188,Math.max(120,e.w-32)),v=e.x+Math.round((e.w-y)/2),k=Math.round(g+w*.12);t.push({trackId:`lounge-${m}-0`,x:v,y:k,w:y,h:36});let T=k+36+14;s.push({x:v+Math.round(y*.33),y:T}),s.push({x:v+Math.round(y*.67),y:T})}else{let y=(n.restCols-1)*12,v=Math.max(96,Math.round((h-y)/n.restCols));for(let k=0;k<n.restCols;k++){let T=e.x+16+k*(v+12),G=Math.round(g+w*.12);t.push({trackId:`lounge-${m}-${k}`,x:T,y:G,w:v,h:36});let B=G+36+14;s.push({x:T+Math.round(v*.33),y:B}),s.push({x:T+Math.round(v*.67),y:B})}}}return{restSlots:s,loungeSofas:t}}static buildMeetingSlots(n,e){return i.computeConferenceChairPositions(n,e)}static computeConferenceChairPositions(n,e){let t=[],s=Math.min(420,e.w-80),a=56,o=e.x+Math.round((e.w-s)/2),r=e.y+Math.round(e.h/2)-Math.round(a/2),c=26,u=Math.max(1,n.meetingCols);for(let d=0;d<u;d++){let f=o+Math.round((d+1)*s/(u+1));t.push({x:f,y:r-c})}for(let d=0;d<u;d++){let f=o+Math.round((d+1)*s/(u+1));t.push({x:f,y:r+a+c})}let l=r+Math.round(a/2);return t.push({x:o-c,y:l}),t.push({x:o+s+c,y:l}),t}static buildConferenceFurniture(n,e){let t=Math.min(420,n.w-80),s=56,a={x:n.x+Math.round((n.w-t)/2),y:n.y+Math.round(n.h/2)-Math.round(s/2),w:t,h:s},o=e.map((r,c)=>({trackId:`conf-chair-${c}`,x:r.x,y:r.y}));return{table:a,chairs:o}}};var se={workstationCols:3,workstationRows:3,restCols:2,restRows:3,meetingCols:2,meetingRows:2,maxEverWorkstationCols:3,maxEverWorkstationRows:3,maxEverRestCols:2,maxEverRestRows:3,maxEverMeetingCols:2,maxEverMeetingRows:2},ke=(()=>{class i{settings_AS=x(he);layoutPersisted_$=P(se);saveTimerId;grid_$=D(()=>{let e=this.layoutPersisted_$();return{workstationCols:e.workstationCols,workstationRows:e.workstationRows,restCols:e.restCols,restRows:e.restRows,meetingCols:e.meetingCols,meetingRows:e.meetingRows}});derived_$=D(()=>E.computeDerived(this.grid_$()));workstationCapacity_$=D(()=>E.workstationCapacity(this.grid_$()));restCapacity_$=D(()=>E.restCapacity(this.grid_$()));meetingCapacity_$=D(()=>E.meetingCapacity(this.grid_$()));maxEverDisplay_$=D(()=>this.layoutPersisted_$());constructor(){this.loadFromServer()}loadFromServer(){return $(this,null,function*(){try{let e=yield this.settings_AS.getSection(ae.darkOfficeLayout);if(e==null||Object.keys(e).length===0){this.layoutPersisted_$.set(se);return}let t=i.parsePayload(e);this.layoutPersisted_$.set(t)}catch{this.layoutPersisted_$.set(se)}})}ensureMinCapacitiesFromSceneCharacters(e){let t=0,s=0,a=0;for(let c of e)c.scenePlacement===O.meeting?a++:c.presence===p.working?t++:s++;let o=this.layoutPersisted_$(),r=R({},o);r=i.expandGridToFit(r,t,s,a),!i.isSamePersisted(o,r)&&(this.layoutPersisted_$.set(r),this.scheduleDebouncedSave())}applyPersistedFromUser(e){return $(this,null,function*(){this.layoutPersisted_$.set(R({},e)),yield this.saveNow()})}validateProposedGridAgainstSceneCharacters(e){let t=E.clampGrid(e.grid),s=0,a=0,o=0;for(let l of e.characters)l.scenePlacement===O.meeting?o++:l.presence===p.working?s++:a++;let r=E.workstationCapacity(t),c=E.restCapacity(t),u=E.meetingCapacity(t);return s<=r&&a<=c&&o<=u?null:`Dark office layout rejected: scene occupancy exceeds proposed capacity. workstation=${s}/${r}, rest=${a}/${c}, meeting=${o}/${u}.`}getWorkstationSlots(){return this.derived_$().workstationSlots}getRestSlots(){return this.derived_$().restSlots}getMeetingSlots(){return this.derived_$().meetingSlots}getDoorPosition(){return this.derived_$().door}scheduleDebouncedSave(){this.saveTimerId!==void 0&&clearTimeout(this.saveTimerId),this.saveTimerId=setTimeout(()=>{this.saveTimerId=void 0,this.saveNow()},500)}saveNow(){return $(this,null,function*(){let e={workstationCols:this.layoutPersisted_$().workstationCols,workstationRows:this.layoutPersisted_$().workstationRows,restCols:this.layoutPersisted_$().restCols,restRows:this.layoutPersisted_$().restRows,meetingCols:this.layoutPersisted_$().meetingCols,meetingRows:this.layoutPersisted_$().meetingRows,maxEverWorkstationCols:this.layoutPersisted_$().maxEverWorkstationCols,maxEverWorkstationRows:this.layoutPersisted_$().maxEverWorkstationRows,maxEverRestCols:this.layoutPersisted_$().maxEverRestCols,maxEverRestRows:this.layoutPersisted_$().maxEverRestRows,maxEverMeetingCols:this.layoutPersisted_$().maxEverMeetingCols,maxEverMeetingRows:this.layoutPersisted_$().maxEverMeetingRows};try{yield this.settings_AS.saveSection(ae.darkOfficeLayout,e)}catch{}})}static parsePayload(e){let t=(o,r)=>{let c=e[o];return typeof c=="number"&&Number.isFinite(c)?Math.floor(c):r},s=se,a={workstationCols:t("workstationCols",s.workstationCols),workstationRows:t("workstationRows",s.workstationRows),restCols:t("restCols",s.restCols),restRows:t("restRows",s.restRows),meetingCols:t("meetingCols",s.meetingCols),meetingRows:t("meetingRows",s.meetingRows),maxEverWorkstationCols:t("maxEverWorkstationCols",s.maxEverWorkstationCols),maxEverWorkstationRows:t("maxEverWorkstationRows",s.maxEverWorkstationRows),maxEverRestCols:t("maxEverRestCols",s.maxEverRestCols),maxEverRestRows:t("maxEverRestRows",s.maxEverRestRows),maxEverMeetingCols:t("maxEverMeetingCols",s.maxEverMeetingCols),maxEverMeetingRows:t("maxEverMeetingRows",s.maxEverMeetingRows)};return i.clampPersisted(a)}static clampPersisted(e){let t=a=>{if(!Number.isFinite(a))return 1;let o=Math.floor(a);return o<1?1:o>12?12:o},s={workstationCols:t(e.workstationCols),workstationRows:t(e.workstationRows),restCols:t(e.restCols),restRows:t(e.restRows),meetingCols:t(e.meetingCols),meetingRows:t(e.meetingRows),maxEverWorkstationCols:t(e.maxEverWorkstationCols),maxEverWorkstationRows:t(e.maxEverWorkstationRows),maxEverRestCols:t(e.maxEverRestCols),maxEverRestRows:t(e.maxEverRestRows),maxEverMeetingCols:t(e.maxEverMeetingCols),maxEverMeetingRows:t(e.maxEverMeetingRows)};return s.maxEverWorkstationCols=Math.max(s.maxEverWorkstationCols,s.workstationCols),s.maxEverWorkstationRows=Math.max(s.maxEverWorkstationRows,s.workstationRows),s.maxEverRestCols=Math.max(s.maxEverRestCols,s.restCols),s.maxEverRestRows=Math.max(s.maxEverRestRows,s.restRows),s.maxEverMeetingCols=Math.max(s.maxEverMeetingCols,s.meetingCols),s.maxEverMeetingRows=Math.max(s.maxEverMeetingRows,s.meetingRows),s}static isSamePersisted(e,t){return e.workstationCols===t.workstationCols&&e.workstationRows===t.workstationRows&&e.restCols===t.restCols&&e.restRows===t.restRows&&e.meetingCols===t.meetingCols&&e.meetingRows===t.meetingRows&&e.maxEverWorkstationCols===t.maxEverWorkstationCols&&e.maxEverWorkstationRows===t.maxEverWorkstationRows&&e.maxEverRestCols===t.maxEverRestCols&&e.maxEverRestRows===t.maxEverRestRows&&e.maxEverMeetingCols===t.maxEverMeetingCols&&e.maxEverMeetingRows===t.maxEverMeetingRows}static expandGridToFit(e,t,s,a){let o=e.workstationCols,r=e.workstationRows,c=e.restCols,u=e.restRows,l=e.meetingCols,d=e.meetingRows;for(;o*r<t&&(o<12||r<12);)o<=r?o=Math.min(12,o+1):r=Math.min(12,r+1);for(;c*u<s&&(c<12||u<12);)c<=u?c=Math.min(12,c+1):u=Math.min(12,u+1);for(;l*d<a&&(l<12||d<12);)l<=d?l=Math.min(12,l+1):d=Math.min(12,d+1);let f={workstationCols:o,workstationRows:r,restCols:c,restRows:u,meetingCols:l,meetingRows:d,maxEverWorkstationCols:Math.max(e.maxEverWorkstationCols,o),maxEverWorkstationRows:Math.max(e.maxEverWorkstationRows,r),maxEverRestCols:Math.max(e.maxEverRestCols,c),maxEverRestRows:Math.max(e.maxEverRestRows,u),maxEverMeetingCols:Math.max(e.maxEverMeetingCols,l),maxEverMeetingRows:Math.max(e.maxEverMeetingRows,d)};return i.clampPersisted(f)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Z({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ie=J(ee());var K=function(i){return i.connected="connected",i.disconnected="disconnected",i.error="error",i.unreachable="unreachable",i}(K||{});var W=class{static pickCcapPrimary(n){if(!n.length)return null;let e=(o,r)=>new Date(r.lastActivityAt).getTime()-new Date(o.lastActivityAt).getTime(),t=n.filter(o=>o.hasActiveRun===!0||o.presence===p.working);return t.length>0?[...t].sort(e)[0]??null:[...n].sort(e)[0]??null}static pickCciPrimary(n){if(!n.length)return null;let e=(o,r)=>new Date(r.lastActivityAt).getTime()-new Date(o.lastActivityAt).getTime(),t=n.filter(o=>o.hasActiveSession===!0||o.presence===p.working);return t.length>0?[...t].sort(e)[0]??null:[...n].sort(e)[0]??null}static pickCaiPrimary(n){if(!n.length)return null;let e=(o,r)=>new Date(r.lastActivityAt).getTime()-new Date(o.lastActivityAt).getTime(),t=n.filter(o=>o.hasActiveSession===!0||o.presence===p.working);return t.length>0?[...t].sort(e)[0]??null:[...n].sort(e)[0]??null}};var z=class{static pickPrimary(n){if(!n.length)return null;let e=(o,r)=>new Date(r.lastActivityAt).getTime()-new Date(o.lastActivityAt).getTime(),t=n.filter(o=>o.hasActiveSession);return t.length>0?[...t].sort(e)[0]??null:[...n].sort(e)[0]??null}};var xe=J(ee()),Pe=2*xe.minute;var ne=class i{static mapGatewaySessionsResponse(n){let e=[];for(let t of n.sessions){let s=i.mapOneSession(t);s!==null&&e.push(s)}return e}static mapOneSession(n){let e=typeof n.key=="string"?n.key:typeof n.sessionId=="string"?n.sessionId:typeof n.id=="string"?n.id:"";if(!e.trim())return null;let t=typeof n.status=="string"?n.status.trim().toLowerCase():"",s=i.resolvePresenceFromGatewaySession({statusLower:t,raw:n}),a=s===p.working,o=H.extractTimestamp(n,H.GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES)??new Date().toISOString(),r=typeof n.label=="string"?n.label:typeof n.name=="string"?n.name:typeof n.title=="string"?n.title:void 0,u=(typeof n.statusMessage=="string"?n.statusMessage:void 0)?.trim()||(t.length>0?t:"OpenClaw session"),l=typeof n.lastPrompt=="string"?n.lastPrompt:void 0;return{sessionId:e,sessionName:r,presence:s,lastActivityAt:o,hasActiveSession:a,activitySummary:u,lastMessage:l}}static resolvePresenceFromGatewaySession(n){let e=n.statusLower;return e==="connecting"?p.working:i.hasRecentGatewayOutputTimestamp(n.raw)?p.working:e?p.idle:p.idle}static hasRecentGatewayOutputTimestamp(n){let e=H.extractTimestamp(n,H.GATEWAY_OUTPUT_ONLY_TIMESTAMP_FIELD_NAMES);if(!e?.length)return!1;let t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t<=Pe}};var re=function(i){return i.creating="creating",i.connecting="connecting",i.waitingInput="waiting-input",i.running="running",i.errored="errored",i.completed="completed",i.terminated="terminated",i.disconnected="disconnected",i}(re||{});var Ee=J(ee()),ce=(()=>{class i{static INTERESTING_SESSION_WINDOW_MS=5*Ee.minute;static prune(e,t){if(e.length===0)return[];let s=t.nowMs,a=t.recentWindowMs,o=[];for(let u of e){let l=new Date(u.lastActivityAt).getTime();Number.isNaN(l)||o.push({row:u,ms:l})}if(o.length===0)return[];let r=o.filter(u=>s-u.ms<=a),c=u=>{let d=[...u].sort((f,h)=>{let I=h.ms-f.ms;return I!==0?I:f.row.sessionId.localeCompare(h.row.sessionId)})[0];if(!d)throw new Error("DO_InstanceTrackerSessionStatuses_Prune_Util | empty sort");return d.row};if(r.length>0){let u=new Map;for(let l of r){let d=u.get(l.row.sessionId);(!d||l.ms>=d.ms)&&u.set(l.row.sessionId,l)}return[...u.values()].sort((l,d)=>d.ms-l.ms).map(l=>l.row)}return[c(o)]}}return i})();var V=class i{static resolveCcapSessionStatuses(n){let e=i.mapRawToCcapSessionStatuses(n.inst.rawSessionStatuses),t=e.length>0?e:i.snapshotCcapSessionStatuses({darkOffice_DS:n.darkOffice_DS,instanceId:n.inst.instanceId});return i.applyInterestingSessionWindow(t)}static resolveOciSessionStatuses(n){let e=i.mapRawToOciSessionStatuses(n.inst.rawSessionStatuses),t=e.length>0?e:i.snapshotOciSessionStatuses({darkOffice_DS:n.darkOffice_DS,instanceId:n.inst.instanceId});return i.applyInterestingSessionWindow(t)}static resolveCciSessionStatuses(n){let e=U.parseCcapId(n.inst.instanceId);if(!e)return[];let t=i.mapRawToCciSessionStatuses(n.inst.rawSessionStatuses),s=t.length>0?t:i.snapshotCciSessionStatuses({darkOffice_DS:n.darkOffice_DS,ccapId:e});return i.applyInterestingSessionWindow(s)}static resolveCaiSessionStatuses(n){let e=F.parseCcapId(n.inst.instanceId);if(!e)return[];let t=i.mapRawToCaiSessionStatuses(n.inst.rawSessionStatuses),s=t.length>0?t:i.snapshotCaiSessionStatuses({darkOffice_DS:n.darkOffice_DS,ccapId:e});return i.applyInterestingSessionWindow(s)}static applyInterestingSessionWindow(n){return ce.prune(n,{nowMs:Date.now(),recentWindowMs:ce.INTERESTING_SESSION_WINDOW_MS})}static snapshotCcapSessionStatuses(n){let t=n.darkOffice_DS.getCcapInstanceDataSnapshot(n.instanceId)?.sessionStatuses;return Array.isArray(t)?t:[]}static snapshotOciSessionStatuses(n){let t=n.darkOffice_DS.getOciInstanceDataSnapshot(n.instanceId)?.sessionStatuses;return Array.isArray(t)?t:[]}static snapshotCciSessionStatuses(n){let t=n.darkOffice_DS.getCciInstanceDataSnapshot(n.ccapId)?.sessionStatuses;return Array.isArray(t)?t:[]}static snapshotCaiSessionStatuses(n){let t=n.darkOffice_DS.getCaiInstanceDataSnapshot(n.ccapId)?.sessionStatuses;return Array.isArray(t)?t:[]}static mapRawToCcapSessionStatuses(n){if(!Array.isArray(n)||n.length===0)return[];let e=[];for(let t of n){if(!("hasActiveRun"in t))continue;let s=t.hasActiveRun;if(typeof s!="boolean")continue;let a=t.sessionId;if(typeof a!="string")continue;let o=t.presence;if(!i.isPresenceEnum(o))continue;let r=t.lastActivityAt;if(typeof r!="string")continue;let c=t.activitySummary;if(typeof c!="string")continue;let u=t.sessionName,l=t.lastMessage,d;if("activeRunPhase"in t){let h=t.activeRunPhase;if(h==null)d=void 0;else if(i.isRunFlowPhaseValue(h))d=h;else continue}let f;if("activeRunId"in t){let h=t.activeRunId;if(typeof h=="string")f=h;else if(h!=null)continue}e.push({sessionId:a,sessionName:typeof u=="string"?u:void 0,presence:o,lastActivityAt:r,hasActiveRun:s,activeRunId:f,activeRunPhase:d,activitySummary:c,lastMessage:typeof l=="string"?l:void 0})}return e}static mapRawToCaiSessionStatuses(n){if(!Array.isArray(n)||n.length===0)return[];let e=[];for(let t of n){if("hasActiveRun"in t||!("hasActiveSession"in t)||!("currentCaSessionStatus"in t))continue;let s=i.tryMapToOciOrCciShape(t);if(s===null)continue;let a=Reflect.get(t,"currentCaSessionStatus"),o;i.isCaSessionStatusValue(a)&&(o=a),e.push({sessionId:s.sessionId,sessionName:s.sessionName,presence:s.presence,lastActivityAt:s.lastActivityAt,hasActiveSession:s.hasActiveSession,currentCaSessionStatus:o,activitySummary:s.activitySummary,lastMessage:s.lastMessage})}return e}static mapRawToOciSessionStatuses(n){if(!Array.isArray(n)||n.length===0)return[];let e=[];for(let t of n){if("hasActiveRun"in t||!("hasActiveSession"in t))continue;let s=i.tryMapToOciOrCciShape(t);s!==null&&e.push(s)}return e}static mapRawToCciSessionStatuses(n){if(!Array.isArray(n)||n.length===0)return[];let e=[];for(let t of n){if("hasActiveRun"in t||!("hasActiveSession"in t))continue;let s=i.tryMapToOciOrCciShape(t);if(s===null)continue;let a;if("currentCcSessionStatus"in t){let o=t.currentCcSessionStatus;typeof o=="string"&&(a=o)}e.push({sessionId:s.sessionId,sessionName:s.sessionName,presence:s.presence,lastActivityAt:s.lastActivityAt,hasActiveSession:s.hasActiveSession,currentCcSessionStatus:a,activitySummary:s.activitySummary,lastMessage:s.lastMessage})}return e}static tryMapToOciOrCciShape(n){if(!("hasActiveSession"in n))return null;let e=Reflect.get(n,"hasActiveSession");if(typeof e!="boolean")return null;let t=n.sessionId;if(typeof t!="string")return null;let s=n.presence;if(!i.isPresenceEnum(s))return null;let a=n.lastActivityAt;if(typeof a!="string")return null;let o=n.activitySummary;if(typeof o!="string")return null;let r=n.sessionName,c=n.lastMessage;return{sessionId:t,sessionName:typeof r=="string"?r:void 0,presence:s,lastActivityAt:a,hasActiveSession:e,activitySummary:o,lastMessage:typeof c=="string"?c:void 0}}static isPresenceEnum(n){return typeof n!="string"?!1:Object.values(p).includes(n)}static isRunFlowPhaseValue(n){if(typeof n!="string")return!1;let e=Object.values(we);for(let t of e)if(t===n)return!0;return!1}static isCaSessionStatusValue(n){if(typeof n!="string")return!1;let e=Object.values(re);for(let t of e)if(t===n)return!0;return!1}};var Te=72,q=class i{static buildLastMessageDerivedStatusLabel(n){let e=n.trim();return e&&e.startsWith("[QUEUE]")?"Message queued":""}static buildPanelActiveSessionRows(n){let e=n.rawSessionStatuses;if(!e||e.length===0)return[];let t=n.characterType,s;return t===C.openclaw||t===C.ccSession||t===C.caSession?s=i.collectActiveOciOrCciFromUnion(e):s=i.collectActiveCcapFromUnion(e),s.length<=1?[]:s}static buildSessionDisplayLabel(n,e){let t=e?.trim();return t||i.shortenSessionId(n)}static truncateLastMessagePreview(n){let e=n.trim();return e?e.length<=Te?e:`${e.slice(0,Te-1)}\u2026`:""}static isCcapSessionRow(n){return"hasActiveRun"in n}static isOciOrCciSessionRow(n){return"hasActiveSession"in n}static isCcapSessionActive(n){return n.hasActiveRun===!0?!0:n.presence===p.working}static isOciOrCciSessionActive(n){return n.hasActiveSession===!0?!0:n.presence===p.working}static isSessionActiveForSceneDuplication(n){if(n.row.presence===p.offline)return!1;let e=n.characterType;return e===C.openclaw||e===C.ccSession||e===C.caSession?i.isOciOrCciSessionRow(n.row)?i.isOciOrCciSessionActive(n.row):!1:i.isCcapSessionRow(n.row)?i.isCcapSessionActive(n.row):!1}static shortenSessionId(n){return n.length<=10?n:`${n.slice(0,8)}\u2026`}static collectActiveCcapFromUnion(n){let e=[];for(let t of n){if(!i.isCcapSessionRow(t)||!i.isCcapSessionActive(t))continue;let s=i.truncateLastMessagePreview(t.lastMessage??"");e.push({sessionId:t.sessionId,displayLabel:i.buildSessionDisplayLabel(t.sessionId,t.sessionName),presence:t.presence,activitySummary:t.activitySummary,lastMessagePreview:s})}return e}static collectActiveOciOrCciFromUnion(n){let e=[];for(let t of n){if(!i.isOciOrCciSessionRow(t)||!i.isOciOrCciSessionActive(t))continue;let s=i.truncateLastMessagePreview(t.lastMessage??"");e.push({sessionId:t.sessionId,displayLabel:i.buildSessionDisplayLabel(t.sessionId,t.sessionName),presence:t.presence,activitySummary:t.activitySummary,lastMessagePreview:s})}return e}};var le=J(ee());var Q=(()=>{class i{static sceneRecentActivityWindowMs=5*le.minute;static sceneIdleWalkActivityWindowMs=15*le.minute;static parseLastActivityMs(e){let t=Date.parse(e);return Number.isNaN(t)?Number.NaN:t}static isSessionRecentAndOnline(e){if(e.presence===p.offline)return!1;let t=i.parseLastActivityMs(e.lastActivityAtIso);return Number.isNaN(t)?!1:e.nowMs-t<=e.windowMs}static rowLastActivityIso(e){return e.lastActivityAt??""}static isSessionWorkingForSceneCharacter(e){return e.presence===p.working||"hasActiveRun"in e&&e.hasActiveRun===!0||"hasActiveSession"in e&&e.hasActiveSession===!0}static isWorkingSessionRecentAndOnline(e){return i.isSessionWorkingForSceneCharacter(e.row)?i.isSessionRecentAndOnline({lastActivityAtIso:i.rowLastActivityIso(e.row),presence:e.row.presence,nowMs:e.nowMs,windowMs:e.windowMs}):!1}static isSessionInIdleWalkWindow(e){if(e.row.presence===p.offline||i.isWorkingSessionRecentAndOnline({row:e.row,nowMs:e.nowMs,windowMs:e.recentWindowMs}))return!1;let t=i.parseLastActivityMs(i.rowLastActivityIso(e.row));return Number.isNaN(t)?!1:e.nowMs-t<=e.idleWalkWindowMs}static pickNewestSessionByLastActivity(e){let t=e.sessions;return t.length===0?null:[...t].sort((o,r)=>{let c=i.parseLastActivityMs(i.rowLastActivityIso(o)),u=i.parseLastActivityMs(i.rowLastActivityIso(r)),l=!Number.isNaN(c),d=!Number.isNaN(u);return l&&d&&u!==c?u-c:l!==d?l?-1:1:o.sessionId.localeCompare(r.sessionId)})[0]??null}}return i})();var je="instance-data:session-status-updated",Be="openclaw-instance-data:status-updated",He="cci-instance-data:status-updated",Ke="cai-instance-data:status-updated",ys=(()=>{class i{instances_$=P([]);characters_$=D(()=>{let e=this.expandInstancesToCharacters(this.instances_$());return this.assignDistinctSlotsForScene(e)});loading_$=P(!1);loadError_$=P(null);isServerUnreachable_$=P(!1);selectedInstanceId_$=P(null);chatPopupSessionId_$=P(null);chatPopupSessionType_$=P(null);instanceStatusDetailInstanceId_$=P(null);instanceData_AS=x(ve);ociInstanceData_AS=x(Ce);cciInstanceData_AS=x(ge);caiInstanceData_AS=x(Ie);runtimeInstances_DS=x(Re);socket_CS=x(ye);ocSession_DS=x(Ae);darkOfficeLayout_DS=x(ke);constructor(){me(()=>{this.darkOfficeLayout_DS.ensureMinCapacitiesFromSceneCharacters(this.characters_$())},{allowSignalWrites:!0}),this.socket_CS.event$.subscribe(e=>{e.event===je?this.handleInstanceStatusUpdate(e.payload):e.event===Be?this.handleOciInstanceStatusUpdate(e.payload):e.event===He?this.handleCciInstanceStatusUpdate(e.payload):e.event===Ke&&this.handleCaiInstanceStatusUpdate(e.payload)})}workstationSlotMap=new Map;restSlotMap=new Map;patchTimerMap=new Map;meetingRoomLingerMs=2*ie.minute;sessionMeetingRoomUntilByKey=new Map;loadInstanceData(){return $(this,null,function*(){this.loading_$.set(!0),this.loadError_$.set(null);try{yield this.runtimeInstances_DS.loadCcapInstanceList();let e=this.runtimeInstances_DS.ccapInstanceListError_$();if(e){e instanceof fe&&e.status===0?this.isServerUnreachable_$.set(!0):this.loadError_$.set(e);return}yield this.runtimeInstances_DS.loadOciInstanceListAllowEmpty(),yield this.runtimeInstances_DS.loadCciInstanceListAllowEmpty(),yield this.runtimeInstances_DS.loadCaiInstanceListAllowEmpty(),this.isServerUnreachable_$.set(!1);let s=this.runtimeInstances_DS.ccapInstanceList_$().filter(d=>d.status===te.active),a=this.runtimeInstances_DS.ociInstanceList_$(),o=yield this.enrichOciListWithGatewaySessions({list:a}),c=this.runtimeInstances_DS.cciInstanceList_$().filter(d=>d.status===te.active),l=this.runtimeInstances_DS.caiInstanceList_$().filter(d=>d.status===te.active);this.applyAllInstanceData(s,o,c,l)}finally{this.loading_$.set(!1)}})}enrichOciListWithGatewaySessions(e){return $(this,null,function*(){return yield Promise.all(e.list.map(s=>$(this,null,function*(){let a=s.sessionStatuses??[];if(!(s.connectionStatus===K.connected)||a.length>0)return s;try{let r=yield this.ocSession_DS.fetchGatewaySessionsForInstance({instanceId:s.instanceId}),c=ne.mapGatewaySessionsResponse({sessions:r.rawSessions});return c.length===0?s:A(R({},s),{sessionStatuses:c})}catch(r){return ie.DyFM_Error.logSimple("CCAP_DarkOffice_DS | enrichOciListWithGatewaySessions failed",r),s}})))})}saveVisuals(e,t){this.instances_$.update(s=>s.map(a=>a.instanceId===e?A(R({},a),{visuals:t}):a)),this.schedulePatch(e,t)}dismissError(){this.loadError_$.set(null)}openChatPopup(e,t=null){this.chatPopupSessionId_$.set(e),this.chatPopupSessionType_$.set(t)}closeChatPopup(){this.chatPopupSessionId_$.set(null),this.chatPopupSessionType_$.set(null)}selectInstance(e){this.selectedInstanceId_$.set(e)}openInstanceStatusDetail(e){this.instanceStatusDetailInstanceId_$.set(e)}closeInstanceStatusDetail(){this.instanceStatusDetailInstanceId_$.set(null)}getCcapInstanceDataSnapshot(e){return this.runtimeInstances_DS.ccapInstanceList_$().find(t=>t.ccapId===e)}getOciInstanceDataSnapshot(e){return this.runtimeInstances_DS.ociInstanceList_$().find(t=>t.instanceId===e)}getCciInstanceDataSnapshot(e){return this.runtimeInstances_DS.cciInstanceList_$().find(t=>t.ccapId===e)}getCaiInstanceDataSnapshot(e){return this.runtimeInstances_DS.caiInstanceList_$().find(t=>t.ccapId===e)}resolveOfficeInstanceById(e){return e?this.instances_$().find(a=>a.instanceId===e)??null:null}resolveModalCcapSessionStatuses(e){return V.resolveCcapSessionStatuses({inst:e,darkOffice_DS:this})}resolveModalOciSessionStatuses(e){return V.resolveOciSessionStatuses({inst:e,darkOffice_DS:this})}resolveModalCciSessionStatuses(e){return V.resolveCciSessionStatuses({inst:e,darkOffice_DS:this})}resolveModalCaiSessionStatuses(e){return V.resolveCaiSessionStatuses({inst:e,darkOffice_DS:this})}buildInstanceStatusDetailRuntimeHint(e){let t=e.characterType??C.ccap;if(t===C.openclaw)return this.resolveModalOciSessionStatuses(e).length>0||this.getOciInstanceDataSnapshot(e.instanceId)?"":"No matching OCI row in runtime list (last load only; socket updates may not refresh this list).";if(t===C.ccSession){let o=U.parseCcapId(e.instanceId);return!o||this.resolveModalCciSessionStatuses(e).length>0||this.getCciInstanceDataSnapshot(o)?"":"No matching CCI row in runtime list (last load only; socket updates may not refresh this list)."}if(t===C.caSession){let o=F.parseCcapId(e.instanceId);return!o||this.resolveModalCaiSessionStatuses(e).length>0||this.getCaiInstanceDataSnapshot(o)?"":"No matching CAI row in runtime list (last load only; socket updates may not refresh this list)."}return this.resolveModalCcapSessionStatuses(e).length>0||this.getCcapInstanceDataSnapshot(e.instanceId)?"":"No matching CCAP row in runtime list (last load only; socket updates may not refresh this list)."}pruneExpiredMeetingRoomKeys(e){for(let t of[...this.sessionMeetingRoomUntilByKey.keys()]){let s=this.sessionMeetingRoomUntilByKey.get(t);s!==void 0&&s<=e&&this.sessionMeetingRoomUntilByKey.delete(t)}}applyMeetingRoomTransitionForSessionDiff(e){let t=Date.now();this.pruneExpiredMeetingRoomKeys(t);let s=new Map;for(let a of e.previousRows??[])s.set(a.sessionId,a.presence);for(let a of e.nextRows??[]){let o=s.get(a.sessionId),r=`${e.baseInstanceId}::${a.sessionId}`;o===p.working&&a.presence===p.idle&&this.sessionMeetingRoomUntilByKey.set(r,t+this.meetingRoomLingerMs)}}resolveScenePlacementForSessionKey(e){let t=`${e.baseInstanceId}::${e.sessionId}`,s=this.sessionMeetingRoomUntilByKey.get(t);if(s!==void 0&&Date.now()<s)return O.meeting}handleInstanceStatusUpdate(e){let t=typeof e.ccapId=="string"?e.ccapId:void 0,s=e.sessionStatuses,a=Array.isArray(s)?s:void 0;if(!t||!a)return;let o=this.instances_$(),r=o.findIndex(h=>h.instanceId===t);if(r<0){this.loadInstanceData();return}let c=o[r];this.applyMeetingRoomTransitionForSessionDiff({baseInstanceId:t,previousRows:c.rawSessionStatuses,nextRows:a});let u=this.resolveSessionInfoFromStatuses(a),l=this.assignSlot(t,u.presence,c),d=this.resolveAnimState(u.presence,c.presence),f=this.applyPanelCardProjection(A(R({},c),{presence:u.presence,activitySummary:u.activitySummary,currentRunFlowPhase:u.currentRunFlowPhase,latestSessionId:u.latestSessionId,lastMessage:u.lastMessage,animState:d,previousPresence:c.presence,assignedSlotIndex:l,rawSessionStatuses:a}));this.instances_$.update(h=>h.map(I=>I.instanceId===t?f:I))}resolveSessionInfoFromStatuses(e){if(e.length===0)return{presence:p.idle,activitySummary:"No CCAP Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let s=W.pickCcapPrimary(e)??e[0];return{presence:s.presence,activitySummary:s.activitySummary,currentRunFlowPhase:s.activeRunPhase??null,latestSessionId:s.sessionId,lastMessage:s.lastMessage??""}}applyPanelCardProjection(e){let t=e.sessionName??"";if(!t&&e.latestSessionId&&e.rawSessionStatuses){for(let s of e.rawSessionStatuses)if(s.sessionId===e.latestSessionId){t=s.sessionName??"";break}}return A(R({},e),{sessionName:t,lastMessageDerivedStatusLabel:q.buildLastMessageDerivedStatusLabel(e.lastMessage),panelActiveSessionRows:q.buildPanelActiveSessionRows({characterType:e.characterType,rawSessionStatuses:e.rawSessionStatuses})})}applyAllInstanceData(e,t,s,a){let o=this.instances_$(),r=new Map(o.map(S=>[S.instanceId,S])),c=e.map(S=>{let m=r.get(S.ccapId),g=m?.visuals??this.mapToVisuals(S),w=this.resolveSessionInfo(S),y=this.assignSlot(S.ccapId,w.presence,m),v=this.resolveAnimState(w.presence,m?.presence??null);return this.applyPanelCardProjection({instanceId:S.ccapId,presence:w.presence,activitySummary:w.activitySummary,currentRunFlowPhase:w.currentRunFlowPhase,latestSessionId:w.latestSessionId,lastMessage:w.lastMessage,visuals:g,animState:v,previousPresence:m?.presence??null,assignedSlotIndex:y,characterType:C.ccap,connectionStatus:null,rawSessionStatuses:S.sessionStatuses??[],lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]})}),u=t.map(S=>{let m=r.get(S.instanceId),g=m?.visuals??this.mapOciToVisuals(S),w=this.resolveOciSessionInfo(S),y=this.assignSlot(S.instanceId,w.presence,m),v=this.resolveAnimState(w.presence,m?.presence??null);return this.applyPanelCardProjection({instanceId:S.instanceId,presence:w.presence,activitySummary:w.activitySummary,currentRunFlowPhase:null,latestSessionId:w.latestSessionId,lastMessage:w.lastMessage,visuals:g,animState:v,previousPresence:m?.presence??null,assignedSlotIndex:y,characterType:C.openclaw,connectionStatus:S.connectionStatus??null,rawSessionStatuses:S.sessionStatuses??[],lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]})}),l=s.map(S=>{let m=U.build({ccapId:S.ccapId}),g=r.get(m),w=g?.visuals??this.mapCciToVisuals(S),y=this.resolveCciSessionInfo(S),v=this.assignSlot(m,y.presence,g),k=this.resolveAnimState(y.presence,g?.presence??null);return this.applyPanelCardProjection({instanceId:m,presence:y.presence,activitySummary:y.activitySummary,currentRunFlowPhase:y.currentRunFlowPhase,latestSessionId:y.latestSessionId,lastMessage:y.lastMessage,visuals:w,animState:k,previousPresence:g?.presence??null,assignedSlotIndex:v,characterType:C.ccSession,connectionStatus:null,rawSessionStatuses:S.sessionStatuses??[],lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]})}),d=a.map(S=>{let m=F.build({ccapId:S.ccapId}),g=r.get(m),w=g?.visuals??this.mapCaiToVisuals(S),y=this.resolveCaiSessionInfo(S),v=this.assignSlot(m,y.presence,g),k=this.resolveAnimState(y.presence,g?.presence??null);return this.applyPanelCardProjection({instanceId:m,presence:y.presence,activitySummary:y.activitySummary,currentRunFlowPhase:y.currentRunFlowPhase,latestSessionId:y.latestSessionId,lastMessage:y.lastMessage,visuals:w,animState:k,previousPresence:g?.presence??null,assignedSlotIndex:v,characterType:C.caSession,connectionStatus:null,rawSessionStatuses:S.sessionStatuses??[],lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]})}),f=[...c,...u,...l,...d];for(let S of f){let m=r.get(S.instanceId);this.applyMeetingRoomTransitionForSessionDiff({baseInstanceId:S.instanceId,previousRows:m?.rawSessionStatuses,nextRows:S.rawSessionStatuses})}let h=new Set(f.map(S=>S.instanceId)),I=o.filter(S=>!h.has(S.instanceId)&&S.animState!==M.walkingOut).map(S=>this.applyPanelCardProjection(A(R({},S),{animState:M.walkingOut})));this.instances_$.set([...f,...I]),I.length>0&&setTimeout(()=>{this.instances_$.update(S=>S.filter(m=>h.has(m.instanceId)))},Me+200)}mapToVisuals(e){let t=e.darkOfficeVisuals;return{skinColor:t?.skinColor??b.skinColor,hairColor:t?.hairColor??b.hairColor,hairStyle:t?.hairStyle??b.hairStyle,shirtColor:t?.shirtColor??b.shirtColor,clothingStyle:t?.clothingStyle??b.clothingStyle,pantsColor:t?.pantsColor??b.pantsColor,eyeColor:t?.eyeColor??b.eyeColor,bodyType:t?.bodyType??b.bodyType,displayName:e.name??""}}resolveSessionInfo(e){let t=e.sessionStatuses;if(!t||t.length===0)return{presence:p.idle,activitySummary:"No CCAP Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let a=W.pickCcapPrimary(t)??t[0];return{presence:a.presence,activitySummary:a.activitySummary,currentRunFlowPhase:a.activeRunPhase??null,latestSessionId:a.sessionId,lastMessage:a.lastMessage??""}}mapOciToVisuals(e){let t=e.darkOfficeVisuals;return{skinColor:t?.skinColor??_.skinColor,hairColor:t?.hairColor??_.hairColor,hairStyle:t?.hairStyle??_.hairStyle,shirtColor:t?.shirtColor??_.shirtColor,clothingStyle:t?.clothingStyle??_.clothingStyle,pantsColor:t?.pantsColor??_.pantsColor,eyeColor:t?.eyeColor??_.eyeColor,bodyType:t?.bodyType??_.bodyType,displayName:e.label??""}}mapCaiToVisuals(e){let t=e.darkOfficeVisuals;return{skinColor:t?.skinColor??N.skinColor,hairColor:t?.hairColor??N.hairColor,hairStyle:t?.hairStyle??N.hairStyle,shirtColor:t?.shirtColor??N.shirtColor,clothingStyle:t?.clothingStyle??N.clothingStyle,pantsColor:t?.pantsColor??N.pantsColor,eyeColor:t?.eyeColor??N.eyeColor,bodyType:t?.bodyType??N.bodyType,displayName:e.name??""}}resolveCaiSessionInfo(e){let t=e.sessionStatuses??[];if(t.length===0)return{presence:p.idle,activitySummary:"No CA Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let a=W.pickCaiPrimary(t)??t[0];return{presence:a.presence,activitySummary:a.activitySummary,currentRunFlowPhase:a.currentCaSessionStatus??null,latestSessionId:a.sessionId,lastMessage:a.lastMessage??""}}mapCciToVisuals(e){let t=e.darkOfficeVisuals;return{skinColor:t?.skinColor??L.skinColor,hairColor:t?.hairColor??L.hairColor,hairStyle:t?.hairStyle??L.hairStyle,shirtColor:t?.shirtColor??L.shirtColor,clothingStyle:t?.clothingStyle??L.clothingStyle,pantsColor:t?.pantsColor??L.pantsColor,eyeColor:t?.eyeColor??L.eyeColor,bodyType:t?.bodyType??L.bodyType,displayName:e.name??""}}resolveCciSessionInfo(e){let t=e.sessionStatuses??[];if(t.length===0)return{presence:p.idle,activitySummary:"No CC Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let a=W.pickCciPrimary(t)??t[0];return{presence:a.presence,activitySummary:a.activitySummary,currentRunFlowPhase:a.currentCcSessionStatus??null,latestSessionId:a.sessionId,lastMessage:a.lastMessage??""}}resolveOciSessionInfo(e){if(!(e.connectionStatus===K.connected))return{presence:p.offline,activitySummary:"Gateway disconnected",latestSessionId:null,lastMessage:""};let s=e.sessionStatuses??[];if(s.length===0)return{presence:p.idle,activitySummary:"Connected",latestSessionId:null,lastMessage:""};let a=z.pickPrimary(s);return a?{presence:a.presence,activitySummary:a.activitySummary,latestSessionId:a.sessionId,lastMessage:a.lastMessage??""}:{presence:p.idle,activitySummary:"Connected",latestSessionId:null,lastMessage:""}}handleOciInstanceStatusUpdate(e){let t=typeof e.instanceId=="string"?e.instanceId:void 0,s=e.sessionStatuses,a=Array.isArray(s)?s:void 0,o=typeof e.connectionStatus=="string"?e.connectionStatus:void 0;if(!t)return;let r=this.instances_$(),c=r.findIndex(m=>m.instanceId===t);if(!(o===K.connected)&&c>=0){let m=r[c],g=this.assignSlot(t,p.offline,m),w=this.resolveAnimState(p.offline,m.presence);this.instances_$.update(y=>y.map(v=>v.instanceId===t?this.applyPanelCardProjection(A(R({},v),{presence:p.offline,activitySummary:"Gateway disconnected",lastMessage:"",animState:w,previousPresence:m.presence,assignedSlotIndex:g,connectionStatus:o??v.connectionStatus})):v));return}if(c<0){this.loadInstanceData();return}let l=r[c],d=a??[];this.applyMeetingRoomTransitionForSessionDiff({baseInstanceId:t,previousRows:l.rawSessionStatuses,nextRows:d});let f;if(d.length>0){let m=z.pickPrimary(d);m?f={presence:m.presence,activitySummary:m.activitySummary,latestSessionId:m.sessionId,lastMessage:m.lastMessage??""}:f={presence:p.idle,activitySummary:"Connected",latestSessionId:null,lastMessage:""}}else f={presence:p.idle,activitySummary:"Connected",latestSessionId:null,lastMessage:""};let h=this.assignSlot(t,f.presence,l),I=this.resolveAnimState(f.presence,l.presence),S=this.applyPanelCardProjection(A(R({},l),{presence:f.presence,activitySummary:f.activitySummary,latestSessionId:f.latestSessionId,lastMessage:f.lastMessage,animState:I,previousPresence:l.presence,assignedSlotIndex:h,connectionStatus:o??l.connectionStatus,rawSessionStatuses:d}));this.instances_$.update(m=>m.map(g=>g.instanceId===t?S:g))}handleCciInstanceStatusUpdate(e){let t=typeof e.officeInstanceId=="string"?e.officeInstanceId:void 0,s=e.sessionStatuses,a=Array.isArray(s)?s:void 0;if(!t)return;let o=this.instances_$(),r=o.findIndex(I=>I.instanceId===t);if(r<0){this.loadInstanceData();return}let c=o[r],u=a??[];this.applyMeetingRoomTransitionForSessionDiff({baseInstanceId:t,previousRows:c.rawSessionStatuses,nextRows:u});let l=this.resolveSessionInfoFromCciStatuses(u),d=this.assignSlot(t,l.presence,c),f=this.resolveAnimState(l.presence,c.presence),h=this.applyPanelCardProjection(A(R({},c),{presence:l.presence,activitySummary:l.activitySummary,currentRunFlowPhase:l.currentRunFlowPhase,latestSessionId:l.latestSessionId,lastMessage:l.lastMessage,animState:f,previousPresence:c.presence,assignedSlotIndex:d,rawSessionStatuses:u}));this.instances_$.update(I=>I.map(S=>S.instanceId===t?h:S))}handleCaiInstanceStatusUpdate(e){let t=typeof e.officeInstanceId=="string"?e.officeInstanceId:void 0,s=e.sessionStatuses,a=Array.isArray(s)?s:void 0;if(!t)return;let o=this.instances_$(),r=o.findIndex(I=>I.instanceId===t);if(r<0){this.loadInstanceData();return}let c=o[r],u=a??[];this.applyMeetingRoomTransitionForSessionDiff({baseInstanceId:t,previousRows:c.rawSessionStatuses,nextRows:u});let l=this.resolveSessionInfoFromCaiStatuses(u),d=this.assignSlot(t,l.presence,c),f=this.resolveAnimState(l.presence,c.presence),h=this.applyPanelCardProjection(A(R({},c),{presence:l.presence,activitySummary:l.activitySummary,currentRunFlowPhase:l.currentRunFlowPhase,latestSessionId:l.latestSessionId,lastMessage:l.lastMessage,animState:f,previousPresence:c.presence,assignedSlotIndex:d,rawSessionStatuses:u}));this.instances_$.update(I=>I.map(S=>S.instanceId===t?h:S))}resolveSessionInfoFromCciStatuses(e){if(e.length===0)return{presence:p.idle,activitySummary:"No CC Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let s=W.pickCciPrimary(e)??e[0];return{presence:s.presence,activitySummary:s.activitySummary,currentRunFlowPhase:s.currentCcSessionStatus??null,latestSessionId:s.sessionId,lastMessage:s.lastMessage??""}}resolveSessionInfoFromCaiStatuses(e){if(e.length===0)return{presence:p.idle,activitySummary:"No CA Session activity",currentRunFlowPhase:null,latestSessionId:null,lastMessage:""};let s=W.pickCaiPrimary(e)??e[0];return{presence:s.presence,activitySummary:s.activitySummary,currentRunFlowPhase:s.currentCaSessionStatus??null,latestSessionId:s.sessionId,lastMessage:s.lastMessage??""}}schedulePatch(e,t){let s=this.patchTimerMap.get(e);s!==void 0&&clearTimeout(s);let a=setTimeout(()=>{this.patchTimerMap.delete(e);let d=t,{displayName:o}=d,r=Se(d,["displayName"]),c=this.instances_$().find(f=>f.instanceId===e),u=F.parseCcapId(e),l=U.parseCcapId(e);u!==null?this.caiInstanceData_AS.patchByCcapId({ccapId:u,name:o||void 0,darkOfficeVisuals:r}):l!==null?this.cciInstanceData_AS.patchByCcapId({ccapId:l,name:o||void 0,darkOfficeVisuals:r}):c?.characterType===C.openclaw?this.ociInstanceData_AS.patchVisuals({instanceId:e,label:o||void 0,darkOfficeVisuals:r}):this.instanceData_AS.patchByCcapId({ccapId:e,name:o||void 0,darkOfficeVisuals:r})},300);this.patchTimerMap.set(e,a)}assignSlot(e,t,s){let a=t===p.working,o=a?this.workstationSlotMap:this.restSlotMap,r=a?this.darkOfficeLayout_DS.workstationCapacity_$():this.darkOfficeLayout_DS.restCapacity_$();if(o.has(e))return o.get(e);this.workstationSlotMap.delete(e),this.restSlotMap.delete(e);let c=new Set(o.values());for(let l=0;l<r;l++)if(!c.has(l))return o.set(e,l),l;let u=r;for(;c.has(u);)u++;return o.set(e,u),u}resolveAnimState(e,t){return t===p.offline&&e!==p.offline?M.walkingIn:t!==null&&t!==p.offline&&e===p.offline?M.walkingOut:t!==null&&t!==p.offline&&e!==p.offline&&t!==e?M.walkingBetween:e===p.working?M.working:e===p.idle?M.sitting:M.standing}assignDistinctSlotsForScene(e){let t=0,s=0,a=0;return e.map(o=>{let r;return o.scenePlacement===O.meeting?r=a++:o.presence===p.working?r=t++:r=s++,A(R({},o),{assignedSlotIndex:r})})}expandInstancesToCharacters(e){let t=[],s=Date.now(),a=Q.sceneRecentActivityWindowMs,o=Q.sceneIdleWalkActivityWindowMs,r=new Map;for(let c of e)c.characterType===C.ccap&&r.set(c.instanceId,c.presence);for(let c of e){if(c.presence===p.offline)continue;if(c.characterType===C.ccSession||c.characterType===C.caSession){let l=c.characterType===C.ccSession?U.parseCcapId(c.instanceId):F.parseCcapId(c.instanceId),d=l?r.get(l):void 0;if(d===void 0||d===p.offline)continue}t.push(this.buildInstanceBaselineCharacter(c));let u=c.rawSessionStatuses??[];for(let l of u){if(Q.isWorkingSessionRecentAndOnline({row:l,nowMs:s,windowMs:a})){t.push(this.buildPerSessionOfficeCharacter(c,l));continue}Q.isSessionInIdleWalkWindow({row:l,nowMs:s,recentWindowMs:a,idleWalkWindowMs:o})&&t.push(this.buildIdleWalkSessionCharacter(c,l))}}return t}buildIdleWalkSessionCharacter(e,t){let s=`${e.instanceId}::${t.sessionId}`;return this.applyPanelCardProjection(A(R({},e),{instanceId:s,sessionId:t.sessionId,sessionName:t.sessionName??"",presence:p.idle,activitySummary:t.activitySummary,lastMessage:t.lastMessage??"",latestSessionId:t.sessionId,currentRunFlowPhase:i.resolveSessionRunFlowPhaseLabel(t),assignedSlotIndex:0,animState:M.idleWalking,previousPresence:null,scenePlacement:void 0,rawSessionStatuses:void 0,lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]}))}buildInstanceBaselineCharacter(e){return this.applyPanelCardProjection(A(R({},e),{instanceId:e.instanceId,sessionId:void 0,sessionName:"",presence:p.idle,activitySummary:e.activitySummary,lastMessage:"",latestSessionId:null,currentRunFlowPhase:null,assignedSlotIndex:0,animState:M.sitting,previousPresence:null,scenePlacement:void 0,rawSessionStatuses:e.rawSessionStatuses,lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]}))}buildPerSessionOfficeCharacter(e,t){let s=`${e.instanceId}::${t.sessionId}`,o=(t.presence===p.working?void 0:this.resolveScenePlacementForSessionKey({baseInstanceId:e.instanceId,sessionId:t.sessionId}))===O.meeting?O.meeting:void 0;return this.applyPanelCardProjection(A(R({},e),{instanceId:s,sessionId:t.sessionId,sessionName:t.sessionName??"",presence:t.presence,activitySummary:t.activitySummary,lastMessage:t.lastMessage??"",latestSessionId:t.sessionId,currentRunFlowPhase:i.resolveSessionRunFlowPhaseLabel(t),assignedSlotIndex:0,animState:t.presence===p.working?M.working:M.sitting,previousPresence:null,scenePlacement:o,rawSessionStatuses:void 0,lastMessageDerivedStatusLabel:"",panelActiveSessionRows:[]}))}static resolveSessionRunFlowPhaseLabel(e){return"activeRunPhase"in e?e.activeRunPhase??null:"currentCcSessionStatus"in e?e.currentCcSessionStatus??null:"currentCaSessionStatus"in e?e.currentCaSessionStatus??null:null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Z({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{M as a,O as b,C as c,K as d,X as e,Y as f,j as g,it as h,ot as i,at as j,rt as k,ct as l,F as m,U as n,Q as o,ke as p,ys as q};
|
|
2
|
+
//# sourceMappingURL=chunk-7JW45JC5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{p as h}from"./chunk-ELFCSLIP.js";import{h as S}from"./chunk-TBMJSIBB.js";var c=S(h()),f=60,d=60*60,g=60*60*24,M=7,m=class{static formatRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=new Date,i=a.getTime()-n.getTime(),o=Math.floor(i/c.second);if(o<0)return"";if(o<f)return"just now";let e=Math.floor(o/f);if(e<60)return e===1?"1 minute ago":`${e} minutes ago`;let s=Math.floor(o/d);if(s<24)return s===1?"1 hour ago":`${s} hours ago`;let r=Math.floor(o/g);if(r<=M)return r===1?"1 day ago":`${r} days ago`;let u={month:"short",day:"numeric",year:n.getFullYear()!==a.getFullYear()?"numeric":void 0};return n.toLocaleDateString(void 0,u)}static formatCompactRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let i=Date.now()-n.getTime();if(i<0)return"just now";let o=Math.floor(i/c.second),e=Math.floor(o/f),s=Math.floor(o/d),r=Math.floor(o/g);return o<f?"just now":e<60?`${e}m ago`:s<24?`${s}h ago`:r<30?`${r}d ago`:`${Math.floor(r/30)}mo ago`}static formatAbsoluteForTooltip(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=String(n.getFullYear()),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0"),e=String(n.getHours()).padStart(2,"0"),s=String(n.getMinutes()).padStart(2,"0"),r=String(n.getSeconds()).padStart(2,"0");return`${a}-${i}-${o} ${e}:${s}:${r}`}};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7MSQD5HV.js.map
|