@futdevpro/ccap 1.1.2947 → 1.1.2950
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-ZEVBTMMM.js → agent-instances.module-PLUH6SO5.js} +2 -2
- package/client-dist/{ca.module-YYOLIMGY.js → ca.module-TS7MCXHK.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-AQC32ZAD.js → cc-usage-dashboard.component-I5TEQDWW.js} +2 -2
- package/client-dist/{cc.module-KHTSL3SA.js → cc.module-E7CZFWXV.js} +2 -2
- package/client-dist/{chunk-N6JHPE46.js → chunk-2Q6X3FU2.js} +2 -2
- package/client-dist/{chunk-KSU4V25I.js → chunk-2W4RUYNR.js} +2 -2
- package/client-dist/{chunk-Y4P5DT5X.js → chunk-3KIQOGDA.js} +2 -2
- package/client-dist/{chunk-QOMCRYEZ.js → chunk-4SEK2OVV.js} +2 -2
- package/client-dist/{chunk-GIIT6ZXQ.js → chunk-57RSGYSP.js} +2 -2
- package/client-dist/{chunk-KAVCCO5Q.js → chunk-5PAC2G7S.js} +2 -2
- package/client-dist/{chunk-XJZ3GRFC.js → chunk-5S5QM7KV.js} +2 -2
- package/client-dist/{chunk-B25QGO2W.js → chunk-5ZOG25AN.js} +2 -2
- package/client-dist/{chunk-TIGUKVX6.js → chunk-6GBI6YSR.js} +2 -2
- package/client-dist/{chunk-VQNH5QZ2.js → chunk-6YF76LQJ.js} +2 -2
- package/client-dist/{chunk-NT4IQ6JG.js → chunk-AWMFJQ7W.js} +2 -2
- package/client-dist/{chunk-EG4UOTIO.js → chunk-B3D3QXEY.js} +2 -2
- package/client-dist/{chunk-NCJ6UM4K.js → chunk-CXJF6KZC.js} +2 -2
- package/client-dist/{chunk-MGBOFP4H.js → chunk-DBL5YOEM.js} +2 -2
- package/client-dist/{chunk-SVOEK6DZ.js → chunk-DW6LMB55.js} +2 -2
- package/client-dist/{chunk-CGARRM5K.js → chunk-EI66XTWY.js} +2 -2
- package/client-dist/{chunk-OQZHKPKW.js → chunk-EYA2RBE7.js} +2 -2
- package/client-dist/{chunk-FU5J4UQR.js → chunk-EYMWCAP4.js} +2 -2
- package/client-dist/{chunk-LQXM24RN.js → chunk-FE2KT5H6.js} +2 -2
- package/client-dist/{chunk-RIXEJWZN.js → chunk-FR3FLYRO.js} +2 -2
- package/client-dist/{chunk-BXLYWWVW.js → chunk-GEYYU32Z.js} +2 -2
- package/client-dist/{chunk-V2WK5UAY.js → chunk-GFMP24TK.js} +2 -2
- package/client-dist/{chunk-BX4VL2VP.js → chunk-GL225VJU.js} +2 -2
- package/client-dist/{chunk-AP5TU3TG.js → chunk-H3XXGD7V.js} +2 -2
- package/client-dist/{chunk-PEOX37GU.js → chunk-IHOGOMMY.js} +2 -2
- package/client-dist/{chunk-BSFAUF6X.js → chunk-IVEAPN2I.js} +2 -2
- package/client-dist/{chunk-ZI6ZNXBW.js → chunk-JNZSSD4W.js} +2 -2
- package/client-dist/{chunk-GAQCGOVC.js → chunk-KQLFLKDB.js} +2 -2
- package/client-dist/{chunk-3RHTWAQ7.js → chunk-KXPA7LRJ.js} +2 -2
- package/client-dist/{chunk-FRYV2ANS.js → chunk-LWQHWFYF.js} +2 -2
- package/client-dist/{chunk-BBH3U5AO.js → chunk-LX33U457.js} +2 -2
- package/client-dist/{chunk-GKQUKC2Y.js → chunk-LYY4T2VF.js} +2 -2
- package/client-dist/{chunk-PD54YIU7.js → chunk-MJGO4S6J.js} +2 -2
- package/client-dist/{chunk-5RLZPCG3.js → chunk-O36HJZWX.js} +2 -2
- package/client-dist/{chunk-MXXUHJBJ.js → chunk-OUDRX5MF.js} +2 -2
- package/client-dist/{chunk-WGZ3KYUI.js → chunk-PFV6G3HT.js} +2 -2
- package/client-dist/{chunk-OKNZODWZ.js → chunk-QD4P5KG4.js} +2 -2
- package/client-dist/{chunk-OKNZODWZ.js.map → chunk-QD4P5KG4.js.map} +1 -1
- package/client-dist/{chunk-KQUC7GVD.js → chunk-QHTS5VFT.js} +2 -2
- package/client-dist/{chunk-ZKPH2UCX.js → chunk-QMUEXCRY.js} +2 -2
- package/client-dist/{chunk-3SNULO46.js → chunk-RAAOEZGV.js} +2 -2
- package/client-dist/{chunk-L64DWL3O.js → chunk-S6HMYXEK.js} +2 -2
- package/client-dist/{chunk-FFOMAJJB.js → chunk-TMTQY7R3.js} +2 -2
- package/client-dist/{chunk-V5JT5SVQ.js → chunk-TPIYQSPE.js} +2 -2
- package/client-dist/{chunk-DNJ7WW7C.js → chunk-U4NGSS7V.js} +2 -2
- package/client-dist/{chunk-YOCBPRNH.js → chunk-UFL2VYVY.js} +2 -2
- package/client-dist/{chunk-E2AGFRVZ.js → chunk-V4F4O5KC.js} +2 -2
- package/client-dist/{chunk-ROX7XMCY.js → chunk-V4WHRM3R.js} +2 -2
- package/client-dist/{chunk-MDXWG4L2.js → chunk-VYQZ2T6E.js} +2 -2
- package/client-dist/{chunk-5BLIQZKV.js → chunk-WLB3DBNI.js} +2 -2
- package/client-dist/{chunk-FWU7MLGG.js → chunk-WLOU5SXS.js} +2 -2
- package/client-dist/{chunk-SOTECVEV.js → chunk-WZYDOGHK.js} +2 -2
- package/client-dist/{chunk-C2JUJE7W.js → chunk-XCWH6UIA.js} +2 -2
- package/client-dist/{chunk-4DZM46W7.js → chunk-XJSUARFG.js} +2 -2
- package/client-dist/{chunk-QBLZN2K7.js → chunk-YCIB5DSA.js} +2 -2
- package/client-dist/{chunk-IMY653SN.js → chunk-YF4JP4SP.js} +2 -2
- package/client-dist/{chunk-NZCKXDHP.js → chunk-ZUBONOYZ.js} +2 -2
- package/client-dist/{consultant.module-PZ7AYCNM.js → consultant.module-NUSIZDIZ.js} +2 -2
- package/client-dist/{crd.module-JFQFGOXI.js → crd.module-ICRZWMAR.js} +2 -2
- package/client-dist/{dashboard.module-7FRVU26A.js → dashboard.module-V3AHYYXU.js} +2 -2
- package/client-dist/{do.module-WUFOTYFG.js → do.module-YYGG6XEF.js} +2 -2
- package/client-dist/{document-library.module-5WYPOT6H.js → document-library.module-JKTT5PO4.js} +2 -2
- package/client-dist/{embedding-eval.module-4CYH6DIQ.js → embedding-eval.module-T7LJ6JYP.js} +2 -2
- package/client-dist/{embedding-registry.module-ZMMAJS4R.js → embedding-registry.module-EGAMMI7V.js} +2 -2
- package/client-dist/{err.module-IMW6OA64.js → err.module-RASONGZC.js} +2 -2
- package/client-dist/{feedback.module-OZPPZJDW.js → feedback.module-VQLNMD5P.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-VJ7TFO4U.js → host-runtime-mcp.module-TZLQDQVA.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-SWGVQIDQ.js → live-dev-pipeline.module-YYAZAUG3.js} +2 -2
- package/client-dist/{logs.module-WW4NNU63.js → logs.module-JMZ7KMOK.js} +2 -2
- package/client-dist/{main-PHZ7O56I.js → main-I24VBZGH.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-DBW56ZMH.js → master-control-remote-poc.module-HTTTQHOE.js} +2 -2
- package/client-dist/{mobile-app.module-I2KQKWOF.js → mobile-app.module-44JDG6XI.js} +2 -2
- package/client-dist/{model-registry.module-33KV2XSZ.js → model-registry.module-2WDFOOA7.js} +2 -2
- package/client-dist/{oc.module-RRE2YITL.js → oc.module-2TJMS5GP.js} +2 -2
- package/client-dist/{orc.module-VOUIZMA6.js → orc.module-XEHTVHGQ.js} +2 -2
- package/client-dist/{project-management.module-GAM4KRIA.js → project-management.module-66X6A4QK.js} +2 -2
- package/client-dist/project-source-routed.module-ABLXIFUW.js +2 -0
- package/client-dist/{scheduler.module-5DUE3I6K.js → scheduler.module-YIXDKIJZ.js} +2 -2
- package/client-dist/{session.module-PDPSJA3D.js → session.module-ASRMUQDB.js} +2 -2
- package/client-dist/{set.module-OSRQZR36.js → set.module-KO2IKUU4.js} +2 -2
- package/client-dist/{setup.module-M5OOSJ4H.js → setup.module-DYSAQO5Z.js} +2 -2
- package/client-dist/{terminals.module-STKPDNMM.js → terminals.module-4MLBSBBZ.js} +2 -2
- package/client-dist/{voice-notes-poc.module-4PRNA77N.js → voice-notes-poc.module-TTIFRTLH.js} +2 -2
- package/client-dist/{wfs.module-NMOLG37Y.js → wfs.module-KOPV2A67.js} +2 -2
- package/package.json +1 -1
- package/client-dist/project-source-routed.module-OO2FG7BY.js +0 -2
- /package/client-dist/{agent-instances.module-ZEVBTMMM.js.map → agent-instances.module-PLUH6SO5.js.map} +0 -0
- /package/client-dist/{ca.module-YYOLIMGY.js.map → ca.module-TS7MCXHK.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-AQC32ZAD.js.map → cc-usage-dashboard.component-I5TEQDWW.js.map} +0 -0
- /package/client-dist/{cc.module-KHTSL3SA.js.map → cc.module-E7CZFWXV.js.map} +0 -0
- /package/client-dist/{chunk-N6JHPE46.js.map → chunk-2Q6X3FU2.js.map} +0 -0
- /package/client-dist/{chunk-KSU4V25I.js.map → chunk-2W4RUYNR.js.map} +0 -0
- /package/client-dist/{chunk-Y4P5DT5X.js.map → chunk-3KIQOGDA.js.map} +0 -0
- /package/client-dist/{chunk-QOMCRYEZ.js.map → chunk-4SEK2OVV.js.map} +0 -0
- /package/client-dist/{chunk-GIIT6ZXQ.js.map → chunk-57RSGYSP.js.map} +0 -0
- /package/client-dist/{chunk-KAVCCO5Q.js.map → chunk-5PAC2G7S.js.map} +0 -0
- /package/client-dist/{chunk-XJZ3GRFC.js.map → chunk-5S5QM7KV.js.map} +0 -0
- /package/client-dist/{chunk-B25QGO2W.js.map → chunk-5ZOG25AN.js.map} +0 -0
- /package/client-dist/{chunk-TIGUKVX6.js.map → chunk-6GBI6YSR.js.map} +0 -0
- /package/client-dist/{chunk-VQNH5QZ2.js.map → chunk-6YF76LQJ.js.map} +0 -0
- /package/client-dist/{chunk-NT4IQ6JG.js.map → chunk-AWMFJQ7W.js.map} +0 -0
- /package/client-dist/{chunk-EG4UOTIO.js.map → chunk-B3D3QXEY.js.map} +0 -0
- /package/client-dist/{chunk-NCJ6UM4K.js.map → chunk-CXJF6KZC.js.map} +0 -0
- /package/client-dist/{chunk-MGBOFP4H.js.map → chunk-DBL5YOEM.js.map} +0 -0
- /package/client-dist/{chunk-SVOEK6DZ.js.map → chunk-DW6LMB55.js.map} +0 -0
- /package/client-dist/{chunk-CGARRM5K.js.map → chunk-EI66XTWY.js.map} +0 -0
- /package/client-dist/{chunk-OQZHKPKW.js.map → chunk-EYA2RBE7.js.map} +0 -0
- /package/client-dist/{chunk-FU5J4UQR.js.map → chunk-EYMWCAP4.js.map} +0 -0
- /package/client-dist/{chunk-LQXM24RN.js.map → chunk-FE2KT5H6.js.map} +0 -0
- /package/client-dist/{chunk-RIXEJWZN.js.map → chunk-FR3FLYRO.js.map} +0 -0
- /package/client-dist/{chunk-BXLYWWVW.js.map → chunk-GEYYU32Z.js.map} +0 -0
- /package/client-dist/{chunk-V2WK5UAY.js.map → chunk-GFMP24TK.js.map} +0 -0
- /package/client-dist/{chunk-BX4VL2VP.js.map → chunk-GL225VJU.js.map} +0 -0
- /package/client-dist/{chunk-AP5TU3TG.js.map → chunk-H3XXGD7V.js.map} +0 -0
- /package/client-dist/{chunk-PEOX37GU.js.map → chunk-IHOGOMMY.js.map} +0 -0
- /package/client-dist/{chunk-BSFAUF6X.js.map → chunk-IVEAPN2I.js.map} +0 -0
- /package/client-dist/{chunk-ZI6ZNXBW.js.map → chunk-JNZSSD4W.js.map} +0 -0
- /package/client-dist/{chunk-GAQCGOVC.js.map → chunk-KQLFLKDB.js.map} +0 -0
- /package/client-dist/{chunk-3RHTWAQ7.js.map → chunk-KXPA7LRJ.js.map} +0 -0
- /package/client-dist/{chunk-FRYV2ANS.js.map → chunk-LWQHWFYF.js.map} +0 -0
- /package/client-dist/{chunk-BBH3U5AO.js.map → chunk-LX33U457.js.map} +0 -0
- /package/client-dist/{chunk-GKQUKC2Y.js.map → chunk-LYY4T2VF.js.map} +0 -0
- /package/client-dist/{chunk-PD54YIU7.js.map → chunk-MJGO4S6J.js.map} +0 -0
- /package/client-dist/{chunk-5RLZPCG3.js.map → chunk-O36HJZWX.js.map} +0 -0
- /package/client-dist/{chunk-MXXUHJBJ.js.map → chunk-OUDRX5MF.js.map} +0 -0
- /package/client-dist/{chunk-WGZ3KYUI.js.map → chunk-PFV6G3HT.js.map} +0 -0
- /package/client-dist/{chunk-KQUC7GVD.js.map → chunk-QHTS5VFT.js.map} +0 -0
- /package/client-dist/{chunk-ZKPH2UCX.js.map → chunk-QMUEXCRY.js.map} +0 -0
- /package/client-dist/{chunk-3SNULO46.js.map → chunk-RAAOEZGV.js.map} +0 -0
- /package/client-dist/{chunk-L64DWL3O.js.map → chunk-S6HMYXEK.js.map} +0 -0
- /package/client-dist/{chunk-FFOMAJJB.js.map → chunk-TMTQY7R3.js.map} +0 -0
- /package/client-dist/{chunk-V5JT5SVQ.js.map → chunk-TPIYQSPE.js.map} +0 -0
- /package/client-dist/{chunk-DNJ7WW7C.js.map → chunk-U4NGSS7V.js.map} +0 -0
- /package/client-dist/{chunk-YOCBPRNH.js.map → chunk-UFL2VYVY.js.map} +0 -0
- /package/client-dist/{chunk-E2AGFRVZ.js.map → chunk-V4F4O5KC.js.map} +0 -0
- /package/client-dist/{chunk-ROX7XMCY.js.map → chunk-V4WHRM3R.js.map} +0 -0
- /package/client-dist/{chunk-MDXWG4L2.js.map → chunk-VYQZ2T6E.js.map} +0 -0
- /package/client-dist/{chunk-5BLIQZKV.js.map → chunk-WLB3DBNI.js.map} +0 -0
- /package/client-dist/{chunk-FWU7MLGG.js.map → chunk-WLOU5SXS.js.map} +0 -0
- /package/client-dist/{chunk-SOTECVEV.js.map → chunk-WZYDOGHK.js.map} +0 -0
- /package/client-dist/{chunk-C2JUJE7W.js.map → chunk-XCWH6UIA.js.map} +0 -0
- /package/client-dist/{chunk-4DZM46W7.js.map → chunk-XJSUARFG.js.map} +0 -0
- /package/client-dist/{chunk-QBLZN2K7.js.map → chunk-YCIB5DSA.js.map} +0 -0
- /package/client-dist/{chunk-IMY653SN.js.map → chunk-YF4JP4SP.js.map} +0 -0
- /package/client-dist/{chunk-NZCKXDHP.js.map → chunk-ZUBONOYZ.js.map} +0 -0
- /package/client-dist/{consultant.module-PZ7AYCNM.js.map → consultant.module-NUSIZDIZ.js.map} +0 -0
- /package/client-dist/{crd.module-JFQFGOXI.js.map → crd.module-ICRZWMAR.js.map} +0 -0
- /package/client-dist/{dashboard.module-7FRVU26A.js.map → dashboard.module-V3AHYYXU.js.map} +0 -0
- /package/client-dist/{do.module-WUFOTYFG.js.map → do.module-YYGG6XEF.js.map} +0 -0
- /package/client-dist/{document-library.module-5WYPOT6H.js.map → document-library.module-JKTT5PO4.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-4CYH6DIQ.js.map → embedding-eval.module-T7LJ6JYP.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-ZMMAJS4R.js.map → embedding-registry.module-EGAMMI7V.js.map} +0 -0
- /package/client-dist/{err.module-IMW6OA64.js.map → err.module-RASONGZC.js.map} +0 -0
- /package/client-dist/{feedback.module-OZPPZJDW.js.map → feedback.module-VQLNMD5P.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-VJ7TFO4U.js.map → host-runtime-mcp.module-TZLQDQVA.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-SWGVQIDQ.js.map → live-dev-pipeline.module-YYAZAUG3.js.map} +0 -0
- /package/client-dist/{logs.module-WW4NNU63.js.map → logs.module-JMZ7KMOK.js.map} +0 -0
- /package/client-dist/{main-PHZ7O56I.js.map → main-I24VBZGH.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-DBW56ZMH.js.map → master-control-remote-poc.module-HTTTQHOE.js.map} +0 -0
- /package/client-dist/{mobile-app.module-I2KQKWOF.js.map → mobile-app.module-44JDG6XI.js.map} +0 -0
- /package/client-dist/{model-registry.module-33KV2XSZ.js.map → model-registry.module-2WDFOOA7.js.map} +0 -0
- /package/client-dist/{oc.module-RRE2YITL.js.map → oc.module-2TJMS5GP.js.map} +0 -0
- /package/client-dist/{orc.module-VOUIZMA6.js.map → orc.module-XEHTVHGQ.js.map} +0 -0
- /package/client-dist/{project-management.module-GAM4KRIA.js.map → project-management.module-66X6A4QK.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-OO2FG7BY.js.map → project-source-routed.module-ABLXIFUW.js.map} +0 -0
- /package/client-dist/{scheduler.module-5DUE3I6K.js.map → scheduler.module-YIXDKIJZ.js.map} +0 -0
- /package/client-dist/{session.module-PDPSJA3D.js.map → session.module-ASRMUQDB.js.map} +0 -0
- /package/client-dist/{set.module-OSRQZR36.js.map → set.module-KO2IKUU4.js.map} +0 -0
- /package/client-dist/{setup.module-M5OOSJ4H.js.map → setup.module-DYSAQO5Z.js.map} +0 -0
- /package/client-dist/{terminals.module-STKPDNMM.js.map → terminals.module-4MLBSBBZ.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-4PRNA77N.js.map → voice-notes-poc.module-TTIFRTLH.js.map} +0 -0
- /package/client-dist/{wfs.module-NMOLG37Y.js.map → wfs.module-KOPV2A67.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as a}from"./chunk-TPIYQSPE.js";var f=class{static extract(t){if(t.toolName)return t.toolName;if(t.rawData){let s=t.rawData.name??t.rawData.tool_name??t.rawData.last_tool_name;if(typeof s=="string")return s}let o=t.bodyText.indexOf(":");return o>0?t.bodyText.substring(0,o).trim():t.bodyText.trim()}};var b=class e{static DEFAULT_GROUPABLE_TOOLS=new Set(["Read","Bash","Grep","Glob"]);static DEFAULT_MIN_GROUP_SIZE=2;static groupSubAgentItems(t,o){let s=new Map;for(let r=0;r<t.length;r++){let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n);i&&s.set(i,{item:n,index:r})}}if(!s.size)return t;let c=new Map,d=new Set;for(let r=0;r<t.length;r++){let n=t[r];if(n.parentAgentId&&s.has(n.parentAgentId)){let i=c.get(n.parentAgentId)??[];i.push(n),c.set(n.parentAgentId,i),d.add(r)}}let l=[];for(let r=0;r<t.length;r++){if(d.has(r))continue;let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n),p=c.get(i)??[],g=[n,...p],I=e.buildSubAgentLabel(n),A=e.extractSubagentType(n),y=e.groupConsecutiveToolItems(g,o);l.push({listKey:e.newListKey(),kind:a.subAgentGroup,bodyText:I,groupItems:y,groupToolName:A||"Agent",rawData:n.rawData})}else l.push(n)}return l}static groupConsecutiveToolItems(t,o){let s=o?.groupableTools??e.DEFAULT_GROUPABLE_TOOLS,c=o?.minGroupSize??e.DEFAULT_MIN_GROUP_SIZE,d=[],l=[],r="",n=()=>{if(!l.length)return;let i=l.filter(p=>p.kind===a.tool).length;i>=c?d.push({listKey:e.newListKey(),kind:a.toolGroup,bodyText:`${r} \xD7 ${i}`,groupItems:l,groupToolName:r}):d.push(...l),l=[],r=""};for(let i of t){if(i.kind===a.tool){let p=f.extract(i);if(s.has(p)){r&&r!==p&&n(),r=p,l.push(i);continue}}if(i.kind===a.toolResult&&l.length){l.push(i);continue}n(),d.push(i)}return n(),d}static resolveAgentId(t){return t.toolCallId?t.toolCallId:t.rawData&&typeof t.rawData.id=="string"?t.rawData.id:""}static extractSubagentType(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.subagent_type;return typeof s=="string"?s:""}static extractDescription(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.description;return typeof s=="string"?s:""}static buildSubAgentLabel(t){let o=e.extractSubagentType(t),s=e.extractDescription(t);return o?`${o}: ${s||"..."}`:s||"Sub-agent"}static newListKey(){return globalThis.crypto.randomUUID()}};var u=function(e){return e.user="user",e.assistant="assistant",e.tool="tool",e.toolResult="tool-result",e.status="status",e.error="error",e.info="info",e.result="result",e.thinking="thinking",e.statusUpdate="status-update",e}(u||{});var h=class e{static fromAssembledMessage(t,o){let s=e.mapRoleToKind(t.messageRole),c=t.toolResult?{text:t.toolResult.text,expandableContent:t.toolResult.expandableContent,rawData:t.toolResult.rawData,isError:t.toolResult.isError}:void 0,d=t.messageRole===u.tool&&t.toolName==="Edit"&&!!t.expandableContent;return{listKey:t.messageKey,kind:s,bodyText:t.bodyText,timestampIso:t.timestamp,toolName:t.toolName,expandableContent:t.expandableContent,pairedResult:c,rawData:t.rawData,subtype:t.subtype,isUserAligned:t.isUserAligned,headerStatusDot:t.headerStatusDot==="error"?"error":void 0,flags:{showCopy:!0,showRawInfo:!0,useEditDiffForExpandable:d},tts:e.buildTts(t,o),toolCallId:t.toolCallId,parentAgentId:t.parentAgentId}}static buildTts(t,o){if(!(!o||!(t.messageRole===u.user||t.messageRole===u.assistant)||!t.bodyText.trim().length))return{messageKey:t.messageKey,sessionId:o.sessionId,role:t.messageRole,content:t.bodyText,timestampIso:t.timestamp,hasTtsAudio:o.cachedKeys.has(t.messageKey)}}static mapRoleToKind(t){switch(t){case u.user:return a.userPrompt;case u.assistant:return a.assistant;case u.tool:return a.tool;case u.toolResult:return a.toolResult;case u.status:return a.status;case u.error:return a.error;case u.info:return a.info;case u.result:return a.result;case u.thinking:return a.thinking;case u.statusUpdate:return a.statusUpdate;default:return a.info}}};export{b as a,h as b};
|
|
2
|
+
//# sourceMappingURL=chunk-QHTS5VFT.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-
|
|
1
|
+
import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-FE2KT5H6.js";import{A as Y,B as X,C as Z,I as Te,K as Oe,p as ge,z as q}from"./chunk-QD4P5KG4.js";import{C as M,D as ve,Fa as k,Ga as C,Gb as je,Ha as z,J as T,Ja as Le,K as O,L as D,M as me,P as $e,Ta as Me,U as V,X as Ee,Z as u,a as re,aa as m,b as Pe,da as A,ga as he,h as fe,hb as S,ia as F,jb as K,k as P,la as v,ma as Ae,oa as J,p as d,pa as G,qa as f,ra as p,sa as Q,ua as W,ub as we,va as N,wa as I,wb as L,xb as Re,y as ie}from"./chunk-TBMJSIBB.js";var Ne=fe(ge());var ee=function(i){return i.strictParse="strict-parse",i.llmExtract="llm-extract",i.llmPrepare="llm-prepare",i.llmParse="llm-parse",i}(ee||{});var Qe=12e3,se=120,xe=600,te=class i{static extractJsonFromContent(n){let e=n.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])return e[1].trim();let t=n.indexOf("{"),r=n.lastIndexOf("}");return t!==-1&&r>t?n.slice(t,r+1):n}static rawContentLooksLikeExtractableJsonObject(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.extractedTrimmedLooksLikeJsonObjectRoot(t)}static prepareLlmJsonTextForStrictParse(n){if(!i.extractedTrimmedLooksLikeJsonObjectRoot(n))return i.relaxTrailingCommasInJsonLikeText(n);let t=i.repairExecutionSummaryForUserOrphanSiblingStrings(n),r=i.repairUnescapedInnerDoubleQuotesInJsonLikeText(t),o=i.sanitizeRawControlCharsInsideJsonStrings(r);return i.relaxTrailingCommasInJsonLikeText(o)}static extractedTrimmedLooksLikeJsonObjectRoot(n){return(n??"").trimStart().startsWith("{")}static getLlmPipelinePreparedText(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.prepareLlmJsonTextForStrictParse(t)}static tryParseStrict(n){let e=n.text??"";try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,failure:i.buildFailureFromParseError({error:t,sourceText:e,contextLabel:n.contextLabel,phase:ee.strictParse})}}}static parseStrictOrThrow(n){let e=i.tryParseStrict({text:n.text,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static tryParseLlmPipeline(n){let e=(n.content??"").trim(),t=i.extractJsonFromContent(e),r=i.prepareLlmJsonTextForStrictParse(t),o=i.tryParseStrict({text:r,contextLabel:n.contextLabel});if(o.ok)return{ok:!0,value:o.value};let s=o.failure,l=`JSON parse failed [${s.contextLabel}] (${ee.llmParse}): ${s.rawMessage}`;return{ok:!1,failure:{phase:ee.llmParse,contextLabel:s.contextLabel,rawMessage:s.rawMessage,summaryMessage:l,position:s.position,line:s.line,column:s.column,inputLength:e.length,snippetAroundError:s.snippetAroundError,extractedLength:t.length,preparedLength:r.length,originalError:s.originalError}}}static parseLlmPipelineOrThrow(n){let e=i.tryParseLlmPipeline({content:n.content,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static failureToPlainAdditionalContext(n){let e={jsonParsePhase:n.phase,jsonParseContextLabel:n.contextLabel,jsonParseRawMessage:n.rawMessage,jsonParseSummaryMessage:n.summaryMessage};n.position!==void 0&&(e.jsonParsePosition=n.position),n.line!==void 0&&(e.jsonParseLine=n.line),n.column!==void 0&&(e.jsonParseColumn=n.column),n.inputLength!==void 0&&(e.jsonParseInputLength=n.inputLength),n.extractedLength!==void 0&&(e.jsonParseExtractedLength=n.extractedLength),n.preparedLength!==void 0&&(e.jsonParsePreparedLength=n.preparedLength),n.snippetAroundError!==void 0&&(e.jsonParseSnippetAroundError=n.snippetAroundError);let t=n.originalError;return t instanceof Error?e.jsonParseOriginalErrorMessage=t.message:t!=null&&(e.jsonParseOriginalErrorMessage=String(t)),e}static formatFailureForLog(n,e,t){let r=n.position,o;if(r!==void 0&&r<e.length){let y=Math.max(0,r-se),c=Math.min(e.length,r+se),$=e.slice(y,c),E=r-y,ue=" ".repeat(Math.max(0,E))+"^";o=`snippetAroundPosition | startOffset: ${String(y)} | errorIndex: ${String(r)}
|
|
2
2
|
${$}
|
|
3
3
|
${ue}`}else{let y=e.slice(0,xe);o=`snippetFallback | noUsablePosition | firstChars: ${String(xe)}
|
|
4
4
|
`+y+(e.length>xe?`
|
|
@@ -36,4 +36,4 @@ ${JSON.stringify(s,null,2)}`;return x.toDisplaySafeString(o??l)}let t=e instance
|
|
|
36
36
|
|
|
37
37
|
Stack:
|
|
38
38
|
${t}`:""].join("")}copyToClipboard(){return P(this,null,function*(){if(this.error()==null)return;let e=this.buildErrorText(),t=yield this.globalError_CS.copyToClipboard(e);t.ok?(this.copyFeedback="M\xE1solva!",setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs)):(this.copyFeedback="M\xE1sol\xE1s sikertelen",this.globalError_CS.reportErrorOnly({message:x.getErrorMessageForDisplay(t.error),source:"error-display-copy",stack:x.getStackForReport(t.error)}),setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs))})}sendToQuickInput(){return P(this,null,function*(){if(this.error()==null||this.isSendingToQuickInput_$())return;let e=this.buildErrorText();if(e.trim()){this.isSendingToQuickInput_$.set(!0);try{let t=yield this.userInput_DS.submitInputForGlobalError(e);this.quickInputFeedback=t?"Quick Input l\xE9trehozva!":"Quick Input sikertelen \u2014 nincs el\xE9rhet\u0151 projekt",t||this.globalError_CS.reportErrorOnly({message:"Send-to-Quick-Input returned false (likely: no available project or server-side validation reject)",source:"send-to-quick-input-no-result"})}catch(t){this.quickInputFeedback="Quick Input sikertelen";let r=t instanceof Error?`Send-to-Quick-Input threw: ${t.message}`:`Send-to-Quick-Input threw: ${String(t)}`;this.globalError_CS.reportErrorOnly({message:r,source:"send-to-quick-input-fail",stack:t instanceof Error?t.stack:void 0})}finally{this.isSendingToQuickInput_$.set(!1),setTimeout(()=>{this.quickInputFeedback=""},i.copyFeedbackResetMs)}}})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ve({type:i,selectors:[["app-ccap-error-display"]],inputs:{error:[1,"error"],sourceLabelOverride:[1,"sourceLabelOverride"],errorClientSource:[1,"errorClientSource"],ng0600Diagnostics:[1,"ng0600Diagnostics"],ng0203Diagnostics:[1,"ng0203Diagnostics"]},standalone:!0,features:[Me],decls:1,vars:1,consts:[[1,"border-2","border-neonRed","rounded-lg","bg-neutral-800","shadow-lg","flex","flex-col","max-h-full","min-h-0"],[1,"flex","items-center","justify-between","p-4","border-b","border-neonRed/50","shrink-0"],[1,"text-lg","font-semibold","text-red-400"],[1,"flex","items-center","gap-2"],["type","button","title","M\xE1sol\xE1s v\xE1g\xF3lapra","aria-label","M\xE1sol\xE1s v\xE1g\xF3lapra",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors",3,"click"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor",1,"h-5","w-5"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"],[1,"text-sm",3,"text-green-400","text-red-400"],["type","button","title","K\xFCld\xE9s Quick Input-ba","aria-label","K\xFCld\xE9s Quick Input-ba",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 19l9 2-9-18-9 18 9-2zm0 0v-8"],[1,"p-4","flex-1","min-h-0","overflow-y-auto","space-y-4","overscroll-contain"],[1,"text-sm","font-medium","text-neutral-400","mb-1"],[1,"text-neutral-100","break-words"],[1,"rounded-md","border","border-amber-600/60","bg-amber-950/40","p-3","space-y-2"],["type","button",1,"text-neutral-400","hover:text-neutral-200","text-sm","mb-1","text-left","w-full","flex","items-center","gap-1",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3","h-3","shrink-0","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"p-3","bg-neutral-900","rounded","text-xs","text-neutral-300","overflow-x-auto","whitespace-pre-wrap","break-words","max-h-[70vh]","overflow-y-auto"],[1,"text-sm"],[1,"text-sm","font-medium","text-amber-200/95"],[1,"list-disc","list-inside","space-y-1.5","text-xs","text-amber-100/90"],[1,"break-words"],[1,"pt-1","space-y-1"],[1,"text-xs","font-medium","text-neutral-400"],[1,"space-y-1","text-xs"],["target","_blank","rel","noopener noreferrer",1,"text-ccapAccent","hover:underline","break-all",3,"href"],[1,"text-neutral-300","text-sm"],[1,"text-neutral-300","text-sm","break-words"],[1,"text-xs","text-neutral-400","mb-2"],[1,"space-y-3","text-xs","text-neutral-300"],[1,"border","border-neutral-600","rounded-md","p-2","bg-neutral-900/80"],[1,"font-medium","text-neonCyan/90","mb-1"],[1,"whitespace-pre-wrap","break-words","text-neutral-400"]],template:function(t,r){t&1&&A(0,Ct,31,15,"div",0),t&2&&v(r.error()?0:-1)},dependencies:[we],encapsulation:2})}return i})();export{qe as a,ae as b,le as c,w as d,R as e,Be as f,dn as g,H as h,He as i,te as j,$n as k};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-QMUEXCRY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-WLOU5SXS.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-QD4P5KG4.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var L=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let S=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=S.trim().length>0?S.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=L.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
|
|
2
|
+
//# sourceMappingURL=chunk-RAAOEZGV.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as R,b as O}from"./chunk-
|
|
1
|
+
import{a as R,b as O}from"./chunk-UFL2VYVY.js";import{a as q}from"./chunk-LWQHWFYF.js";import{a as g}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-EYA2RBE7.js";import{e as P}from"./chunk-XJSUARFG.js";import{h as y,j as L}from"./chunk-FE2KT5H6.js";import{p as D}from"./chunk-QD4P5KG4.js";import{C as v,R as T,a as h,aa as p,b as f,h as E,k as d,y as A}from"./chunk-TBMJSIBB.js";var S=E(D());var _=class u{static compareAsc(C,e){let s=(C.sequence??0)-(e.sequence??0);if(s!==0)return s;let n=typeof C.timestamp=="string"?C.timestamp:"",t=typeof e.timestamp=="string"?e.timestamp:"",o=n.localeCompare(t);if(o!==0)return o;let i=typeof C.messageKey=="string"?C.messageKey:"",r=typeof e.messageKey=="string"?e.messageKey:"";return i.localeCompare(r)}static sortAsc(C){return[...C].sort(u.compareAsc)}};var M=E(D());var x=(()=>{class u{parent;agentToolUseIds=new Set;activeSubAgentId="";toolUseIdToName=new Map;init(e){this.parent=e}resetTrackingState(){this.toolUseIdToName.clear(),this.agentToolUseIds.clear(),this.activeSubAgentId=""}handleSocketEvent(e,s){let n=e.event,t=e.payload;try{let o=typeof t.ccapId=="string"?t.ccapId:"";if(n!=="cc:rate-limit-update"&&n!=="ext-session-msg:message"&&n!=="ext-session-msg:update"&&o&&s.selectedCcapId&&o!==s.selectedCcapId){M.DyFM_Log.info(`CCAP_CcSession_DS | socket event dropped by instance filter | event: ${n} | eventCcapId: ${o} | selectedCcapId: ${s.selectedCcapId}`);return}switch(n){case"cc-session:status":this.handleStatusUpdate(t);break;case"cc-session:output":this.handleOutputChunk(t);break;case"cc-session:event":this.handleSessionEvent(t);break;case"cc-session:list-update":this.handleListUpdate(t);break;case"cc-session:session-update":this.handleSessionItemUpdate(t);break;case"agent-events":this.handleAgentEvent(t);break;case"ext-session-msg:message":this.handleAssembledMessage(t);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(t);break;case"cc:rate-limit-update":this.handleRateLimitBroadcast(t);break}}catch(o){let i=o instanceof Error?o.message:String(o);M.DyFM_Log.error(`CCAP_CcSession_DS | socket event error | event: ${n}`,o),s.globalErrorShowError(o instanceof Error?o:new Error(`CC Session socket event processing failed: ${n} \u2014 ${i}`),"cc-session-socket-event")}}pushConsoleMessageFromEvent(e,s,n){let t=e.data;switch(e.eventType){case"response-chunk":{this.pushResponseChunkBlocks(t);break}case"tool-call-start":{let o=t.name??t.tool_name??"unknown",i=typeof t.id=="string"?t.id:"";i&&this.toolUseIdToName.set(i,o),o==="Agent"&&i&&this.agentToolUseIds.add(i);let r=t.input,a=r?u.summarizeToolInput(r):"",l=a?`${o}: ${a}`:o,c=o==="Edit"?u.buildEditExpandableContent(r):void 0,m=o==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:l,expandableContent:c,rawData:t,parentAgentId:m||void 0});break}case"tool-call-end":{let o=t.content??t.output,i=typeof o=="string"?o:"",r=i.length>200?i.substring(0,200)+"\u2026":i;if(r){let a=i.length>200?i:void 0;this.parent.pushConsoleMessage({type:"tool-result",text:r,expandableContent:a,rawData:t,parentAgentId:this.activeSubAgentId||void 0})}break}case"response-complete":{this.activeSubAgentId="";let o=t.cost_usd,i=typeof o=="number"?` ($${o.toFixed(4)})`:"",r=typeof t.model=="string"?` \xB7 ${t.model}`:"";this.parent.pushConsoleMessage({type:"result",text:`Response complete${r}${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)}),this.accumulateUsage(t);break}case"prompt-sent":{let o=typeof t.content=="string"?t.content:"";o&&(this.parent.consoleMessages_$().some(a=>a.type==="prompt"&&a.text===o.trim())||this.parent.pushConsoleMessage({type:"prompt",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}));break}case"status-change":{let o=typeof t.from=="string"?t.from:"",i=typeof t.to=="string"?t.to:"";if(i){let r=typeof t.statusMessage=="string"?t.statusMessage:void 0,a=o?`${o} \u2192 ${i}`:i,l=r?`${a} \u2014 ${r}`:a;this.parent.pushConsoleMessage({type:"status",text:l,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)})}break}case"config-change":{let o=t.update,i=o&&typeof o=="object"?Object.keys(o).join(", "):"unknown";this.parent.pushConsoleMessage({type:"info",text:`Config updated: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"error":{let o=typeof t.message=="string"?t.message:"Unknown error";this.parent.pushConsoleMessage({type:"error",text:o,rawData:t,expandableContent:JSON.stringify(t,null,2)}),s&&n(new Error(`CC Session error: ${o}`),"cc-session-event");break}case"usage-update":{this.accumulateUsage(t);break}case"cli-chunk":{this.handleCliChunkEvent(t);break}case"runner-overflow":{let i=`Runner buffer overflow: ${typeof t.droppedCount=="number"?t.droppedCount:0} output items lost during server disconnect`;this.parent.pushConsoleMessage({type:"error",text:i,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"interrupted-prompt":{let o=typeof t.reason=="string"?t.reason:"",i=typeof t.lastPrompt=="string"?t.lastPrompt:"",r=i.length>80?i.substring(0,80)+"\u2026":i,a=r?`Prompt interrupted (${o}): "${r}"`:`Prompt interrupted${o?" ("+o+")":""}`;this.parent.pushConsoleMessage({type:"status",text:a,isStatus:!0,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"session-init":{let o=typeof t.model=="string"?t.model:"",i=typeof t.claudeCodeVersion=="string"?t.claudeCodeVersion:"",r=typeof t.permissionMode=="string"?t.permissionMode:"",a=[];o&&a.push(o),r&&a.push(r),i&&a.push(`v${i}`);let l=a.length>0?`CLI init: ${a.join(" \xB7 ")}`:"CLI initialized",c=JSON.stringify(t,null,2);this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:c});break}case"config-mismatch":{let o=t.mismatches,i=Array.isArray(o)?o.map(r=>`${r.field}: requested "${r.requested}" \u2192 actual "${r.actual}"`).join(", "):"unknown mismatch";this.parent.pushConsoleMessage({type:"error",text:`Config mismatch: ${i}`,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"cli-args-record":{let o=typeof t.model=="string"?t.model:"default",i=typeof t.reasoningEffort=="string"?t.reasoningEffort:"default",r=typeof t.mode=="string"?t.mode:"normal",a=typeof t.permissionPolicy=="string"?t.permissionPolicy:"default",l=`CLI spawn: model=${o} \xB7 effort=${i} \xB7 mode=${r} \xB7 permission=${a}`;this.parent.pushConsoleMessage({type:"info",text:l,rawData:t,expandableContent:JSON.stringify(t,null,2)});break}case"stdout-line":case"stderr-line":break;default:{let o=e.eventType;this.parent.pushConsoleMessage({type:"raw",text:o,rawData:t});break}}}handleStatusUpdate(e){let s=e.sessionId??"",n=e.status??"",t=e.statusMessage;this.parent.lastStatusUpdate_$.set({sessionId:s,status:n,statusMessage:t});let i=this.parent.sessions_$().map(a=>a.sessionId===s?f(h({},a),{status:n,statusMessage:t}):a);this.parent.sessions_$.set(i);let r=this.parent.selectedSession_$();if(r?.session.sessionId===s){let a=u.isLiveCcSessionStatus(n);this.parent.selectedSession_$.set(f(h({},r),{session:f(h({},r.session),{status:n,statusMessage:t}),runtime:f(h({},r.runtime),{isLive:a,runtimeStatus:n})}))}if(n==="errored"){let a=(t??"").trim();if(a.startsWith("Auto-recovery: terminal runner dropped silently")||a.startsWith("Exit code:"))M.DyFM_Log.warn(`CCAP_CcSession | user-task-fail diagnostic (NOT recorded to /errors) | sessionId: ${s} | statusMessage: ${a}`);else{let c=t?`CC Session error (${s}): ${t}`:`CC Session error (${s}): session entered errored state`;this.parent.showGlobalError(new Error(c),"cc-session-status")}}this.parent.evaluateSessionEventsPolling()}handleOutputChunk(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.content??"",t=e.type??"stdout",o=this.parent.liveOutput_$(),i=n.split(`
|
|
2
2
|
`),r=3e3;if(t==="stderr"){let c=new Set(this.parent.liveStderrLines_$()),m=o.length;for(let b=0;b<i.length;b++)c.add(m+b);this.parent.liveStderrLines_$.set(c)}let l=[...o,...i];if(l.length>r){let c=l.length-r,m=l.slice(c),b=this.parent.liveStderrLines_$(),I=new Set;for(let w of b){let $=w-c;$>=0&&I.add($)}this.parent.liveStderrLines_$.set(I),this.parent.liveOutput_$.set(m)}else this.parent.liveOutput_$.set(l)}handleSessionEvent(e){let s=e.sessionId??"";if(s&&s!==this.parent.activeSessionId_$())return;let n=e.event??{},t={sessionId:s,eventType:n.eventType??"",timestamp:n.timestamp??"",data:n.data??{},sequence:n.sequence??0,eventSource:typeof n.eventSource=="string"?n.eventSource:void 0};if(t.sequence<=this.parent.getLastKnownEventSequence())return;this.parent.setLastKnownEventSequence(t.sequence);let o=this.parent.selectedSessionEvents_$();this.parent.selectedSessionEvents_$.set([...o,t]),this.pushConsoleMessageFromEvent(t,!0,(i,r)=>{this.parent.showGlobalError(i,r)})}handleAgentEvent(e){let s=typeof e.phase=="string"?e.phase:void 0;if(s)switch(s){case g.runInitialization:this.parent.pushConsoleMessage({type:"status",text:"RUN initialization",isStatus:!0});break;case g.analyze:this.parent.pushConsoleMessage({type:"status",text:"Analyzing incoming message",isStatus:!0});break;case g.analyzeResult:{let n=typeof e.runIntent=="string"?e.runIntent:"";n&&this.parent.pushConsoleMessage({type:"run-intent",text:n,isStatus:!1});break}case g.assemble:this.parent.pushConsoleMessage({type:"status",text:"Refreshing Context",isStatus:!0});break;case g.executionStart:this.parent.pushConsoleMessage({type:"status",text:"Starting Agent",isStatus:!0});break;case g.llmAgenticLoop:this.parent.pushConsoleMessage({type:"status",text:"Selecting next move",isStatus:!0});break;case g.agenticLoopIteration:{let n=typeof e.action=="string"?e.action:"",t=typeof e.tool=="string"?e.tool:"",o=typeof e.intent=="string"?e.intent:"",i=[];n&&i.push(n),t&&i.push(t),o&&i.push(o);let r=i.join(" \xB7 ");r&&this.parent.pushConsoleMessage({type:"iteration",text:r,isStatus:!1});break}case g.llmToolDescription:this.parent.pushConsoleMessage({type:"status",text:"Assembling tool inputs",isStatus:!0});break;case g.llmToolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Figuring out what's wrong",isStatus:!0});break;case g.toolErrorRetry:this.parent.pushConsoleMessage({type:"status",text:"Trying to fix inputs",isStatus:!0});break;case g.executionEnd:this.parent.pushConsoleMessage({type:"status",text:"Finishing run",isStatus:!0});break;case g.finalization:case g.llmRunFinalization:this.parent.pushConsoleMessage({type:"status",text:"Gathering what we've done",isStatus:!0});break;case g.postFinalization:this.parent.pushConsoleMessage({type:"status",text:"Memorizing stuff",isStatus:!0});break;case g.runFlowComplete:this.parent.pushConsoleMessage({type:"status",text:"Getting back to user",isStatus:!0});break}}handleRateLimitBroadcast(e){let s=e.rate_limit_info;if(!s||typeof s!="object")return;let n=s,t={status:typeof n.status=="string"?n.status:"",resetsAt:typeof n.resetsAt=="number"?n.resetsAt:0,rateLimitType:typeof n.rateLimitType=="string"?n.rateLimitType:"",utilization:typeof n.utilization=="number"?n.utilization:0,surpassedThreshold:typeof n.surpassedThreshold=="number"?n.surpassedThreshold:0,isUsingOverage:n.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(t)}handleListUpdate(e){let s=e.sessions??[],o=[...this.parent.sessions_$().some(i=>i.isArchived===!0)?s:s.filter(i=>!i.isArchived)].sort((i,r)=>{let a=i.lastActivityAt?new Date(i.lastActivityAt).getTime():0;return(r.lastActivityAt?new Date(r.lastActivityAt).getTime():0)-a});this.parent.sessions_$.set(o),this.mergeActiveSessionDetail(s)}handleSessionItemUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s)return;let n=typeof e.update=="object"&&e.update!==null?e.update:{},o=this.parent.sessions_$().map(r=>r.sessionId!==s?r:u.applySessionFieldUpdate(r,n));this.parent.sessions_$.set(o);let i=this.parent.selectedSession_$();i?.session.sessionId===s&&this.parent.selectedSession_$.set(f(h({},i),{session:u.applySessionFieldUpdate(i.session,n)}))}static applySessionFieldUpdate(e,s){let n=h({},e);return typeof s.toolCallCountIncrement=="number"&&(n.toolCallCount=(n.toolCallCount??0)+s.toolCallCountIncrement),typeof s.promptCountIncrement=="number"&&(n.promptCount=(n.promptCount??0)+s.promptCountIncrement),typeof s.inputTokensIncrement=="number"&&(n.inputTokensTotal=(n.inputTokensTotal??0)+s.inputTokensIncrement),typeof s.outputTokensIncrement=="number"&&(n.outputTokensTotal=(n.outputTokensTotal??0)+s.outputTokensIncrement),typeof s.costUsdIncrement=="number"&&(n.costUsdTotal=(n.costUsdTotal??0)+s.costUsdIncrement),typeof s.status=="string"&&(n.status=s.status),(typeof s.statusMessage=="string"||s.statusMessage===void 0)&&(n.statusMessage=s.statusMessage),typeof s.lastActivityAt=="string"&&(n.lastActivityAt=s.lastActivityAt),typeof s.lastPrompt=="string"&&(n.lastPrompt=s.lastPrompt),typeof s.activeModel=="string"&&(n.activeModel=s.activeModel),n}mergeActiveSessionDetail(e){let s=this.parent.activeSessionId_$();if(!s)return;let n=this.parent.selectedSession_$();if(!n)return;let t=e.find(o=>o.sessionId===s);t&&this.parent.selectedSession_$.set(f(h({},n),{session:h(h({},n.session),t)}))}handleAssembledMessage(e){let s=typeof e.sessionId=="string"?e.sessionId:"",n=this.parent.activeSessionId_$();if(!s||s!==n)return;let t=e.message;if(!t||typeof t!="object"){M.DyFM_Log.warn("CCAP_CcSession_DS | handleAssembledMessage dropped: invalid message payload",{sessionId:s,payloadKeys:Object.keys(e)});return}let o=t,i=this.parent.assembledMessages_$(),r=typeof o.messageKey=="string"?o.messageKey:"";r&&i.some(a=>a.messageKey===r)||this.parent.assembledMessages_$.set(_.sortAsc([...i,o]))}handleAssembledMessageUpdate(e){let s=typeof e.sessionId=="string"?e.sessionId:"";if(!s||s!==this.parent.activeSessionId_$())return;let n=typeof e.messageKey=="string"?e.messageKey:"";if(!n)return;let t=e.update;if(!t||typeof t!="object")return;let o=t,i=this.parent.assembledMessages_$(),r=i.findIndex(c=>c.messageKey===n);if(r<0)return;let a=h({},i[r]);typeof o.bodyText=="string"&&(a.bodyText=o.bodyText),o.toolResult!==void 0&&(a.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(a.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(a.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let l=[...i];l[r]=a,this.parent.assembledMessages_$.set(l)}handleCliChunkEvent(e){let s=typeof e.type=="string"?e.type:"";if(s==="rate_limit_event"){let n=e.rate_limit_info;if(n&&typeof n=="object"){let t=n,o={status:typeof t.status=="string"?t.status:"",resetsAt:typeof t.resetsAt=="number"?t.resetsAt:0,rateLimitType:typeof t.rateLimitType=="string"?t.rateLimitType:"",utilization:typeof t.utilization=="number"?t.utilization:0,surpassedThreshold:typeof t.surpassedThreshold=="number"?t.surpassedThreshold:0,isUsingOverage:t.isUsingOverage===!0,receivedAt:new Date().toISOString()};this.parent.rateLimitInfo_$.set(o)}return}if(s==="system"){this.handleCliChunkSystemEvent(e);return}this.handleCliChunkToolResults(e)||this.parent.pushConsoleMessage({type:"raw",text:s||"cli-chunk",rawData:e})}handleCliChunkSystemEvent(e){let s=typeof e.subtype=="string"?e.subtype:"",n=typeof e.description=="string"?e.description:u.buildSystemEventBrief({subtype:s,data:e}),t=typeof e.tool_use_id=="string"?e.tool_use_id:"";t&&this.agentToolUseIds.has(t)&&(this.activeSubAgentId=t);let o=t&&this.agentToolUseIds.has(t)?t:this.activeSubAgentId||void 0,i=typeof e.last_tool_name=="string"?e.last_tool_name:"";if(s==="task_progress"&&i){this.parent.pushConsoleMessage({type:"tool",text:`${i}: ${n}`,isStatus:!1,rawData:e,parentAgentId:o});return}this.parent.pushConsoleMessage({type:"status-update",text:n,subtype:s,isStatus:!1,rawData:e,parentAgentId:o})}pushResponseChunkBlocks(e){let s=e.message,n=s&&typeof s=="object"?s.content:e.content;if(Array.isArray(n)){for(let t of n){if(!t||typeof t!="object")continue;let o=t,i=typeof o.type=="string"?o.type:"";if(i==="text"){let r=typeof o.text=="string"?o.text:"";r&&(this.activeSubAgentId="",this.parent.pushConsoleMessage({type:"assistant",text:r,rawData:e}))}else if(i==="tool_use")this.handleResponseChunkToolUse(o,e);else if(i==="tool_result")this.handleResponseChunkToolResult(o);else if(i==="thinking"){let r=typeof o.thinking=="string"?o.thinking:"";r&&this.parent.pushConsoleMessage({type:"thinking",text:r,rawData:o,parentAgentId:this.activeSubAgentId||void 0})}else i&&this.parent.pushConsoleMessage({type:"raw",text:i,rawData:o})}return}if(typeof n=="string"&&n){this.parent.pushConsoleMessage({type:"assistant",text:n,rawData:e});return}this.parent.pushConsoleMessage({type:"raw",text:"response-chunk",rawData:e})}handleResponseChunkToolUse(e,s){let n=typeof e.name=="string"?e.name:"unknown",t=typeof e.id=="string"?e.id:"";t&&this.toolUseIdToName.set(t,n),n==="Agent"&&t&&this.agentToolUseIds.add(t);let o=e.input,i=o?u.summarizeToolInput(o):"",r=i?`${n}: ${i}`:n,a=n==="Edit"?u.buildEditExpandableContent(o):void 0,l=n==="Agent"?"":this.activeSubAgentId;this.parent.pushConsoleMessage({type:"tool",text:r,expandableContent:a,rawData:e,parentAgentId:l||void 0})}handleResponseChunkToolResult(e){let s=typeof e.tool_use_id=="string"?e.tool_use_id:"",n=s&&this.agentToolUseIds.has(s)?s:this.activeSubAgentId||"",t=e.content??e.output,o=typeof t=="string"?t:"",i=o.length>200?o.substring(0,200)+"\u2026":o||"tool_result";this.parent.pushConsoleMessage({type:"tool-result",text:i,expandableContent:o.length>200?o:void 0,rawData:e,parentAgentId:n||void 0})}handleCliChunkToolResults(e){if((typeof e.type=="string"?e.type:"")!=="user")return!1;let n=e.message,t=n&&typeof n=="object"?n.content:null;if(!Array.isArray(t))return!1;let o=typeof e.parent_tool_use_id=="string"?e.parent_tool_use_id:"",i=!1;for(let r of t){if(!r||typeof r!="object")continue;let a=r,l=typeof a.type=="string"?a.type:"";if(l==="tool_result"){let c=typeof a.tool_use_id=="string"?a.tool_use_id:"",m=c?this.toolUseIdToName.get(c)??"":"",b=a.content,I=typeof b=="string"?b:"",w=a.is_error===!0,$=m?`${m}: `:"",k=I.length>200?I.substring(0,200)+"\u2026":I||"tool result",F=w?`${$}ERROR \u2014 ${k}`:`${$}${k}`;this.parent.pushConsoleMessage({type:"tool-result",text:F,expandableContent:I.length>200?I:void 0,rawData:f(h({},a),{parent_tool_use_id:o||void 0}),parentAgentId:o||void 0}),i=!0}else if(l==="text"&&o){let c=typeof a.text=="string"?a.text:"";if(c){let m=c.length>200?c.substring(0,200)+"\u2026":c;this.parent.pushConsoleMessage({type:"tool-result",text:m,expandableContent:c.length>200?c:void 0,rawData:{tool_use_id:o,type:"sub-agent-prompt",text:c},parentAgentId:o}),i=!0}}}return i}static isLiveCcSessionStatus(e){return e==="running"||e==="waiting-input"||e==="starting"}static buildSystemEventBrief(e){switch(e.subtype){case"init":{let s=typeof e.data.cwd=="string"?e.data.cwd:"",n=typeof e.data.model=="string"?e.data.model:"",t=["init"];return s&&t.push(s),n&&t.push(n),t.join(" \xB7 ")}case"task_updated":{let s=e.data.patch,n=s&&typeof s=="object"&&typeof s.status=="string"?s.status:"";return n?`task ${n}`:"task updated"}case"task_notification":{let s=typeof e.data.status=="string"?e.data.status:"";return s?`task ${s}`:"task notification"}default:return e.subtype||"system"}}static buildEditExpandableContent(e){if(!e||typeof e!="object")return;let s=e,n=s.old_string,t=s.new_string;if(typeof n!="string"||typeof t!="string")return;let o=500,i=n.length>o?n.substring(0,o)+"\u2026":n,r=t.length>o?t.substring(0,o)+"\u2026":t;return JSON.stringify({old:i,new:r})}static summarizeToolInput(e){if(typeof e=="string")return e.length>120?e.substring(0,120)+"\u2026":e;if(e&&typeof e=="object"){let s=e,n=s.file_path??s.path,t=s.command,o=s.pattern;if(typeof n=="string")return n;if(typeof t=="string")return t.length>120?t.substring(0,120)+"\u2026":t;if(typeof o=="string")return o}return""}accumulateUsage(e){let s=e.usage,n=typeof e.cost_usd=="number"?e.cost_usd:0,t=0,o=0;if(s&&typeof s=="object"){let r=s;t=typeof r.input_tokens=="number"?r.input_tokens:typeof r.promptTokens=="number"?r.promptTokens:0,o=typeof r.output_tokens=="number"?r.output_tokens:typeof r.completionTokens=="number"?r.completionTokens:0}let i=this.parent.sessionUsage_$();this.parent.sessionUsage_$.set({promptTokens:i.promptTokens+t,completionTokens:i.completionTokens+o,totalTokens:i.totalTokens+t+o,costUsd:i.costUsd+n})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();var ne=(()=>{class u{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);liveOutput_$=p([]);liveStderrLines_$=p(new Set);consoleMessages_$=p([]);assembledMessages_$=p([]);assembledMessagesHasMore_$=p(!1);isLoadingOlderMessages_$=p(!1);assembledMessagesLoaded_$=p(!1);lastStatusUpdate_$=p(null);sessionUsage_$=p({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0});rateLimitInfo_$=p(null);activeSessionId_$=p("");ccSession_AS=v(R);extSessionMsg_AS=v(q);globalError_CS=v(L);socket_CS=v(P);ngZone=v(T);peiContext_DS=v(U);socketEventHandler_CS=v(x);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;static SESSION_EVENTS_POLL_INTERVAL_MS=5*S.second;sessionEventsPollHandle=null;isSessionEventsPollInFlight=!1;constructor(){this.socketEventHandler_CS.init(this),this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.ngZone.run(()=>{this.socketEventHandler_CS.handleSocketEvent(e,{selectedCcapId:this.peiContext_DS.activeCcapId_$(),globalErrorShowError:(s,n)=>{this.globalError_CS.showError(s,n)}})})}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(!e)return;let s=this.activeSessionId_$();s&&(this.socket_CS.emit("cc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{}),this.loadSessionDetail({sessionId:s}).catch(()=>{})),this.loadSessions().catch(()=>{}),this.backfillMissedEvents()})}ngOnDestroy(){this.stopSessionEventsPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}showGlobalError(e,s){this.globalError_CS.showError(e,s)}getLastKnownEventSequence(){return this.lastKnownEventSequence}setLastKnownEventSequence(e){this.lastKnownEventSequence=e}evaluateSessionEventsPolling(){let e=this.activeSessionId_$(),s=this.resolveActiveSessionStatusForEventsPolling();!!(e&&this.lastKnownEventSequence>=0&&s!=null&&x.isLiveCcSessionStatus(s))?this.ensureSessionEventsPollingStarted():this.stopSessionEventsPolling()}loadSessions(e){return d(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let n=[...(yield this.ccSession_AS.listSessions({status:e?.status,workspacePath:e?.workspacePath,includeArchived:e?.includeArchived})).sessions].sort((t,o)=>{let i=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(n)}catch(s){this.sessionsLoadError_$.set(s)}finally{this.sessionsLoading_$.set(!1)}})}loadPersistedRateLimitState(e){return d(this,null,function*(){let s=e.ccapId?.trim()??"";if(s)try{let n=yield this.ccSession_AS.getRateLimitState({ccapId:s});this.mergePersistedRateLimitState(n.items)}catch(n){S.DyFM_Log.warn(`ClaudeCode_DS | loadPersistedRateLimitState failed (non-blocking) | ccapId: ${s} | ${n instanceof Error?n.message:String(n)}`)}})}mergePersistedRateLimitState(e){if(this.rateLimitInfo_$()!==null)return;let s=O.mapServerItemsToClientInfo(e);s!==null&&this.rateLimitInfo_$.set(s)}loadSessionDetail(e){return d(this,null,function*(){this.selectedSessionLoading_$.set(!0);try{let s=yield this.ccSession_AS.getSession({sessionId:e.sessionId}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionDetail stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSession_$.set(s)}catch(s){let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSession_$.set(null);let t=s instanceof Error?s.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${t}`})}finally{this.selectedSessionLoading_$.set(!1),this.evaluateSessionEventsPolling()}})}loadSessionEvents(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.getSessionEvents({sessionId:e.sessionId,eventType:e.eventType,limit:e.limit??500,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadSessionEvents stale response \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n}`);return}this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let t of s.events)this.socketEventHandler_CS.pushConsoleMessageFromEvent(t,!1,(o,i)=>{this.globalError_CS.showError(o,i)});this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{})}catch{let n=this.activeSessionId_$();if(n&&n!==e.sessionId)return;this.selectedSessionEvents_$.set([])}finally{this.evaluateSessionEventsPolling()}})}createSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.createSession(e),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(e){return d(this,null,function*(){let s=e.attachments?.filter(n=>n.isImage&&!!n.base64).map(n=>`data:${n.mimeType};base64,${n.base64}`);this.pushConsoleMessage({type:"prompt",text:e.content,imageDataUrls:s?.length?s:void 0});try{let n=yield this.ccSession_AS.sendPrompt(e);n.relayed&&(n.targetOnline?this.pushConsoleMessage({type:"info",text:`Prompt relayed to remote instance (task: ${n.taskId?.substring(0,8)}\u2026)`}):this.pushConsoleMessage({type:"error",text:`\u26A0 A t\xE1voli instance jelenleg offline \u2014 a prompt queue-ban v\xE1rakozik (task: ${n.taskId?.substring(0,8)}\u2026) \xE9s csak akkor k\xE9zbes\xEDt\u0151dik, ha a target instance online lesz. Ellen\u0151rizd, hogy mindk\xE9t instance fut, \xE9s a Settings \u2192 Cluster sharedSecret azonos.`})),this.evaluateSessionEventsPolling()}catch(n){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${y.getErrorMessageForDisplay(n)}`}),this.globalError_CS.showError(n,"CC Session sendPrompt"),n}})}forkSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.forkSession({sessionId:e.sessionId,label:e.label}),n=String(s.session.sessionId||"");return yield this.loadSessions(),n}catch(s){throw this.pushConsoleMessage({type:"error",text:`Fork session failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}resumeSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.resumeSession(e);s.relayed&&this.pushConsoleMessage({type:"info",text:s.targetOnline?"Resume relayed to remote instance":"Resume queued for offline remote instance"}),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Resume failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.stopExecution(e);if(s.relayed){this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Stop execution relayed to remote instance":"Stop execution queued for offline remote instance",role:"info"});return}let n=s.message||"Execution stopped";this.pushSystemAssembledMessage({sessionId:e.sessionId,text:n,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Stop execution failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}terminateSession(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.terminateSession(e);s.relayed?this.pushSystemAssembledMessage({sessionId:e.sessionId,text:s.targetOnline?"Terminate relayed to remote instance":"Terminate queued for offline remote instance",role:"info"}):this.pushSystemAssembledMessage({sessionId:e.sessionId,text:"Session terminated",role:"status"}),yield this.loadSessions()}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Terminate failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}restartRunner(e){return d(this,null,function*(){try{let s=yield this.ccSession_AS.restartRunner(e);this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restarted (new terminalId: ${s.newTerminalId.slice(0,8)}\u2026). New terminal window should open shortly.`,role:"info"})}catch(s){throw this.pushSystemAssembledMessage({sessionId:e.sessionId,text:`Runner restart failed: ${y.getErrorMessageForDisplay(s)}`,role:"error"}),s}})}setSessionArchived(e){return d(this,null,function*(){try{yield this.ccSession_AS.setSessionArchived(e),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(e){return d(this,null,function*(){try{yield this.ccSession_AS.updateSessionConfig(e);let s=this.selectedSession_$();if(s?.session.sessionId===e.sessionId){let n=h({},s.session);e.label!=null&&(n.label=e.label),e.mode!=null&&(n.mode=e.mode),e.permissionPolicy!=null&&(n.permissionPolicy=e.permissionPolicy),e.reasoningEffort!=null&&(n.reasoningEffort=e.reasoningEffort),e.model!=null&&(n.model=e.model),e.isDebugMode!=null&&(n.isDebugMode=e.isDebugMode),this.selectedSession_$.set(f(h({},s),{session:n}))}if(e.label!=null){let n=this.sessions_$(),t=n.findIndex(o=>o.sessionId===e.sessionId);if(t>=0){let o=[...n];o[t]=f(h({},o[t]),{label:e.label}),this.sessions_$.set(o)}}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${y.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(e){let s=this.activeSessionId_$();s!==e&&this.stopSessionEventsPolling(),s&&s!==e&&this.socket_CS.emit("cc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("cc-session:subscribe",{sessionId:e})}clearLiveOutput(){this.stopSessionEventsPolling(),this.liveOutput_$.set([]),this.liveStderrLines_$.set(new Set),this.consoleMessages_$.set([]),this.assembledMessages_$.set([]),this.assembledMessagesHasMore_$.set(!1),this.isLoadingOlderMessages_$.set(!1),this.assembledMessagesLoaded_$.set(!1),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.lastStatusUpdate_$.set(null),this.sessionUsage_$.set({promptTokens:0,completionTokens:0,totalTokens:0,costUsd:0}),this.lastKnownEventSequence=-1,this.socketEventHandler_CS.resetTrackingState()}pushConsoleMessage(e){let s=e.type==="assistant"||e.type==="prompt"?e.text.trim():e.text,n={listKey:e.listKey??this.allocateConsoleListKey(),type:e.type,text:s,timestamp:e.timestamp??new Date().toISOString(),isStatus:e.isStatus??!1,expandableContent:e.expandableContent,rawData:e.rawData,subtype:e.subtype,parentAgentId:e.parentAgentId,imageDataUrls:e.imageDataUrls},t=this.consoleMessages_$();this.consoleMessages_$.set([...t,n])}loadAssembledMessages(e){return d(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0}),n=this.activeSessionId_$();if(n&&n!==e.sessionId){S.DyFM_Log.info(`CCAP_CcSession_DS | loadAssembledMessages stale \u2014 discarded | requestedSessionId: ${e.sessionId} | currentActiveSessionId: ${n} | restMessageCount: ${s.messages.length}`);return}let t=this.assembledMessages_$(),o=new Set(s.messages.map(r=>r.messageKey).filter(r=>typeof r=="string"&&r.length>0)),i=t.filter(r=>!o.has(r.messageKey));this.assembledMessages_$.set(_.sortAsc([...s.messages,...i])),this.assembledMessagesHasMore_$.set(s.hasMore)}catch(s){S.DyFM_Log.error(`CCAP_CcSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,s)}finally{this.assembledMessagesLoaded_$.set(!0)}})}loadOlderAssembledMessages(e){return d(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let s=this.assembledMessages_$();if(!s.length)return;let n=s.reduce((t,o)=>(o.sequence??0)<t?o.sequence??0:t,s[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,beforeSequence:n,limit:e.limit??50});t.messages.length&&this.assembledMessages_$.set(_.sortAsc([...t.messages,...s])),this.assembledMessagesHasMore_$.set(t.hasMore)}catch(t){S.DyFM_Log.error(`CCAP_CcSession_DS | loadOlderAssembledMessages failed | sessionId: ${e.sessionId}`,t)}finally{this.isLoadingOlderMessages_$.set(!1)}})}pushSystemAssembledMessage(e){let s=this.assembledMessages_$(),n=s.length?s.reduce((o,i)=>(i.sequence??0)>o?i.sequence??0:o,0):0,t={messageKey:`sys-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,sessionId:e.sessionId,sessionType:"cc",messageRole:e.role,bodyText:e.text,timestamp:new Date().toISOString(),sequence:n+1};this.assembledMessages_$.set(_.sortAsc([...s,t])),this.pushConsoleMessage({type:e.role==="error"?"error":e.role==="status"?"status":"info",text:e.text,isStatus:e.role==="status"})}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pullEventsSinceLastKnownSequence(e){return d(this,null,function*(){let s=this.activeSessionId_$();if(!(!s||this.lastKnownEventSequence<0))try{let t=(yield this.ccSession_AS.getSessionEvents({sessionId:s,sinceSequence:this.lastKnownEventSequence})).events;if(!t.length)return;this.ngZone.run(()=>{let o=this.activeSessionId_$();if(o!==s){S.DyFM_Log.info(`CCAP_CcSession_DS | pull(${e}) stale \u2014 discarded | requestedSessionId: ${s} | currentActiveSessionId: ${o} | newEventCount: ${t.length}`);return}let i=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...i,...t]);for(let r of t)this.socketEventHandler_CS.pushConsoleMessageFromEvent(r,!0,(a,l)=>{this.globalError_CS.showError(a,l)});this.updateLastKnownSequence(t)})}catch(n){let t=e==="poll"?"session events poll failed":"backfill failed";S.DyFM_Log.warn(`CCAP_CcSession_DS | ${t}`,n)}})}backfillMissedEvents(){return d(this,null,function*(){yield this.pullEventsSinceLastKnownSequence("backfill")})}updateLastKnownSequence(e){for(let s of e)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}resolveActiveSessionStatusForEventsPolling(){let e=this.activeSessionId_$();if(!e)return null;let s=this.selectedSession_$();if(s?.session.sessionId===e)return s.session.status;let n=this.lastStatusUpdate_$();return n?.sessionId===e?n.status:this.sessions_$().find(o=>o.sessionId===e)?.status??null}ensureSessionEventsPollingStarted(){this.sessionEventsPollHandle===null&&(this.sessionEventsPollHandle=setInterval(()=>{this.onSessionEventsPollTick()},u.SESSION_EVENTS_POLL_INTERVAL_MS))}stopSessionEventsPolling(){this.sessionEventsPollHandle!==null&&(clearInterval(this.sessionEventsPollHandle),this.sessionEventsPollHandle=null),this.isSessionEventsPollInFlight=!1}onSessionEventsPollTick(){return d(this,null,function*(){if(!this.isSessionEventsPollInFlight){this.isSessionEventsPollInFlight=!0;try{yield this.pullEventsSinceLastKnownSequence("poll");let e=this.activeSessionId_$();e&&(yield this.loadAssembledMessages({sessionId:e}))}finally{this.isSessionEventsPollInFlight=!1}}})}static \u0275fac=function(s){return new(s||u)};static \u0275prov=A({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();export{ne as a};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-S6HMYXEK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as s}from"./chunk-QMUEXCRY.js";var r="ccap-personaSoulDraft";function p(){try{let o=localStorage.getItem(r);if(!o)return null;let n=s.tryParseStrict({text:o,contextLabel:"CCAP_PersonaDraft_localStorage"});if(!n.ok)return null;let e=n.value;if(typeof e!="object"||e===null)return null;let t=Object.fromEntries(Object.entries(e)),a=typeof t.name=="string"?t.name:"",c=typeof t.personality=="string"?t.personality:"",i=typeof t.conversation_style=="string"?t.conversation_style:"",l=typeof t.work_style=="string"?t.work_style:"",f=typeof t.mission=="string"?t.mission:"",y=typeof t.avoid=="string"?t.avoid:"";return{name:a,personality:c,conversation_style:i,work_style:l,mission:f,avoid:y}}catch{return null}}function g(o){try{localStorage.setItem(r,JSON.stringify(o))}catch{}}function u(){try{localStorage.removeItem(r)}catch{}}var m={get:p,save:g,clear:u};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TMTQY7R3.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
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+`>
|
|
1
|
+
import{b as ri,c as si,d as Te}from"./chunk-U4NGSS7V.js";import{c as oi}from"./chunk-RAAOEZGV.js";import{a as ai}from"./chunk-WLB3DBNI.js";import{a as ii}from"./chunk-B3D3QXEY.js";import{a as li}from"./chunk-EI66XTWY.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-FE2KT5H6.js";import{p as ao}from"./chunk-QD4P5KG4.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-TPIYQSPE.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-4SEK2OVV.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
|
|
2
2
|
`).length}};export{a,u as b,d as c,s as d};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-U4NGSS7V.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-EYA2RBE7.js";import{I as m}from"./chunk-QD4P5KG4.js";import{C as l,d,p as i,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class n{baseUrl=`${m.api.baseUrl}/cc-session`;http=l(I);peiContext_DS=l(S);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(t){let e=this.currentCcapId();return e?t.set("ccapId",e):t}createSession(t){let e=this.withCcapId(new r);return i(this.http.post(this.baseUrl,t,{params:e}))}listSessions(t){let e=this.withCcapId(new r);return t?.status&&(e=e.set("status",t.status)),t?.workspacePath&&(e=e.set("workspacePath",t.workspacePath)),t?.includeArchived&&(e=e.set("includeArchived","1")),t?.limit!=null&&(e=e.set("limit",String(t.limit))),t?.offset!=null&&(e=e.set("offset",String(t.offset))),i(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return i(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:e}))}sendPrompt(t){let e={content:t.content};t.attachments?.length&&(e.attachments=t.attachments);let s=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/resume`,{},{params:e}))}forkSession(t){let e={};t.label&&(e.label=t.label);let s=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=d(a,["sessionId"]),o=this.withCcapId(new r);return i(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return i(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:e}))}getSessionEvents(t){let e=this.withCcapId(new r);return t.eventType&&(e=e.set("eventType",t.eventType)),t.since&&(e=e.set("since",t.since)),t.sinceSequence!=null&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(e=e.set("limit",String(t.limit))),t.offset!=null&&(e=e.set("offset",String(t.offset))),t.latest&&(e=e.set("latest","1")),i(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return i(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}getSessionEventStreamUrl(t){let e=`${this.baseUrl}/${t.sessionId}/events/stream`,s=this.currentCcapId();return s?`${e}?ccapId=${encodeURIComponent(s)}`:e}static \u0275fac=function(e){return new(e||n)};static \u0275prov=f({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var C=(()=>{class n{static DEFAULT_SURPASSED_THRESHOLD=.8;static mapServerItemsToClientInfo(t){if(!t||!Array.isArray(t)||t.length===0)return null;let e=t.filter(u=>typeof u?.rateLimitType=="string"&&u.rateLimitType.length>0);if(e.length===0)return null;let s=n.pickMostRelevantItem(e),o=typeof s.utilization=="number"?Math.max(0,Math.min(1,s.utilization)):0,a=typeof s.resetsAtMs=="number"&&s.resetsAtMs>0?s.resetsAtMs:0,c=a>0?Math.floor(a/1e3):0,h=n.mapStatus(s.lastObservedStatus),p=n.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:n.DEFAULT_SURPASSED_THRESHOLD,isUsingOverage:!1,receivedAt:p}}static pickMostRelevantItem(t){let e=o=>o==="reached"?2:o==="approaching"?1:0;return[...t].sort((o,a)=>{let c=e(a.lastObservedStatus)-e(o.lastObservedStatus);if(c!==0)return c;let h=(a.utilization??0)-(o.utilization??0);if(Math.abs(h)>1e-4)return h>0?1:-1;let p=n.readObservedAtMs(o.observedAt);return n.readObservedAtMs(a.observedAt)-p})[0]}static mapStatus(t){return t==="reached"?"limited":t==="approaching"?"allowed_warning":"allowed"}static readObservedAtMs(t){if(!t)return 0;if(t instanceof Date)return t.getTime();let e=Date.parse(t);return isNaN(e)?0:e}static readObservedAtIso(t){if(!t)return new Date().toISOString();if(t instanceof Date)return t.toISOString();let e=Date.parse(t);return isNaN(e)?new Date().toISOString():new Date(e).toISOString()}}return n})();export{P as a,C as b};
|
|
2
|
+
//# sourceMappingURL=chunk-UFL2VYVY.js.map
|