@futdevpro/ccap 1.1.2941 → 1.1.2947
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-DQNVM7AN.js → agent-instances.module-ZEVBTMMM.js} +2 -2
- package/client-dist/{ca.module-O75C6NM4.js → ca.module-YYOLIMGY.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-T6B7E2UI.js → cc-usage-dashboard.component-AQC32ZAD.js} +2 -2
- package/client-dist/{cc.module-J3EAMUJD.js → cc.module-KHTSL3SA.js} +2 -2
- package/client-dist/{chunk-SAPL2K2E.js → chunk-3RHTWAQ7.js} +2 -2
- package/client-dist/{chunk-C5KZ5ZXA.js → chunk-3SNULO46.js} +2 -2
- package/client-dist/{chunk-XCT53H4N.js → chunk-4DZM46W7.js} +2 -2
- package/client-dist/{chunk-ULQMQC3R.js → chunk-5BLIQZKV.js} +2 -2
- package/client-dist/{chunk-BVMJ6VDQ.js → chunk-5RLZPCG3.js} +2 -2
- package/client-dist/{chunk-KYHDIQCX.js → chunk-AP5TU3TG.js} +2 -2
- package/client-dist/{chunk-SLVEW3FJ.js → chunk-B25QGO2W.js} +2 -2
- package/client-dist/{chunk-QFLT45N4.js → chunk-BBH3U5AO.js} +2 -2
- package/client-dist/{chunk-EE62M3C3.js → chunk-BSFAUF6X.js} +2 -2
- package/client-dist/{chunk-L34TPSOM.js → chunk-BX4VL2VP.js} +2 -2
- package/client-dist/{chunk-76DKMZYK.js → chunk-BXLYWWVW.js} +2 -2
- package/client-dist/{chunk-ME33LUDI.js → chunk-C2JUJE7W.js} +2 -2
- package/client-dist/{chunk-BFYLRSXS.js → chunk-CGARRM5K.js} +2 -2
- package/client-dist/{chunk-STNBIKCT.js → chunk-DNJ7WW7C.js} +2 -2
- package/client-dist/{chunk-F53NZ2ZL.js → chunk-E2AGFRVZ.js} +2 -2
- package/client-dist/{chunk-GWVMW7IG.js → chunk-EG4UOTIO.js} +2 -2
- package/client-dist/{chunk-FLM2XUDT.js → chunk-FFOMAJJB.js} +2 -2
- package/client-dist/{chunk-YORE53OO.js → chunk-FRYV2ANS.js} +2 -2
- package/client-dist/{chunk-4IIQKFA5.js → chunk-FU5J4UQR.js} +2 -2
- package/client-dist/{chunk-3SDOBYEW.js → chunk-FWU7MLGG.js} +2 -2
- package/client-dist/{chunk-ISH4TFYI.js → chunk-GAQCGOVC.js} +2 -2
- package/client-dist/{chunk-ELCLLZN6.js → chunk-GIIT6ZXQ.js} +2 -2
- package/client-dist/{chunk-H6M757KS.js → chunk-GKQUKC2Y.js} +2 -2
- package/client-dist/{chunk-XFC3O3CG.js → chunk-IMY653SN.js} +2 -2
- package/client-dist/{chunk-LQFJLYDU.js → chunk-KAVCCO5Q.js} +2 -2
- package/client-dist/{chunk-IXECCSJS.js → chunk-KQUC7GVD.js} +2 -2
- package/client-dist/{chunk-TVFT7AVC.js → chunk-KSU4V25I.js} +2 -2
- package/client-dist/{chunk-6ZJOH7NF.js → chunk-L64DWL3O.js} +2 -2
- package/client-dist/{chunk-KE3ET6OR.js → chunk-LQXM24RN.js} +2 -2
- package/client-dist/{chunk-YUCPEKTT.js → chunk-MDXWG4L2.js} +2 -2
- package/client-dist/{chunk-T55CH5AA.js → chunk-MGBOFP4H.js} +2 -2
- package/client-dist/{chunk-ZDNLZMH3.js → chunk-MXXUHJBJ.js} +2 -2
- package/client-dist/{chunk-JFYDUH37.js → chunk-N6JHPE46.js} +2 -2
- package/client-dist/{chunk-4PVZDW7U.js → chunk-NCJ6UM4K.js} +2 -2
- package/client-dist/{chunk-KUOWE3RO.js → chunk-NT4IQ6JG.js} +2 -2
- package/client-dist/{chunk-GHC5GFO2.js → chunk-NZCKXDHP.js} +2 -2
- package/client-dist/{chunk-PYVALWHU.js → chunk-OKNZODWZ.js} +2 -2
- package/client-dist/{chunk-PYVALWHU.js.map → chunk-OKNZODWZ.js.map} +1 -1
- package/client-dist/{chunk-O3R65DXW.js → chunk-OQZHKPKW.js} +2 -2
- package/client-dist/{chunk-KUXCTBKK.js → chunk-PD54YIU7.js} +2 -2
- package/client-dist/{chunk-6HEIMADY.js → chunk-PEOX37GU.js} +2 -2
- package/client-dist/{chunk-5L2ZD352.js → chunk-QBLZN2K7.js} +2 -2
- package/client-dist/{chunk-SB6AP4YU.js → chunk-QOMCRYEZ.js} +2 -2
- package/client-dist/{chunk-EVULZLJI.js → chunk-RIXEJWZN.js} +2 -2
- package/client-dist/{chunk-S3LPVCEK.js → chunk-ROX7XMCY.js} +2 -2
- package/client-dist/{chunk-QR57TW7S.js → chunk-SOTECVEV.js} +2 -2
- package/client-dist/{chunk-FDFKQCLH.js → chunk-SVOEK6DZ.js} +2 -2
- package/client-dist/{chunk-VE3L6E54.js → chunk-TIGUKVX6.js} +2 -2
- package/client-dist/{chunk-SPGMJKQ6.js → chunk-V2WK5UAY.js} +2 -2
- package/client-dist/{chunk-MPNIHRMZ.js → chunk-V5JT5SVQ.js} +2 -2
- package/client-dist/{chunk-ZRXTZHMM.js → chunk-VQNH5QZ2.js} +2 -2
- package/client-dist/{chunk-AQ7GMTGO.js → chunk-WGZ3KYUI.js} +2 -2
- package/client-dist/{chunk-25FKG2J7.js → chunk-XJZ3GRFC.js} +2 -2
- package/client-dist/{chunk-ZXONE2EQ.js → chunk-Y4P5DT5X.js} +2 -2
- package/client-dist/{chunk-JBI7DZF6.js → chunk-YOCBPRNH.js} +2 -2
- package/client-dist/{chunk-2SLADLRY.js → chunk-ZI6ZNXBW.js} +2 -2
- package/client-dist/{chunk-HIEUVQDI.js → chunk-ZKPH2UCX.js} +2 -2
- package/client-dist/{consultant.module-KY52LOBE.js → consultant.module-PZ7AYCNM.js} +2 -2
- package/client-dist/{crd.module-WUXOSSGU.js → crd.module-JFQFGOXI.js} +2 -2
- package/client-dist/{dashboard.module-UTQDXN24.js → dashboard.module-7FRVU26A.js} +2 -2
- package/client-dist/{do.module-7N5QH7EH.js → do.module-WUFOTYFG.js} +2 -2
- package/client-dist/{document-library.module-PP32OUKK.js → document-library.module-5WYPOT6H.js} +2 -2
- package/client-dist/{embedding-eval.module-J73HF4SJ.js → embedding-eval.module-4CYH6DIQ.js} +2 -2
- package/client-dist/{embedding-registry.module-73AL3GC5.js → embedding-registry.module-ZMMAJS4R.js} +2 -2
- package/client-dist/{err.module-TKF4HCDX.js → err.module-IMW6OA64.js} +2 -2
- package/client-dist/{feedback.module-AMF7Z6CL.js → feedback.module-OZPPZJDW.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-Y3H5KATA.js → host-runtime-mcp.module-VJ7TFO4U.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-3I425DWB.js → live-dev-pipeline.module-SWGVQIDQ.js} +2 -2
- package/client-dist/{logs.module-DU7IJ2DE.js → logs.module-WW4NNU63.js} +2 -2
- package/client-dist/{main-DBKN6KIK.js → main-PHZ7O56I.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-QGNYMMG3.js → master-control-remote-poc.module-DBW56ZMH.js} +2 -2
- package/client-dist/{mobile-app.module-LSMEWADN.js → mobile-app.module-I2KQKWOF.js} +2 -2
- package/client-dist/{model-registry.module-T7RR46CZ.js → model-registry.module-33KV2XSZ.js} +2 -2
- package/client-dist/{oc.module-SJGNF5A3.js → oc.module-RRE2YITL.js} +2 -2
- package/client-dist/{orc.module-IZI6CDZM.js → orc.module-VOUIZMA6.js} +2 -2
- package/client-dist/{project-management.module-2FLSPZW7.js → project-management.module-GAM4KRIA.js} +2 -2
- package/client-dist/project-source-routed.module-OO2FG7BY.js +2 -0
- package/client-dist/{scheduler.module-PIEO4HFO.js → scheduler.module-5DUE3I6K.js} +2 -2
- package/client-dist/{session.module-VLAABUIK.js → session.module-PDPSJA3D.js} +2 -2
- package/client-dist/{set.module-6ZL4FBEL.js → set.module-OSRQZR36.js} +2 -2
- package/client-dist/{setup.module-M6GV6JEI.js → setup.module-M5OOSJ4H.js} +2 -2
- package/client-dist/{terminals.module-2GVQO2KU.js → terminals.module-STKPDNMM.js} +2 -2
- package/client-dist/{voice-notes-poc.module-KGPLCE5E.js → voice-notes-poc.module-4PRNA77N.js} +2 -2
- package/client-dist/{wfs.module-CRKC34R4.js → wfs.module-NMOLG37Y.js} +2 -2
- package/package.json +1 -1
- package/client-dist/project-source-routed.module-WI5VP2S7.js +0 -2
- /package/client-dist/{agent-instances.module-DQNVM7AN.js.map → agent-instances.module-ZEVBTMMM.js.map} +0 -0
- /package/client-dist/{ca.module-O75C6NM4.js.map → ca.module-YYOLIMGY.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-T6B7E2UI.js.map → cc-usage-dashboard.component-AQC32ZAD.js.map} +0 -0
- /package/client-dist/{cc.module-J3EAMUJD.js.map → cc.module-KHTSL3SA.js.map} +0 -0
- /package/client-dist/{chunk-SAPL2K2E.js.map → chunk-3RHTWAQ7.js.map} +0 -0
- /package/client-dist/{chunk-C5KZ5ZXA.js.map → chunk-3SNULO46.js.map} +0 -0
- /package/client-dist/{chunk-XCT53H4N.js.map → chunk-4DZM46W7.js.map} +0 -0
- /package/client-dist/{chunk-ULQMQC3R.js.map → chunk-5BLIQZKV.js.map} +0 -0
- /package/client-dist/{chunk-BVMJ6VDQ.js.map → chunk-5RLZPCG3.js.map} +0 -0
- /package/client-dist/{chunk-KYHDIQCX.js.map → chunk-AP5TU3TG.js.map} +0 -0
- /package/client-dist/{chunk-SLVEW3FJ.js.map → chunk-B25QGO2W.js.map} +0 -0
- /package/client-dist/{chunk-QFLT45N4.js.map → chunk-BBH3U5AO.js.map} +0 -0
- /package/client-dist/{chunk-EE62M3C3.js.map → chunk-BSFAUF6X.js.map} +0 -0
- /package/client-dist/{chunk-L34TPSOM.js.map → chunk-BX4VL2VP.js.map} +0 -0
- /package/client-dist/{chunk-76DKMZYK.js.map → chunk-BXLYWWVW.js.map} +0 -0
- /package/client-dist/{chunk-ME33LUDI.js.map → chunk-C2JUJE7W.js.map} +0 -0
- /package/client-dist/{chunk-BFYLRSXS.js.map → chunk-CGARRM5K.js.map} +0 -0
- /package/client-dist/{chunk-STNBIKCT.js.map → chunk-DNJ7WW7C.js.map} +0 -0
- /package/client-dist/{chunk-F53NZ2ZL.js.map → chunk-E2AGFRVZ.js.map} +0 -0
- /package/client-dist/{chunk-GWVMW7IG.js.map → chunk-EG4UOTIO.js.map} +0 -0
- /package/client-dist/{chunk-FLM2XUDT.js.map → chunk-FFOMAJJB.js.map} +0 -0
- /package/client-dist/{chunk-YORE53OO.js.map → chunk-FRYV2ANS.js.map} +0 -0
- /package/client-dist/{chunk-4IIQKFA5.js.map → chunk-FU5J4UQR.js.map} +0 -0
- /package/client-dist/{chunk-3SDOBYEW.js.map → chunk-FWU7MLGG.js.map} +0 -0
- /package/client-dist/{chunk-ISH4TFYI.js.map → chunk-GAQCGOVC.js.map} +0 -0
- /package/client-dist/{chunk-ELCLLZN6.js.map → chunk-GIIT6ZXQ.js.map} +0 -0
- /package/client-dist/{chunk-H6M757KS.js.map → chunk-GKQUKC2Y.js.map} +0 -0
- /package/client-dist/{chunk-XFC3O3CG.js.map → chunk-IMY653SN.js.map} +0 -0
- /package/client-dist/{chunk-LQFJLYDU.js.map → chunk-KAVCCO5Q.js.map} +0 -0
- /package/client-dist/{chunk-IXECCSJS.js.map → chunk-KQUC7GVD.js.map} +0 -0
- /package/client-dist/{chunk-TVFT7AVC.js.map → chunk-KSU4V25I.js.map} +0 -0
- /package/client-dist/{chunk-6ZJOH7NF.js.map → chunk-L64DWL3O.js.map} +0 -0
- /package/client-dist/{chunk-KE3ET6OR.js.map → chunk-LQXM24RN.js.map} +0 -0
- /package/client-dist/{chunk-YUCPEKTT.js.map → chunk-MDXWG4L2.js.map} +0 -0
- /package/client-dist/{chunk-T55CH5AA.js.map → chunk-MGBOFP4H.js.map} +0 -0
- /package/client-dist/{chunk-ZDNLZMH3.js.map → chunk-MXXUHJBJ.js.map} +0 -0
- /package/client-dist/{chunk-JFYDUH37.js.map → chunk-N6JHPE46.js.map} +0 -0
- /package/client-dist/{chunk-4PVZDW7U.js.map → chunk-NCJ6UM4K.js.map} +0 -0
- /package/client-dist/{chunk-KUOWE3RO.js.map → chunk-NT4IQ6JG.js.map} +0 -0
- /package/client-dist/{chunk-GHC5GFO2.js.map → chunk-NZCKXDHP.js.map} +0 -0
- /package/client-dist/{chunk-O3R65DXW.js.map → chunk-OQZHKPKW.js.map} +0 -0
- /package/client-dist/{chunk-KUXCTBKK.js.map → chunk-PD54YIU7.js.map} +0 -0
- /package/client-dist/{chunk-6HEIMADY.js.map → chunk-PEOX37GU.js.map} +0 -0
- /package/client-dist/{chunk-5L2ZD352.js.map → chunk-QBLZN2K7.js.map} +0 -0
- /package/client-dist/{chunk-SB6AP4YU.js.map → chunk-QOMCRYEZ.js.map} +0 -0
- /package/client-dist/{chunk-EVULZLJI.js.map → chunk-RIXEJWZN.js.map} +0 -0
- /package/client-dist/{chunk-S3LPVCEK.js.map → chunk-ROX7XMCY.js.map} +0 -0
- /package/client-dist/{chunk-QR57TW7S.js.map → chunk-SOTECVEV.js.map} +0 -0
- /package/client-dist/{chunk-FDFKQCLH.js.map → chunk-SVOEK6DZ.js.map} +0 -0
- /package/client-dist/{chunk-VE3L6E54.js.map → chunk-TIGUKVX6.js.map} +0 -0
- /package/client-dist/{chunk-SPGMJKQ6.js.map → chunk-V2WK5UAY.js.map} +0 -0
- /package/client-dist/{chunk-MPNIHRMZ.js.map → chunk-V5JT5SVQ.js.map} +0 -0
- /package/client-dist/{chunk-ZRXTZHMM.js.map → chunk-VQNH5QZ2.js.map} +0 -0
- /package/client-dist/{chunk-AQ7GMTGO.js.map → chunk-WGZ3KYUI.js.map} +0 -0
- /package/client-dist/{chunk-25FKG2J7.js.map → chunk-XJZ3GRFC.js.map} +0 -0
- /package/client-dist/{chunk-ZXONE2EQ.js.map → chunk-Y4P5DT5X.js.map} +0 -0
- /package/client-dist/{chunk-JBI7DZF6.js.map → chunk-YOCBPRNH.js.map} +0 -0
- /package/client-dist/{chunk-2SLADLRY.js.map → chunk-ZI6ZNXBW.js.map} +0 -0
- /package/client-dist/{chunk-HIEUVQDI.js.map → chunk-ZKPH2UCX.js.map} +0 -0
- /package/client-dist/{consultant.module-KY52LOBE.js.map → consultant.module-PZ7AYCNM.js.map} +0 -0
- /package/client-dist/{crd.module-WUXOSSGU.js.map → crd.module-JFQFGOXI.js.map} +0 -0
- /package/client-dist/{dashboard.module-UTQDXN24.js.map → dashboard.module-7FRVU26A.js.map} +0 -0
- /package/client-dist/{do.module-7N5QH7EH.js.map → do.module-WUFOTYFG.js.map} +0 -0
- /package/client-dist/{document-library.module-PP32OUKK.js.map → document-library.module-5WYPOT6H.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-J73HF4SJ.js.map → embedding-eval.module-4CYH6DIQ.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-73AL3GC5.js.map → embedding-registry.module-ZMMAJS4R.js.map} +0 -0
- /package/client-dist/{err.module-TKF4HCDX.js.map → err.module-IMW6OA64.js.map} +0 -0
- /package/client-dist/{feedback.module-AMF7Z6CL.js.map → feedback.module-OZPPZJDW.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-Y3H5KATA.js.map → host-runtime-mcp.module-VJ7TFO4U.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-3I425DWB.js.map → live-dev-pipeline.module-SWGVQIDQ.js.map} +0 -0
- /package/client-dist/{logs.module-DU7IJ2DE.js.map → logs.module-WW4NNU63.js.map} +0 -0
- /package/client-dist/{main-DBKN6KIK.js.map → main-PHZ7O56I.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-QGNYMMG3.js.map → master-control-remote-poc.module-DBW56ZMH.js.map} +0 -0
- /package/client-dist/{mobile-app.module-LSMEWADN.js.map → mobile-app.module-I2KQKWOF.js.map} +0 -0
- /package/client-dist/{model-registry.module-T7RR46CZ.js.map → model-registry.module-33KV2XSZ.js.map} +0 -0
- /package/client-dist/{oc.module-SJGNF5A3.js.map → oc.module-RRE2YITL.js.map} +0 -0
- /package/client-dist/{orc.module-IZI6CDZM.js.map → orc.module-VOUIZMA6.js.map} +0 -0
- /package/client-dist/{project-management.module-2FLSPZW7.js.map → project-management.module-GAM4KRIA.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-WI5VP2S7.js.map → project-source-routed.module-OO2FG7BY.js.map} +0 -0
- /package/client-dist/{scheduler.module-PIEO4HFO.js.map → scheduler.module-5DUE3I6K.js.map} +0 -0
- /package/client-dist/{session.module-VLAABUIK.js.map → session.module-PDPSJA3D.js.map} +0 -0
- /package/client-dist/{set.module-6ZL4FBEL.js.map → set.module-OSRQZR36.js.map} +0 -0
- /package/client-dist/{setup.module-M6GV6JEI.js.map → setup.module-M5OOSJ4H.js.map} +0 -0
- /package/client-dist/{terminals.module-2GVQO2KU.js.map → terminals.module-STKPDNMM.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-KGPLCE5E.js.map → voice-notes-poc.module-4PRNA77N.js.map} +0 -0
- /package/client-dist/{wfs.module-CRKC34R4.js.map → wfs.module-NMOLG37Y.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ri,c as si,d as Te}from"./chunk-STNBIKCT.js";import{c as oi}from"./chunk-C5KZ5ZXA.js";import{a as ai}from"./chunk-ULQMQC3R.js";import{a as ii}from"./chunk-GWVMW7IG.js";import{a as li}from"./chunk-BFYLRSXS.js";import{f as Yn,i as Kn,n as Xn,o as Qn,p as ei,v as ti}from"./chunk-EO4DNTT4.js";import{a as Yt}from"./chunk-5UPNU54P.js";import{j as ni}from"./chunk-KE3ET6OR.js";import{p as ao}from"./chunk-PYVALWHU.js";import{$a as J,C as ke,Cb as Ct,D as Fe,Fa as f,G as Gn,Ga as E,Ha as qt,Hb as Jn,Ia as Jt,J as I,K as D,Kb as Zn,L as ie,M as Je,T as Ze,Ta as Ue,U as me,Ua as Zt,W as _t,X as xt,Z as d,_ as jn,a as ne,aa as se,ab as Z,b as Ne,da as A,fa as Ae,ga as M,h as so,hb as T,ja as V,jb as qn,k as re,la as k,na as bt,oa as Se,pa as ye,qa as c,ra as p,sa as S,ua as N,ub as He,va as B,wa as _,xa as Wn,y as Vn,ya as Ye}from"./chunk-TBMJSIBB.js";var{entries:_i,setPrototypeOf:ci,isFrozen:lo,getPrototypeOf:co,getOwnPropertyDescriptor:po}=Object,{freeze:X,seal:ae,create:St}=Object,{apply:on,construct:rn}=typeof Reflect<"u"&&Reflect;X||(X=function(n){return n});ae||(ae=function(n){return n});on||(on=function(n,e){for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];return n.apply(e,i)});rn||(rn=function(n){for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return new n(...o)});var kt=Q(Array.prototype.forEach),uo=Q(Array.prototype.lastIndexOf),pi=Q(Array.prototype.pop),Ke=Q(Array.prototype.push),mo=Q(Array.prototype.splice),yt=Q(String.prototype.toLowerCase),Kt=Q(String.prototype.toString),Xt=Q(String.prototype.match),Xe=Q(String.prototype.replace),go=Q(String.prototype.indexOf),ho=Q(String.prototype.trim),oe=Q(Object.prototype.hasOwnProperty),K=Q(RegExp.prototype.test),Qe=fo(TypeError);function Q(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return on(t,n,o)}}function fo(t){return function(){for(var n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];return rn(t,e)}}function v(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt;ci&&ci(t,null);let o=n.length;for(;o--;){let i=n[o];if(typeof i=="string"){let r=e(i);r!==i&&(lo(n)||(n[o]=r),i=r)}t[i]=!0}return t}function _o(t){for(let n=0;n<t.length;n++)oe(t,n)||(t[n]=null);return t}function ge(t){let n=St(null);for(let[e,o]of _i(t))oe(t,e)&&(Array.isArray(o)?n[e]=_o(o):o&&typeof o=="object"&&o.constructor===Object?n[e]=ge(o):n[e]=o);return n}function et(t,n){for(;t!==null;){let o=po(t,n);if(o){if(o.get)return Q(o.get);if(typeof o.value=="function")return Q(o.value)}t=co(t)}function e(){return null}return e}var di=X(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Qt=X(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),en=X(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),xo=X(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),tn=X(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bo=X(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ui=X(["#text"]),mi=X(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),nn=X(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),gi=X(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wt=X(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Co=ae(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ko=ae(/<%[\w\W]*|[\w\W]*%>/gm),wo=ae(/\$\{[\w\W]*/gm),So=ae(/^data-[\-\w.\u00B7-\uFFFF]+$/),yo=ae(/^aria-[\-\w]+$/),xi=ae(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),To=ae(/^(?:\w+script|data):/i),vo=ae(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bi=ae(/^html$/i),Eo=ae(/^[a-z][.\w]*(-[.\w]+)+$/i),hi=Object.freeze({__proto__:null,ARIA_ATTR:yo,ATTR_WHITESPACE:vo,CUSTOM_ELEMENT:Eo,DATA_ATTR:So,DOCTYPE_NAME:bi,ERB_EXPR:ko,IS_ALLOWED_URI:xi,IS_SCRIPT_OR_DATA:To,MUSTACHE_EXPR:Co,TMPLIT_EXPR:wo}),tt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ao=function(){return typeof window>"u"?null:window},Mo=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(o=e.getAttribute(i));let r="dompurify"+(o?"#"+o:"");try{return n.createPolicy(r,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},fi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ci(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ao(),n=b=>Ci(b);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==tt.document||!t.Element)return n.isSupported=!1,n;let{document:e}=t,o=e,i=o.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:u,Element:l,NodeFilter:h,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:y,trustedTypes:L}=t,$=l.prototype,le=et($,"cloneNode"),st=et($,"remove"),at=et($,"nextSibling"),lt=et($,"childNodes"),$e=et($,"parentNode");if(typeof s=="function"){let b=e.createElement("template");b.content&&b.content.ownerDocument&&(e=b.content.ownerDocument)}let G,fe="",{implementation:_e,createNodeIterator:Gi,createDocumentFragment:ji,getElementsByTagName:Wi}=e,{importNode:qi}=o,Y=fi();n.isSupported=typeof _i=="function"&&typeof $e=="function"&&_e&&_e.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Lt,ERB_EXPR:Ot,TMPLIT_EXPR:It,DATA_ATTR:Ji,ARIA_ATTR:Zi,IS_SCRIPT_OR_DATA:Yi,ATTR_WHITESPACE:bn,CUSTOM_ELEMENT:Ki}=hi,{IS_ALLOWED_URI:Cn}=hi,H=null,kn=v({},[...di,...Qt,...en,...tn,...ui]),j=null,wn=v({},[...mi,...nn,...gi,...wt]),z=Object.seal(St(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,ct=null,we=Object.seal(St(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Sn=!0,Dt=!0,yn=!1,Tn=!0,Le=!1,pt=!0,ve=!1,Bt=!1,zt=!1,Oe=!1,dt=!1,ut=!1,vn=!0,En=!1,Xi="user-content-",Nt=!0,We=!1,Ie={},de=null,Ft=v({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),An=null,Mn=v({},["audio","video","img","source","image","track"]),Ut=null,Rn=v({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mt="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",xe="http://www.w3.org/1999/xhtml",De=xe,Ht=!1,Vt=null,Qi=v({},[mt,gt,xe],Kt),ht=v({},["mi","mo","mn","ms","mtext"]),ft=v({},["annotation-xml"]),eo=v({},["title","style","font","a","script"]),qe=null,to=["application/xhtml+xml","text/html"],no="text/html",U=null,Be=null,io=e.createElement("form"),Pn=function(a){return a instanceof RegExp||a instanceof Function},Gt=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Be&&Be===a)){if((!a||typeof a!="object")&&(a={}),a=ge(a),qe=to.indexOf(a.PARSER_MEDIA_TYPE)===-1?no:a.PARSER_MEDIA_TYPE,U=qe==="application/xhtml+xml"?Kt:yt,H=oe(a,"ALLOWED_TAGS")?v({},a.ALLOWED_TAGS,U):kn,j=oe(a,"ALLOWED_ATTR")?v({},a.ALLOWED_ATTR,U):wn,Vt=oe(a,"ALLOWED_NAMESPACES")?v({},a.ALLOWED_NAMESPACES,Kt):Qi,Ut=oe(a,"ADD_URI_SAFE_ATTR")?v(ge(Rn),a.ADD_URI_SAFE_ATTR,U):Rn,An=oe(a,"ADD_DATA_URI_TAGS")?v(ge(Mn),a.ADD_DATA_URI_TAGS,U):Mn,de=oe(a,"FORBID_CONTENTS")?v({},a.FORBID_CONTENTS,U):Ft,je=oe(a,"FORBID_TAGS")?v({},a.FORBID_TAGS,U):ge({}),ct=oe(a,"FORBID_ATTR")?v({},a.FORBID_ATTR,U):ge({}),Ie=oe(a,"USE_PROFILES")?a.USE_PROFILES:!1,Sn=a.ALLOW_ARIA_ATTR!==!1,Dt=a.ALLOW_DATA_ATTR!==!1,yn=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Tn=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Le=a.SAFE_FOR_TEMPLATES||!1,pt=a.SAFE_FOR_XML!==!1,ve=a.WHOLE_DOCUMENT||!1,Oe=a.RETURN_DOM||!1,dt=a.RETURN_DOM_FRAGMENT||!1,ut=a.RETURN_TRUSTED_TYPE||!1,zt=a.FORCE_BODY||!1,vn=a.SANITIZE_DOM!==!1,En=a.SANITIZE_NAMED_PROPS||!1,Nt=a.KEEP_CONTENT!==!1,We=a.IN_PLACE||!1,Cn=a.ALLOWED_URI_REGEXP||xi,De=a.NAMESPACE||xe,ht=a.MATHML_TEXT_INTEGRATION_POINTS||ht,ft=a.HTML_INTEGRATION_POINTS||ft,z=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Pn(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(z.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Pn(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(z.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(z.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Le&&(Dt=!1),dt&&(Oe=!0),Ie&&(H=v({},ui),j=St(null),Ie.html===!0&&(v(H,di),v(j,mi)),Ie.svg===!0&&(v(H,Qt),v(j,nn),v(j,wt)),Ie.svgFilters===!0&&(v(H,en),v(j,nn),v(j,wt)),Ie.mathMl===!0&&(v(H,tn),v(j,gi),v(j,wt))),oe(a,"ADD_TAGS")||(we.tagCheck=null),oe(a,"ADD_ATTR")||(we.attributeCheck=null),a.ADD_TAGS&&(typeof a.ADD_TAGS=="function"?we.tagCheck=a.ADD_TAGS:(H===kn&&(H=ge(H)),v(H,a.ADD_TAGS,U))),a.ADD_ATTR&&(typeof a.ADD_ATTR=="function"?we.attributeCheck=a.ADD_ATTR:(j===wn&&(j=ge(j)),v(j,a.ADD_ATTR,U))),a.ADD_URI_SAFE_ATTR&&v(Ut,a.ADD_URI_SAFE_ATTR,U),a.FORBID_CONTENTS&&(de===Ft&&(de=ge(de)),v(de,a.FORBID_CONTENTS,U)),a.ADD_FORBID_CONTENTS&&(de===Ft&&(de=ge(de)),v(de,a.ADD_FORBID_CONTENTS,U)),Nt&&(H["#text"]=!0),ve&&v(H,["html","head","body"]),H.table&&(v(H,["tbody"]),delete je.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');G=a.TRUSTED_TYPES_POLICY,fe=G.createHTML("")}else G===void 0&&(G=Mo(L,i)),G!==null&&typeof fe=="string"&&(fe=G.createHTML(""));X&&X(a),Be=a}},$n=v({},[...Qt,...en,...xo]),Ln=v({},[...tn,...bo]),oo=function(a){let g=$e(a);(!g||!g.tagName)&&(g={namespaceURI:De,tagName:"template"});let x=yt(a.tagName),O=yt(g.tagName);return Vt[a.namespaceURI]?a.namespaceURI===gt?g.namespaceURI===xe?x==="svg":g.namespaceURI===mt?x==="svg"&&(O==="annotation-xml"||ht[O]):!!$n[x]:a.namespaceURI===mt?g.namespaceURI===xe?x==="math":g.namespaceURI===gt?x==="math"&&ft[O]:!!Ln[x]:a.namespaceURI===xe?g.namespaceURI===gt&&!ft[O]||g.namespaceURI===mt&&!ht[O]?!1:!Ln[x]&&(eo[x]||!$n[x]):!!(qe==="application/xhtml+xml"&&Vt[a.namespaceURI]):!1},ue=function(a){Ke(n.removed,{element:a});try{$e(a).removeChild(a)}catch{st(a)}},Ee=function(a,g){try{Ke(n.removed,{attribute:g.getAttributeNode(a),from:g})}catch{Ke(n.removed,{attribute:null,from:g})}if(g.removeAttribute(a),a==="is")if(Oe||dt)try{ue(g)}catch{}else try{g.setAttribute(a,"")}catch{}},On=function(a){let g=null,x=null;if(zt)a="<remove></remove>"+a;else{let F=Xt(a,/^[\r\n\t ]+/);x=F&&F[0]}qe==="application/xhtml+xml"&&De===xe&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");let O=G?G.createHTML(a):a;if(De===xe)try{g=new y().parseFromString(O,qe)}catch{}if(!g||!g.documentElement){g=_e.createDocument(De,"template",null);try{g.documentElement.innerHTML=Ht?fe:O}catch{}}let q=g.body||g.documentElement;return a&&x&&q.insertBefore(e.createTextNode(x),q.childNodes[0]||null),De===xe?Wi.call(g,ve?"html":"body")[0]:ve?g.documentElement:q},In=function(a){return Gi.call(a.ownerDocument||a,a,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},jt=function(a){return a instanceof C&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof m)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},Dn=function(a){return typeof u=="function"&&a instanceof u};function be(b,a,g){kt(b,x=>{x.call(n,a,g,Be)})}let Bn=function(a){let g=null;if(be(Y.beforeSanitizeElements,a,null),jt(a))return ue(a),!0;let x=U(a.nodeName);if(be(Y.uponSanitizeElement,a,{tagName:x,allowedTags:H}),pt&&a.hasChildNodes()&&!Dn(a.firstElementChild)&&K(/<[/\w!]/g,a.innerHTML)&&K(/<[/\w!]/g,a.textContent)||a.nodeType===tt.progressingInstruction||pt&&a.nodeType===tt.comment&&K(/<[/\w]/g,a.data))return ue(a),!0;if(!(we.tagCheck instanceof Function&&we.tagCheck(x))&&(!H[x]||je[x])){if(!je[x]&&Nn(x)&&(z.tagNameCheck instanceof RegExp&&K(z.tagNameCheck,x)||z.tagNameCheck instanceof Function&&z.tagNameCheck(x)))return!1;if(Nt&&!de[x]){let O=$e(a)||a.parentNode,q=lt(a)||a.childNodes;if(q&&O){let F=q.length;for(let te=F-1;te>=0;--te){let Ce=le(q[te],!0);Ce.__removalCount=(a.__removalCount||0)+1,O.insertBefore(Ce,at(a))}}}return ue(a),!0}return a instanceof l&&!oo(a)||(x==="noscript"||x==="noembed"||x==="noframes")&&K(/<\/no(script|embed|frames)/i,a.innerHTML)?(ue(a),!0):(Le&&a.nodeType===tt.text&&(g=a.textContent,kt([Lt,Ot,It],O=>{g=Xe(g,O," ")}),a.textContent!==g&&(Ke(n.removed,{element:a.cloneNode()}),a.textContent=g)),be(Y.afterSanitizeElements,a,null),!1)},zn=function(a,g,x){if(ct[g]||vn&&(g==="id"||g==="name")&&(x in e||x in io))return!1;if(!(Dt&&!ct[g]&&K(Ji,g))){if(!(Sn&&K(Zi,g))){if(!(we.attributeCheck instanceof Function&&we.attributeCheck(g,a))){if(!j[g]||ct[g]){if(!(Nn(a)&&(z.tagNameCheck instanceof RegExp&&K(z.tagNameCheck,a)||z.tagNameCheck instanceof Function&&z.tagNameCheck(a))&&(z.attributeNameCheck instanceof RegExp&&K(z.attributeNameCheck,g)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(g,a))||g==="is"&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&K(z.tagNameCheck,x)||z.tagNameCheck instanceof Function&&z.tagNameCheck(x))))return!1}else if(!Ut[g]){if(!K(Cn,Xe(x,bn,""))){if(!((g==="src"||g==="xlink:href"||g==="href")&&a!=="script"&&go(x,"data:")===0&&An[a])){if(!(yn&&!K(Yi,Xe(x,bn,"")))){if(x)return!1}}}}}}}return!0},Nn=function(a){return a!=="annotation-xml"&&Xt(a,Ki)},Fn=function(a){be(Y.beforeSanitizeAttributes,a,null);let{attributes:g}=a;if(!g||jt(a))return;let x={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0},O=g.length;for(;O--;){let q=g[O],{name:F,namespaceURI:te,value:Ce}=q,ze=U(F),Wt=Ce,W=F==="value"?Wt:ho(Wt);if(x.attrName=ze,x.attrValue=W,x.keepAttr=!0,x.forceKeepAttr=void 0,be(Y.uponSanitizeAttribute,a,x),W=x.attrValue,En&&(ze==="id"||ze==="name")&&(Ee(F,a),W=Xi+W),pt&&K(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,W)){Ee(F,a);continue}if(ze==="attributename"&&Xt(W,"href")){Ee(F,a);continue}if(x.forceKeepAttr)continue;if(!x.keepAttr){Ee(F,a);continue}if(!Tn&&K(/\/>/i,W)){Ee(F,a);continue}Le&&kt([Lt,Ot,It],Hn=>{W=Xe(W,Hn," ")});let Un=U(a.nodeName);if(!zn(Un,ze,W)){Ee(F,a);continue}if(G&&typeof L=="object"&&typeof L.getAttributeType=="function"&&!te)switch(L.getAttributeType(Un,ze)){case"TrustedHTML":{W=G.createHTML(W);break}case"TrustedScriptURL":{W=G.createScriptURL(W);break}}if(W!==Wt)try{te?a.setAttributeNS(te,F,W):a.setAttribute(F,W),jt(a)?ue(a):pi(n.removed)}catch{Ee(F,a)}}be(Y.afterSanitizeAttributes,a,null)},ro=function b(a){let g=null,x=In(a);for(be(Y.beforeSanitizeShadowDOM,a,null);g=x.nextNode();)be(Y.uponSanitizeShadowNode,g,null),Bn(g),Fn(g),g.content instanceof r&&b(g.content);be(Y.afterSanitizeShadowDOM,a,null)};return n.sanitize=function(b){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=null,x=null,O=null,q=null;if(Ht=!b,Ht&&(b="<!-->"),typeof b!="string"&&!Dn(b))if(typeof b.toString=="function"){if(b=b.toString(),typeof b!="string")throw Qe("dirty is not a string, aborting")}else throw Qe("toString is not a function");if(!n.isSupported)return b;if(Bt||Gt(a),n.removed=[],typeof b=="string"&&(We=!1),We){if(b.nodeName){let Ce=U(b.nodeName);if(!H[Ce]||je[Ce])throw Qe("root node is forbidden and cannot be sanitized in-place")}}else if(b instanceof u)g=On("<!---->"),x=g.ownerDocument.importNode(b,!0),x.nodeType===tt.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?g=x:g.appendChild(x);else{if(!Oe&&!Le&&!ve&&b.indexOf("<")===-1)return G&&ut?G.createHTML(b):b;if(g=On(b),!g)return Oe?null:ut?fe:""}g&&zt&&ue(g.firstChild);let F=In(We?b:g);for(;O=F.nextNode();)Bn(O),Fn(O),O.content instanceof r&&ro(O.content);if(We)return b;if(Oe){if(dt)for(q=ji.call(g.ownerDocument);g.firstChild;)q.appendChild(g.firstChild);else q=g;return(j.shadowroot||j.shadowrootmode)&&(q=qi.call(o,q,!0)),q}let te=ve?g.outerHTML:g.innerHTML;return ve&&H["!doctype"]&&g.ownerDocument&&g.ownerDocument.doctype&&g.ownerDocument.doctype.name&&K(bi,g.ownerDocument.doctype.name)&&(te="<!DOCTYPE "+g.ownerDocument.doctype.name+`>
|
|
1
|
+
import{b as ri,c as si,d as Te}from"./chunk-DNJ7WW7C.js";import{c as oi}from"./chunk-3SNULO46.js";import{a as ai}from"./chunk-5BLIQZKV.js";import{a as ii}from"./chunk-EG4UOTIO.js";import{a as li}from"./chunk-CGARRM5K.js";import{f as Yn,i as Kn,n as Xn,o as Qn,p as ei,v as ti}from"./chunk-EO4DNTT4.js";import{a as Yt}from"./chunk-5UPNU54P.js";import{j as ni}from"./chunk-LQXM24RN.js";import{p as ao}from"./chunk-OKNZODWZ.js";import{$a as J,C as ke,Cb as Ct,D as Fe,Fa as f,G as Gn,Ga as E,Ha as qt,Hb as Jn,Ia as Jt,J as I,K as D,Kb as Zn,L as ie,M as Je,T as Ze,Ta as Ue,U as me,Ua as Zt,W as _t,X as xt,Z as d,_ as jn,a as ne,aa as se,ab as Z,b as Ne,da as A,fa as Ae,ga as M,h as so,hb as T,ja as V,jb as qn,k as re,la as k,na as bt,oa as Se,pa as ye,qa as c,ra as p,sa as S,ua as N,ub as He,va as B,wa as _,xa as Wn,y as Vn,ya as Ye}from"./chunk-TBMJSIBB.js";var{entries:_i,setPrototypeOf:ci,isFrozen:lo,getPrototypeOf:co,getOwnPropertyDescriptor:po}=Object,{freeze:X,seal:ae,create:St}=Object,{apply:on,construct:rn}=typeof Reflect<"u"&&Reflect;X||(X=function(n){return n});ae||(ae=function(n){return n});on||(on=function(n,e){for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];return n.apply(e,i)});rn||(rn=function(n){for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return new n(...o)});var kt=Q(Array.prototype.forEach),uo=Q(Array.prototype.lastIndexOf),pi=Q(Array.prototype.pop),Ke=Q(Array.prototype.push),mo=Q(Array.prototype.splice),yt=Q(String.prototype.toLowerCase),Kt=Q(String.prototype.toString),Xt=Q(String.prototype.match),Xe=Q(String.prototype.replace),go=Q(String.prototype.indexOf),ho=Q(String.prototype.trim),oe=Q(Object.prototype.hasOwnProperty),K=Q(RegExp.prototype.test),Qe=fo(TypeError);function Q(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];return on(t,n,o)}}function fo(t){return function(){for(var n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];return rn(t,e)}}function v(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt;ci&&ci(t,null);let o=n.length;for(;o--;){let i=n[o];if(typeof i=="string"){let r=e(i);r!==i&&(lo(n)||(n[o]=r),i=r)}t[i]=!0}return t}function _o(t){for(let n=0;n<t.length;n++)oe(t,n)||(t[n]=null);return t}function ge(t){let n=St(null);for(let[e,o]of _i(t))oe(t,e)&&(Array.isArray(o)?n[e]=_o(o):o&&typeof o=="object"&&o.constructor===Object?n[e]=ge(o):n[e]=o);return n}function et(t,n){for(;t!==null;){let o=po(t,n);if(o){if(o.get)return Q(o.get);if(typeof o.value=="function")return Q(o.value)}t=co(t)}function e(){return null}return e}var di=X(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Qt=X(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),en=X(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),xo=X(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),tn=X(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bo=X(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ui=X(["#text"]),mi=X(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),nn=X(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),gi=X(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wt=X(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Co=ae(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ko=ae(/<%[\w\W]*|[\w\W]*%>/gm),wo=ae(/\$\{[\w\W]*/gm),So=ae(/^data-[\-\w.\u00B7-\uFFFF]+$/),yo=ae(/^aria-[\-\w]+$/),xi=ae(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),To=ae(/^(?:\w+script|data):/i),vo=ae(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bi=ae(/^html$/i),Eo=ae(/^[a-z][.\w]*(-[.\w]+)+$/i),hi=Object.freeze({__proto__:null,ARIA_ATTR:yo,ATTR_WHITESPACE:vo,CUSTOM_ELEMENT:Eo,DATA_ATTR:So,DOCTYPE_NAME:bi,ERB_EXPR:ko,IS_ALLOWED_URI:xi,IS_SCRIPT_OR_DATA:To,MUSTACHE_EXPR:Co,TMPLIT_EXPR:wo}),tt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ao=function(){return typeof window>"u"?null:window},Mo=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(o=e.getAttribute(i));let r="dompurify"+(o?"#"+o:"");try{return n.createPolicy(r,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},fi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ci(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ao(),n=b=>Ci(b);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==tt.document||!t.Element)return n.isSupported=!1,n;let{document:e}=t,o=e,i=o.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:u,Element:l,NodeFilter:h,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:y,trustedTypes:L}=t,$=l.prototype,le=et($,"cloneNode"),st=et($,"remove"),at=et($,"nextSibling"),lt=et($,"childNodes"),$e=et($,"parentNode");if(typeof s=="function"){let b=e.createElement("template");b.content&&b.content.ownerDocument&&(e=b.content.ownerDocument)}let G,fe="",{implementation:_e,createNodeIterator:Gi,createDocumentFragment:ji,getElementsByTagName:Wi}=e,{importNode:qi}=o,Y=fi();n.isSupported=typeof _i=="function"&&typeof $e=="function"&&_e&&_e.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Lt,ERB_EXPR:Ot,TMPLIT_EXPR:It,DATA_ATTR:Ji,ARIA_ATTR:Zi,IS_SCRIPT_OR_DATA:Yi,ATTR_WHITESPACE:bn,CUSTOM_ELEMENT:Ki}=hi,{IS_ALLOWED_URI:Cn}=hi,H=null,kn=v({},[...di,...Qt,...en,...tn,...ui]),j=null,wn=v({},[...mi,...nn,...gi,...wt]),z=Object.seal(St(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,ct=null,we=Object.seal(St(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Sn=!0,Dt=!0,yn=!1,Tn=!0,Le=!1,pt=!0,ve=!1,Bt=!1,zt=!1,Oe=!1,dt=!1,ut=!1,vn=!0,En=!1,Xi="user-content-",Nt=!0,We=!1,Ie={},de=null,Ft=v({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),An=null,Mn=v({},["audio","video","img","source","image","track"]),Ut=null,Rn=v({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mt="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",xe="http://www.w3.org/1999/xhtml",De=xe,Ht=!1,Vt=null,Qi=v({},[mt,gt,xe],Kt),ht=v({},["mi","mo","mn","ms","mtext"]),ft=v({},["annotation-xml"]),eo=v({},["title","style","font","a","script"]),qe=null,to=["application/xhtml+xml","text/html"],no="text/html",U=null,Be=null,io=e.createElement("form"),Pn=function(a){return a instanceof RegExp||a instanceof Function},Gt=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Be&&Be===a)){if((!a||typeof a!="object")&&(a={}),a=ge(a),qe=to.indexOf(a.PARSER_MEDIA_TYPE)===-1?no:a.PARSER_MEDIA_TYPE,U=qe==="application/xhtml+xml"?Kt:yt,H=oe(a,"ALLOWED_TAGS")?v({},a.ALLOWED_TAGS,U):kn,j=oe(a,"ALLOWED_ATTR")?v({},a.ALLOWED_ATTR,U):wn,Vt=oe(a,"ALLOWED_NAMESPACES")?v({},a.ALLOWED_NAMESPACES,Kt):Qi,Ut=oe(a,"ADD_URI_SAFE_ATTR")?v(ge(Rn),a.ADD_URI_SAFE_ATTR,U):Rn,An=oe(a,"ADD_DATA_URI_TAGS")?v(ge(Mn),a.ADD_DATA_URI_TAGS,U):Mn,de=oe(a,"FORBID_CONTENTS")?v({},a.FORBID_CONTENTS,U):Ft,je=oe(a,"FORBID_TAGS")?v({},a.FORBID_TAGS,U):ge({}),ct=oe(a,"FORBID_ATTR")?v({},a.FORBID_ATTR,U):ge({}),Ie=oe(a,"USE_PROFILES")?a.USE_PROFILES:!1,Sn=a.ALLOW_ARIA_ATTR!==!1,Dt=a.ALLOW_DATA_ATTR!==!1,yn=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Tn=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Le=a.SAFE_FOR_TEMPLATES||!1,pt=a.SAFE_FOR_XML!==!1,ve=a.WHOLE_DOCUMENT||!1,Oe=a.RETURN_DOM||!1,dt=a.RETURN_DOM_FRAGMENT||!1,ut=a.RETURN_TRUSTED_TYPE||!1,zt=a.FORCE_BODY||!1,vn=a.SANITIZE_DOM!==!1,En=a.SANITIZE_NAMED_PROPS||!1,Nt=a.KEEP_CONTENT!==!1,We=a.IN_PLACE||!1,Cn=a.ALLOWED_URI_REGEXP||xi,De=a.NAMESPACE||xe,ht=a.MATHML_TEXT_INTEGRATION_POINTS||ht,ft=a.HTML_INTEGRATION_POINTS||ft,z=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Pn(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(z.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Pn(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(z.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(z.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Le&&(Dt=!1),dt&&(Oe=!0),Ie&&(H=v({},ui),j=St(null),Ie.html===!0&&(v(H,di),v(j,mi)),Ie.svg===!0&&(v(H,Qt),v(j,nn),v(j,wt)),Ie.svgFilters===!0&&(v(H,en),v(j,nn),v(j,wt)),Ie.mathMl===!0&&(v(H,tn),v(j,gi),v(j,wt))),oe(a,"ADD_TAGS")||(we.tagCheck=null),oe(a,"ADD_ATTR")||(we.attributeCheck=null),a.ADD_TAGS&&(typeof a.ADD_TAGS=="function"?we.tagCheck=a.ADD_TAGS:(H===kn&&(H=ge(H)),v(H,a.ADD_TAGS,U))),a.ADD_ATTR&&(typeof a.ADD_ATTR=="function"?we.attributeCheck=a.ADD_ATTR:(j===wn&&(j=ge(j)),v(j,a.ADD_ATTR,U))),a.ADD_URI_SAFE_ATTR&&v(Ut,a.ADD_URI_SAFE_ATTR,U),a.FORBID_CONTENTS&&(de===Ft&&(de=ge(de)),v(de,a.FORBID_CONTENTS,U)),a.ADD_FORBID_CONTENTS&&(de===Ft&&(de=ge(de)),v(de,a.ADD_FORBID_CONTENTS,U)),Nt&&(H["#text"]=!0),ve&&v(H,["html","head","body"]),H.table&&(v(H,["tbody"]),delete je.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');G=a.TRUSTED_TYPES_POLICY,fe=G.createHTML("")}else G===void 0&&(G=Mo(L,i)),G!==null&&typeof fe=="string"&&(fe=G.createHTML(""));X&&X(a),Be=a}},$n=v({},[...Qt,...en,...xo]),Ln=v({},[...tn,...bo]),oo=function(a){let g=$e(a);(!g||!g.tagName)&&(g={namespaceURI:De,tagName:"template"});let x=yt(a.tagName),O=yt(g.tagName);return Vt[a.namespaceURI]?a.namespaceURI===gt?g.namespaceURI===xe?x==="svg":g.namespaceURI===mt?x==="svg"&&(O==="annotation-xml"||ht[O]):!!$n[x]:a.namespaceURI===mt?g.namespaceURI===xe?x==="math":g.namespaceURI===gt?x==="math"&&ft[O]:!!Ln[x]:a.namespaceURI===xe?g.namespaceURI===gt&&!ft[O]||g.namespaceURI===mt&&!ht[O]?!1:!Ln[x]&&(eo[x]||!$n[x]):!!(qe==="application/xhtml+xml"&&Vt[a.namespaceURI]):!1},ue=function(a){Ke(n.removed,{element:a});try{$e(a).removeChild(a)}catch{st(a)}},Ee=function(a,g){try{Ke(n.removed,{attribute:g.getAttributeNode(a),from:g})}catch{Ke(n.removed,{attribute:null,from:g})}if(g.removeAttribute(a),a==="is")if(Oe||dt)try{ue(g)}catch{}else try{g.setAttribute(a,"")}catch{}},On=function(a){let g=null,x=null;if(zt)a="<remove></remove>"+a;else{let F=Xt(a,/^[\r\n\t ]+/);x=F&&F[0]}qe==="application/xhtml+xml"&&De===xe&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");let O=G?G.createHTML(a):a;if(De===xe)try{g=new y().parseFromString(O,qe)}catch{}if(!g||!g.documentElement){g=_e.createDocument(De,"template",null);try{g.documentElement.innerHTML=Ht?fe:O}catch{}}let q=g.body||g.documentElement;return a&&x&&q.insertBefore(e.createTextNode(x),q.childNodes[0]||null),De===xe?Wi.call(g,ve?"html":"body")[0]:ve?g.documentElement:q},In=function(a){return Gi.call(a.ownerDocument||a,a,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},jt=function(a){return a instanceof C&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof m)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},Dn=function(a){return typeof u=="function"&&a instanceof u};function be(b,a,g){kt(b,x=>{x.call(n,a,g,Be)})}let Bn=function(a){let g=null;if(be(Y.beforeSanitizeElements,a,null),jt(a))return ue(a),!0;let x=U(a.nodeName);if(be(Y.uponSanitizeElement,a,{tagName:x,allowedTags:H}),pt&&a.hasChildNodes()&&!Dn(a.firstElementChild)&&K(/<[/\w!]/g,a.innerHTML)&&K(/<[/\w!]/g,a.textContent)||a.nodeType===tt.progressingInstruction||pt&&a.nodeType===tt.comment&&K(/<[/\w]/g,a.data))return ue(a),!0;if(!(we.tagCheck instanceof Function&&we.tagCheck(x))&&(!H[x]||je[x])){if(!je[x]&&Nn(x)&&(z.tagNameCheck instanceof RegExp&&K(z.tagNameCheck,x)||z.tagNameCheck instanceof Function&&z.tagNameCheck(x)))return!1;if(Nt&&!de[x]){let O=$e(a)||a.parentNode,q=lt(a)||a.childNodes;if(q&&O){let F=q.length;for(let te=F-1;te>=0;--te){let Ce=le(q[te],!0);Ce.__removalCount=(a.__removalCount||0)+1,O.insertBefore(Ce,at(a))}}}return ue(a),!0}return a instanceof l&&!oo(a)||(x==="noscript"||x==="noembed"||x==="noframes")&&K(/<\/no(script|embed|frames)/i,a.innerHTML)?(ue(a),!0):(Le&&a.nodeType===tt.text&&(g=a.textContent,kt([Lt,Ot,It],O=>{g=Xe(g,O," ")}),a.textContent!==g&&(Ke(n.removed,{element:a.cloneNode()}),a.textContent=g)),be(Y.afterSanitizeElements,a,null),!1)},zn=function(a,g,x){if(ct[g]||vn&&(g==="id"||g==="name")&&(x in e||x in io))return!1;if(!(Dt&&!ct[g]&&K(Ji,g))){if(!(Sn&&K(Zi,g))){if(!(we.attributeCheck instanceof Function&&we.attributeCheck(g,a))){if(!j[g]||ct[g]){if(!(Nn(a)&&(z.tagNameCheck instanceof RegExp&&K(z.tagNameCheck,a)||z.tagNameCheck instanceof Function&&z.tagNameCheck(a))&&(z.attributeNameCheck instanceof RegExp&&K(z.attributeNameCheck,g)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(g,a))||g==="is"&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&K(z.tagNameCheck,x)||z.tagNameCheck instanceof Function&&z.tagNameCheck(x))))return!1}else if(!Ut[g]){if(!K(Cn,Xe(x,bn,""))){if(!((g==="src"||g==="xlink:href"||g==="href")&&a!=="script"&&go(x,"data:")===0&&An[a])){if(!(yn&&!K(Yi,Xe(x,bn,"")))){if(x)return!1}}}}}}}return!0},Nn=function(a){return a!=="annotation-xml"&&Xt(a,Ki)},Fn=function(a){be(Y.beforeSanitizeAttributes,a,null);let{attributes:g}=a;if(!g||jt(a))return;let x={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0},O=g.length;for(;O--;){let q=g[O],{name:F,namespaceURI:te,value:Ce}=q,ze=U(F),Wt=Ce,W=F==="value"?Wt:ho(Wt);if(x.attrName=ze,x.attrValue=W,x.keepAttr=!0,x.forceKeepAttr=void 0,be(Y.uponSanitizeAttribute,a,x),W=x.attrValue,En&&(ze==="id"||ze==="name")&&(Ee(F,a),W=Xi+W),pt&&K(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,W)){Ee(F,a);continue}if(ze==="attributename"&&Xt(W,"href")){Ee(F,a);continue}if(x.forceKeepAttr)continue;if(!x.keepAttr){Ee(F,a);continue}if(!Tn&&K(/\/>/i,W)){Ee(F,a);continue}Le&&kt([Lt,Ot,It],Hn=>{W=Xe(W,Hn," ")});let Un=U(a.nodeName);if(!zn(Un,ze,W)){Ee(F,a);continue}if(G&&typeof L=="object"&&typeof L.getAttributeType=="function"&&!te)switch(L.getAttributeType(Un,ze)){case"TrustedHTML":{W=G.createHTML(W);break}case"TrustedScriptURL":{W=G.createScriptURL(W);break}}if(W!==Wt)try{te?a.setAttributeNS(te,F,W):a.setAttribute(F,W),jt(a)?ue(a):pi(n.removed)}catch{Ee(F,a)}}be(Y.afterSanitizeAttributes,a,null)},ro=function b(a){let g=null,x=In(a);for(be(Y.beforeSanitizeShadowDOM,a,null);g=x.nextNode();)be(Y.uponSanitizeShadowNode,g,null),Bn(g),Fn(g),g.content instanceof r&&b(g.content);be(Y.afterSanitizeShadowDOM,a,null)};return n.sanitize=function(b){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=null,x=null,O=null,q=null;if(Ht=!b,Ht&&(b="<!-->"),typeof b!="string"&&!Dn(b))if(typeof b.toString=="function"){if(b=b.toString(),typeof b!="string")throw Qe("dirty is not a string, aborting")}else throw Qe("toString is not a function");if(!n.isSupported)return b;if(Bt||Gt(a),n.removed=[],typeof b=="string"&&(We=!1),We){if(b.nodeName){let Ce=U(b.nodeName);if(!H[Ce]||je[Ce])throw Qe("root node is forbidden and cannot be sanitized in-place")}}else if(b instanceof u)g=On("<!---->"),x=g.ownerDocument.importNode(b,!0),x.nodeType===tt.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?g=x:g.appendChild(x);else{if(!Oe&&!Le&&!ve&&b.indexOf("<")===-1)return G&&ut?G.createHTML(b):b;if(g=On(b),!g)return Oe?null:ut?fe:""}g&&zt&&ue(g.firstChild);let F=In(We?b:g);for(;O=F.nextNode();)Bn(O),Fn(O),O.content instanceof r&&ro(O.content);if(We)return b;if(Oe){if(dt)for(q=ji.call(g.ownerDocument);g.firstChild;)q.appendChild(g.firstChild);else q=g;return(j.shadowroot||j.shadowrootmode)&&(q=qi.call(o,q,!0)),q}let te=ve?g.outerHTML:g.innerHTML;return ve&&H["!doctype"]&&g.ownerDocument&&g.ownerDocument.doctype&&g.ownerDocument.doctype.name&&K(bi,g.ownerDocument.doctype.name)&&(te="<!DOCTYPE "+g.ownerDocument.doctype.name+`>
|
|
2
2
|
`+te),Le&&kt([Lt,Ot,It],Ce=>{te=Xe(te,Ce," ")}),G&&ut?G.createHTML(te):te},n.setConfig=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Gt(b),Bt=!0},n.clearConfig=function(){Be=null,Bt=!1},n.isValidAttribute=function(b,a,g){Be||Gt({});let x=U(b),O=U(a);return zn(x,O,g)},n.addHook=function(b,a){typeof a=="function"&&Ke(Y[b],a)},n.removeHook=function(b,a){if(a!==void 0){let g=uo(Y[b],a);return g===-1?void 0:mo(Y[b],g,1)[0]}return pi(Y[b])},n.removeHooks=function(b){Y[b]=[]},n.removeAllHooks=function(){Y=fi()},n}var ki=Ci();function cn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Pe=cn();function Ai(t){Pe=t}var Me={exec:()=>null};function R(t,n=""){let e=typeof t=="string"?t:t.source,o={replace:(i,r)=>{let s=typeof r=="string"?r:r.source;return s=s.replace(ee.caret,"$1"),e=e.replace(i,s),o},getRegex:()=>new RegExp(e,n)};return o}var Ro=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ee={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Po=/^(?:[ \t]*(?:\n|$))+/,$o=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Lo=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,rt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Oo=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Mi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ri=R(Mi).replace(/bull/g,pn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Io=R(Mi).replace(/bull/g,pn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),dn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Do=/^[^\n]+/,un=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Bo=R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",un).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zo=R(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pn).getRegex(),Mt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",mn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,No=R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",mn).replace("tag",Mt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pi=R(dn).replace("hr",rt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mt).getRegex(),Fo=R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pi).getRegex(),gn={blockquote:Fo,code:$o,def:Bo,fences:Lo,heading:Oo,hr:rt,html:No,lheading:Ri,list:zo,newline:Po,paragraph:Pi,table:Me,text:Do},wi=R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mt).getRegex(),Uo=Ne(ne({},gn),{lheading:Io,table:wi,paragraph:R(dn).replace("hr",rt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",wi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mt).getRegex()}),Ho=Ne(ne({},gn),{html:R(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",mn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Me,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:R(dn).replace("hr",rt).replace("heading",` *#{1,6} *[^
|
|
3
3
|
]`).replace("lheading",Ri).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Vo=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Go=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$i=/^( {2,}|\\)\n(?!\s*$)/,jo=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ve=/[\p{P}\p{S}]/u,Rt=/[\s\p{P}\p{S}]/u,hn=/[^\s\p{P}\p{S}]/u,Wo=R(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rt).getRegex(),Li=/(?!~)[\p{P}\p{S}]/u,qo=/(?!~)[\s\p{P}\p{S}]/u,Jo=/(?:[^\s\p{P}\p{S}]|~)/u,Zo=R(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ro?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Oi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Yo=R(Oi,"u").replace(/punct/g,Ve).getRegex(),Ko=R(Oi,"u").replace(/punct/g,Li).getRegex(),Ii="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xo=R(Ii,"gu").replace(/notPunctSpace/g,hn).replace(/punctSpace/g,Rt).replace(/punct/g,Ve).getRegex(),Qo=R(Ii,"gu").replace(/notPunctSpace/g,Jo).replace(/punctSpace/g,qo).replace(/punct/g,Li).getRegex(),er=R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hn).replace(/punctSpace/g,Rt).replace(/punct/g,Ve).getRegex(),tr=R(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ve).getRegex(),nr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ir=R(nr,"gu").replace(/notPunctSpace/g,hn).replace(/punctSpace/g,Rt).replace(/punct/g,Ve).getRegex(),or=R(/\\(punct)/,"gu").replace(/punct/g,Ve).getRegex(),rr=R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),sr=R(mn).replace("(?:-->|$)","-->").getRegex(),ar=R("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",sr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),vt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,lr=R(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",vt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Di=R(/^!?\[(label)\]\[(ref)\]/).replace("label",vt).replace("ref",un).getRegex(),Bi=R(/^!?\[(ref)\](?:\[\])?/).replace("ref",un).getRegex(),cr=R("reflink|nolink(?!\\()","g").replace("reflink",Di).replace("nolink",Bi).getRegex(),Si=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,fn={_backpedal:Me,anyPunctuation:or,autolink:rr,blockSkip:Zo,br:$i,code:Go,del:Me,delLDelim:Me,delRDelim:Me,emStrongLDelim:Yo,emStrongRDelimAst:Xo,emStrongRDelimUnd:er,escape:Vo,link:lr,nolink:Bi,punctuation:Wo,reflink:Di,reflinkSearch:cr,tag:ar,text:jo,url:Me},pr=Ne(ne({},fn),{link:R(/^!?\[(label)\]\((.*?)\)/).replace("label",vt).getRegex(),reflink:R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vt).getRegex()}),sn=Ne(ne({},fn),{emStrongRDelimAst:Qo,emStrongLDelim:Ko,delLDelim:tr,delRDelim:ir,url:R(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Si).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:R(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Si).getRegex()}),dr=Ne(ne({},sn),{br:R($i).replace("{2,}","*").getRegex(),text:R(sn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Tt={normal:gn,gfm:Uo,pedantic:Ho},nt={normal:fn,gfm:sn,breaks:dr,pedantic:pr},ur={"&":"&","<":"<",">":">",'"':""","'":"'"},yi=t=>ur[t];function he(t,n){if(n){if(ee.escapeTest.test(t))return t.replace(ee.escapeReplace,yi)}else if(ee.escapeTestNoEncode.test(t))return t.replace(ee.escapeReplaceNoEncode,yi);return t}function Ti(t){try{t=encodeURI(t).replace(ee.percentDecode,"%")}catch{return null}return t}function vi(t,n){let e=t.replace(ee.findPipe,(r,s,u)=>{let l=!1,h=s;for(;--h>=0&&u[h]==="\\";)l=!l;return l?"|":" |"}),o=e.split(ee.splitPipe),i=0;if(o[0].trim()||o.shift(),o.length>0&&!o.at(-1)?.trim()&&o.pop(),n)if(o.length>n)o.splice(n);else for(;o.length<n;)o.push("");for(;i<o.length;i++)o[i]=o[i].trim().replace(ee.slashPipe,"|");return o}function it(t,n,e){let o=t.length;if(o===0)return"";let i=0;for(;i<o;){let r=t.charAt(o-i-1);if(r===n&&!e)i++;else if(r!==n&&e)i++;else break}return t.slice(0,o-i)}function mr(t,n){if(t.indexOf(n[1])===-1)return-1;let e=0;for(let o=0;o<t.length;o++)if(t[o]==="\\")o++;else if(t[o]===n[0])e++;else if(t[o]===n[1]&&(e--,e<0))return o;return e>0?-2:-1}function gr(t,n=0){let e=n,o="";for(let i of t)if(i===" "){let r=4-e%4;o+=" ".repeat(r),e+=r}else o+=i,e++;return o}function Ei(t,n,e,o,i){let r=n.href,s=n.title||null,u=t[1].replace(i.other.outputLinkReplace,"$1");o.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:e,href:r,title:s,text:u,tokens:o.inlineTokens(u)};return o.state.inLink=!1,l}function hr(t,n,e){let o=t.match(e.other.indentCodeCompensation);if(o===null)return n;let i=o[1];return n.split(`
|
|
4
4
|
`).map(r=>{let s=r.match(e.other.beginningSpace);if(s===null)return r;let[u]=s;return u.length>=i.length?r.slice(i.length):r}).join(`
|
|
@@ -70,4 +70,4 @@ Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error
|
|
|
70
70
|
`).slice(1).join(`
|
|
71
71
|
`).trim();return Te.looksLikeJson(i)?Te.formatJson(i):i});typeLabel_$=T(()=>{switch(this.view().kind){case w.userPrompt:return"User";case w.assistant:return"Assistant";case w.tool:return"Tool Call";case w.toolResult:return"Tool Result";case w.error:return"Error";case w.info:return"Info";case w.status:return"Status";case w.thinking:return"Thinking";case w.runIntent:return"Run intent";case w.iteration:return"Iteration";case w.statusUpdate:return"Status update";case w.raw:return"Raw";case w.result:return"Result";case w.toolGroup:return"Tool group";case w.subAgentGroup:return"Sub-agent";default:return String(this.view().kind)}});kindEnum=w;tts_$=T(()=>this.view().tts??null);ttsLoading_$=se(!1);showTtsButton_$=T(()=>{let e=this.tts_$();return e!==null&&!e.hasTtsAudio&&e.content.trim().length>0});autoReadEffect=qn(()=>{if(this.isAutoPlayFired||this.view().kind!==w.assistant)return;let e=this.tts_$();!e||e.hasTtsAudio||e.content.trim().length===0||this.ttsLoading_$()||Pt.shouldAutoPlay(e.sessionId,e.timestampIso)&&(this.isAutoPlayFired=!0,this.handleTtsPlayClick())});ttsAudioUrl_$=T(()=>{let e=this.tts_$();if(!e||!e.hasTtsAudio)return null;let o=this.voiceSttQaUi_DS.getTtsMessageAudioUrl(e.messageKey);return o.length>0?o:null});handleTtsPlayClick(){return re(this,null,function*(){let e=this.tts_$();if(!e||this.ttsLoading_$())return;this.ttsLoading_$.set(!0);let o,i,r;try{o=yield this.voiceSttQaUi_DS.getOrCreateTtsMessageAudio({sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestampIso}),i=URL.createObjectURL(o);let s=i;r=new Audio(i);try{yield r.play()}catch(u){URL.revokeObjectURL(s);let l=this.voiceSttQaUi_DS.getTtsMessageAudioUrl(e.messageKey);if(l.length===0)throw u;r=new Audio(l),yield r.play(),this.ttsCached.emit(e.messageKey);return}r.onended=()=>{URL.revokeObjectURL(s)},this.ttsCached.emit(e.messageKey)}catch(s){i!=null&&URL.revokeObjectURL(i);let u=yield t.diagnoseAudioBlobMagic(o),l=r?.error?.code===4,h=l&&u!=null&&!u.isMp3Magic&&(o?.type==="audio/mpeg"||o?.type===""),m={messageKey:e.messageKey,sessionId:e.sessionId,role:e.role,contentLength:e.content.length,timestampIso:e.timestampIso,blobSize:o?.size,blobType:o?.type,blobUrlCreated:i!=null,audioReadyState:r?.readyState,audioNetworkState:r?.networkState,audioErrorCode:r?.error?.code,audioErrorMessage:r?.error?.message,originalErrorName:s instanceof Error?s.name:typeof s,originalErrorMessage:s instanceof Error?s.message:String(s),payloadMagicHex:u?.magicHex,isMp3Magic:u?.isMp3Magic,isPayloadCorruptionLikely:h,diagnosticHint:h?"TTS provider returned non-MP3 payload despite audio/mpeg MIME \u2014 first bytes do not match MP3 magic (FF FB / FF F3 / FF F2 / 49 44 33). Provider/server-side audio generation likely corrupted.":l?"MEDIA_ERR_SRC_NOT_SUPPORTED \u2014 browser refused to decode the audio source. May be Chromium URL-safety-check (cycle 22 fallback path), unsupported codec, or rare format variant.":void 0},C=Object.assign(new Error(h?`TTS audio playback failed (payload corruption likely \u2014 non-MP3 magic ${u?.magicHex}): ${s instanceof Error?s.message:String(s)}`:`TTS audio playback failed: ${s instanceof Error?s.message:String(s)}`),{errorCode:"CCAP-TTS-PLAY-FAIL",additionalContent:m});this.globalError_CS.showError(C,"s-agent-console-message-bubble")}finally{this.ttsLoading_$.set(!1)}})}static diagnoseAudioBlobMagic(e){return re(this,null,function*(){if(e==null||e.size<4)return null;try{let i=yield e.slice(0,16).arrayBuffer(),r=new Uint8Array(i),s=[];for(let L=0;L<r.length;L++)s.push(r[L].toString(16).padStart(2,"0").toUpperCase());let u=s.join(" "),l=r[0],h=r[1],m=r[2];return{magicHex:u,isMp3Magic:l===255&&(h===251||h===243||h===242||h===250||h===244)||l===73&&h===68&&m===51}}catch{return null}})}handleToggleExpand(){this.isExpanded_$.update(e=>!e)}handleToggleAssistantBodyExpand(){this.isAssistantBodyExpanded_$.update(e=>!e)}handleToggleRawInfo(){this.isRawInfoOpen_$.update(e=>!e)}handleImageClick(e){window.open(e,"_blank")}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=Fe({type:t,selectors:[["app-s-agent-console-message-bubble"]],inputs:{view:[1,"view"]},outputs:{ttsCached:"ttsCached"},standalone:!0,features:[Ue],decls:10,vars:2,consts:[[1,"rounded","border","px-2.5","py-1","text-xs","overflow-hidden",3,"class"],[1,"group/msg","rounded-lg","border","px-2","py-1","text-xs","sm:px-3","sm:py-1.5","sm:text-sm","overflow-hidden",3,"class"],[1,"flex","justify-center","mb-1","group/msg"],[1,"rounded","border","px-2.5","py-1.5","text-xs","overflow-hidden",3,"class"],[1,"bg-orange-500/5","border","border-orange-500/15","rounded-lg","overflow-hidden"],[1,"border","border-indigo-500/20","rounded-lg","overflow-hidden","bg-indigo-500/3"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/70","p-4"],[1,"rounded","border","px-2.5","py-1","text-xs","overflow-hidden"],[1,"flex","items-center","gap-2","cursor-pointer","select-none",3,"click"],["title","Tool call failed",1,"w-1.5","h-1.5","rounded-full","bg-red-500","shrink-0"],[1,"text-orange-400","font-semibold","text-[11px]"],[1,"text-[10px]","text-neutral-400","select-none",3,"title"],[1,"flex-1"],[1,"text-neutral-600","text-[10px]"],["type","button","title","Raw details",3,"class"],["buttonTitle","Copy tool call","size","sm",3,"content"],[1,"text-[10px]","text-red-500/60","font-medium"],[1,"text-[10px]","text-green-500/60","font-medium"],["type","button","title","Raw details",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],[1,"mt-1.5","border-t","border-orange-500/10","pt-1.5"],[1,"mt-1.5","border-t","border-green-500/10","pt-1.5"],[1,"text-[9px]","text-neutral-600","uppercase","tracking-wider","mb-0.5"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-orange-300/80","max-h-[300px]","overflow-y-auto"],[1,"text-[11px]","leading-relaxed","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto","overflow-x-auto","break-words",3,"innerHTML"],[1,"text-[11px]","leading-relaxed","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto","whitespace-pre-wrap","break-words",3,"innerHTML"],[1,"mt-1","flex","justify-end"],["buttonTitle","Copy result","size","sm",3,"content"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto"],[1,"mt-1.5","border-t","border-red-500/15","pt-1.5"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-red-400/90","max-h-[300px]","overflow-y-auto"],[1,"group/msg","rounded-lg","border","px-2","py-1","text-xs","sm:px-3","sm:py-1.5","sm:text-sm","overflow-hidden"],[1,"flex","items-center","gap-1","mb-px"],[1,"font-bold","text-[10px]","text-neonGreen/60","uppercase"],[1,"flex","items-center","gap-0.5"],["buttonTitle","Copy prompt","size","sm",3,"content"],["type","button","title","Felolvas\xE1s (TTS)",3,"disabled","class"],[1,"flex","flex-wrap","gap-2","mb-1.5"],[1,"leading-snug","sm:leading-normal","whitespace-pre-wrap","break-words","text-neutral-100"],["controls","","aria-label","\xDCzenet felolvas\xE1sa",1,"max-w-full","h-8","min-w-[200px]","mt-1.5",3,"src"],["type","button","title","Felolvas\xE1s (TTS)",3,"click","disabled"],[1,"inline-block","w-3.5","h-3.5","shrink-0","animate-spin","rounded-full","border-2","border-blue-400/40","border-t-blue-400"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-3.5","h-3.5","shrink-0"],["points","11 5 6 9 2 9 2 15 6 15 11 19 11 5"],["d","M15.54 8.46a5 5 0 0 1 0 7.07"],["alt","Attached image",1,"max-w-[200px]","max-h-[200px]","rounded","border","border-neonDefault/30","object-contain","cursor-pointer",3,"src"],["alt","Attached image",1,"max-w-[200px]","max-h-[200px]","rounded","border","border-neonDefault/30","object-contain","cursor-pointer",3,"click","src"],[1,"font-bold","text-[10px]","text-neonCyan/60","uppercase"],["buttonTitle","Copy message","size","sm",3,"content"],[1,"text-xs","leading-snug","sm:leading-normal","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-neutral-100"],["type","button",1,"mt-1","text-[10px]","text-ccapAccent","hover:text-ccapAccent/80","transition-colors"],[1,"inline-block","w-3.5","h-3.5","shrink-0","animate-spin","rounded-full","border-2","border-neutral-400/40","border-t-neutral-300"],[1,"ccap-assistant-md","leading-snug","sm:leading-normal","break-words","text-neutral-100","min-w-0",3,"innerHTML"],["type","button",1,"mt-1","text-[10px]","text-ccapAccent","hover:text-ccapAccent/80","transition-colors",3,"click"],[1,"inline-flex","items-center","gap-1.5","bg-teal-500/6","border","border-teal-500/15","rounded-full","px-3","py-0.5","max-w-[85%]","min-w-0"],["viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","2",1,"w-3","h-3","text-teal-400/70","shrink-0","animate-spin"],["d","M8 2a6 6 0 0 1 6 6","stroke-linecap","round"],[1,"text-[10px]","text-teal-300/70","truncate","min-w-0"],[1,"text-[8px]","text-teal-400/40","shrink-0"],["type","button",1,"shrink-0","w-3.5","h-3.5","rounded-full","bg-teal-500/15","flex","items-center","justify-center","cursor-pointer","hover:bg-teal-500/30"],["type","button",1,"shrink-0","w-3.5","h-3.5","rounded-full","bg-teal-500/15","flex","items-center","justify-center","cursor-pointer","hover:bg-teal-500/30",3,"click"],[1,"text-[7px]","text-teal-300/60","font-bold","leading-none"],[1,"rounded","border","px-2.5","py-1.5","text-xs","overflow-hidden"],[1,"flex","items-center","gap-1.5","mb-0.5"],["title","Error",1,"w-1.5","h-1.5","rounded-full","bg-red-500","shrink-0"],[1,"font-semibold","text-[10px]","text-red-400","uppercase","tracking-wider"],["buttonTitle","Copy error","size","sm",3,"content"],[1,"leading-relaxed","whitespace-pre-wrap","break-words","text-red-400"],[1,"font-semibold","text-[10px]","text-orange-300/70","uppercase","tracking-wider"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-orange-300/70","max-h-[300px]","overflow-y-auto"],[1,"flex","items-center","gap-1.5","px-2.5","py-1","cursor-pointer","select-none","hover:bg-orange-500/8","transition-colors","list-none","[&::-webkit-details-marker]:hidden"],[1,"text-[11px]","text-orange-300/90","font-medium"],["viewBox","0 0 12 12","fill","none",1,"w-3","h-3","text-orange-400/50","transition-transform","[[open]>&]:rotate-90"],["d","M4.5 2.5l4 3.5-4 3.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"px-2","pb-1.5","pt-0.5","space-y-0.5"],[3,"view"],[3,"ttsCached","view"],[1,"flex","items-center","gap-1.5","px-2.5","py-1.5","cursor-pointer","select-none","hover:bg-indigo-500/8","transition-colors","list-none","[&::-webkit-details-marker]:hidden"],["viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","text-indigo-400","shrink-0"],["x","3","y","5","width","10","height","8","rx","2"],["cx","6","cy","9","r","1"],["cx","10","cy","9","r","1"],["d","M8 2v3"],["d","M6 2h4"],[1,"text-[10px]","text-indigo-400/60","font-medium","uppercase","tracking-wider","shrink-0"],[1,"text-[11px]","text-indigo-300/90","font-medium","truncate"],[1,"text-[9px]","text-indigo-400/40","shrink-0"],["viewBox","0 0 12 12","fill","none",1,"w-3","h-3","text-indigo-400/40","shrink-0","transition-transform","[[open]>&]:rotate-90"],[1,"px-2","pb-2","pt-1","space-y-0.5","border-t","border-indigo-500/10"],[1,"font-semibold","text-[10px]","uppercase","tracking-wider"],[1,"text-[9px]","text-neutral-500"],["buttonTitle","Copy","size","sm",3,"content"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono",3,"class"],[1,"mt-1","leading-relaxed","whitespace-pre-wrap","break-words",3,"class"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono"],[1,"mt-1","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/70","p-4",3,"click"],[1,"bg-neutral-900","border","border-neutral-700","rounded-lg","shadow-2xl","w-full","max-w-2xl","max-h-[80vh]","flex","flex-col",2,"max-height","80dvh",3,"click"],[1,"flex","items-center","gap-2","px-4","py-2","border-b","border-neutral-700","shrink-0"],[1,"text-xs","font-semibold","text-neutral-300"],[1,"text-[10px]","text-neutral-400",3,"title"],["buttonTitle","Copy raw JSON","size","sm",3,"content"],["type","button",1,"text-neutral-500","hover:text-neutral-300","text-sm","transition-colors","px-1",3,"click"],[1,"flex-1","overflow-auto","p-4","space-y-4"],[1,"text-[9px]","text-neutral-500","uppercase","tracking-wide","mb-1"],[1,"text-[11px]","leading-relaxed","whitespace-pre-wrap","break-words","overflow-x-auto","font-mono","text-neutral-300"],[1,"mb-3","last:mb-0"],[1,"text-[8px]","text-neutral-600","mb-0.5"]],template:function(o,i){if(o&1&&A(0,Lr,16,15,"div",0)(1,Hr,17,14,"div",1)(2,ns,17,14,"div",1)(3,rs,8,3,"div",2)(4,ls,14,11,"div",3)(5,us,14,12,"div",0)(6,gs,10,2,"details",4)(7,_s,20,3,"details",5)(8,ys,15,16,"div",0)(9,Ms,17,11,"div",6),o&2){let r,s;k((r=i.view().kind)===i.kindEnum.tool?0:r===i.kindEnum.userPrompt?1:r===i.kindEnum.assistant?2:r===i.kindEnum.statusUpdate?3:r===i.kindEnum.error?4:r===i.kindEnum.toolResult?5:r===i.kindEnum.toolGroup?6:r===i.kindEnum.subAgentGroup?7:8),d(9),k((s=i.isRawInfoOpen_$()&&i.rawOverlayBundle_$())?9:-1,s)}},dependencies:()=>[t,He,ri,Fi,si,ai],styles:[`@charset "UTF-8";.ccap-assistant-md[_ngcontent-%COMP%]{font-size:inherit;line-height:1.55;text-align:left;color:#ffffffeb}.ccap-assistant-md[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:0}.ccap-assistant-md[_ngcontent-%COMP%] [_ngcontent-%COMP%]:last-child{margin-bottom:0}.ccap-assistant-md[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .ccap-assistant-md[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .ccap-assistant-md[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .ccap-assistant-md[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-weight:600;color:#fffffff7;letter-spacing:.01em}.ccap-assistant-md[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.2em;margin-top:1.5rem;margin-bottom:.6rem;padding-bottom:.45rem;border-bottom:1px solid rgba(0,245,255,.28)}.ccap-assistant-md[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:1.1em;margin-top:1.35rem;margin-bottom:.55rem;padding-bottom:.35rem;border-bottom:1px solid rgba(0,245,255,.16)}.ccap-assistant-md[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:1.02em;margin-top:1.15rem;margin-bottom:.45rem;color:#00f5ffe0}.ccap-assistant-md[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:.95em;margin-top:.95rem;margin-bottom:.35rem;color:#ffffffc7}.ccap-assistant-md[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:.5rem 0}.ccap-assistant-md[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:650;color:#fffffffa}.ccap-assistant-md[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-style:italic;color:#ffffffd9}.ccap-assistant-md[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:.6rem 0;padding-left:1.5rem;list-style-type:disc}.ccap-assistant-md[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:.6rem 0;padding-left:1.5rem;list-style-type:decimal}.ccap-assistant-md[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:.15rem 0;line-height:1.5}.ccap-assistant-md[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .ccap-assistant-md[_ngcontent-%COMP%] ol[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style-type:circle}.ccap-assistant-md[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .ccap-assistant-md[_ngcontent-%COMP%] ol[_ngcontent-%COMP%] ol[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{list-style-type:square}.ccap-assistant-md[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]{margin-top:.25rem}.ccap-assistant-md[_ngcontent-%COMP%] li[_ngcontent-%COMP%] > ul[_ngcontent-%COMP%], .ccap-assistant-md[_ngcontent-%COMP%] li[_ngcontent-%COMP%] > ol[_ngcontent-%COMP%]{margin-top:.15rem;margin-bottom:.1rem}.ccap-assistant-md[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border:0;height:1px;background:linear-gradient(90deg,transparent 0%,rgba(0,245,255,.38) 12%,rgba(0,245,255,.38) 88%,transparent 100%);margin:2.2rem 0}.ccap-assistant-md[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{margin:.75rem 0;padding:.45rem .85rem;border-left:3px solid rgba(0,245,255,.4);background:#00f5ff0a;border-radius:0 .25rem .25rem 0;color:#ffffffd9}.ccap-assistant-md[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:.2rem 0}.ccap-assistant-md[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:separate;border-spacing:0;margin:1rem 0;font-size:.9em;display:block;overflow-x:auto;border:1px solid rgba(0,245,255,.32);border-radius:.3rem}.ccap-assistant-md[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:sticky;top:0}.ccap-assistant-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#00f5ff24;font-weight:600;color:#00f5ffeb;border-bottom:1px solid rgba(0,245,255,.22);border-right:1px solid rgba(0,245,255,.12);padding:.45rem .7rem;text-align:left;vertical-align:top;white-space:nowrap}.ccap-assistant-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{border-right:none}.ccap-assistant-md[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:1px solid rgba(255,255,255,.16);border-right:1px solid rgba(255,255,255,.12);padding:.4rem .7rem;text-align:left;vertical-align:top}.ccap-assistant-md[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{border-right:none}.ccap-assistant-md[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%]{border-bottom:none}.ccap-assistant-md[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background:#ffffff08}.ccap-assistant-md[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:#00f5ff0e}.ccap-assistant-md[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.55rem 0;padding:.6rem .75rem;border-radius:.3rem;background:#00000080;border:1px solid rgba(255,255,255,.08);overflow-x:auto;font-size:.88em}.ccap-assistant-md[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.9em}.ccap-assistant-md[_ngcontent-%COMP%] p[_ngcontent-%COMP%] code[_ngcontent-%COMP%], .ccap-assistant-md[_ngcontent-%COMP%] li[_ngcontent-%COMP%] code[_ngcontent-%COMP%], .ccap-assistant-md[_ngcontent-%COMP%] td[_ngcontent-%COMP%] code[_ngcontent-%COMP%], .ccap-assistant-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{padding:.1rem .28rem;border-radius:.2rem;background:#00f5ff12;color:#00f5ffeb;border:1px solid rgba(0,245,255,.12)}.ccap-assistant-md[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:transparent;color:inherit;border:none;padding:0;font-size:inherit}.ccap-assistant-md[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#38bdf8;text-decoration:underline;text-underline-offset:2px}.ccap-assistant-md[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#7dd3fc}
|
|
72
72
|
/*# sourceMappingURL=s-agent-console-message-bubble.component-KS3KL36G.css.map */`]})}return t})();var Rs=[[["","sChatColumnHeader",""]],[["","sChatColumnScroll",""]],[["","sChatColumnOverlay",""]],[["","sChatColumnComposer",""]]],Ps=["[sChatColumnHeader]","[sChatColumnScroll]","[sChatColumnOverlay]","[sChatColumnComposer]"],$a=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275cmp=Fe({type:t,selectors:[["app-s-session-chat-column-layout"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden","w-full","min-w-0"],standalone:!0,features:[Ue],ngContentSelectors:Ps,decls:8,vars:0,consts:[[1,"min-w-0","shrink-0"],[1,"relative","min-h-0","min-w-0","flex-1","flex","flex-col"],[1,"min-h-0","min-w-0","flex-1","overflow-y-auto","overflow-x-hidden"]],template:function(o,i){o&1&&(Wn(Rs),c(0,"div",0),Ye(1),p(),c(2,"div",1)(3,"div",2),Ye(4,1),p(),Ye(5,2),p(),c(6,"div",0),Ye(7,3),p())},dependencies:[He],encapsulation:2})}return t})();var xn=so(ao());var Vi=(()=>{class t{mrg_AS=ke(ii);erg_AS=ke(li);llmEntries_$=se([]);llmLoading_$=se(!1);llmLoadError_$=se(null);isLlmLoaded=!1;llmLoadPromise=null;embeddingEntries_$=se([]);embeddingLoading_$=se(!1);embeddingLoadError_$=se(null);isEmbeddingLoaded=!1;embeddingLoadPromise=null;enabledLlmModels_$=T(()=>this.llmEntries_$().filter(e=>e.enabled));enabledLlmProviders_$=T(()=>{let e=new Map;for(let o of this.enabledLlmModels_$())e.has(o.provider)||e.set(o.provider,t.llmProviderLabel(o.provider));return[...e.entries()].map(([o,i])=>({value:o,label:i}))});isLlmEmpty_$=T(()=>this.isLlmLoaded&&!this.llmLoading_$()&&this.enabledLlmModels_$().length===0);enabledEmbeddingModels_$=T(()=>this.embeddingEntries_$().filter(e=>e.enabled===!0));enabledEmbeddingProviders_$=T(()=>{let e=new Map;for(let o of this.enabledEmbeddingModels_$()){let i=o.embeddingBackend??"";i&&!e.has(i)&&e.set(i,t.embeddingBackendLabel(i))}return[...e.entries()].map(([o,i])=>({value:o,label:i}))});isEmbeddingEmpty_$=T(()=>this.isEmbeddingLoaded&&!this.embeddingLoading_$()&&this.enabledEmbeddingModels_$().length===0);ensureLoaded(e){return re(this,null,function*(){if(e==="llm"){if(this.isLlmLoaded&&!this.llmLoading_$())return;if(this.llmLoadPromise)return this.llmLoadPromise;this.llmLoadPromise=this.fetchLlm();try{yield this.llmLoadPromise}finally{this.llmLoadPromise=null}return}if(!(this.isEmbeddingLoaded&&!this.embeddingLoading_$())){if(this.embeddingLoadPromise)return this.embeddingLoadPromise;this.embeddingLoadPromise=this.fetchEmbedding();try{yield this.embeddingLoadPromise}finally{this.embeddingLoadPromise=null}}})}refresh(e){return re(this,null,function*(){e==="llm"?(this.isLlmLoaded=!1,yield this.fetchLlm()):(this.isEmbeddingLoaded=!1,yield this.fetchEmbedding())})}invalidate(e){e==="llm"?this.isLlmLoaded=!1:this.isEmbeddingLoaded=!1}getModelsForProvider(e,o){return e==="llm"?this.enabledLlmModels_$().filter(i=>i.provider===o).map(i=>i.modelName):this.enabledEmbeddingModels_$().filter(i=>i.embeddingBackend===o).map(i=>i.modelId??"")}fetchLlm(){return re(this,null,function*(){this.llmLoading_$.set(!0),this.llmLoadError_$.set(null);try{let e=yield this.mrg_AS.getList({enabled:!0});this.llmEntries_$.set(e.list),this.isLlmLoaded=!0}catch(e){this.llmLoadError_$.set(e),xn.DyFM_Error.logSimple("AIS_RegistrySsot_ControlService | fetchLlm failed",e)}finally{this.llmLoading_$.set(!1)}})}fetchEmbedding(){return re(this,null,function*(){this.embeddingLoading_$.set(!0),this.embeddingLoadError_$.set(null);try{let e=yield this.erg_AS.getList({enabled:!0});this.embeddingEntries_$.set(e.list),this.isEmbeddingLoaded=!0}catch(e){this.embeddingLoadError_$.set(e),xn.DyFM_Error.logSimple("AIS_RegistrySsot_ControlService | fetchEmbedding failed",e)}finally{this.embeddingLoading_$.set(!1)}})}static llmProviderLabel(e){return{"open-ai":"OpenAI",anthropic:"Anthropic",google:"Google",deepseek:"DeepSeek","fdp-ai":"FDPAI"}[e]??e}static embeddingBackendLabel(e){return{ollama:"Ollama","open-ai-compatible":"OpenAI-kompatibilis","open-ai-official":"OpenAI hivatalos","custom-http":"Custom HTTP"}[e]??e}static \u0275fac=function(o){return new(o||t)};static \u0275prov=Vn({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $s=(t,n)=>n.value;function Ls(t,n){t&1&&(c(0,"div",0),S(1,"span",3),c(2,"span"),f(3,"Registry bet\xF6lt\xE9se\u2026"),p()())}function Os(t,n){if(t&1&&(c(0,"p",4),f(1,"Nincs enged\xE9lyezett modell a registry-ben."),p(),c(2,"p"),f(3," Menj a "),c(4,"a",5),f(5,"Model Registry"),p(),f(6," oldalra, futtass "),c(7,"strong"),f(8,"Sync"),p(),f(9,"-et, majd az "),c(10,"code",6),f(11,"enabled"),p(),f(12," kapcsol\xF3val enged\xE9lyezz legal\xE1bb egy modellt. "),p()),t&2){let e=_(2);d(4),M("routerLink",e.registryRoute_$())}}function Is(t,n){if(t&1&&(c(0,"p",4),f(1,"Nincs enged\xE9lyezett embedding modell."),p(),c(2,"p"),f(3," Menj az "),c(4,"a",5),f(5,"Embedding Registry"),p(),f(6," oldalra, futtass "),c(7,"strong"),f(8,"Sync"),p(),f(9,"-et, majd az "),c(10,"code",6),f(11,"enabled"),p(),f(12," kapcsol\xF3val enged\xE9lyezz legal\xE1bb egy modellt. "),p()),t&2){let e=_(2);d(4),M("routerLink",e.registryRoute_$())}}function Ds(t,n){if(t&1&&(c(0,"div",1),A(1,Os,13,1)(2,Is,13,1),p()),t&2){let e=_();d(),k(e.registryKind()==="llm"?1:2)}}function Bs(t,n){if(t&1&&(c(0,"option",11),f(1),p()),t&2){let e=n.$implicit;M("value",e.value),d(),E(e.label)}}function zs(t,n){if(t&1){let e=N();c(0,"div",7)(1,"label",8),f(2),p(),c(3,"select",9),B("ngModelChange",function(i){I(e);let r=_(2);return D(r.handleProviderChange(i))}),c(4,"option",10),f(5,"\u2014 V\xE1lassz \u2014"),p(),Se(6,Bs,2,2,"option",11,$s),p()()}if(t&2){let e=_(2);d(2),E(e.providerLabel()),d(),M("ngModel",e.selectedProvider())("disabled",e.disabled()),d(3),ye(e.providerOptions_$())}}function Ns(t,n){if(t&1&&(c(0,"option",11),f(1),p()),t&2){let e=n.$implicit;M("value",e),d(),E(e)}}function Fs(t,n){t&1&&(c(0,"span",12),f(1,"A kiv\xE1lasztott providernek nincs enged\xE9lyezett modellje."),p())}function Us(t,n){if(t&1){let e=N();c(0,"div",2),A(1,zs,8,3,"div",7),c(2,"div",7)(3,"label",8),f(4),p(),c(5,"select",9),B("ngModelChange",function(i){I(e);let r=_();return D(r.handleModelChange(i))}),c(6,"option",10),f(7,"\u2014 V\xE1lassz modellt \u2014"),p(),Se(8,Ns,2,2,"option",11,bt),p(),A(10,Fs,2,0,"span",12),p()()}if(t&2){let e=_();d(),k(e.showProviderSelect_$()?1:-1),d(3),E(e.modelLabel()),d(),M("ngModel",e.selectedModel())("disabled",e.disabled()||e.modelOptions_$().length===0),d(3),ye(e.modelOptions_$()),d(2),k(e.modelOptions_$().length===0&&(e.selectedProvider()||e.providerFilter())?10:-1)}}var Ja=(()=>{class t{registrySsot_CS=ke(Vi);registryKind=me.required();selectedProvider=me("");selectedModel=me("");providerLabel=me("Provider");modelLabel=me("Modell");disabled=me(!1);providerFilter=me(void 0);providerChange=Ze();modelChange=Ze();isEmpty_$=T(()=>this.registryKind()==="llm"?this.registrySsot_CS.isLlmEmpty_$():this.registrySsot_CS.isEmbeddingEmpty_$());isLoading_$=T(()=>this.registryKind()==="llm"?this.registrySsot_CS.llmLoading_$():this.registrySsot_CS.embeddingLoading_$());providerOptions_$=T(()=>this.registryKind()==="llm"?this.registrySsot_CS.enabledLlmProviders_$():this.registrySsot_CS.enabledEmbeddingProviders_$());modelOptions_$=T(()=>{let e=this.providerFilter()??this.selectedProvider();return e?this.registrySsot_CS.getModelsForProvider(this.registryKind(),e):[]});registryRoute_$=T(()=>this.registryKind()==="llm"?"/model-registry":"/embedding-registry");showProviderSelect_$=T(()=>this.providerFilter()===void 0);ngOnInit(){this.registrySsot_CS.ensureLoaded(this.registryKind())}handleProviderChange(e){this.providerChange.emit(e)}handleModelChange(e){this.modelChange.emit(e)}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=Fe({type:t,selectors:[["app-s-registry-provider-model-select"]],inputs:{registryKind:[1,"registryKind"],selectedProvider:[1,"selectedProvider"],selectedModel:[1,"selectedModel"],providerLabel:[1,"providerLabel"],modelLabel:[1,"modelLabel"],disabled:[1,"disabled"],providerFilter:[1,"providerFilter"]},outputs:{providerChange:"providerChange",modelChange:"modelChange"},standalone:!0,features:[Ue],decls:3,vars:3,consts:[[1,"flex","items-center","gap-2","text-sm","text-zinc-400","py-1"],[1,"bg-red-900/30","border","border-red-600","rounded","px-3","py-2","text-sm","text-red-300","space-y-1"],[1,"flex","flex-col","gap-2"],[1,"animate-spin","inline-block","w-4","h-4","border-2","border-zinc-500","border-t-transparent","rounded-full"],[1,"font-semibold"],[1,"underline","text-blue-400","hover:text-blue-300",3,"routerLink"],[1,"text-xs","bg-zinc-800","px-1","rounded"],[1,"flex","flex-col","gap-1"],[1,"text-xs","text-zinc-400","uppercase","tracking-wide"],[1,"bg-zinc-800","border","border-zinc-600","rounded","px-2","py-1","text-sm","text-zinc-100",3,"ngModelChange","ngModel","disabled"],["value",""],[3,"value"],[1,"text-xs","text-zinc-500"]],template:function(o,i){o&1&&A(0,Ls,4,0,"div",0)(1,Ds,3,1,"div",1)(2,Us,11,5,"div",2),o&2&&(k(i.isLoading_$()?0:-1),d(),k(i.isEmpty_$()&&!i.isLoading_$()?1:-1),d(),k(!i.isEmpty_$()&&!i.isLoading_$()?2:-1))},dependencies:[He,ti,Qn,ei,Xn,Yn,Kn,Zn,Jn],encapsulation:2})}return t})();export{zi as a,w as b,Ge as c,Pt as d,Fi as e,Aa as f,$a as g,Vi as h,Ja as i};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-V5JT5SVQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as o,p as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as o,p as f}from"./chunk-OKNZODWZ.js";import{C as s,aa as i,h as m,hb as n,k as l,p as h,xb as p,y as r}from"./chunk-TBMJSIBB.js";var c=m(f());var u=(()=>{class e{baseUrl=`${o.api.baseUrl}/mobile`;http=s(p);getStatus(){return h(this.http.get(`${this.baseUrl}/status`))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var C=6*60*60*1e3;function d(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}var y=(()=>{class e{mobile_AS=s(u);latestStatus_$=i(null);isChecking_$=i(!1);lastCheckedAt_$=i(null);lastCheckError_$=i(null);pendingCheckPromise=null;updateAvailable_$=n(()=>{let t=this.latestStatus_$();return!t||!t.available||!t.packageVersion?!1:t.packageVersion!==o.version});latestPackageVersion_$=n(()=>{let t=this.latestStatus_$();return t?.packageVersion??t?.version??""});intervalId=null;constructor(){d()&&this.startPeriodicCheck()}startPeriodicCheck(){this.checkNow(),this.intervalId=setInterval(()=>{this.checkNow()},C)}checkNow(){return this.pendingCheckPromise?this.pendingCheckPromise:(this.pendingCheckPromise=this.performCheck(),this.pendingCheckPromise)}performCheck(){return l(this,null,function*(){this.isChecking_$.set(!0),this.lastCheckError_$.set(null);try{let t=yield this.mobile_AS.getStatus();this.latestStatus_$.set(t),this.lastCheckedAt_$.set(new Date)}catch(t){c.DyFM_Error.logSimple("CCAP_AppVersionCheck | checkNow failed",t),this.lastCheckError_$.set(c.DyFM_Error.getErrorMessage(t)||"Verzi\xF3 ellen\u0151rz\xE9s sikertelen."),this.lastCheckedAt_$.set(new Date)}finally{this.isChecking_$.set(!1),this.pendingCheckPromise=null}})}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{u as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-VQNH5QZ2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as c}from"./chunk-VQNH5QZ2.js";import{I as d,p as h}from"./chunk-OKNZODWZ.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-WGZ3KYUI.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as H,b as Ae}from"./chunk-5L2ZD352.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-LQFJLYDU.js";import{a as Ce}from"./chunk-XFC3O3CG.js";import{e as ye}from"./chunk-XCT53H4N.js";import{L as he,p as ee,t as ae}from"./chunk-PYVALWHU.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-QBLZN2K7.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-KAVCCO5Q.js";import{a as Ce}from"./chunk-IMY653SN.js";import{e as ye}from"./chunk-4DZM46W7.js";import{L as he,p as ee,t as ae}from"./chunk-OKNZODWZ.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-XJZ3GRFC.js.map
|