@memberjunction/ng-composer 6.1.0-edge.5 → 6.1.0-edge.7

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.
@@ -282,7 +282,7 @@ export class MentionDropdownComponent {
282
282
  i0.ɵɵconditionalCreate(0, MentionDropdownComponent_Conditional_0_Template, 3, 12, "div", 0);
283
283
  } if (rf & 2) {
284
284
  i0.ɵɵconditional(ctx.visible ? 0 : -1);
285
- } }, dependencies: [i1.NgClass, i2.MJEmptyStateComponent], styles: [".mention-dropdown[_ngcontent-%COMP%] {\n position: absolute;\n z-index: 10000;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: var(--mj-shadow-lg);\n min-width: 280px;\n \n\n\n max-width: min(400px, calc(100vw - 32px));\n max-height: 300px;\n overflow-y: auto;\n transform-origin: top left; \n\n}\n\n.mention-dropdown.fixed-position[_ngcontent-%COMP%] {\n position: fixed; \n\n}\n\n.mention-dropdown.show-above[_ngcontent-%COMP%] {\n transform: translateY(-100%); \n\n transform-origin: bottom left; \n\n}\n\n\n\n\n\n.mention-dropdown.align-right[_ngcontent-%COMP%] {\n transform: translateX(-100%);\n transform-origin: top right;\n}\n\n.mention-dropdown.show-above.align-right[_ngcontent-%COMP%] {\n transform: translate(-100%, -100%);\n transform-origin: bottom right;\n}\n\n.mention-suggestions[_ngcontent-%COMP%] {\n padding: 4px 0;\n}\n\n.mention-suggestion[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 10px 12px;\n cursor: pointer;\n transition: background-color 0.15s;\n}\n\n.mention-suggestion[_ngcontent-%COMP%]:hover, \n.mention-suggestion.selected[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface-hover);\n}\n\n.suggestion-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--mj-brand-primary);\n border-radius: 6px;\n color: var(--mj-text-inverse);\n font-size: 16px;\n flex-shrink: 0;\n}\n\n.suggestion-icon[_ngcontent-%COMP%] i.fa-user[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n}\n\n\n\n\n.suggestion-icon.skill[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n border-radius: 4px;\n}\n\n.suggestion-icon[_ngcontent-%COMP%] .suggestion-image[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n border-radius: 6px;\n object-fit: cover;\n}\n\n.suggestion-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.suggestion-name[_ngcontent-%COMP%] {\n font-weight: 500;\n font-size: 14px;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.suggestion-type-badge[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 2px 6px;\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border-radius: 3px;\n}\n\n.suggestion-type-badge.user[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n}\n\n.suggestion-type-badge.entity[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n}\n\n.suggestion-type-badge.query[_ngcontent-%COMP%] {\n background: var(--mj-status-warning);\n}\n\n\n\n.suggestion-type-badge.skill[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n}\n\n.suggestion-description[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-secondary);\n margin-top: 2px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n\n\n.mention-dropdown[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 8px;\n}\n\n.mention-dropdown[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n}\n\n.mention-dropdown[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: var(--mj-border-default);\n border-radius: 8px;\n}\n\n.mention-dropdown[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: var(--mj-border-strong);\n}", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n[class^=\"mj-icon-\"][_ngcontent-%COMP%], \n[class*=\" mj-icon-\"][_ngcontent-%COMP%] {\n font-style: normal;\n font-variant: normal;\n text-rendering: auto;\n -webkit-font-smoothing: antialiased;\n display: inline-block;\n font-size: inherit;\n line-height: 1;\n}\n\n\n\n\n\n\n\n\n\n\n\n.mj-icon-skip[_ngcontent-%COMP%] {\n width: 1.4em;\n height: 1.4em;\n display: inline-block;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n \n\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 101.89918457031249 96.83947368421053'%3E%3Cg transform='translate(-0.1288232421875,-0.0)'%3E%3Cpath d='M93.85,41.56c-.84,0-1.62.2-2.37.55-3-4.35-7.49-8.12-13.04-11.04l.04-7.18v-14.44h-10.24v17.6c-1.52-.43-3.07-.8-4.67-1.11V0h-10.24v24.72s-.09,0-.14,0h-4.38s-.1,0-.14,0V7.3h-10.24v18.62c-1.6.32-3.15.69-4.67,1.11v-11.67h-10.24v6.09l.04,9.6c-5.55,2.92-10.04,6.7-13.04,11.04-.75-.35-1.53-.55-2.37-.55-4.5,0-8.14,5.61-8.14,12.51s3.64,12.53,8.14,12.53c.58,0,1.14-.12,1.67-.29,4.1,6.62,11.54,12.06,20.98,15.28l.79.13v7.05c0,2.97,1.45,5.58,3.87,6.99,1.18.69,2.5,1.04,3.85,1.03,1.4,0,2.83-.37,4.15-1.12l7.54-4.29,7.56,4.3c1.31.74,2.73,1.12,4.13,1.12s2.67-.35,3.85-1.04c2.42-1.41,3.86-4.02,3.86-6.98v-7.05l.79-.13c9.44-3.22,16.89-8.66,20.98-15.28.54.17,1.09.29,1.68.29,4.5,0,8.14-5.61,8.14-12.53s-3.63-12.51-8.14-12.51' fill='%23AAAAAA'/%3E%3Cpath d='M86.69,50.87c0-12.22-13.6-19.1-28.94-20.66-4.48-.47-9.19-.54-13.52,0-15.34,1.53-28.93,8.41-28.93,20.66,0,8.55,5.7,15.55,12.68,15.55h7.94c3.05,2.5,6.93,4.1,11.08,4.71,2.65.4,5.44.46,8.01,0,4.15-.6,8.05-2.2,11.1-4.71h7.92c6.97,0,12.68-7,12.68-15.55' fill='white' opacity='0.9'/%3E%3Cpath d='M57.83,55.82c-1.19,2.58-3.8,4.35-6.84,4.35s-5.65-1.77-6.84-4.35h13.68Z' fill='%23AAAAAA'/%3E%3Cpath d='M32.52,41.14c1.74,0,3.18,2.13,3.18,4.76s-1.44,4.74-3.18,4.74-3.16-2.13-3.16-4.74,1.41-4.76,3.16-4.76' fill='%23AAAAAA'/%3E%3Cpath d='M69.46,41.14c1.74,0,3.16,2.13,3.16,4.76s-1.41,4.74-3.16,4.74-3.18-2.13-3.18-4.74,1.41-4.76,3.18-4.76' fill='%23AAAAAA'/%3E%3Cpath d='M63.91,76.15c-.82-.48-1.84-.43-2.8.12l-10.13,5.75-10.11-5.75c-.96-.55-1.98-.59-2.8-.12-.82.47-1.29,1.38-1.29,2.49v10.12c0,1.11.47,2.02,1.28,2.49.38.22.8.33,1.24.33.51,0,1.05-.15,1.57-.44l10.12-5.75,10.11,5.75c.52.29,1.05.44,1.56.44.44,0,.86-.11,1.24-.33.81-.48,1.28-1.38,1.28-2.49v-10.12c0-1.11-.47-2.02-1.28-2.49' fill='white' opacity='0.9'/%3E%3C/g%3E%3C/svg%3E\");\n vertical-align: middle;\n}\n\n\n\n\n\n\n.mj-icon-skip-lightning[_ngcontent-%COMP%]::before {\n content: \"\u26A1\";\n color: var(--mj-brand-primary);\n font-size: 1.1em;\n}\n\n\n\n\n\n\n.mj-icon-skip-brain[_ngcontent-%COMP%]::before {\n content: \"\uD83E\uDDE0\";\n font-size: 1.2em;\n}\n\n\n\n\n\n\n.mj-icon-betty[_ngcontent-%COMP%] {\n width: 1.4em;\n height: 1.4em;\n display: inline-block;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n \n\n background-image: url(\"data:image/svg+xml,%3Csvg id='a' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 150'%3E%3Cpath d='M64.96,60.23h75.12c10.58,0,20.24,4.31,27.2,11.32,7.01,6.95,11.32,16.61,11.32,27.19s-4.31,20.24-11.32,27.19c-6.95,7.02-16.61,11.32-27.2,11.32h-75.12c-10.58,0-20.24-4.31-27.19-11.32-2.65-2.64-4.92-5.6-6.71-8.92-.24,0-.49.06-.74.06-2.46,0-4.67-1.05-6.34-2.65-1.6-1.66-2.58-3.87-2.58-6.34v-18.7c0-2.46.98-4.74,2.58-6.34,1.66-1.66,3.87-2.65,6.34-2.65.25,0,.49,0,.74.06,1.79-3.32,4.06-6.34,6.71-8.92,6.95-7.01,16.61-11.32,27.19-11.32' fill='%233d1252'/%3E%3Cpath d='M132.33,68.36h0c0,1.72-.74,3.32-1.91,4.49-1.11,1.17-2.71,1.84-4.49,1.84h-13.29c-1.78,0-3.32-.68-4.49-1.84-1.17-1.17-1.91-2.77-1.91-4.49h-12.92c-8.37,0-15.94,3.44-21.47,8.92-5.47,5.54-8.92,13.1-8.92,21.47v1.17l.06.37v.37l.06.43v.37l.06.37v.37l.06.37.06.43.06.37.06.37.06.37.06.37c0,.12.06.25.06.37l.06.37.12.37.06.37.12.37.06.37.12.37.12.31.06.37.12.37.12.37.12.31.12.37.12.37.19.31.12.37.12.37.12.31.18.37.12.31.19.31.18.37.12.31.18.31.19.37.18.31.18.31.19.31.18.31c.12.24.25.43.37.68l.19.25.24.31.19.31c.43.62.86,1.23,1.35,1.79l.18.24c.49.62.99,1.17,1.48,1.66.19.19.31.37.49.56.19.12.37.31.56.49.49.49,1.04.98,1.6,1.47l.31.19c.56.49,1.17.92,1.79,1.35.18.12.37.25.55.37l.31.25.31.18.31.19.37.18.31.18.31.19.31.18.31.19.37.12.31.19.31.18c.12.06.24.12.37.12l.31.19.37.12.31.19.37.12.31.12.37.19.37.12.31.12.37.12.37.12.37.06c.24.12.43.18.68.25l.37.12.37.06.37.12c.12,0,.25.06.37.06l.37.06.37.12.37.06.37.06.37.06.37.06.37.06.37.06.43.06h.37l.37.06h.37l.37.06h.8l.37.06h47.56c8.37,0,15.94-3.44,21.47-8.92,5.48-5.54,8.92-13.1,8.92-21.47s-3.44-15.94-8.92-21.47c-5.54-5.48-13.1-8.92-21.47-8.92h-7.75Z' fill='%23fff'/%3E%3Cpolygon points='54.93 12.74 85.57 55.25 106.12 55.25 106.12 34.89 106.12 34.7 105.75 34.7 54.93 12.74' fill='%233aba91'/%3E%3Cpolygon points='111.1 55.25 124.76 55.25 145 27.07 111.35 41.59 111.1 41.59 111.1 41.72 111.1 55.25' fill='%233aba91'/%3E%3Cpath d='M94.55,82.81c3.75,0,6.83,3.81,7.57,8.92.06.74-.31,1.35-.98,1.66-.61.31-1.35.18-1.84-.37-1.29-1.48-2.96-2.34-4.74-2.34s-3.38.86-4.67,2.34c-.49.55-1.23.68-1.91.37-.68-.31-1.05-.92-.92-1.66.68-5.11,3.81-8.92,7.51-8.92' fill='%233d1252'/%3E%3Cpath d='M132.08,115.24c-.31,1.05-.86,2.03-1.66,2.77-1.11,1.17-2.71,1.84-4.49,1.84h-13.29c-1.79,0-3.32-.68-4.49-1.84-.8-.74-1.36-1.72-1.66-2.77-.19-.68.06-1.41.68-1.84.56-.43,1.35-.49,1.97-.06.98.68,2.21,1.05,3.51,1.05h13.29c1.29,0,2.52-.37,3.51-1.05.61-.43,1.41-.37,1.97.06.62.43.86,1.17.68,1.84' fill='%233d1252'/%3E%3Cpath d='M144.02,82.81c3.69,0,6.83,3.81,7.51,8.92.12.74-.24,1.35-.92,1.66-.68.31-1.41.18-1.91-.37-1.29-1.48-2.89-2.34-4.67-2.34s-3.44.86-4.74,2.34c-.49.55-1.23.68-1.84.37-.68-.31-1.05-.92-.98-1.66.74-5.11,3.81-8.92,7.57-8.92' fill='%233d1252'/%3E%3C/svg%3E\");\n vertical-align: middle;\n}\n\n\n\n\n\n\n.mj-icon-izzy[_ngcontent-%COMP%] {\n width: 1.4em;\n height: 1.4em;\n display: inline-block;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n \n\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 204 180'%3E%3Cpath d='M0 0 C3.61144774 3.08477828 4.84942137 4.90830493 5.5 9.625 C5 13 5 13 3.5 14.9375 C1.74432121 17.35155834 1.83578869 18.21944114 1.90625 21.12890625 C1.9371875 22.40636719 1.968125 23.68382813 2 25 C3.18335937 24.72285156 4.36671875 24.44570313 5.5859375 24.16015625 C22.44010416 20.26839867 22.44010416 20.26839867 30 20 C31.80210938 19.92265625 31.80210938 19.92265625 33.640625 19.84375 C47.49356199 19.44904163 61.73614427 20.86627802 75 25 C75.53596907 19.64244551 75.53596907 19.64244551 73.5 15 C71.5549761 12.4066348 71.45048389 10.16629658 71.59375 6.97265625 C72.33633815 3.36681955 74.01253991 1.99164006 77 0 C79.80907914 -0.63997166 82.18961327 -0.63020793 85 0 C87.8100346 1.79363911 89.50940468 3.01880935 91 6 C90.984375 8.05859375 90.984375 8.05859375 90.75 10.4375 C90.68296875 11.21996094 90.6159375 12.00242187 90.546875 12.80859375 C90 15 90 15 88.49609375 16.3984375 C86.25734576 18.79500846 86.4852344 20.97464008 86.3125 24.1875 C86.21388672 25.81751953 86.21388672 25.81751953 86.11328125 27.48046875 C86.07589844 28.31191406 86.03851563 29.14335937 86 30 C86.67675781 30.0825 87.35351562 30.165 88.05078125 30.25 C91.82333306 31.20937741 94.89353787 32.99425194 98.1875 35 C99.18052124 35.60448975 99.18052124 35.60448975 100.19360352 36.22119141 C111.98050012 43.58460075 121.17745776 53.2687532 127 66 C127 66.66 127 67.32 127 68 C127.721875 68.0825 128.44375 68.165 129.1875 68.25 C133.81406141 69.48374971 136.2179022 71.66516963 138.625 75.7734375 C140.97801199 81.55147269 140.43210927 87.87027126 140.375 94 C140.38660156 95.24523437 140.39820313 96.49046875 140.41015625 97.7734375 C140.3675701 111.08870765 140.3675701 111.08870765 135.5 116.7421875 C131.62323281 119.66995439 128.8523137 121.14337998 124 121.125 C122.9790625 121.12886719 122.9790625 121.12886719 121.9375 121.1328125 C120 121 120 121 117 120 C116.74347656 120.65226562 116.48695313 121.30453125 116.22265625 121.9765625 C115.83980469 122.85054688 115.45695313 123.72453125 115.0625 124.625 C114.70285156 125.48351562 114.34320313 126.34203125 113.97265625 127.2265625 C108.57908063 134.80960941 99.56813916 137.59212379 91.0625 140.375 C90.02287109 140.72949219 88.98324219 141.08398438 87.91210938 141.44921875 C80.34347852 144 80.34347852 144 78 144 C78.02094727 144.65484375 78.04189453 145.3096875 78.06347656 145.984375 C78.14730383 148.98942328 78.19886895 151.99422464 78.25 155 C78.28351563 156.02996094 78.31703125 157.05992187 78.3515625 158.12109375 C78.43361416 164.56214867 77.93369275 169.71304442 74 175 C68.75523423 179.17440541 64.68195675 180.53237245 58 180 C55.12653443 178.963898 52.49379495 177.58020045 49.8125 176.125 C49.11447266 175.76019531 48.41644531 175.39539063 47.69726562 175.01953125 C46.39868999 174.33997216 45.10309803 173.65465367 43.81176758 172.96142578 C43.21388428 172.64415527 42.61600098 172.32688477 42 172 C41.34290039 171.59402588 40.68580078 171.18805176 40.00878906 170.76977539 C38.03672401 169.77639533 38.03672401 169.77639533 36.12475586 170.58325195 C35.49448486 170.96441162 34.86421387 171.34557129 34.21484375 171.73828125 C33.17166992 172.35026367 33.17166992 172.35026367 32.10742188 172.97460938 C31.39134766 173.41611328 30.67527344 173.85761719 29.9375 174.3125 C28.51029236 175.1647359 27.08194984 176.01507485 25.65234375 176.86328125 C25.02320068 177.24782471 24.39405762 177.63236816 23.74584961 178.02856445 C19.79572932 180.2265128 16.44037501 180.296025 12 180 C6.82155197 178.33236419 3.95074467 176.59004726 1 172 C-0.72417326 168.34258111 -1.2403609 165.51230089 -1.1953125 161.48046875 C-1.18886719 160.45888672 -1.18242188 159.43730469 -1.17578125 158.38476562 C-1.15902344 157.32966797 -1.14226563 156.27457031 -1.125 155.1875 C-1.11597656 154.11306641 -1.10695312 153.03863281 -1.09765625 151.93164062 C-1.07415306 149.28753146 -1.04129575 146.64388128 -1 144 C-1.63196289 143.81171631 -2.26392578 143.62343262 -2.91503906 143.42944336 C-8.20708475 141.84808949 -13.49207901 140.2541307 -18.75 138.5625 C-19.98234375 138.17191406 -21.2146875 137.78132812 -22.484375 137.37890625 C-29.06200008 134.79901552 -34.12925122 130.90130551 -38 125 C-38.875 121.5625 -38.875 121.5625 -39 119 C-39.495 119.33 -39.99 119.66 -40.5 120 C-45.24354984 121.89741993 -49.49426304 121.53143657 -54.1875 119.875 C-58.42051121 117.05299253 -61.35909664 113.92271008 -63 109 C-63.22709306 104.92471184 -63.22828659 100.8492307 -63.24023438 96.76806641 C-63.2498982 94.77103695 -63.28108516 92.77414948 -63.3125 90.77734375 C-63.36188158 78.59243786 -63.36188158 78.59243786 -60 73 C-57.7509823 70.86631654 -55.88785241 69.35340008 -53.0078125 68.20703125 C-50.3010212 66.57979679 -49.65488803 64.83796148 -48.3125 62 C-45.06106922 55.7428385 -40.95735135 50.97447519 -36 46 C-35.40832031 45.38511719 -34.81664063 44.77023438 -34.20703125 44.13671875 C-28.97373562 39.11136864 -17.47215548 30 -10 30 C-10.08733973 27.91589342 -10.19552278 25.83265331 -10.3125 23.75 C-10.37050781 22.58984375 -10.42851563 21.4296875 -10.48828125 20.234375 C-11.02905532 16.81635262 -11.84853545 15.59874271 -14 13 C-14.54046356 8.75350057 -14.48376179 6.74176808 -12.125 3.125 C-8.57275398 -0.42724602 -4.8825369 -0.970906 0 0 Z M5 35 C4.30245605 35.21962402 3.60491211 35.43924805 2.88623047 35.66552734 C-14.1501062 41.15773444 -29.02751477 50.81254544 -39 66 C-39.33 66.99 -39.66 67.98 -40 69 C-37.525 70.98 -37.525 70.98 -35 73 C-34.52691406 72.29875 -34.05382812 71.5975 -33.56640625 70.875 C-21.08320269 52.96537462 -2.17172019 42.38052109 19.26171875 38.5078125 C46.97805996 34.9959591 75.10426623 38.71529466 97.73046875 56.09765625 C103.53827054 61.07953766 107.9264808 66.53902088 112 73 C113.32 72.01 114.64 71.02 116 70 C115.01713954 61.60788376 107.55262518 55.04847712 101.375 49.8125 C82.80696113 35.82916208 61.35998978 30.59265576 38.375 30.625 C37.71836365 30.62554382 37.06172729 30.62608765 36.38519287 30.62664795 C25.42439402 30.66823796 15.42390121 31.62072499 5 35 Z' fill='%234E3B78' transform='translate(63,0)'/%3E%3Cpath d='M0 0 C5.27957047 5.78547525 9.31612861 13.25448014 10 21.125 C9.69743213 24.83293961 8.77676366 26.8914086 6.1875 29.5625 C-2.04152489 35.76003038 -13.60917874 39.6270706 -23.875 38.8125 C-24.535 38.1525 -25.195 37.4925 -25.875 36.8125 C-28.97847254 36.48234335 -31.03281176 36.30718706 -33.75 37.9375 C-35.40354531 40.69340884 -35.26865568 42.66325452 -34.875 45.8125 C-33.95833333 47.89583333 -33.95833333 47.89583333 -31.875 48.8125 C-28.29166667 48.89583333 -28.29166667 48.89583333 -24.875 47.8125 C-24.57086182 47.16466553 -24.26672363 46.51683105 -23.95336914 45.84936523 C-22.875 43.8125 -22.875 43.8125 -20.77124023 42.88696289 C-19.91731689 42.6883667 -19.06339355 42.48977051 -18.18359375 42.28515625 C-17.23806641 42.04990234 -16.29253906 41.81464844 -15.31835938 41.57226562 C-14.32642578 41.34216797 -13.33449219 41.11207031 -12.3125 40.875 C-4.77934417 39.10870895 1.54823541 36.95205932 8.125 32.8125 C7.81647145 40.06292099 4.56245219 45.32546918 -0.5 50.4609375 C-5.29811284 54.61130511 -8.83216751 54.86916719 -15 55 C-21.13677833 55.26569953 -25.04589225 56.51893716 -29.890625 60.31640625 C-39.17633501 67.31724667 -52.82450605 66.52799961 -63.875 65.8125 C-71.37432145 64.60538489 -79.4496824 61.2378176 -84.875 55.8125 C-86.81199027 55.70419517 -88.75076074 55.60687514 -90.69067383 55.58691406 C-97.68300211 55.51299157 -103.12007731 55.4392364 -108.44140625 50.40234375 C-108.91449219 49.87769531 -109.38757813 49.35304688 -109.875 48.8125 C-110.6175 48.090625 -111.36 47.36875 -112.125 46.625 C-118.35765562 36.60823203 -119.69570866 25.34707186 -117.25 13.8828125 C-113.47065738 3.0509466 -104.76645407 -4.0120534 -94.875 -9.1875 C-91.26850975 -10.75400624 -87.62602625 -12.0153043 -83.875 -13.1875 C-83.029375 -13.47496094 -82.18375 -13.76242188 -81.3125 -14.05859375 C-56.0861494 -22.29657387 -20.04377266 -18.06142152 0 0 Z' fill='%23FDFDFD' transform='translate(155.875,64.1875)'/%3E%3Cpath d='M0 0 C5.24479788 1.58079188 9.51172656 4.60408712 14.06640625 7.58984375 C18.37837094 10.28462973 18.37837094 10.28462973 23.30859375 11.1328125 C28.49696048 9.20971132 33.08639658 6.29555589 37.79882812 3.42578125 C43.66838131 -0.00837477 43.66838131 -0.00837477 47.27734375 0.078125 C49.34375 1.0078125 49.34375 1.0078125 51.34375 3.0078125 C51.82984303 7.30136192 51.71414913 11.62739332 51.71875 15.9453125 C51.74324219 17.15123047 51.76773438 18.35714844 51.79296875 19.59960938 C51.79876953 21.33114258 51.79876953 21.33114258 51.8046875 23.09765625 C51.81290527 24.15847412 51.82112305 25.21929199 51.82958984 26.31225586 C51.34375 29.0078125 51.34375 29.0078125 49.48461914 30.87670898 C46.29658529 32.56106989 44.78123809 32.062357 41.34375 31.0078125 C37.60135447 29.03986817 34.07891261 26.72386924 30.53320312 24.42578125 C26.44214688 21.80182316 26.44214688 21.80182316 21.77734375 20.921875 C17.60401055 22.78413283 13.85973006 25.2663764 10.046875 27.76953125 C5.85335687 30.41401513 2.44659272 31.9581498 -2.65625 32.0078125 C-4.33203125 30.87695312 -4.33203125 30.87695312 -5.65625 29.0078125 C-6.04443359 26.328125 -6.04443359 26.328125 -6.0546875 23.1328125 C-6.05855469 21.98296875 -6.06242187 20.833125 -6.06640625 19.6484375 C-6.05480469 18.44703125 -6.04320313 17.245625 -6.03125 16.0078125 C-6.04285156 14.80640625 -6.05445312 13.605 -6.06640625 12.3671875 C-6.06253906 11.21734375 -6.05867188 10.0675 -6.0546875 8.8828125 C-6.05130371 7.82835937 -6.04791992 6.77390625 -6.04443359 5.6875 C-5.65625 3.0078125 -5.65625 3.0078125 -4.29736328 1.14111328 C-2.65625 0.0078125 -2.65625 0.0078125 0 0 Z' fill='%23FCFCFD' transform='translate(78.65625,136.9921875)'/%3E%3Cpath d='M0 0 C2.5 0.625 2.5 0.625 4.8125 2.625 C6.96830116 6.4575354 7.24792603 9.32007692 6.5 13.625 C5.34367254 15.98793002 4.35016245 17.77483755 2.5 19.625 C0.1875 20 0.1875 20 -2.5 19.625 C-5.06638215 17.47478793 -6.29103188 15.79226637 -6.88671875 12.46484375 C-7.08084032 8.45522921 -6.77549931 6.12498023 -4.8125 2.5625 C-2.5 0.625 -2.5 0.625 0 0 Z' fill='%2353417C' transform='translate(138.5,67.375)'/%3E%3Cpath d='M0 0 C2.5 0.6875 2.5 0.6875 4.8125 2.625 C7.08407605 6.74748987 7.32547179 10.07653131 6.5 14.6875 C4.8125 17.75 4.8125 17.75 2.5 19.6875 C-0.0625 20.25 -0.0625 20.25 -2.5 19.6875 C-5.30401904 17.38419865 -5.84979387 14.76309142 -6.4375 11.3125 C-6.72853275 7.71913649 -6.44645777 6.57011897 -4.875 3.125 C-2.5 0.6875 -2.5 0.6875 0 0 Z' fill='%23523F7B' transform='translate(64.5,67.3125)'/%3E%3Cpath d='M0 0 C8.91 0 17.82 0 27 0 C24.81183076 5.47042311 24.169236 6.55141452 19 9 C14.08609728 9.94526984 9.88605617 10.13992406 5.51171875 7.49609375 C3.4733513 5.76185217 1.65854906 4.10051199 0 2 C0 1.34 0 0.68 0 0 Z' fill='%23574680' transform='translate(88,95)'/%3E%3C/svg%3E\");\n vertical-align: middle;\n}\n\n\n\n\n\n\n\n\n\n\n.mj-icon-data-analyst[_ngcontent-%COMP%]::before {\n content: \"\uD83D\uDCCA\";\n font-size: 1.1em;\n}\n\n\n\n\n\n.mj-icon-api[_ngcontent-%COMP%]::before {\n content: \"\uD83D\uDD0C\";\n font-size: 1.1em;\n}\n\n\n\n\n\n.mj-icon-processing[_ngcontent-%COMP%]::before {\n content: \"\u2699\uFE0F\";\n display: inline-block;\n animation: _ngcontent-%COMP%_rotate-icon 2s linear infinite;\n}\n\n@keyframes _ngcontent-%COMP%_rotate-icon {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n\n\n\n\n\n.mj-icon-monogram-s[_ngcontent-%COMP%]::before {\n content: \"S\";\n font-weight: 800;\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 1.1em;\n color: var(--mj-brand-primary);\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"] });
285
+ } }, dependencies: [i1.NgClass, i2.MJEmptyStateComponent], styles: [".mention-dropdown[_ngcontent-%COMP%] {\n position: absolute;\n z-index: 10000;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: var(--mj-shadow-lg);\n min-width: 280px;\n \n\n max-width: min(400px, calc(100vw - 32px));\n max-height: 300px;\n overflow-y: auto;\n transform-origin: top left; \n}\n\n.mention-dropdown.fixed-position[_ngcontent-%COMP%] {\n position: fixed; \n}\n\n.mention-dropdown.show-above[_ngcontent-%COMP%] {\n transform: translateY(-100%); \n transform-origin: bottom left; \n}\n\n\n\n\n.mention-dropdown.align-right[_ngcontent-%COMP%] {\n transform: translateX(-100%);\n transform-origin: top right;\n}\n\n.mention-dropdown.show-above.align-right[_ngcontent-%COMP%] {\n transform: translate(-100%, -100%);\n transform-origin: bottom right;\n}\n\n.mention-suggestions[_ngcontent-%COMP%] {\n padding: 4px 0;\n}\n\n.mention-suggestion[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 10px 12px;\n cursor: pointer;\n transition: background-color 0.15s;\n}\n\n.mention-suggestion[_ngcontent-%COMP%]:hover, \n.mention-suggestion.selected[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface-hover);\n}\n\n.suggestion-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--mj-brand-primary);\n border-radius: 6px;\n color: var(--mj-text-inverse);\n font-size: 16px;\n flex-shrink: 0;\n}\n\n.suggestion-icon[_ngcontent-%COMP%] i.fa-user[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n}\n\n\n\n.suggestion-icon.skill[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n border-radius: 4px;\n}\n\n.suggestion-icon[_ngcontent-%COMP%] .suggestion-image[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n border-radius: 6px;\n object-fit: cover;\n}\n\n.suggestion-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.suggestion-name[_ngcontent-%COMP%] {\n font-weight: 500;\n font-size: 14px;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.suggestion-type-badge[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 2px 6px;\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border-radius: 3px;\n}\n\n.suggestion-type-badge.user[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n}\n\n.suggestion-type-badge.entity[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n}\n\n.suggestion-type-badge.query[_ngcontent-%COMP%] {\n background: var(--mj-status-warning);\n}\n\n\n.suggestion-type-badge.skill[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n}\n\n.suggestion-description[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-secondary);\n margin-top: 2px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n\n.mention-dropdown[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 8px;\n}\n\n.mention-dropdown[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n}\n\n.mention-dropdown[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: var(--mj-border-default);\n border-radius: 8px;\n}\n\n.mention-dropdown[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: var(--mj-border-strong);\n}", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n[class^=\"mj-icon-\"][_ngcontent-%COMP%], \n[class*=\" mj-icon-\"][_ngcontent-%COMP%] {\n font-style: normal;\n font-variant: normal;\n text-rendering: auto;\n -webkit-font-smoothing: antialiased;\n display: inline-block;\n font-size: inherit;\n line-height: 1;\n}\n\n\n\n\n\n\n\n\n\n.mj-icon-skip[_ngcontent-%COMP%] {\n width: 1.4em;\n height: 1.4em;\n display: inline-block;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n \n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 101.89918457031249 96.83947368421053'%3E%3Cg transform='translate(-0.1288232421875,-0.0)'%3E%3Cpath d='M93.85,41.56c-.84,0-1.62.2-2.37.55-3-4.35-7.49-8.12-13.04-11.04l.04-7.18v-14.44h-10.24v17.6c-1.52-.43-3.07-.8-4.67-1.11V0h-10.24v24.72s-.09,0-.14,0h-4.38s-.1,0-.14,0V7.3h-10.24v18.62c-1.6.32-3.15.69-4.67,1.11v-11.67h-10.24v6.09l.04,9.6c-5.55,2.92-10.04,6.7-13.04,11.04-.75-.35-1.53-.55-2.37-.55-4.5,0-8.14,5.61-8.14,12.51s3.64,12.53,8.14,12.53c.58,0,1.14-.12,1.67-.29,4.1,6.62,11.54,12.06,20.98,15.28l.79.13v7.05c0,2.97,1.45,5.58,3.87,6.99,1.18.69,2.5,1.04,3.85,1.03,1.4,0,2.83-.37,4.15-1.12l7.54-4.29,7.56,4.3c1.31.74,2.73,1.12,4.13,1.12s2.67-.35,3.85-1.04c2.42-1.41,3.86-4.02,3.86-6.98v-7.05l.79-.13c9.44-3.22,16.89-8.66,20.98-15.28.54.17,1.09.29,1.68.29,4.5,0,8.14-5.61,8.14-12.53s-3.63-12.51-8.14-12.51' fill='%23AAAAAA'/%3E%3Cpath d='M86.69,50.87c0-12.22-13.6-19.1-28.94-20.66-4.48-.47-9.19-.54-13.52,0-15.34,1.53-28.93,8.41-28.93,20.66,0,8.55,5.7,15.55,12.68,15.55h7.94c3.05,2.5,6.93,4.1,11.08,4.71,2.65.4,5.44.46,8.01,0,4.15-.6,8.05-2.2,11.1-4.71h7.92c6.97,0,12.68-7,12.68-15.55' fill='white' opacity='0.9'/%3E%3Cpath d='M57.83,55.82c-1.19,2.58-3.8,4.35-6.84,4.35s-5.65-1.77-6.84-4.35h13.68Z' fill='%23AAAAAA'/%3E%3Cpath d='M32.52,41.14c1.74,0,3.18,2.13,3.18,4.76s-1.44,4.74-3.18,4.74-3.16-2.13-3.16-4.74,1.41-4.76,3.16-4.76' fill='%23AAAAAA'/%3E%3Cpath d='M69.46,41.14c1.74,0,3.16,2.13,3.16,4.76s-1.41,4.74-3.16,4.74-3.18-2.13-3.18-4.74,1.41-4.76,3.18-4.76' fill='%23AAAAAA'/%3E%3Cpath d='M63.91,76.15c-.82-.48-1.84-.43-2.8.12l-10.13,5.75-10.11-5.75c-.96-.55-1.98-.59-2.8-.12-.82.47-1.29,1.38-1.29,2.49v10.12c0,1.11.47,2.02,1.28,2.49.38.22.8.33,1.24.33.51,0,1.05-.15,1.57-.44l10.12-5.75,10.11,5.75c.52.29,1.05.44,1.56.44.44,0,.86-.11,1.24-.33.81-.48,1.28-1.38,1.28-2.49v-10.12c0-1.11-.47-2.02-1.28-2.49' fill='white' opacity='0.9'/%3E%3C/g%3E%3C/svg%3E\");\n vertical-align: middle;\n}\n\n\n\n\n\n.mj-icon-skip-lightning[_ngcontent-%COMP%]::before {\n content: \"\u26A1\";\n color: var(--mj-brand-primary);\n font-size: 1.1em;\n}\n\n\n\n\n\n.mj-icon-skip-brain[_ngcontent-%COMP%]::before {\n content: \"\uD83E\uDDE0\";\n font-size: 1.2em;\n}\n\n\n\n\n\n.mj-icon-betty[_ngcontent-%COMP%] {\n width: 1.4em;\n height: 1.4em;\n display: inline-block;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n \n background-image: url(\"data:image/svg+xml,%3Csvg id='a' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 150'%3E%3Cpath d='M64.96,60.23h75.12c10.58,0,20.24,4.31,27.2,11.32,7.01,6.95,11.32,16.61,11.32,27.19s-4.31,20.24-11.32,27.19c-6.95,7.02-16.61,11.32-27.2,11.32h-75.12c-10.58,0-20.24-4.31-27.19-11.32-2.65-2.64-4.92-5.6-6.71-8.92-.24,0-.49.06-.74.06-2.46,0-4.67-1.05-6.34-2.65-1.6-1.66-2.58-3.87-2.58-6.34v-18.7c0-2.46.98-4.74,2.58-6.34,1.66-1.66,3.87-2.65,6.34-2.65.25,0,.49,0,.74.06,1.79-3.32,4.06-6.34,6.71-8.92,6.95-7.01,16.61-11.32,27.19-11.32' fill='%233d1252'/%3E%3Cpath d='M132.33,68.36h0c0,1.72-.74,3.32-1.91,4.49-1.11,1.17-2.71,1.84-4.49,1.84h-13.29c-1.78,0-3.32-.68-4.49-1.84-1.17-1.17-1.91-2.77-1.91-4.49h-12.92c-8.37,0-15.94,3.44-21.47,8.92-5.47,5.54-8.92,13.1-8.92,21.47v1.17l.06.37v.37l.06.43v.37l.06.37v.37l.06.37.06.43.06.37.06.37.06.37.06.37c0,.12.06.25.06.37l.06.37.12.37.06.37.12.37.06.37.12.37.12.31.06.37.12.37.12.37.12.31.12.37.12.37.19.31.12.37.12.37.12.31.18.37.12.31.19.31.18.37.12.31.18.31.19.37.18.31.18.31.19.31.18.31c.12.24.25.43.37.68l.19.25.24.31.19.31c.43.62.86,1.23,1.35,1.79l.18.24c.49.62.99,1.17,1.48,1.66.19.19.31.37.49.56.19.12.37.31.56.49.49.49,1.04.98,1.6,1.47l.31.19c.56.49,1.17.92,1.79,1.35.18.12.37.25.55.37l.31.25.31.18.31.19.37.18.31.18.31.19.31.18.31.19.37.12.31.19.31.18c.12.06.24.12.37.12l.31.19.37.12.31.19.37.12.31.12.37.19.37.12.31.12.37.12.37.12.37.06c.24.12.43.18.68.25l.37.12.37.06.37.12c.12,0,.25.06.37.06l.37.06.37.12.37.06.37.06.37.06.37.06.37.06.37.06.43.06h.37l.37.06h.37l.37.06h.8l.37.06h47.56c8.37,0,15.94-3.44,21.47-8.92,5.48-5.54,8.92-13.1,8.92-21.47s-3.44-15.94-8.92-21.47c-5.54-5.48-13.1-8.92-21.47-8.92h-7.75Z' fill='%23fff'/%3E%3Cpolygon points='54.93 12.74 85.57 55.25 106.12 55.25 106.12 34.89 106.12 34.7 105.75 34.7 54.93 12.74' fill='%233aba91'/%3E%3Cpolygon points='111.1 55.25 124.76 55.25 145 27.07 111.35 41.59 111.1 41.59 111.1 41.72 111.1 55.25' fill='%233aba91'/%3E%3Cpath d='M94.55,82.81c3.75,0,6.83,3.81,7.57,8.92.06.74-.31,1.35-.98,1.66-.61.31-1.35.18-1.84-.37-1.29-1.48-2.96-2.34-4.74-2.34s-3.38.86-4.67,2.34c-.49.55-1.23.68-1.91.37-.68-.31-1.05-.92-.92-1.66.68-5.11,3.81-8.92,7.51-8.92' fill='%233d1252'/%3E%3Cpath d='M132.08,115.24c-.31,1.05-.86,2.03-1.66,2.77-1.11,1.17-2.71,1.84-4.49,1.84h-13.29c-1.79,0-3.32-.68-4.49-1.84-.8-.74-1.36-1.72-1.66-2.77-.19-.68.06-1.41.68-1.84.56-.43,1.35-.49,1.97-.06.98.68,2.21,1.05,3.51,1.05h13.29c1.29,0,2.52-.37,3.51-1.05.61-.43,1.41-.37,1.97.06.62.43.86,1.17.68,1.84' fill='%233d1252'/%3E%3Cpath d='M144.02,82.81c3.69,0,6.83,3.81,7.51,8.92.12.74-.24,1.35-.92,1.66-.68.31-1.41.18-1.91-.37-1.29-1.48-2.89-2.34-4.67-2.34s-3.44.86-4.74,2.34c-.49.55-1.23.68-1.84.37-.68-.31-1.05-.92-.98-1.66.74-5.11,3.81-8.92,7.57-8.92' fill='%233d1252'/%3E%3C/svg%3E\");\n vertical-align: middle;\n}\n\n\n\n\n\n.mj-icon-izzy[_ngcontent-%COMP%] {\n width: 1.4em;\n height: 1.4em;\n display: inline-block;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n \n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 204 180'%3E%3Cpath d='M0 0 C3.61144774 3.08477828 4.84942137 4.90830493 5.5 9.625 C5 13 5 13 3.5 14.9375 C1.74432121 17.35155834 1.83578869 18.21944114 1.90625 21.12890625 C1.9371875 22.40636719 1.968125 23.68382813 2 25 C3.18335937 24.72285156 4.36671875 24.44570313 5.5859375 24.16015625 C22.44010416 20.26839867 22.44010416 20.26839867 30 20 C31.80210938 19.92265625 31.80210938 19.92265625 33.640625 19.84375 C47.49356199 19.44904163 61.73614427 20.86627802 75 25 C75.53596907 19.64244551 75.53596907 19.64244551 73.5 15 C71.5549761 12.4066348 71.45048389 10.16629658 71.59375 6.97265625 C72.33633815 3.36681955 74.01253991 1.99164006 77 0 C79.80907914 -0.63997166 82.18961327 -0.63020793 85 0 C87.8100346 1.79363911 89.50940468 3.01880935 91 6 C90.984375 8.05859375 90.984375 8.05859375 90.75 10.4375 C90.68296875 11.21996094 90.6159375 12.00242187 90.546875 12.80859375 C90 15 90 15 88.49609375 16.3984375 C86.25734576 18.79500846 86.4852344 20.97464008 86.3125 24.1875 C86.21388672 25.81751953 86.21388672 25.81751953 86.11328125 27.48046875 C86.07589844 28.31191406 86.03851563 29.14335937 86 30 C86.67675781 30.0825 87.35351562 30.165 88.05078125 30.25 C91.82333306 31.20937741 94.89353787 32.99425194 98.1875 35 C99.18052124 35.60448975 99.18052124 35.60448975 100.19360352 36.22119141 C111.98050012 43.58460075 121.17745776 53.2687532 127 66 C127 66.66 127 67.32 127 68 C127.721875 68.0825 128.44375 68.165 129.1875 68.25 C133.81406141 69.48374971 136.2179022 71.66516963 138.625 75.7734375 C140.97801199 81.55147269 140.43210927 87.87027126 140.375 94 C140.38660156 95.24523437 140.39820313 96.49046875 140.41015625 97.7734375 C140.3675701 111.08870765 140.3675701 111.08870765 135.5 116.7421875 C131.62323281 119.66995439 128.8523137 121.14337998 124 121.125 C122.9790625 121.12886719 122.9790625 121.12886719 121.9375 121.1328125 C120 121 120 121 117 120 C116.74347656 120.65226562 116.48695313 121.30453125 116.22265625 121.9765625 C115.83980469 122.85054688 115.45695313 123.72453125 115.0625 124.625 C114.70285156 125.48351562 114.34320313 126.34203125 113.97265625 127.2265625 C108.57908063 134.80960941 99.56813916 137.59212379 91.0625 140.375 C90.02287109 140.72949219 88.98324219 141.08398438 87.91210938 141.44921875 C80.34347852 144 80.34347852 144 78 144 C78.02094727 144.65484375 78.04189453 145.3096875 78.06347656 145.984375 C78.14730383 148.98942328 78.19886895 151.99422464 78.25 155 C78.28351563 156.02996094 78.31703125 157.05992187 78.3515625 158.12109375 C78.43361416 164.56214867 77.93369275 169.71304442 74 175 C68.75523423 179.17440541 64.68195675 180.53237245 58 180 C55.12653443 178.963898 52.49379495 177.58020045 49.8125 176.125 C49.11447266 175.76019531 48.41644531 175.39539063 47.69726562 175.01953125 C46.39868999 174.33997216 45.10309803 173.65465367 43.81176758 172.96142578 C43.21388428 172.64415527 42.61600098 172.32688477 42 172 C41.34290039 171.59402588 40.68580078 171.18805176 40.00878906 170.76977539 C38.03672401 169.77639533 38.03672401 169.77639533 36.12475586 170.58325195 C35.49448486 170.96441162 34.86421387 171.34557129 34.21484375 171.73828125 C33.17166992 172.35026367 33.17166992 172.35026367 32.10742188 172.97460938 C31.39134766 173.41611328 30.67527344 173.85761719 29.9375 174.3125 C28.51029236 175.1647359 27.08194984 176.01507485 25.65234375 176.86328125 C25.02320068 177.24782471 24.39405762 177.63236816 23.74584961 178.02856445 C19.79572932 180.2265128 16.44037501 180.296025 12 180 C6.82155197 178.33236419 3.95074467 176.59004726 1 172 C-0.72417326 168.34258111 -1.2403609 165.51230089 -1.1953125 161.48046875 C-1.18886719 160.45888672 -1.18242188 159.43730469 -1.17578125 158.38476562 C-1.15902344 157.32966797 -1.14226563 156.27457031 -1.125 155.1875 C-1.11597656 154.11306641 -1.10695312 153.03863281 -1.09765625 151.93164062 C-1.07415306 149.28753146 -1.04129575 146.64388128 -1 144 C-1.63196289 143.81171631 -2.26392578 143.62343262 -2.91503906 143.42944336 C-8.20708475 141.84808949 -13.49207901 140.2541307 -18.75 138.5625 C-19.98234375 138.17191406 -21.2146875 137.78132812 -22.484375 137.37890625 C-29.06200008 134.79901552 -34.12925122 130.90130551 -38 125 C-38.875 121.5625 -38.875 121.5625 -39 119 C-39.495 119.33 -39.99 119.66 -40.5 120 C-45.24354984 121.89741993 -49.49426304 121.53143657 -54.1875 119.875 C-58.42051121 117.05299253 -61.35909664 113.92271008 -63 109 C-63.22709306 104.92471184 -63.22828659 100.8492307 -63.24023438 96.76806641 C-63.2498982 94.77103695 -63.28108516 92.77414948 -63.3125 90.77734375 C-63.36188158 78.59243786 -63.36188158 78.59243786 -60 73 C-57.7509823 70.86631654 -55.88785241 69.35340008 -53.0078125 68.20703125 C-50.3010212 66.57979679 -49.65488803 64.83796148 -48.3125 62 C-45.06106922 55.7428385 -40.95735135 50.97447519 -36 46 C-35.40832031 45.38511719 -34.81664063 44.77023438 -34.20703125 44.13671875 C-28.97373562 39.11136864 -17.47215548 30 -10 30 C-10.08733973 27.91589342 -10.19552278 25.83265331 -10.3125 23.75 C-10.37050781 22.58984375 -10.42851563 21.4296875 -10.48828125 20.234375 C-11.02905532 16.81635262 -11.84853545 15.59874271 -14 13 C-14.54046356 8.75350057 -14.48376179 6.74176808 -12.125 3.125 C-8.57275398 -0.42724602 -4.8825369 -0.970906 0 0 Z M5 35 C4.30245605 35.21962402 3.60491211 35.43924805 2.88623047 35.66552734 C-14.1501062 41.15773444 -29.02751477 50.81254544 -39 66 C-39.33 66.99 -39.66 67.98 -40 69 C-37.525 70.98 -37.525 70.98 -35 73 C-34.52691406 72.29875 -34.05382812 71.5975 -33.56640625 70.875 C-21.08320269 52.96537462 -2.17172019 42.38052109 19.26171875 38.5078125 C46.97805996 34.9959591 75.10426623 38.71529466 97.73046875 56.09765625 C103.53827054 61.07953766 107.9264808 66.53902088 112 73 C113.32 72.01 114.64 71.02 116 70 C115.01713954 61.60788376 107.55262518 55.04847712 101.375 49.8125 C82.80696113 35.82916208 61.35998978 30.59265576 38.375 30.625 C37.71836365 30.62554382 37.06172729 30.62608765 36.38519287 30.62664795 C25.42439402 30.66823796 15.42390121 31.62072499 5 35 Z' fill='%234E3B78' transform='translate(63,0)'/%3E%3Cpath d='M0 0 C5.27957047 5.78547525 9.31612861 13.25448014 10 21.125 C9.69743213 24.83293961 8.77676366 26.8914086 6.1875 29.5625 C-2.04152489 35.76003038 -13.60917874 39.6270706 -23.875 38.8125 C-24.535 38.1525 -25.195 37.4925 -25.875 36.8125 C-28.97847254 36.48234335 -31.03281176 36.30718706 -33.75 37.9375 C-35.40354531 40.69340884 -35.26865568 42.66325452 -34.875 45.8125 C-33.95833333 47.89583333 -33.95833333 47.89583333 -31.875 48.8125 C-28.29166667 48.89583333 -28.29166667 48.89583333 -24.875 47.8125 C-24.57086182 47.16466553 -24.26672363 46.51683105 -23.95336914 45.84936523 C-22.875 43.8125 -22.875 43.8125 -20.77124023 42.88696289 C-19.91731689 42.6883667 -19.06339355 42.48977051 -18.18359375 42.28515625 C-17.23806641 42.04990234 -16.29253906 41.81464844 -15.31835938 41.57226562 C-14.32642578 41.34216797 -13.33449219 41.11207031 -12.3125 40.875 C-4.77934417 39.10870895 1.54823541 36.95205932 8.125 32.8125 C7.81647145 40.06292099 4.56245219 45.32546918 -0.5 50.4609375 C-5.29811284 54.61130511 -8.83216751 54.86916719 -15 55 C-21.13677833 55.26569953 -25.04589225 56.51893716 -29.890625 60.31640625 C-39.17633501 67.31724667 -52.82450605 66.52799961 -63.875 65.8125 C-71.37432145 64.60538489 -79.4496824 61.2378176 -84.875 55.8125 C-86.81199027 55.70419517 -88.75076074 55.60687514 -90.69067383 55.58691406 C-97.68300211 55.51299157 -103.12007731 55.4392364 -108.44140625 50.40234375 C-108.91449219 49.87769531 -109.38757813 49.35304688 -109.875 48.8125 C-110.6175 48.090625 -111.36 47.36875 -112.125 46.625 C-118.35765562 36.60823203 -119.69570866 25.34707186 -117.25 13.8828125 C-113.47065738 3.0509466 -104.76645407 -4.0120534 -94.875 -9.1875 C-91.26850975 -10.75400624 -87.62602625 -12.0153043 -83.875 -13.1875 C-83.029375 -13.47496094 -82.18375 -13.76242188 -81.3125 -14.05859375 C-56.0861494 -22.29657387 -20.04377266 -18.06142152 0 0 Z' fill='%23FDFDFD' transform='translate(155.875,64.1875)'/%3E%3Cpath d='M0 0 C5.24479788 1.58079188 9.51172656 4.60408712 14.06640625 7.58984375 C18.37837094 10.28462973 18.37837094 10.28462973 23.30859375 11.1328125 C28.49696048 9.20971132 33.08639658 6.29555589 37.79882812 3.42578125 C43.66838131 -0.00837477 43.66838131 -0.00837477 47.27734375 0.078125 C49.34375 1.0078125 49.34375 1.0078125 51.34375 3.0078125 C51.82984303 7.30136192 51.71414913 11.62739332 51.71875 15.9453125 C51.74324219 17.15123047 51.76773438 18.35714844 51.79296875 19.59960938 C51.79876953 21.33114258 51.79876953 21.33114258 51.8046875 23.09765625 C51.81290527 24.15847412 51.82112305 25.21929199 51.82958984 26.31225586 C51.34375 29.0078125 51.34375 29.0078125 49.48461914 30.87670898 C46.29658529 32.56106989 44.78123809 32.062357 41.34375 31.0078125 C37.60135447 29.03986817 34.07891261 26.72386924 30.53320312 24.42578125 C26.44214688 21.80182316 26.44214688 21.80182316 21.77734375 20.921875 C17.60401055 22.78413283 13.85973006 25.2663764 10.046875 27.76953125 C5.85335687 30.41401513 2.44659272 31.9581498 -2.65625 32.0078125 C-4.33203125 30.87695312 -4.33203125 30.87695312 -5.65625 29.0078125 C-6.04443359 26.328125 -6.04443359 26.328125 -6.0546875 23.1328125 C-6.05855469 21.98296875 -6.06242187 20.833125 -6.06640625 19.6484375 C-6.05480469 18.44703125 -6.04320313 17.245625 -6.03125 16.0078125 C-6.04285156 14.80640625 -6.05445312 13.605 -6.06640625 12.3671875 C-6.06253906 11.21734375 -6.05867188 10.0675 -6.0546875 8.8828125 C-6.05130371 7.82835937 -6.04791992 6.77390625 -6.04443359 5.6875 C-5.65625 3.0078125 -5.65625 3.0078125 -4.29736328 1.14111328 C-2.65625 0.0078125 -2.65625 0.0078125 0 0 Z' fill='%23FCFCFD' transform='translate(78.65625,136.9921875)'/%3E%3Cpath d='M0 0 C2.5 0.625 2.5 0.625 4.8125 2.625 C6.96830116 6.4575354 7.24792603 9.32007692 6.5 13.625 C5.34367254 15.98793002 4.35016245 17.77483755 2.5 19.625 C0.1875 20 0.1875 20 -2.5 19.625 C-5.06638215 17.47478793 -6.29103188 15.79226637 -6.88671875 12.46484375 C-7.08084032 8.45522921 -6.77549931 6.12498023 -4.8125 2.5625 C-2.5 0.625 -2.5 0.625 0 0 Z' fill='%2353417C' transform='translate(138.5,67.375)'/%3E%3Cpath d='M0 0 C2.5 0.6875 2.5 0.6875 4.8125 2.625 C7.08407605 6.74748987 7.32547179 10.07653131 6.5 14.6875 C4.8125 17.75 4.8125 17.75 2.5 19.6875 C-0.0625 20.25 -0.0625 20.25 -2.5 19.6875 C-5.30401904 17.38419865 -5.84979387 14.76309142 -6.4375 11.3125 C-6.72853275 7.71913649 -6.44645777 6.57011897 -4.875 3.125 C-2.5 0.6875 -2.5 0.6875 0 0 Z' fill='%23523F7B' transform='translate(64.5,67.3125)'/%3E%3Cpath d='M0 0 C8.91 0 17.82 0 27 0 C24.81183076 5.47042311 24.169236 6.55141452 19 9 C14.08609728 9.94526984 9.88605617 10.13992406 5.51171875 7.49609375 C3.4733513 5.76185217 1.65854906 4.10051199 0 2 C0 1.34 0 0.68 0 0 Z' fill='%23574680' transform='translate(88,95)'/%3E%3C/svg%3E\");\n vertical-align: middle;\n}\n\n\n\n\n\n\n\n\n.mj-icon-data-analyst[_ngcontent-%COMP%]::before {\n content: \"\uD83D\uDCCA\";\n font-size: 1.1em;\n}\n\n\n\n\n.mj-icon-api[_ngcontent-%COMP%]::before {\n content: \"\uD83D\uDD0C\";\n font-size: 1.1em;\n}\n\n\n\n\n.mj-icon-processing[_ngcontent-%COMP%]::before {\n content: \"\u2699\uFE0F\";\n display: inline-block;\n animation: _ngcontent-%COMP%_rotate-icon 2s linear infinite;\n}\n\n@keyframes _ngcontent-%COMP%_rotate-icon {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n\n\n\n\n.mj-icon-monogram-s[_ngcontent-%COMP%]::before {\n content: \"S\";\n font-weight: 800;\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 1.1em;\n color: var(--mj-brand-primary);\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"] });
286
286
  }
287
287
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MentionDropdownComponent, [{
288
288
  type: Component,
@@ -8,8 +8,8 @@ const _c0 = ["editor"];
8
8
  function MentionEditorComponent_Conditional_1_For_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
9
9
  i0.ɵɵelement(0, "img", 8);
10
10
  } if (rf & 2) {
11
- const attachment_r3 = i0.ɵɵnextContext().$implicit;
12
- i0.ɵɵproperty("src", attachment_r3.thumbnailUrl, i0.ɵɵsanitizeUrl)("alt", attachment_r3.fileName);
11
+ const attachment_r2 = i0.ɵɵnextContext().$implicit;
12
+ i0.ɵɵproperty("src", attachment_r2.thumbnailUrl, i0.ɵɵsanitizeUrl)("alt", attachment_r2.fileName);
13
13
  } }
14
14
  function MentionEditorComponent_Conditional_1_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
15
15
  i0.ɵɵelementStart(0, "div", 9);
@@ -18,35 +18,35 @@ function MentionEditorComponent_Conditional_1_For_2_Conditional_2_Template(rf, c
18
18
  i0.ɵɵtext(3);
19
19
  i0.ɵɵelementEnd()();
20
20
  } if (rf & 2) {
21
- const attachment_r3 = i0.ɵɵnextContext().$implicit;
21
+ const attachment_r2 = i0.ɵɵnextContext().$implicit;
22
22
  i0.ɵɵadvance(3);
23
- i0.ɵɵtextInterpolate(attachment_r3.fileName);
23
+ i0.ɵɵtextInterpolate(attachment_r2.fileName);
24
24
  } }
25
25
  function MentionEditorComponent_Conditional_1_For_2_Template(rf, ctx) { if (rf & 1) {
26
- const _r2 = i0.ɵɵgetCurrentView();
26
+ const _r1 = i0.ɵɵgetCurrentView();
27
27
  i0.ɵɵelementStart(0, "div", 7);
28
- i0.ɵɵlistener("click", function MentionEditorComponent_Conditional_1_For_2_Template_div_click_0_listener() { const attachment_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.onAttachmentClick(attachment_r3)); });
28
+ i0.ɵɵlistener("click", function MentionEditorComponent_Conditional_1_For_2_Template_div_click_0_listener() { const attachment_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onAttachmentClick(attachment_r2)); });
29
29
  i0.ɵɵconditionalCreate(1, MentionEditorComponent_Conditional_1_For_2_Conditional_1_Template, 1, 2, "img", 8);
30
30
  i0.ɵɵconditionalCreate(2, MentionEditorComponent_Conditional_1_For_2_Conditional_2_Template, 4, 1, "div", 9);
31
31
  i0.ɵɵelementStart(3, "button", 10);
32
- i0.ɵɵlistener("click", function MentionEditorComponent_Conditional_1_For_2_Template_button_click_3_listener($event) { const attachment_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(2); ctx_r3.removeAttachment(attachment_r3.id); return i0.ɵɵresetView($event.stopPropagation()); });
32
+ i0.ɵɵlistener("click", function MentionEditorComponent_Conditional_1_For_2_Template_button_click_3_listener($event) { const attachment_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); ctx_r2.removeAttachment(attachment_r2.id); return i0.ɵɵresetView($event.stopPropagation()); });
33
33
  i0.ɵɵelement(4, "i", 11);
34
34
  i0.ɵɵelementEnd()();
35
35
  } if (rf & 2) {
36
- const attachment_r3 = ctx.$implicit;
36
+ const attachment_r2 = ctx.$implicit;
37
37
  i0.ɵɵadvance();
38
- i0.ɵɵconditional(attachment_r3.thumbnailUrl ? 1 : -1);
38
+ i0.ɵɵconditional(attachment_r2.thumbnailUrl ? 1 : -1);
39
39
  i0.ɵɵadvance();
40
- i0.ɵɵconditional(!attachment_r3.thumbnailUrl ? 2 : -1);
40
+ i0.ɵɵconditional(!attachment_r2.thumbnailUrl ? 2 : -1);
41
41
  } }
42
42
  function MentionEditorComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
43
43
  i0.ɵɵelementStart(0, "div", 2);
44
44
  i0.ɵɵrepeaterCreate(1, MentionEditorComponent_Conditional_1_For_2_Template, 5, 2, "div", 6, i0.ɵɵrepeaterTrackByIdentity);
45
45
  i0.ɵɵelementEnd();
46
46
  } if (rf & 2) {
47
- const ctx_r3 = i0.ɵɵnextContext();
47
+ const ctx_r2 = i0.ɵɵnextContext();
48
48
  i0.ɵɵadvance();
49
- i0.ɵɵrepeater(ctx_r3.pendingAttachments);
49
+ i0.ɵɵrepeater(ctx_r2.pendingAttachments);
50
50
  } }
51
51
  function MentionEditorComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
52
52
  i0.ɵɵelementStart(0, "div", 4)(1, "div", 14);
@@ -56,13 +56,13 @@ function MentionEditorComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
56
56
  i0.ɵɵelementEnd()()();
57
57
  } }
58
58
  function MentionEditorComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
59
- const _r5 = i0.ɵɵgetCurrentView();
59
+ const _r4 = i0.ɵɵgetCurrentView();
60
60
  i0.ɵɵelementStart(0, "mj-mention-dropdown", 16);
61
- i0.ɵɵlistener("suggestionSelected", function MentionEditorComponent_Conditional_5_Template_mj_mention_dropdown_suggestionSelected_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onMentionSelected($event)); })("closed", function MentionEditorComponent_Conditional_5_Template_mj_mention_dropdown_closed_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.closeMentionDropdown()); });
61
+ i0.ɵɵlistener("suggestionSelected", function MentionEditorComponent_Conditional_5_Template_mj_mention_dropdown_suggestionSelected_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onMentionSelected($event)); })("closed", function MentionEditorComponent_Conditional_5_Template_mj_mention_dropdown_closed_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeMentionDropdown()); });
62
62
  i0.ɵɵelementEnd();
63
63
  } if (rf & 2) {
64
- const ctx_r3 = i0.ɵɵnextContext();
65
- i0.ɵɵproperty("suggestions", ctx_r3.mentionSuggestions)("position", ctx_r3.mentionDropdownPosition)("showAbove", ctx_r3.mentionDropdownShowAbove)("alignRight", ctx_r3.mentionDropdownAlignRight)("useFixedPositioning", true)("visible", true);
64
+ const ctx_r2 = i0.ɵɵnextContext();
65
+ i0.ɵɵproperty("suggestions", ctx_r2.mentionSuggestions)("position", ctx_r2.mentionDropdownPosition)("showAbove", ctx_r2.mentionDropdownShowAbove)("alignRight", ctx_r2.mentionDropdownAlignRight)("useFixedPositioning", true)("visible", true);
66
66
  } }
67
67
  /**
68
68
  * ContentEditable-based mention editor with visual chips/pills
@@ -1683,12 +1683,11 @@ export class MentionEditorComponent {
1683
1683
  multi: true
1684
1684
  }
1685
1685
  ])], decls: 6, vars: 7, consts: [["editor", ""], [1, "mention-editor-container", 3, "click", "dragover", "dragleave", "drop"], [1, "pending-attachments"], ["contenteditable", "true", 1, "mention-editor", 3, "input", "keydown", "blur", "paste"], [1, "drop-overlay"], [3, "suggestions", "position", "showAbove", "alignRight", "useFixedPositioning", "visible"], [1, "attachment-thumbnail"], [1, "attachment-thumbnail", 3, "click"], [1, "thumbnail-image", 3, "src", "alt"], [1, "thumbnail-placeholder"], ["title", "Remove attachment", 1, "remove-attachment", 3, "click"], [1, "fa-solid", "fa-times"], [1, "fa-solid", "fa-file"], [1, "file-name"], [1, "drop-message"], [1, "fa-solid", "fa-cloud-arrow-up"], [3, "suggestionSelected", "closed", "suggestions", "position", "showAbove", "alignRight", "useFixedPositioning", "visible"]], template: function MentionEditorComponent_Template(rf, ctx) { if (rf & 1) {
1686
- const _r1 = i0.ɵɵgetCurrentView();
1687
1686
  i0.ɵɵelementStart(0, "div", 1);
1688
- i0.ɵɵlistener("click", function MentionEditorComponent_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onContainerClick($event)); })("dragover", function MentionEditorComponent_Template_div_dragover_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDragOver($event)); })("dragleave", function MentionEditorComponent_Template_div_dragleave_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDragLeave($event)); })("drop", function MentionEditorComponent_Template_div_drop_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDrop($event)); });
1687
+ i0.ɵɵlistener("click", function MentionEditorComponent_Template_div_click_0_listener($event) { return ctx.onContainerClick($event); })("dragover", function MentionEditorComponent_Template_div_dragover_0_listener($event) { return ctx.onDragOver($event); })("dragleave", function MentionEditorComponent_Template_div_dragleave_0_listener($event) { return ctx.onDragLeave($event); })("drop", function MentionEditorComponent_Template_div_drop_0_listener($event) { return ctx.onDrop($event); });
1689
1688
  i0.ɵɵconditionalCreate(1, MentionEditorComponent_Conditional_1_Template, 3, 0, "div", 2);
1690
1689
  i0.ɵɵelementStart(2, "div", 3, 0);
1691
- i0.ɵɵlistener("input", function MentionEditorComponent_Template_div_input_2_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onInput()); })("keydown", function MentionEditorComponent_Template_div_keydown_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onKeyDown($event)); })("blur", function MentionEditorComponent_Template_div_blur_2_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onBlur()); })("paste", function MentionEditorComponent_Template_div_paste_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onPaste($event)); });
1690
+ i0.ɵɵlistener("input", function MentionEditorComponent_Template_div_input_2_listener() { return ctx.onInput(); })("keydown", function MentionEditorComponent_Template_div_keydown_2_listener($event) { return ctx.onKeyDown($event); })("blur", function MentionEditorComponent_Template_div_blur_2_listener() { return ctx.onBlur(); })("paste", function MentionEditorComponent_Template_div_paste_2_listener($event) { return ctx.onPaste($event); });
1692
1691
  i0.ɵɵelementEnd();
1693
1692
  i0.ɵɵconditionalCreate(4, MentionEditorComponent_Conditional_4_Template, 5, 0, "div", 4);
1694
1693
  i0.ɵɵconditionalCreate(5, MentionEditorComponent_Conditional_5_Template, 1, 6, "mj-mention-dropdown", 5);
@@ -1703,7 +1702,7 @@ export class MentionEditorComponent {
1703
1702
  i0.ɵɵconditional(ctx.isDragOver ? 4 : -1);
1704
1703
  i0.ɵɵadvance();
1705
1704
  i0.ɵɵconditional(ctx.showMentionDropdown && ctx.enableMentions ? 5 : -1);
1706
- } }, dependencies: [i1.MentionDropdownComponent], styles: [".mention-editor-container[_ngcontent-%COMP%] {\n position: relative;\n width: 100%;\n display: block;\n}\n\n.mention-editor-container.drag-over[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 5%, transparent);\n border-color: var(--mj-brand-primary);\n}\n\n.mention-editor[_ngcontent-%COMP%] {\n display: block;\n width: 100%;\n min-height: 100px;\n max-height: 300px;\n padding: 7px 3.5rem 7px 12px;\n outline: none;\n border: none;\n background: transparent;\n font-family: inherit;\n font-size: 1rem;\n line-height: 1.5;\n overflow-y: auto;\n overflow-x: hidden;\n word-wrap: break-word;\n white-space: pre-wrap;\n cursor: text;\n user-select: text;\n box-sizing: border-box;\n}\n.mention-editor[_ngcontent-%COMP%]:empty:before {\n content: attr(data-placeholder);\n color: var(--mj-text-muted);\n pointer-events: none;\n position: absolute;\n}\n.mention-editor[_ngcontent-%COMP%]:focus {\n outline: none;\n}\n.mention-editor[contenteditable=false][_ngcontent-%COMP%] {\n cursor: not-allowed;\n opacity: 0.6;\n background: var(--mj-bg-surface-sunken);\n}\n@media (max-width: 768px) {\n .mention-editor[_ngcontent-%COMP%] {\n font-size: 16px;\n padding: 5px;\n padding-right: 3rem;\n }\n}\n\n .mention-chip {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 12px;\n margin: 0 3px;\n border-radius: 16px;\n font-size: 13px;\n font-weight: 600;\n cursor: default;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n pointer-events: all;\n -webkit-user-modify: read-only;\n -moz-user-modify: read-only;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: 2px solid color-mix(in srgb, var(--mj-brand-primary) 40%, transparent);\n box-shadow: var(--mj-shadow-md);\n animation: _ngcontent-%COMP%_chipInsert 0.15s ease-out;\n}\n .mention-chip i {\n font-size: 12px;\n opacity: 0.95;\n}\n .mention-chip[data-mention-type=user] {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: 2px solid color-mix(in srgb, var(--mj-brand-primary) 40%, transparent);\n}\n .mention-chip:hover {\n transform: translateY(-1px);\n box-shadow: var(--mj-shadow-lg);\n transition: all 0.2s ease;\n}\n .mention-chip:focus, .mention-chip.selected {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 2px;\n}\n@keyframes _ngcontent-%COMP%_chipInsert {\n 0% {\n transform: scale(0.8);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n.mention-editor[_ngcontent-%COMP%] .mention-chip[_ngcontent-%COMP%] + .mention-chip[_ngcontent-%COMP%] {\n margin-left: 4px;\n}\n.mention-editor[_ngcontent-%COMP%] br[_ngcontent-%COMP%] {\n display: block;\n content: \"\";\n margin: 0;\n}\n\n.mention-editor[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 6px;\n}\n.mention-editor[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: transparent;\n}\n.mention-editor[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: color-mix(in srgb, var(--mj-text-primary) 20%, transparent);\n border-radius: 3px;\n}\n.mention-editor[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: color-mix(in srgb, var(--mj-text-primary) 30%, transparent);\n}\n\n\n\n\n.pending-attachments[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 8px 12px;\n border-bottom: 1px solid color-mix(in srgb, var(--mj-text-primary) 8%, transparent);\n background: color-mix(in srgb, var(--mj-text-primary) 2%, transparent);\n}\n\n.attachment-thumbnail[_ngcontent-%COMP%] {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 8px;\n overflow: hidden;\n cursor: pointer;\n transition: transform 0.2s, box-shadow 0.2s;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid color-mix(in srgb, var(--mj-text-primary) 10%, transparent);\n}\n\n.attachment-thumbnail[_ngcontent-%COMP%]:hover {\n transform: scale(1.05);\n box-shadow: var(--mj-shadow-lg);\n}\n\n.thumbnail-image[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.thumbnail-placeholder[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 8px;\n color: var(--mj-text-secondary);\n}\n\n.thumbnail-placeholder[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 24px;\n margin-bottom: 4px;\n color: var(--mj-text-muted);\n}\n\n.thumbnail-placeholder[_ngcontent-%COMP%] .file-name[_ngcontent-%COMP%] {\n font-size: 10px;\n text-align: center;\n word-break: break-all;\n line-height: 1.2;\n max-height: 36px;\n overflow: hidden;\n}\n\n.remove-attachment[_ngcontent-%COMP%] {\n position: absolute;\n top: 4px;\n right: 4px;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n background: color-mix(in srgb, var(--mj-text-primary) 60%, transparent);\n color: var(--mj-text-inverse);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.2s, background 0.2s;\n}\n\n.attachment-thumbnail[_ngcontent-%COMP%]:hover .remove-attachment[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n.remove-attachment[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-status-error) 90%, transparent);\n}\n\n.remove-attachment[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 10px;\n}\n\n\n\n.drop-overlay[_ngcontent-%COMP%] {\n position: absolute;\n inset: 0;\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n backdrop-filter: blur(2px);\n border: 2px dashed var(--mj-brand-primary);\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100;\n pointer-events: none;\n}\n\n.drop-message[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n color: var(--mj-brand-primary);\n font-weight: 600;\n}\n\n.drop-message[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 32px;\n}\n\n.drop-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n font-size: 14px;\n}"] });
1705
+ } }, dependencies: [i1.MentionDropdownComponent], styles: [".mention-editor-container[_ngcontent-%COMP%] {\n position: relative;\n width: 100%;\n display: block;\n}\n\n.mention-editor-container.drag-over[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 5%, transparent);\n border-color: var(--mj-brand-primary);\n}\n\n.mention-editor[_ngcontent-%COMP%] {\n display: block;\n width: 100%;\n min-height: 100px;\n max-height: 300px;\n padding: 7px 3.5rem 7px 12px;\n outline: none;\n border: none;\n background: transparent;\n font-family: inherit;\n font-size: 1rem;\n line-height: 1.5;\n overflow-y: auto;\n overflow-x: hidden;\n word-wrap: break-word;\n white-space: pre-wrap;\n cursor: text;\n user-select: text;\n box-sizing: border-box;\n}\n.mention-editor[_ngcontent-%COMP%]:empty:before {\n content: attr(data-placeholder);\n color: var(--mj-text-muted);\n pointer-events: none;\n position: absolute;\n}\n.mention-editor[_ngcontent-%COMP%]:focus {\n outline: none;\n}\n.mention-editor[contenteditable=false][_ngcontent-%COMP%] {\n cursor: not-allowed;\n opacity: 0.6;\n background: var(--mj-bg-surface-sunken);\n}\n@media (max-width: 768px) {\n .mention-editor[_ngcontent-%COMP%] {\n font-size: 16px;\n padding: 5px;\n padding-right: 3rem;\n }\n}\n\n .mention-chip {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 12px;\n margin: 0 3px;\n border-radius: 16px;\n font-size: 13px;\n font-weight: 600;\n cursor: default;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n pointer-events: all;\n -webkit-user-modify: read-only;\n -moz-user-modify: read-only;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: 2px solid color-mix(in srgb, var(--mj-brand-primary) 40%, transparent);\n box-shadow: var(--mj-shadow-md);\n animation: _ngcontent-%COMP%_chipInsert 0.15s ease-out;\n}\n .mention-chip i {\n font-size: 12px;\n opacity: 0.95;\n}\n .mention-chip[data-mention-type=user] {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: 2px solid color-mix(in srgb, var(--mj-brand-primary) 40%, transparent);\n}\n .mention-chip:hover {\n transform: translateY(-1px);\n box-shadow: var(--mj-shadow-lg);\n transition: all 0.2s ease;\n}\n .mention-chip:focus, .mention-chip.selected {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 2px;\n}\n@keyframes _ngcontent-%COMP%_chipInsert {\n 0% {\n transform: scale(0.8);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n.mention-editor[_ngcontent-%COMP%] .mention-chip[_ngcontent-%COMP%] + .mention-chip[_ngcontent-%COMP%] {\n margin-left: 4px;\n}\n.mention-editor[_ngcontent-%COMP%] br[_ngcontent-%COMP%] {\n display: block;\n content: \"\";\n margin: 0;\n}\n\n.mention-editor[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 6px;\n}\n.mention-editor[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: transparent;\n}\n.mention-editor[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: color-mix(in srgb, var(--mj-text-primary) 20%, transparent);\n border-radius: 3px;\n}\n.mention-editor[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: color-mix(in srgb, var(--mj-text-primary) 30%, transparent);\n}\n\n\n\n.pending-attachments[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 8px 12px;\n border-bottom: 1px solid color-mix(in srgb, var(--mj-text-primary) 8%, transparent);\n background: color-mix(in srgb, var(--mj-text-primary) 2%, transparent);\n}\n\n.attachment-thumbnail[_ngcontent-%COMP%] {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 8px;\n overflow: hidden;\n cursor: pointer;\n transition: transform 0.2s, box-shadow 0.2s;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid color-mix(in srgb, var(--mj-text-primary) 10%, transparent);\n}\n\n.attachment-thumbnail[_ngcontent-%COMP%]:hover {\n transform: scale(1.05);\n box-shadow: var(--mj-shadow-lg);\n}\n\n.thumbnail-image[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.thumbnail-placeholder[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 8px;\n color: var(--mj-text-secondary);\n}\n\n.thumbnail-placeholder[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 24px;\n margin-bottom: 4px;\n color: var(--mj-text-muted);\n}\n\n.thumbnail-placeholder[_ngcontent-%COMP%] .file-name[_ngcontent-%COMP%] {\n font-size: 10px;\n text-align: center;\n word-break: break-all;\n line-height: 1.2;\n max-height: 36px;\n overflow: hidden;\n}\n\n.remove-attachment[_ngcontent-%COMP%] {\n position: absolute;\n top: 4px;\n right: 4px;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n background: color-mix(in srgb, var(--mj-text-primary) 60%, transparent);\n color: var(--mj-text-inverse);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.2s, background 0.2s;\n}\n\n.attachment-thumbnail[_ngcontent-%COMP%]:hover .remove-attachment[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n.remove-attachment[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-status-error) 90%, transparent);\n}\n\n.remove-attachment[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 10px;\n}\n\n\n.drop-overlay[_ngcontent-%COMP%] {\n position: absolute;\n inset: 0;\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n backdrop-filter: blur(2px);\n border: 2px dashed var(--mj-brand-primary);\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100;\n pointer-events: none;\n}\n\n.drop-message[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n color: var(--mj-brand-primary);\n font-weight: 600;\n}\n\n.drop-message[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 32px;\n}\n\n.drop-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n font-size: 14px;\n}"] });
1707
1706
  }
1708
1707
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MentionEditorComponent, [{
1709
1708
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"mention-editor.component.js","sourceRoot":"","sources":["../../../../src/lib/components/mention/mention-editor.component.ts","../../../../src/lib/components/mention/mention-editor.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EAGT,UAAU,EAIV,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAwB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAGL,gCAAgC,EAGjC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;;;ICTxC,yBAG0B;;;IADxB,AADA,kEAA+B,+BACJ;;;IAI7B,8BAAmC;IACjC,wBAAgC;IAChC,gCAAwB;IAAA,YAAyB;IACnD,AADmD,iBAAO,EACpD;;;IADoB,eAAyB;IAAzB,4CAAyB;;;;IAXvD,8BAC0C;IAAxC,8NAAS,uCAA6B,KAAC;IACvC,4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GAAG,EAAE,CAAC,sBAAsB,CAAC;oBACrD,KAAK,EAAE,IAAI;iBACZ;aACF;;YCtEH,8BAK0B;YAAxB,AADA,AADA,AADA,4IAAS,4BAAwB,KAAC,qIACtB,sBAAkB,KAAC,uIAClB,uBAAmB,KAAC,6HACzB,kBAAc,KAAC;YAGvB,wFAAqC;YA2BrC,iCAUC;YADC,AADA,AADA,AADA,sIAAS,aAAS,KAAC,mIACR,qBAAiB,KAAC,uHACrB,YAAQ,KAAC,+HACR,mBAAe,KAAC;YAC1B,iBAAM;YAGP,wFAAkB;YAUlB,wGAA6C;YAY/C,iBAAM;;YArEJ,2CAA8B;YAO9B,cAyBC;YAzBD,4DAyBC;YAMC,cAAkC;;YASpC,eAOC;YAPD,yCAOC;YAGD,cAWC;YAXD,wEAWC;;;iFDGU,sBAAsB;cAblC,SAAS;6BACI,KAAK,YACP,mBAAmB,aAGlB;oBACT;wBACE,OAAO,EAAE,iBAAiB;wBAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,uBAAuB,CAAC;wBACrD,KAAK,EAAE,IAAI;qBACZ;iBACF;;kBAGA,SAAS;mBAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;kBAErC,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,KAAK;;kBAML,KAAK;;kBAKL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAGL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAEN,MAAM;;kBA+FN,YAAY;mBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;kFApInC,sBAAsB","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n AfterViewInit,\n forwardRef,\n OnInit,\n ViewEncapsulation,\n ChangeDetectorRef,\n HostListener\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n ComposerSuggestionRequest,\n ComposerTriggerProvider,\n DiscoverComposerTriggerProviders,\n MentionSuggestion,\n MentionSuggestionPreset\n} from '../../composer-trigger-provider';\nimport { IMetadataProvider, UserInfo } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\n\n/**\n * Represents a pending attachment that hasn't been uploaded yet\n */\nexport interface PendingAttachment {\n /** Local ID for tracking */\n id: string;\n /** Original File object (null for artifact references) */\n file: File | null;\n /** Base64 data URL for display */\n dataUrl: string;\n /** MIME type */\n mimeType: string;\n /** Original filename */\n fileName: string;\n /** File size in bytes */\n sizeBytes: number;\n /** Width in pixels (for images) */\n width?: number;\n /** Height in pixels (for images) */\n height?: number;\n /** Small thumbnail URL for preview */\n thumbnailUrl?: string;\n /** MJStorage File ID (for artifact references, mutually exclusive with inline data) */\n fileID?: string;\n /** Source of the attachment */\n source?: 'upload' | 'artifact';\n /** Artifact Version ID (for artifact references, used to create ConversationDetailArtifact) */\n artifactVersionId?: string;\n}\n\n/**\n * ContentEditable-based mention editor with visual chips/pills\n * Provides Slack/Teams-style mention UX with immutable mention tokens\n */\n@Component({\n standalone: false,\n selector: 'mj-mention-editor',\n templateUrl: './mention-editor.component.html',\n styleUrls: ['./mention-editor.component.css'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MentionEditorComponent),\n multi: true\n }\n ]\n})\nexport class MentionEditorComponent implements OnInit, AfterViewInit, ControlValueAccessor {\n @ViewChild('editor', { static: false }) editorRef!: ElementRef<HTMLDivElement>;\n\n @Input() placeholder: string = 'Type @ to mention agents or users, # for entities...';\n @Input() disabled: boolean = false;\n @Input() currentUser?: UserInfo;\n /** Master switch for all mention/command triggers. When false no providers are consulted. */\n @Input() enableMentions: boolean = true;\n /**\n * Explicit trigger-provider list — when bound, EXACTLY these providers are active\n * (explicit list wins over discovery). Leave null to discover providers registered\n * with the ClassFactory via `@RegisterClass(ComposerTriggerProvider, '<Key>')`.\n */\n @Input() TriggerProviders: ComposerTriggerProvider[] | null = null;\n /**\n * Discovery-mode filter: providers whose stable `Key` appears here are skipped when\n * resolving registered providers. Ignored when `TriggerProviders` is bound.\n */\n @Input() ExcludedTriggerKeys: string[] = [];\n /** Optional metadata provider scoping this editor (multi-provider hosts); passed through to trigger providers. */\n @Input() Provider: IMetadataProvider | null = null;\n /** Auto-focus the editor after view init (the composer default). Disable when embedded in forms. */\n @Input() autoFocus: boolean = true;\n\n // Attachment settings\n @Input() enableAttachments: boolean = true;\n @Input() maxAttachments: number = 10;\n @Input() maxAttachmentSizeBytes: number = 20 * 1024 * 1024; // 20MB default\n @Input() acceptedFileTypes: string = 'image/*'; // MIME types to accept\n\n @Output() valueChange = new EventEmitter<string>();\n @Output() mentionSelected = new EventEmitter<MentionSuggestion>();\n @Output() enterPressed = new EventEmitter<string>();\n @Output() attachmentsChanged = new EventEmitter<PendingAttachment[]>();\n @Output() attachmentError = new EventEmitter<string>();\n @Output() attachmentClicked = new EventEmitter<PendingAttachment>();\n /** Fires when the contenteditable loses focus (hosts persist drafts on this). */\n @Output() editorBlurred = new EventEmitter<void>();\n\n // Pending attachments state\n public pendingAttachments: PendingAttachment[] = [];\n public isDragOver: boolean = false;\n\n // Mention dropdown state\n public showMentionDropdown: boolean = false;\n public mentionSuggestions: MentionSuggestion[] = [];\n public mentionDropdownPosition: { top: number; left: number } = { top: 0, left: 0 };\n public mentionDropdownShowAbove: boolean = false;\n /** Right-align the dropdown against its anchor. Only the button path sets this. */\n public mentionDropdownAlignRight: boolean = false;\n\n private mentionStartIndex: number = -1;\n private mentionQuery: string = '';\n /** The trigger char that opened the current mention dropdown */\n private activeTrigger: string = '@';\n /**\n * Set while a dropdown was opened by {@link OpenTrigger} rather than by typing.\n *\n * In this mode the trigger character is NOT in the editor — there is nothing to strip on\n * dismissal, and nothing for the user to see until they pick something. It also changes how the\n * query and the chip insertion are measured, since neither can anchor on a character that is not\n * there; {@link virtualTriggerBaseline} stands in for it.\n */\n private virtualTriggerOpen: boolean = false;\n /** Text length at the moment a virtual trigger opened — the origin for its query and deletion. */\n private virtualTriggerBaseline: number = 0;\n /**\n * The control that opened a virtual trigger, used to anchor the dropdown to it.\n *\n * STICKY for the whole session on purpose. `positionMentionDropdown()` re-runs on every keystroke\n * while the user filters, and once there is text the caret measures real coordinates — so\n * anchoring only on first paint would open at the button and then jump to the far-left caret on\n * the first keypress, which is worse than not anchoring at all.\n */\n private virtualTriggerAnchor: HTMLElement | null = null;\n /**\n * Monotonic sequence guarding the async suggestion fetch — a response only applies\n * when no newer keystroke (or dropdown close) has superseded it.\n */\n private suggestionRequestSeq: number = 0;\n /** Cap on the suggestions displayed; passed to providers as `MaxResults`. */\n private static readonly MaxSuggestions: number = 50;\n\n /**\n * The trigger providers this editor consults: the explicit `TriggerProviders` list\n * when bound, otherwise ClassFactory discovery filtered by `ExcludedTriggerKeys`.\n * Empty when `enableMentions` is off (or nothing is registered) — the editor then\n * behaves as a plain text editor.\n */\n private get activeProviders(): ComposerTriggerProvider[] {\n if (!this.enableMentions) {\n return [];\n }\n return this.TriggerProviders ?? DiscoverComposerTriggerProviders(this.ExcludedTriggerKeys);\n }\n\n /** Unique trigger characters across the active providers (priority order preserved). */\n private get mentionTriggers(): string[] {\n const triggers: string[] = [];\n for (const provider of this.activeProviders) {\n if (!triggers.includes(provider.TriggerChar)) {\n triggers.push(provider.TriggerChar);\n }\n }\n return triggers;\n }\n\n private onChange: (value: string) => void = () => {};\n public onTouched: () => void = () => {};\n /** Value written via writeValue() before the view (editorRef) exists — applied in ngAfterViewInit. */\n private pendingWriteValue: string | null = null;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private hostRef: ElementRef<HTMLElement>\n ) {}\n\n /**\n * Close the dropdown when the pointer goes down anywhere outside it.\n *\n * Dismissal previously relied entirely on the editor's blur, which is not enough: clicking a\n * non-focusable area (the message list, page background) does not blur a contenteditable, so the\n * dropdown stayed open with nothing to close it. That was always true for a typed trigger; the\n * Skills button makes it easy to hit, because the button deliberately keeps focus in the editor\n * so the user's next click is the FIRST thing that could dismiss it.\n *\n * `mousedown` rather than `click`: it fires before the browser moves focus, so this decides\n * before blur's own 200ms timer gets involved and the two cannot race.\n *\n * The dropdown renders with fixed positioning but stays inside this component's host, so the\n * containment check covers a click on a suggestion row — which must select, not dismiss.\n */\n @HostListener('document:mousedown', ['$event'])\n onDocumentMouseDown(event: MouseEvent): void {\n // Also fires for a press still awaiting suggestions: on a cold session the provider load takes\n // hundreds of ms, and without this the user's dismissing click is ignored and the menu pops\n // open afterwards, unbidden. closeMentionDropdown bumps the request sequence, which drops the\n // in-flight response.\n if (!this.showMentionDropdown && !this.virtualTriggerOpen) {\n return;\n }\n const target = event.target as Node | null;\n if (target && this.hostRef.nativeElement.contains(target)) {\n return;\n }\n this.closeMentionDropdown();\n this.cdr.markForCheck();\n }\n\n async ngOnInit(): Promise<void> {\n // Warm up the active providers (best-effort — a provider that fails to warm\n // simply serves its first real request cold).\n if (this.enableMentions) {\n const user = this.currentUser ?? null;\n await Promise.all(\n this.activeProviders.map((p) => p.Initialize(user).catch(() => undefined))\n );\n }\n }\n\n ngAfterViewInit(): void {\n // Apply any value written through the ControlValueAccessor before the view existed\n // (NgModel calls writeValue during directive init, before this component's view is ready)\n if (this.pendingWriteValue !== null) {\n this.setEditorContent(this.pendingWriteValue);\n this.pendingWriteValue = null;\n }\n\n // Auto-focus the editor\n if (this.autoFocus) {\n setTimeout(() => {\n this.editorRef?.nativeElement?.focus();\n }, 100);\n }\n }\n\n /**\n * Handle clicks on the container - focus the editor if clicking outside the contentEditable\n */\n onContainerClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n const editor = this.editorRef?.nativeElement;\n\n // Don't handle clicks on the dropdown or its children\n if (target.closest('mj-mention-dropdown')) {\n return;\n }\n\n // If clicking on container or any element that's not the editor itself, focus the editor\n if (target !== editor && !editor?.contains(target)) {\n editor?.focus();\n\n // Move cursor to end of content\n const selection = window.getSelection();\n const range = document.createRange();\n\n if (editor && selection) {\n range.selectNodeContents(editor);\n range.collapse(false); // Collapse to end\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n }\n\n /**\n * Handle input changes in contentEditable\n */\n onInput(): void {\n const plainText = this.getPlainText();\n this.onChange(plainText);\n this.valueChange.emit(plainText);\n\n // Handle mention/command autocomplete via the active trigger providers\n if (this.enableMentions) {\n this.handleMentionInput();\n }\n }\n\n /**\n * Handle blur event - close dropdown when editor loses focus\n */\n onBlur(): void {\n // Call form control touched callback\n this.onTouched();\n this.editorBlurred.emit();\n\n // Close dropdown when editor loses focus\n // Use setTimeout to allow mousedown events on dropdown to fire first\n setTimeout(() => {\n if (this.showMentionDropdown || this.virtualTriggerOpen) {\n this.closeMentionDropdown();\n }\n }, 200);\n }\n\n /**\n * Handle paste event - images or plain text\n */\n onPaste(event: ClipboardEvent): void {\n // Check for image data in clipboard\n if (this.enableAttachments && event.clipboardData?.items) {\n const items = Array.from(event.clipboardData.items);\n const imageItems = items.filter(item => item.type.startsWith('image/'));\n\n if (imageItems.length > 0) {\n event.preventDefault();\n\n // Process each image\n for (const item of imageItems) {\n const file = item.getAsFile();\n if (file) {\n this.processFile(file);\n }\n }\n return;\n }\n }\n\n // No images - handle as plain text\n event.preventDefault();\n\n // Get plain text from clipboard\n const text = event.clipboardData?.getData('text/plain') || '';\n\n if (!text) return;\n\n // Insert plain text at cursor position\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n const range = selection.getRangeAt(0);\n range.deleteContents();\n\n // Insert text as text node (not HTML)\n const textNode = document.createTextNode(text);\n range.insertNode(textNode);\n\n // Move cursor to end of inserted text\n range.setStartAfter(textNode);\n range.collapse(true);\n selection.removeAllRanges();\n selection.addRange(range);\n\n // Trigger input event to update model\n this.onInput();\n }\n\n /**\n * Handle keydown events\n */\n onKeyDown(event: KeyboardEvent): void {\n // Enter alone: Send message. The dropdown only earns Enter when it has something to pick. A\n // button-opened menu stays open on an empty result set (so the press is not a silent no-op),\n // which made \"showing but empty\" reachable for the first time — and there Enter was neither\n // handled nor prevented, so it fell through to the contenteditable and inserted a newline\n // instead of sending.\n if (event.key === 'Enter' && !event.shiftKey && (!this.showMentionDropdown || this.mentionSuggestions.length === 0)) {\n event.preventDefault();\n if (this.showMentionDropdown) {\n this.closeMentionDropdown();\n }\n const plainText = this.getPlainText();\n this.enterPressed.emit(plainText);\n return;\n }\n\n // Backspace: Check if deleting a mention chip\n if (event.key === 'Backspace') {\n this.handleBackspace(event);\n }\n\n // Handle mention dropdown navigation\n if (this.showMentionDropdown) {\n // Let the dropdown handle arrow keys, enter, escape\n // (We'll pass these through to mention-dropdown component)\n }\n }\n\n /**\n * Handle mention/command trigger detection — finds the nearest active trigger char\n * before the cursor and kicks off the (async) provider suggestion fetch.\n */\n private handleMentionInput(): void {\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n const activeTriggers = this.mentionTriggers;\n if (activeTriggers.length === 0) {\n this.closeMentionDropdown();\n return;\n }\n\n const range = selection.getRangeAt(0);\n const textBeforeCursor = this.getTextBeforeCursor(range);\n\n // Find the nearest active trigger char before the cursor — whichever is closest wins\n // A button-opened session only recognises trigger characters typed AFTER it opened. Without\n // this floor the scan runs over the whole message, so a URL ('.../docs'), an email ('a@b.io')\n // or a date ('9/11') already in the box is found instead, and the first keystroke either closes\n // the menu the button just opened or filters it by the wrong query. searchFrom is 0 on the\n // typed path, which leaves that path's behaviour byte-for-byte unchanged.\n const searchFrom = this.virtualTriggerOpen ? this.virtualTriggerBaseline : 0;\n let triggerIndex = -1;\n let triggerChar = '@';\n for (const t of activeTriggers) {\n const idx = textBeforeCursor.lastIndexOf(t);\n if (idx >= searchFrom && idx > triggerIndex) {\n triggerIndex = idx;\n triggerChar = t;\n }\n }\n\n if (triggerIndex === -1) {\n // A virtual trigger has no character in the text, so the search above finds nothing. Keep it\n // open and measure the query from where it opened, otherwise the first keystroke after\n // clicking the button would dismiss the list the button just produced.\n if (this.virtualTriggerOpen && textBeforeCursor.length >= this.virtualTriggerBaseline) {\n const query = textBeforeCursor.substring(this.virtualTriggerBaseline);\n if (!query.includes(' ')) {\n this.mentionQuery = query;\n void this.fetchSuggestions(this.activeTrigger, query);\n return;\n }\n }\n this.closeMentionDropdown();\n return;\n }\n\n // Check if there's a space between the trigger and cursor (means mention was completed)\n const textAfterTrigger = textBeforeCursor.substring(triggerIndex + 1);\n if (textAfterTrigger.includes(' ')) {\n this.closeMentionDropdown();\n return;\n }\n\n // A real trigger character now owns the session, so the virtual one must let go: otherwise\n // chip insertion still takes the virtual branch and deletes only the typed tail, orphaning the\n // trigger text, and the menu stays pinned to the button instead of the caret.\n if (this.virtualTriggerOpen) {\n this.virtualTriggerOpen = false;\n this.virtualTriggerBaseline = 0;\n this.virtualTriggerAnchor = null;\n this.mentionDropdownAlignRight = false;\n }\n\n // Extract query\n this.mentionQuery = textAfterTrigger;\n this.mentionStartIndex = triggerIndex;\n this.activeTrigger = triggerChar;\n\n // Fetch suggestions from the provider(s) owning this trigger (async, race-guarded)\n void this.fetchSuggestions(triggerChar, textAfterTrigger);\n }\n\n /**\n * Routes the suggestion request to every active provider whose TriggerChar matches,\n * concatenates their results in priority order, caps the merged list, and opens the\n * dropdown. A monotonic sequence drops stale responses when the user keeps typing.\n */\n private async fetchSuggestions(triggerChar: string, query: string): Promise<void> {\n const seq = ++this.suggestionRequestSeq;\n const providers = this.activeProviders.filter((p) => p.TriggerChar === triggerChar);\n\n const request: ComposerSuggestionRequest = {\n Query: query,\n MaxResults: MentionEditorComponent.MaxSuggestions,\n ContextUser: this.currentUser ?? null,\n Provider: this.Provider\n };\n\n const resultSets = await Promise.all(\n providers.map((p) => p.GetSuggestions(request).catch(() => [] as MentionSuggestion[]))\n );\n\n if (seq !== this.suggestionRequestSeq) {\n return; // superseded by a newer keystroke or an explicit close\n }\n\n const merged = resultSets.flat().slice(0, MentionEditorComponent.MaxSuggestions);\n this.mentionSuggestions = merged;\n\n if (merged.length > 0) {\n this.showMentionDropdown = true;\n this.positionMentionDropdown();\n } else if (this.virtualTriggerOpen) {\n // A button press must never be a silent no-op. Closing on empty results is right for a TYPED\n // trigger (the user is mid-word and nothing matched yet), but a host with zero skills clicking\n // the button would get no feedback at all and read it as broken. Staying open surfaces the\n // dropdown's own empty state, which was otherwise unreachable.\n this.showMentionDropdown = true;\n this.positionMentionDropdown();\n } else {\n this.closeMentionDropdown();\n }\n this.cdr.detectChanges();\n }\n\n /**\n * Get text before cursor position\n */\n private getTextBeforeCursor(range: Range): string {\n const tempRange = range.cloneRange();\n tempRange.selectNodeContents(this.editorRef.nativeElement);\n tempRange.setEnd(range.startContainer, range.startOffset);\n return tempRange.toString();\n }\n\n /**\n * Position the mention dropdown\n */\n private positionMentionDropdown(): void {\n const editor = this.editorRef?.nativeElement;\n if (!editor) return;\n\n // Get the parent container (message-input-box-container) for alignment\n const container = editor.closest('.message-input-box-container');\n const containerRect = container?.getBoundingClientRect();\n\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n // A button-opened trigger anchors to the BUTTON, not the caret. On the typed path the user's\n // eyes and query are at the caret so the caret is right; on the button path nobody is looking at\n // the caret, they are looking at the control they just pressed. Sticky for the session (see\n // virtualTriggerAnchor) so filtering does not yank the menu to the caret on the first keystroke.\n if (this.virtualTriggerOpen && this.virtualTriggerAnchor) {\n this.positionToAnchor(this.virtualTriggerAnchor, containerRect);\n return;\n }\n\n const range = selection.getRangeAt(0);\n let cursorRect = range.getBoundingClientRect();\n\n // A collapsed range in an EMPTY editor measures 0x0 at 0,0 in every browser, which pinned the\n // dropdown to the bottom-left corner of the viewport and ran it off screen. Rare while typing\n // (there is text to measure) but the normal case when a BUTTON opens the trigger on an empty\n // composer. Fall back to the editor's own box so the menu lands over the composer either way.\n if (cursorRect.width === 0 && cursorRect.height === 0 && cursorRect.top === 0 && cursorRect.left === 0) {\n const editorRect = editor.getBoundingClientRect();\n cursorRect = editorRect as DOMRect;\n }\n\n // Check space below vs above\n const spaceBelow = window.innerHeight - cursorRect.bottom;\n const spaceAbove = cursorRect.top;\n const dropdownHeight = Math.min(this.mentionSuggestions.length * 56, 300);\n\n // Prefer ABOVE. The composer sits at the bottom of the chat, so a dropdown that grows downward\n // lands on top of the very text being typed. Below is the fallback for the rare host that\n // mounts the composer high in a tall viewport.\n this.mentionDropdownAlignRight = false;\n this.mentionDropdownShowAbove = spaceAbove >= dropdownHeight || spaceAbove > spaceBelow;\n\n if (this.mentionDropdownShowAbove) {\n // Position above, aligning with container top if possible\n this.mentionDropdownPosition = {\n top: (containerRect ? containerRect.top : cursorRect.top) + window.scrollY - 8,\n left: cursorRect.left + window.scrollX\n };\n } else {\n // Position below cursor, but align bottom edge with container top\n this.mentionDropdownPosition = {\n top: containerRect ? containerRect.top + window.scrollY : cursorRect.bottom + window.scrollY + 4,\n left: cursorRect.left + window.scrollX\n };\n }\n }\n\n\n /**\n * Right-align the dropdown above a trigger control, matching where the voice-options picker puts\n * its popover so two buttons in the same strip do not open menus on opposite corners.\n *\n * Right alignment is applied as a transform in CSS (`align-right`) rather than computed here,\n * because the dropdown's width is content-based; `left` is still clamped so no anchor position can\n * push it off the left edge on a narrow viewport.\n */\n private positionToAnchor(anchor: HTMLElement, containerRect: DOMRect | undefined): void {\n const GUTTER = 16;\n const rect = anchor.getBoundingClientRect();\n // The dropdown is rendered with `useFixedPositioning`, so `top`/`left` are VIEWPORT coordinates.\n // Never add window.scrollX/scrollY here — getBoundingClientRect is already viewport-relative, and\n // adding scroll converts to document coordinates, which under `position: fixed` drags the menu\n // off by exactly the scroll offset.\n\n // HORIZONTAL. Align the box's LEFT edge to the button's left edge and let it grow rightward.\n // Right-alignment is wrong for this control: the Skills button sits in `.attach-buttons` on the\n // LEFT of the composer, so pinning the box's right edge to the button's right edge sends a\n // 280-400px menu off the left of the screen, and clamping it back parks it over the middle of\n // the composer. Flip to right-aligned only when growing right would overflow the viewport,\n // which is what a menu anchored to a right-hand control needs.\n const assumedWidth = Math.min(400, window.innerWidth - GUTTER * 2);\n const overflowsRight = rect.left + assumedWidth > window.innerWidth - GUTTER;\n this.mentionDropdownAlignRight = overflowsRight;\n // align-right shifts the box back by its own width, so `left` is then its RIGHT edge; otherwise\n // `left` is its left edge. Clamp both forms inside the gutter.\n //\n // When flipping, align to the CONTAINER's right edge, not the button's. `.attach-buttons` is\n // pinned to the composer's bottom-right and Skills is the leftmost of five icons, so pinning the\n // box to that one button's right edge hangs its whole 400px body out to the left of the icon the\n // user pressed. Aligning to the composer instead puts the menu above the button cluster, which is\n // what \"above the button\" means when the menu is ten times the button's width.\n const flippedRightEdge = containerRect\n ? Math.min(containerRect.right, window.innerWidth - GUTTER)\n : Math.min(rect.right, window.innerWidth - GUTTER);\n const left = overflowsRight\n ? Math.max(assumedWidth + GUTTER, flippedRightEdge)\n : Math.min(Math.max(GUTTER, rect.left), window.innerWidth - GUTTER - assumedWidth);\n\n // VERTICAL. Prefer the composer's top edge so the menu clears the whole input box rather than\n // overlapping the text the user is composing; fall back to the button when there is no container.\n // Not unconditional: `show-above` lifts the box by its own height, so forcing it where there is\n // no room renders it off the top of the viewport where it cannot be reached.\n const anchorTop = containerRect ? containerRect.top : rect.top;\n const dropdownHeight = Math.min(Math.max(this.mentionSuggestions.length, 1) * 56, 300);\n // Prefer above, but when it does not fit, take whichever side has MORE room rather than\n // dropping below unconditionally — the composer is bottom-docked, so below is usually the worse\n // side. In a short viewport (a popped-out chat, or mobile with the keyboard up) that difference\n // is the whole menu versus a clipped sliver.\n const spaceBelow = window.innerHeight - rect.bottom;\n const showAbove = anchorTop >= dropdownHeight + GUTTER || anchorTop > spaceBelow;\n this.mentionDropdownShowAbove = showAbove;\n // Above: `top` is the box's BOTTOM edge (the transform lifts it). Below: it is the top edge.\n // Clamped either way, because dropdownHeight is an estimate (rows with descriptions run taller\n // than 56px) and an underestimate would otherwise clip the first row off the top of the screen.\n const rawTop = showAbove ? anchorTop - 8 : rect.bottom + 8;\n const top = showAbove\n ? Math.max(GUTTER + dropdownHeight, Math.min(rawTop, window.innerHeight - GUTTER))\n : Math.max(GUTTER, Math.min(rawTop, window.innerHeight - GUTTER - dropdownHeight));\n\n this.mentionDropdownPosition = { top, left };\n }\n\n /**\n * Handle mention selection from dropdown\n */\n onMentionSelected(suggestion: MentionSuggestion): void {\n this.insertMentionChip(suggestion);\n this.closeMentionDropdown();\n this.mentionSelected.emit(suggestion);\n\n // Refocus the editor after selection\n setTimeout(() => {\n this.editorRef?.nativeElement?.focus();\n }, 50);\n }\n\n /**\n * Insert a mention chip at the current cursor position\n */\n /**\n * Programmatically inserts a RESOLVED mention chip (+ a single trailing space) at\n * the END of the editor content and places the caret after it — the exact state a\n * user reaches by typing a trigger and picking from the dropdown. Unlike the\n * dropdown path this needs no active trigger context, so hosts can pre-address a\n * message (e.g. the omnibar's '@agent' flow staging a Sage pill) and leave the\n * user ready to type.\n *\n * @returns false when the editor view isn't mounted yet — callers may retry.\n */\n /** Focuses the editor and places the caret at the very end of its content. */\n public FocusCaretAtEnd(): boolean {\n const editor = this.editorRef?.nativeElement;\n if (!editor) {\n return false;\n }\n editor.focus();\n const selection = window.getSelection();\n if (selection) {\n const range = document.createRange();\n range.selectNodeContents(editor);\n range.collapse(false);\n selection.removeAllRanges();\n selection.addRange(range);\n }\n return true;\n }\n\n /**\n * Open the suggestion dropdown for a trigger character, exactly as if the user had typed it.\n *\n * Exists so a trigger can have a BUTTON as well as a keystroke. `/` commands were previously\n * reachable only by knowing to type `/`, which is not an affordance — nothing on screen says the\n * feature is there.\n *\n * Deliberately inserts the character and re-runs the normal input path rather than opening the\n * dropdown directly. Everything downstream (which providers own the char, permission filtering,\n * the query the user then types, replacing the char with the chosen chip) is already driven by\n * that path; short-circuiting it would fork the flow and leave `mentionStartIndex` /\n * `activeTrigger` unset, so the first selection would insert in the wrong place.\n *\n * @returns false when the editor is disabled, unavailable, or no active provider owns the char.\n */\n public OpenTrigger(triggerChar: string, anchorEl?: HTMLElement | null): boolean {\n const editor = this.editorRef?.nativeElement;\n if (!editor || this.disabled) {\n return false;\n }\n if (!this.mentionTriggers.includes(triggerChar)) {\n return false;\n }\n if (!this.FocusCaretAtEnd()) {\n return false;\n }\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) {\n return false;\n }\n\n // NOTHING is written into the editor. An earlier version inserted the trigger character to\n // reuse the typed path, and cleaned it up on dismissal — but a character the user never typed,\n // appearing and then vanishing, is visible churn in their own message. The dropdown is opened\n // directly instead, and the character only ever exists as the chip the user chooses.\n this.virtualTriggerOpen = true;\n this.virtualTriggerAnchor = anchorEl ?? null;\n this.virtualTriggerBaseline = this.getTextBeforeCursor(selection.getRangeAt(0)).length;\n this.activeTrigger = triggerChar;\n this.mentionQuery = '';\n void this.fetchSuggestions(triggerChar, '');\n return true;\n }\n\n /**\n * True when the suggestion dropdown is open FOR THIS trigger character.\n *\n * Lets a control that opens a trigger render its own pressed state without duplicating the\n * editor's state. Both halves matter: `showMentionDropdown` alone would light the Skills button\n * while an unrelated `@` mention dropdown is open.\n */\n public IsTriggerOpen(triggerChar: string): boolean {\n // virtualTriggerOpen covers the window between the press and the provider's response. Reporting\n // \"closed\" there makes the second press of a quick double-click re-run the open path instead of\n // toggling, re-emitting the Before/After pair.\n return (this.showMentionDropdown || this.virtualTriggerOpen) && this.activeTrigger === triggerChar;\n }\n\n /** True when keyboard focus currently sits inside this editor. */\n public get HasFocus(): boolean {\n const editor = this.editorRef?.nativeElement;\n return !!editor && (editor === document.activeElement || editor.contains(document.activeElement));\n }\n\n public InsertMention(suggestion: MentionSuggestion, focus: boolean = true): boolean {\n const editor = this.editorRef?.nativeElement;\n if (!editor) {\n return false;\n }\n editor.focus();\n const selection = window.getSelection();\n if (!selection) {\n return false;\n }\n // Caret to the end of the current content, then chip + space + caret-after.\n const range = document.createRange();\n range.selectNodeContents(editor);\n range.collapse(false);\n const chip = this.createMentionChip(suggestion);\n range.insertNode(chip);\n const space = document.createTextNode(' ');\n range.setStartAfter(chip);\n range.collapse(true);\n range.insertNode(space);\n range.setStartAfter(space);\n range.collapse(true);\n selection.removeAllRanges();\n selection.addRange(range);\n if (!focus) {\n editor.blur();\n }\n this.onInput();\n return true;\n }\n\n private insertMentionChip(suggestion: MentionSuggestion): void {\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n const range = selection.getRangeAt(0);\n\n // Delete the trigger + query text (use the active trigger char). A VIRTUAL trigger has no\n // character in the editor, so the span to remove is only what the user typed since it opened —\n // anchoring on the trigger char here would delete an unrelated earlier one, or nothing.\n const textBeforeCursor = this.getTextBeforeCursor(range);\n const deleteLength = this.virtualTriggerOpen\n ? Math.max(0, textBeforeCursor.length - this.virtualTriggerBaseline)\n : textBeforeCursor.length - textBeforeCursor.lastIndexOf(this.activeTrigger);\n\n if (deleteLength > 0) {\n range.setStart(range.startContainer, range.startOffset - deleteLength);\n range.deleteContents();\n }\n\n // Create mention chip element\n const chip = this.createMentionChip(suggestion);\n\n // Insert chip\n range.insertNode(chip);\n\n // Add space after chip\n const space = document.createTextNode(' ');\n range.collapse(false);\n range.insertNode(space);\n\n // Move cursor after the space\n range.setStartAfter(space);\n range.collapse(true);\n selection.removeAllRanges();\n selection.addRange(range);\n\n // Trigger change detection\n this.onInput();\n }\n\n /**\n * Create a mention chip DOM element\n */\n private createMentionChip(suggestion: MentionSuggestion): HTMLSpanElement {\n const chip = document.createElement('span');\n chip.className = 'mention-chip';\n chip.contentEditable = 'false'; // Make chip non-editable\n chip.setAttribute('data-mention-id', suggestion.id);\n chip.setAttribute('data-mention-type', suggestion.type);\n chip.setAttribute('data-mention-name', suggestion.name);\n\n // Configuration presets ride along on the suggestion itself (supplied by the trigger\n // provider — e.g. the agent-mentions provider maps AI Agent Configuration presets in).\n // The composer has no knowledge of what a preset IS; it just stores the default's\n // ID/Name on the chip and offers a picker when there are 2+.\n const presets: MentionSuggestionPreset[] = suggestion.presets ?? [];\n if (presets.length > 0) {\n const defaultPreset = presets.find(p => p.IsDefault) || presets[0];\n if (defaultPreset) {\n chip.setAttribute('data-preset-id', defaultPreset.ID || '');\n chip.setAttribute('data-preset-name', defaultPreset.Name || '');\n }\n }\n\n // Apply inline styles directly — color by mention type. Skills carry their own accent Color\n // (AISkill.Color UX metadata); when present it drives the chip, otherwise the standard skill\n // green (--mj-status-success). Same color logic as the saved-message badge — keep in sync with\n // message-item's renderMentionHTML.\n const skillPalette = suggestion.type === 'skill'\n ? { bg: suggestion.color || 'var(--mj-status-success)', border: 'rgba(255, 255, 255, 0.35)' }\n : null;\n const palette =\n skillPalette\n ? skillPalette\n : suggestion.type === 'user'\n ? { bg: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', border: 'rgba(240, 147, 251, 0.4)' }\n : suggestion.type === 'entity'\n ? { bg: 'linear-gradient(135deg, #11998e 0%, #38ef7d 100%)', border: 'rgba(17, 153, 142, 0.4)' }\n : suggestion.type === 'query'\n ? { bg: 'linear-gradient(135deg, #FF6A00 0%, #FF9E2C 100%)', border: 'rgba(255, 106, 0, 0.4)' }\n : { bg: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', border: 'rgba(102, 126, 234, 0.4)' };\n // Skills render as a sharp-cornered rectangle (vs. the rounded pill for agents/users/entities)\n // — the shape is the at-a-glance differentiator. Same shape in the saved-message badge.\n const chipRadius = suggestion.type === 'skill' ? '4px' : '16px';\n chip.style.cssText = `\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 12px;\n margin: 0 3px;\n border-radius: ${chipRadius};\n font-size: 13px;\n font-weight: 600;\n cursor: default;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n pointer-events: all;\n background: ${palette.bg};\n color: white;\n border: 2px solid ${palette.border};\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);\n `;\n\n // Add icon or image\n if (suggestion.type === 'agent' && suggestion.imageUrl) {\n // Use image if available (LogoURL from agent)\n const img = document.createElement('img');\n img.src = suggestion.imageUrl;\n img.alt = suggestion.displayName;\n img.style.cssText = 'width: 16px; height: 16px; border-radius: 50%; object-fit: cover;';\n chip.appendChild(img);\n } else if (suggestion.type === 'agent' && suggestion.icon === 'mj-icon-skip') {\n // Special handling for mj-icon-skip: use the SVG data URI as an image\n const img = document.createElement('img');\n img.src = \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 101.89918457031249 96.83947368421053'%3E%3Cg transform='translate(-0.1288232421875,-0.0)'%3E%3Cpath d='M93.85,41.56c-.84,0-1.62.2-2.37.55-3-4.35-7.49-8.12-13.04-11.04l.04-7.18v-14.44h-10.24v17.6c-1.52-.43-3.07-.8-4.67-1.11V0h-10.24v24.72s-.09,0-.14,0h-4.38s-.1,0-.14,0V7.3h-10.24v18.62c-1.6.32-3.15.69-4.67,1.11v-11.67h-10.24v6.09l.04,9.6c-5.55,2.92-10.04,6.7-13.04,11.04-.75-.35-1.53-.55-2.37-.55-4.5,0-8.14,5.61-8.14,12.51s3.64,12.53,8.14,12.53c.58,0,1.14-.12,1.67-.29,4.1,6.62,11.54,12.06,20.98,15.28l.79.13v7.05c0,2.97,1.45,5.58,3.87,6.99,1.18.69,2.5,1.04,3.85,1.03,1.4,0,2.83-.37,4.15-1.12l7.54-4.29,7.56,4.3c1.31.74,2.73,1.12,4.13,1.12s2.67-.35,3.85-1.04c2.42-1.41,3.86-4.02,3.86-6.98v-7.05l.79-.13c9.44-3.22,16.89-8.66,20.98-15.28.54.17,1.09.29,1.68.29,4.5,0,8.14-5.61,8.14-12.53s-3.63-12.51-8.14-12.51' fill='%23AAAAAA'/%3E%3Cpath d='M86.69,50.87c0-12.22-13.6-19.1-28.94-20.66-4.48-.47-9.19-.54-13.52,0-15.34,1.53-28.93,8.41-28.93,20.66,0,8.55,5.7,15.55,12.68,15.55h7.94c3.05,2.5,6.93,4.1,11.08,4.71,2.65.4,5.44.46,8.01,0,4.15-.6,8.05-2.2,11.1-4.71h7.92c6.97,0,12.68-7,12.68-15.55' fill='white' opacity='0.9'/%3E%3Cpath d='M57.83,55.82c-1.19,2.58-3.8,4.35-6.84,4.35s-5.65-1.77-6.84-4.35h13.68Z' fill='%23AAAAAA'/%3E%3Cpath d='M32.52,41.14c1.74,0,3.18,2.13,3.18,4.76s-1.44,4.74-3.18,4.74-3.16-2.13-3.16-4.74,1.41-4.76,3.16-4.76' fill='%23AAAAAA'/%3E%3Cpath d='M69.46,41.14c1.74,0,3.16,2.13,3.16,4.76s-1.41,4.74-3.16,4.74-3.18-2.13-3.18-4.74,1.41-4.76,3.18-4.76' fill='%23AAAAAA'/%3E%3Cpath d='M63.91,76.15c-.82-.48-1.84-.43-2.8.12l-10.13,5.75-10.11-5.75c-.96-.55-1.98-.59-2.8-.12-.82.47-1.29,1.38-1.29,2.49v10.12c0,1.11.47,2.02,1.28,2.49.38.22.8.33,1.24.33.51,0,1.05-.15,1.57-.44l10.12-5.75,10.11,5.75c.52.29,1.05.44,1.56.44.44,0,.86-.11,1.24-.33.81-.48,1.28-1.38,1.28-2.49v-10.12c0-1.11-.47-2.02-1.28-2.49' fill='white' opacity='0.9'/%3E%3C/g%3E%3C/svg%3E\";\n img.alt = suggestion.displayName;\n img.style.cssText = 'width: 16px; height: 16px; border-radius: 50%; object-fit: cover;';\n chip.appendChild(img);\n } else {\n // Use icon for users or agents without images\n const icon = document.createElement('i');\n icon.style.cssText = 'font-size: 12px; opacity: 0.95;';\n if (suggestion.type === 'agent' && suggestion.icon) {\n icon.className = this.getIconClasses(suggestion.icon);\n } else if (suggestion.type === 'user') {\n icon.className = 'fa-solid fa-user';\n } else if (suggestion.type === 'entity') {\n icon.className = this.getIconClasses(suggestion.icon || 'fa-solid fa-table');\n } else if (suggestion.type === 'query') {\n icon.className = this.getIconClasses(suggestion.icon || 'fa-solid fa-database');\n } else if (suggestion.type === 'skill') {\n icon.className = this.getIconClasses(suggestion.icon || 'fa-solid fa-wand-magic-sparkles');\n } else {\n icon.className = 'fa-solid fa-robot';\n }\n chip.appendChild(icon);\n }\n\n // Add space between icon/image and text\n const space = document.createTextNode(' ');\n chip.appendChild(space);\n\n // Add text\n const text = document.createTextNode(suggestion.displayName);\n chip.appendChild(text);\n\n // Add dropdown when the suggestion carries 2+ presets\n if (presets.length >= 2) {\n this.addConfigurationDropdown(chip, presets);\n }\n\n return chip;\n }\n\n /**\n * Add configuration preset dropdown to a mention chip\n */\n private addConfigurationDropdown(chip: HTMLSpanElement, presets: MentionSuggestionPreset[]): void {\n // Store default preset for comparison\n const defaultPreset = presets.find(p => p.IsDefault) || presets[0];\n\n // Add preset indicator text (only shown when non-default selected)\n const presetIndicator = document.createElement('span');\n presetIndicator.className = 'preset-indicator';\n presetIndicator.style.cssText = `\n display: none;\n font-size: 10px;\n font-weight: 600;\n font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;\n background: rgba(255, 255, 255, 0.25);\n padding: 2px 6px;\n border-radius: 4px;\n margin-left: 4px;\n letter-spacing: 0.3px;\n text-transform: uppercase;\n border: 1px solid rgba(255, 255, 255, 0.15);\n `;\n chip.appendChild(presetIndicator);\n\n // Add dropdown chevron button\n const chevron = document.createElement('i');\n chevron.className = 'fa-solid fa-chevron-down';\n chevron.style.cssText = `\n font-size: 10px;\n opacity: 0.9;\n cursor: pointer;\n padding: 2px;\n `;\n chip.appendChild(chevron);\n\n // Create dropdown menu (initially hidden) - append to body for global positioning\n const dropdown = document.createElement('div');\n dropdown.className = 'preset-dropdown';\n dropdown.style.cssText = `\n display: none;\n position: fixed;\n background: white;\n border: 1px solid #ddd;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n min-width: 200px;\n max-width: 300px;\n z-index: 10000;\n overflow: hidden;\n `;\n\n // Add preset options to dropdown\n presets.forEach(preset => {\n const option = document.createElement('div');\n option.className = 'preset-option';\n option.style.cssText = `\n padding: 10px 12px;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n transition: background 0.2s;\n `;\n\n // Check if this is the selected preset\n const currentPresetId = chip.getAttribute('data-preset-id');\n const isSelected = UUIDsEqual(preset.ID, currentPresetId);\n\n // Add checkmark for selected option\n const checkmark = document.createElement('i');\n checkmark.className = 'fa-solid fa-check';\n checkmark.style.cssText = `\n font-size: 12px;\n color: #667eea;\n opacity: ${isSelected ? '1' : '0'};\n width: 14px;\n `;\n option.appendChild(checkmark);\n\n // Add preset text content\n const textContainer = document.createElement('div');\n textContainer.style.cssText = 'flex: 1;';\n\n const displayName = document.createElement('div');\n displayName.textContent = preset.DisplayName || preset.Name;\n displayName.style.cssText = `\n font-weight: 600;\n color: #333;\n font-size: 13px;\n `;\n textContainer.appendChild(displayName);\n\n if (preset.Description) {\n const description = document.createElement('div');\n description.textContent = preset.Description;\n description.style.cssText = `\n font-size: 11px;\n color: #666;\n margin-top: 2px;\n `;\n textContainer.appendChild(description);\n }\n\n option.appendChild(textContainer);\n\n // Hover effects\n option.addEventListener('mouseenter', () => {\n option.style.background = '#f5f5f5';\n });\n option.addEventListener('mouseleave', () => {\n option.style.background = 'white';\n });\n\n // Click handler to select preset\n option.addEventListener('click', (e) => {\n e.stopPropagation();\n\n // Update chip data attributes\n // IMPORTANT: Store preset.ID (AIAgentConfiguration.ID), not AIConfigurationID\n chip.setAttribute('data-preset-id', preset.ID || '');\n chip.setAttribute('data-preset-name', preset.Name || '');\n\n // Update preset indicator visibility and text\n const isDefault = UUIDsEqual(preset.ID, defaultPreset.ID);\n if (isDefault) {\n presetIndicator.style.display = 'none';\n } else {\n presetIndicator.style.display = 'inline';\n presetIndicator.textContent = preset.DisplayName || preset.Name;\n }\n\n // Update checkmarks\n dropdown.querySelectorAll('.preset-option').forEach((opt, idx) => {\n const check = opt.querySelector('i.fa-check') as HTMLElement;\n if (check) {\n check.style.opacity = idx === presets.indexOf(preset) ? '1' : '0';\n }\n });\n\n // Close dropdown\n dropdown.style.display = 'none';\n });\n\n dropdown.appendChild(option);\n });\n\n // Append dropdown to document body for global positioning\n document.body.appendChild(dropdown);\n\n // Helper function to position dropdown relative to chip\n const positionDropdown = () => {\n const chipRect = chip.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - chipRect.bottom;\n\n // Set left position (same for both above/below)\n dropdown.style.left = `${chipRect.left}px`;\n\n // First, show dropdown to measure its actual height\n const wasHidden = dropdown.style.display === 'none';\n if (wasHidden) {\n dropdown.style.visibility = 'hidden';\n dropdown.style.display = 'block';\n }\n\n const dropdownHeight = dropdown.offsetHeight;\n const spaceAbove = chipRect.top;\n\n // Position dropdown above chip if not enough space below\n if (spaceBelow < dropdownHeight && spaceAbove > spaceBelow) {\n // Show above - position so bottom of dropdown is 4px above top of chip\n dropdown.style.top = `${chipRect.top - dropdownHeight - 4}px`;\n } else {\n // Show below (default) - position 4px below bottom of chip\n dropdown.style.top = `${chipRect.bottom + 4}px`;\n }\n\n // Restore visibility\n if (wasHidden) {\n dropdown.style.visibility = 'visible';\n }\n };\n\n // Toggle dropdown on chevron click\n chevron.addEventListener('click', (e) => {\n e.stopPropagation();\n const isVisible = dropdown.style.display === 'block';\n\n if (isVisible) {\n dropdown.style.display = 'none';\n } else {\n positionDropdown();\n dropdown.style.display = 'block';\n }\n });\n\n // Close dropdown when clicking outside\n const closeDropdown = (e: MouseEvent) => {\n if (!dropdown.contains(e.target as Node) && !chip.contains(e.target as Node)) {\n dropdown.style.display = 'none';\n }\n };\n document.addEventListener('click', closeDropdown);\n\n // Cleanup: remove dropdown from body and event listeners when chip is removed\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n mutation.removedNodes.forEach((node) => {\n if (node === chip) {\n document.removeEventListener('click', closeDropdown);\n if (dropdown.parentNode) {\n dropdown.parentNode.removeChild(dropdown);\n }\n observer.disconnect();\n }\n });\n });\n });\n if (chip.parentNode) {\n observer.observe(chip.parentNode, { childList: true });\n }\n }\n\n /**\n * Get icon classes with proper FA prefix\n */\n private getIconClasses(iconClass: string): string {\n if (!iconClass) return 'fa-solid fa-robot';\n if (iconClass.includes('fa-')) {\n if (iconClass.match(/\\b(fa-solid|fa-regular|fa-light|fa-brands)\\b/)) {\n return iconClass;\n }\n return `fa-solid ${iconClass}`;\n }\n return iconClass;\n }\n\n /**\n * Handle backspace key - delete entire chip if cursor is right after one\n */\n private handleBackspace(event: KeyboardEvent): void {\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n const range = selection.getRangeAt(0);\n\n // Check if cursor is right after a mention chip\n if (range.collapsed && range.startOffset > 0) {\n const prevNode = range.startContainer.childNodes[range.startOffset - 1];\n\n if (prevNode && (prevNode as HTMLElement).classList?.contains('mention-chip')) {\n event.preventDefault();\n prevNode.remove();\n this.onInput();\n }\n }\n }\n\n /**\n * Close mention dropdown\n */\n closeMentionDropdown(): void {\n // No text cleanup: a virtual trigger never wrote anything into the editor, which is the whole\n // point of it. Dismissing leaves the message exactly as the user left it.\n this.virtualTriggerOpen = false;\n this.virtualTriggerBaseline = 0;\n this.virtualTriggerAnchor = null;\n this.mentionDropdownAlignRight = false;\n // Invalidate any in-flight suggestion fetch so a late response can't reopen the dropdown\n this.suggestionRequestSeq++;\n this.showMentionDropdown = false;\n this.mentionSuggestions = [];\n this.mentionStartIndex = -1;\n this.mentionQuery = '';\n this.activeTrigger = '@';\n }\n\n /**\n * Convert editor HTML to plain text with @mentions\n */\n private getPlainText(): string {\n const editor = this.editorRef?.nativeElement;\n if (!editor) return '';\n\n let text = '';\n const nodes = editor.childNodes;\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node.nodeType === Node.TEXT_NODE) {\n text += node.textContent || '';\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as HTMLElement;\n\n if (element.classList.contains('mention-chip')) {\n const name = element.getAttribute('data-mention-name') || '';\n const mentionType = element.getAttribute('data-mention-type');\n const prefix = mentionType === 'entity' || mentionType === 'query' ? '#' : mentionType === 'skill' ? '/' : '@';\n // Use quoted format if name has spaces\n text += name.includes(' ') ? `${prefix}\"${name}\"` : `${prefix}${name}`;\n } else if (element.tagName === 'BR') {\n text += '\\n';\n } else if (element.tagName === 'DIV') {\n // Handle line breaks from contentEditable\n if (i > 0) text += '\\n';\n text += this.getNodeText(element);\n } else {\n text += element.textContent || '';\n }\n }\n }\n\n return text;\n }\n\n /**\n * Get text from a node recursively\n */\n private getNodeText(node: Node): string {\n let text = '';\n const children = node.childNodes;\n\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n\n if (child.nodeType === Node.TEXT_NODE) {\n text += child.textContent || '';\n } else if (child.nodeType === Node.ELEMENT_NODE) {\n const element = child as HTMLElement;\n\n if (element.classList.contains('mention-chip')) {\n const name = element.getAttribute('data-mention-name') || '';\n const mentionType = element.getAttribute('data-mention-type');\n const prefix = mentionType === 'entity' || mentionType === 'query' ? '#' : mentionType === 'skill' ? '/' : '@';\n text += name.includes(' ') ? `${prefix}\"${name}\"` : `${prefix}${name}`;\n } else {\n text += this.getNodeText(element);\n }\n }\n }\n\n return text;\n }\n\n /**\n * Set editor content from plain text (for programmatic updates)\n */\n /**\n * Renders a value into the editor, REHYDRATING any serialized mention tokens\n * (the `@{\"type\":…,\"id\":…,\"name\":…}` format produced by\n * {@link getPlainTextWithJsonMentions}) back into real chips — so persisted\n * drafts and any host-written serialized value round-trip losslessly. Plain\n * strings (no tokens) take the fast path.\n */\n private setEditorContent(text: string): void {\n const editor = this.editorRef?.nativeElement;\n if (!editor) return;\n\n const segments = MentionEditorComponent.ParseSerializedMentions(text);\n if (segments.every((seg) => typeof seg === 'string')) {\n editor.textContent = text;\n return;\n }\n editor.textContent = '';\n for (const seg of segments) {\n if (typeof seg === 'string') {\n if (seg.length > 0) {\n editor.appendChild(document.createTextNode(seg));\n }\n } else {\n const chip = this.createMentionChip(seg.suggestion);\n if (seg.configId) {\n chip.setAttribute('data-preset-id', seg.configId);\n }\n if (seg.config) {\n chip.setAttribute('data-preset-name', seg.config);\n }\n editor.appendChild(chip);\n }\n }\n }\n\n /**\n * Splits text containing serialized mention tokens into plain-string segments and\n * parsed mention segments. Token = '@' followed by a JSON object with at least\n * {type,id,name}; brace matching is string-aware so names containing braces or\n * escaped quotes parse correctly. Malformed candidates stay as literal text.\n */\n public static ParseSerializedMentions(\n text: string\n ): Array<string | { suggestion: MentionSuggestion; configId?: string; config?: string }> {\n const segments: Array<string | { suggestion: MentionSuggestion; configId?: string; config?: string }> = [];\n let cursor = 0;\n let searchFrom = 0;\n while (true) {\n const start = text.indexOf('@{', searchFrom);\n if (start === -1) {\n break;\n }\n const end = MentionEditorComponent.findJsonEnd(text, start + 1);\n if (end === -1) {\n searchFrom = start + 2;\n continue;\n }\n const candidate = text.substring(start + 1, end + 1);\n let parsed: { type?: string; id?: string; name?: string; configId?: string; config?: string } | null = null;\n try {\n parsed = JSON.parse(candidate);\n } catch {\n parsed = null;\n }\n if (!parsed || typeof parsed.type !== 'string' || typeof parsed.id !== 'string' || typeof parsed.name !== 'string') {\n searchFrom = start + 2; // not a mention token — keep scanning past it\n continue;\n }\n if (start > cursor) {\n segments.push(text.substring(cursor, start));\n }\n segments.push({\n suggestion: { type: parsed.type, id: parsed.id, name: parsed.name, displayName: parsed.name },\n configId: parsed.configId,\n config: parsed.config,\n });\n cursor = end + 1;\n searchFrom = cursor;\n }\n if (cursor < text.length) {\n segments.push(text.substring(cursor));\n }\n if (segments.length === 0) {\n segments.push(text);\n }\n return segments;\n }\n\n /** Index of the matching closing brace for the object starting at `openIndex` ('{'), string-aware. -1 when unbalanced. */\n private static findJsonEnd(text: string, openIndex: number): number {\n let depth = 0;\n let inString = false;\n for (let i = openIndex; i < text.length; i++) {\n const ch = text[i];\n if (inString) {\n if (ch === '\\\\') {\n i++; // skip escaped char\n } else if (ch === '\"') {\n inString = false;\n }\n continue;\n }\n if (ch === '\"') {\n inString = true;\n } else if (ch === '{') {\n depth++;\n } else if (ch === '}') {\n depth--;\n if (depth === 0) {\n return i;\n }\n }\n }\n return -1;\n }\n\n // ControlValueAccessor implementation\n writeValue(value: string): void {\n const editor = this.editorRef?.nativeElement;\n if (!editor) {\n // View not created yet — buffer the value; ngAfterViewInit applies it\n this.pendingWriteValue = value ?? '';\n return;\n }\n if (value) {\n this.setEditorContent(value);\n } else {\n editor.textContent = '';\n }\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n if (this.editorRef?.nativeElement) {\n this.editorRef.nativeElement.contentEditable = (!isDisabled).toString();\n }\n }\n\n /**\n * Focus the editor\n */\n public focus(): void {\n this.editorRef?.nativeElement?.focus();\n }\n\n /**\n * Clear the editor content and pending attachments\n */\n public clear(): void {\n if (this.editorRef?.nativeElement) {\n this.editorRef.nativeElement.textContent = '';\n this.onInput();\n }\n this.clearPendingAttachments();\n }\n\n /**\n * Extract mention chips with their configuration data\n * Returns array of objects containing mention info and preset configuration\n */\n public getMentionChipsData(): Array<{ id: string; type: string; name: string; presetId?: string; presetName?: string }> {\n const editor = this.editorRef?.nativeElement;\n if (!editor) return [];\n\n const chips: Array<{ id: string; type: string; name: string; presetId?: string; presetName?: string }> = [];\n const mentionElements = editor.querySelectorAll('.mention-chip');\n\n mentionElements.forEach(chip => {\n const element = chip as HTMLElement;\n const id = element.getAttribute('data-mention-id') || '';\n const type = element.getAttribute('data-mention-type') || '';\n const name = element.getAttribute('data-mention-name') || '';\n const presetId = element.getAttribute('data-preset-id') || undefined;\n const presetName = element.getAttribute('data-preset-name') || undefined;\n\n chips.push({\n id,\n type,\n name,\n ...(presetId ? { presetId } : {}),\n ...(presetName ? { presetName } : {})\n });\n });\n\n return chips;\n }\n\n /**\n * Get the plain text value with mentions encoded as JSON\n * This format preserves configuration information when messages are saved\n * Format: @{type:\"agent\",id:\"uuid\",name:\"Agent Name\",configId:\"uuid\",config:\"High\"}\n */\n public getPlainTextWithJsonMentions(): string {\n const editor = this.editorRef?.nativeElement;\n if (!editor) return '';\n\n let plainText = '';\n const childNodes = Array.from(editor.childNodes);\n\n for (const node of childNodes) {\n if (node.nodeType === Node.TEXT_NODE) {\n // Regular text node\n plainText += node.textContent || '';\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as HTMLElement;\n\n if (element.classList.contains('mention-chip')) {\n // Extract mention data attributes\n const type = element.getAttribute('data-mention-type') || '';\n const id = element.getAttribute('data-mention-id') || '';\n const name = element.getAttribute('data-mention-name') || '';\n const presetId = element.getAttribute('data-preset-id');\n const presetName = element.getAttribute('data-preset-name');\n\n // Build JSON mention object (compact format - no spaces)\n const mentionObj: Record<string, string> = {\n type,\n id,\n name\n };\n\n // Add configuration fields if present (for agents with non-default presets)\n if (presetId) {\n mentionObj.configId = presetId;\n }\n if (presetName) {\n mentionObj.config = presetName;\n }\n\n // Encode as JSON mention\n // Don't remove spaces from the JSON string - spaces in values (like agent names) need to be preserved\n plainText += `@${JSON.stringify(mentionObj)}`;\n } else {\n // Other HTML element (e.g., <br>)\n if (element.tagName === 'BR') {\n plainText += '\\n';\n } else {\n plainText += element.textContent || '';\n }\n }\n }\n }\n\n return plainText;\n }\n\n // ==================== Attachment Handling Methods ====================\n\n /**\n * Handle drag over event\n */\n onDragOver(event: DragEvent): void {\n if (!this.enableAttachments) return;\n\n event.preventDefault();\n event.stopPropagation();\n this.isDragOver = true;\n }\n\n /**\n * Handle drag leave event\n */\n onDragLeave(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.isDragOver = false;\n }\n\n /**\n * Handle drop event\n */\n onDrop(event: DragEvent): void {\n if (!this.enableAttachments) return;\n\n event.preventDefault();\n event.stopPropagation();\n this.isDragOver = false;\n\n if (event.dataTransfer?.files) {\n const files = Array.from(event.dataTransfer.files);\n for (const file of files) {\n if (this.isAcceptedFile(file)) {\n this.processFile(file);\n }\n }\n }\n }\n\n /**\n * Handle file input change (from file picker)\n */\n onFileSelected(event: Event): void {\n const input = event.target as HTMLInputElement;\n if (input.files) {\n const files = Array.from(input.files);\n for (const file of files) {\n this.processFile(file);\n }\n // Reset input so same file can be selected again\n input.value = '';\n }\n }\n\n /**\n * Process a file for attachment\n */\n private async processFile(file: File): Promise<void> {\n // Validate file\n const validation = this.validateFile(file);\n if (!validation.valid) {\n this.attachmentError.emit(validation.error!);\n return;\n }\n\n // Read file as data URL\n const dataUrl = await this.readFileAsDataUrl(file);\n if (!dataUrl) {\n this.attachmentError.emit('Failed to read file');\n return;\n }\n\n // Get image dimensions if applicable\n let width: number | undefined;\n let height: number | undefined;\n\n if (file.type.startsWith('image/')) {\n const dimensions = await this.getImageDimensions(dataUrl);\n width = dimensions.width;\n height = dimensions.height;\n }\n\n // Create pending attachment\n const attachment: PendingAttachment = {\n id: this.generateAttachmentId(),\n file,\n dataUrl,\n mimeType: file.type,\n fileName: file.name,\n sizeBytes: file.size,\n width,\n height,\n thumbnailUrl: file.type.startsWith('image/') ? dataUrl : undefined\n };\n\n // Add to pending attachments\n this.pendingAttachments.push(attachment);\n this.attachmentsChanged.emit([...this.pendingAttachments]);\n this.cdr.detectChanges();\n }\n\n /**\n * Validate a file against settings\n */\n private validateFile(file: File): { valid: boolean; error?: string } {\n // Check count limit\n if (this.pendingAttachments.length >= this.maxAttachments) {\n return {\n valid: false,\n error: `Maximum ${this.maxAttachments} attachments allowed`\n };\n }\n\n // Check size limit\n if (file.size > this.maxAttachmentSizeBytes) {\n const maxMB = (this.maxAttachmentSizeBytes / (1024 * 1024)).toFixed(1);\n const fileMB = (file.size / (1024 * 1024)).toFixed(1);\n return {\n valid: false,\n error: `File size (${fileMB}MB) exceeds maximum (${maxMB}MB)`\n };\n }\n\n // Check file type\n if (!this.isAcceptedFile(file)) {\n return {\n valid: false,\n error: `File type ${file.type || 'unknown'} not accepted`\n };\n }\n\n return { valid: true };\n }\n\n /**\n * Check if file type is accepted\n */\n private isAcceptedFile(file: File): boolean {\n if (this.acceptedFileTypes === '*' || this.acceptedFileTypes === '*/*') {\n return true;\n }\n\n const acceptedTypes = this.acceptedFileTypes.split(',').map(t => t.trim());\n\n for (const accepted of acceptedTypes) {\n // Handle universal wildcard */* anywhere in the list\n if (accepted === '*/*') {\n return true;\n }\n // Handle wildcard MIME types like \"image/*\"\n if (accepted.endsWith('/*')) {\n const category = accepted.slice(0, -2);\n if (file.type.startsWith(category + '/')) {\n return true;\n }\n } else if (accepted.startsWith('.')) {\n // Handle file extensions like \".png\"\n if (file.name.toLowerCase().endsWith(accepted.toLowerCase())) {\n return true;\n }\n } else if (file.type === accepted) {\n // Exact MIME type match\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Read file as data URL\n */\n private readFileAsDataUrl(file: File): Promise<string | null> {\n return new Promise((resolve) => {\n const reader = new FileReader();\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = () => resolve(null);\n reader.readAsDataURL(file);\n });\n }\n\n /**\n * Get image dimensions\n */\n private getImageDimensions(dataUrl: string): Promise<{ width: number; height: number }> {\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n resolve({ width: img.naturalWidth, height: img.naturalHeight });\n };\n img.onerror = () => {\n resolve({ width: 0, height: 0 });\n };\n img.src = dataUrl;\n });\n }\n\n /**\n * Generate unique attachment ID\n */\n private generateAttachmentId(): string {\n return `att_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\n }\n\n /**\n * Remove a pending attachment by ID\n */\n public removeAttachment(id: string): void {\n const index = this.pendingAttachments.findIndex(a => a.id === id);\n if (index !== -1) {\n this.pendingAttachments.splice(index, 1);\n this.attachmentsChanged.emit([...this.pendingAttachments]);\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Get all pending attachments\n */\n public getPendingAttachments(): PendingAttachment[] {\n return [...this.pendingAttachments];\n }\n\n /**\n * Add an artifact as a pending attachment programmatically.\n * Used by the artifact picker to attach artifacts as conversation inputs.\n */\n public AddArtifactAttachment(artifact: {\n fileID: string; fileName: string; mimeType: string;\n sizeBytes: number; artifactVersionId?: string;\n }): PendingAttachment {\n const attachment: PendingAttachment = {\n id: crypto.randomUUID(),\n file: null,\n dataUrl: '',\n mimeType: artifact.mimeType,\n fileName: artifact.fileName,\n sizeBytes: artifact.sizeBytes,\n fileID: artifact.fileID,\n source: 'artifact',\n artifactVersionId: artifact.artifactVersionId\n };\n this.pendingAttachments.push(attachment);\n this.attachmentsChanged.emit([...this.pendingAttachments]);\n return attachment;\n }\n\n /**\n * Clear all pending attachments\n */\n public clearPendingAttachments(): void {\n this.pendingAttachments = [];\n this.attachmentsChanged.emit([]);\n this.cdr.detectChanges();\n }\n\n /**\n * Handle click on an attachment thumbnail\n */\n public onAttachmentClick(attachment: PendingAttachment): void {\n this.attachmentClicked.emit(attachment);\n }\n\n /**\n * Check if there are any pending attachments\n */\n public hasAttachments(): boolean {\n return this.pendingAttachments.length > 0;\n }\n\n /**\n * Trigger file picker programmatically\n */\n public openFilePicker(): void {\n const input = document.createElement('input');\n input.type = 'file';\n // If */* is in the list, accept all files (some browsers don't handle */* correctly)\n input.accept = this.acceptedFileTypes.includes('*/*') ? '' : this.acceptedFileTypes;\n input.multiple = true;\n input.onchange = (e) => this.onFileSelected(e);\n input.click();\n }\n}\n","<div class=\"mention-editor-container\"\n [class.drag-over]=\"isDragOver\"\n (click)=\"onContainerClick($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n\n <!-- Pending Attachments Preview -->\n @if (pendingAttachments.length > 0) {\n <div class=\"pending-attachments\">\n @for (attachment of pendingAttachments; track attachment) {\n <div class=\"attachment-thumbnail\"\n (click)=\"onAttachmentClick(attachment)\">\n @if (attachment.thumbnailUrl) {\n <img\n [src]=\"attachment.thumbnailUrl\"\n [alt]=\"attachment.fileName\"\n class=\"thumbnail-image\">\n }\n @if (!attachment.thumbnailUrl) {\n <div class=\"thumbnail-placeholder\">\n <i class=\"fa-solid fa-file\"></i>\n <span class=\"file-name\">{{ attachment.fileName }}</span>\n </div>\n }\n <button class=\"remove-attachment\"\n (click)=\"removeAttachment(attachment.id); $event.stopPropagation()\"\n title=\"Remove attachment\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n }\n </div>\n }\n\n <div\n #editor\n class=\"mention-editor\"\n contenteditable=\"true\"\n [attr.contenteditable]=\"!disabled\"\n [attr.data-placeholder]=\"placeholder\"\n (input)=\"onInput()\"\n (keydown)=\"onKeyDown($event)\"\n (blur)=\"onBlur()\"\n (paste)=\"onPaste($event)\"\n ></div>\n\n <!-- Drag & Drop Overlay -->\n @if (isDragOver) {\n <div class=\"drop-overlay\">\n <div class=\"drop-message\">\n <i class=\"fa-solid fa-cloud-arrow-up\"></i>\n <span>Drop files here</span>\n </div>\n </div>\n }\n\n <!-- Mention Dropdown -->\n @if (showMentionDropdown && enableMentions) {\n <mj-mention-dropdown\n [suggestions]=\"mentionSuggestions\"\n [position]=\"mentionDropdownPosition\"\n [showAbove]=\"mentionDropdownShowAbove\"\n [alignRight]=\"mentionDropdownAlignRight\"\n [useFixedPositioning]=\"true\"\n [visible]=\"true\"\n (suggestionSelected)=\"onMentionSelected($event)\"\n (closed)=\"closeMentionDropdown()\">\n </mj-mention-dropdown>\n }\n</div>\n"]}
1
+ {"version":3,"file":"mention-editor.component.js","sourceRoot":"","sources":["../../../../src/lib/components/mention/mention-editor.component.ts","../../../../src/lib/components/mention/mention-editor.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EAGT,UAAU,EAIV,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAwB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAGL,gCAAgC,EAGjC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;;;ICTxC,yBAG0B;;;IADxB,AADA,kEAA+B,+BACJ;;;IAI7B,8BAAmC;IACjC,wBAAgC;IAChC,gCAAwB;IAAA,YAAyB;IACnD,AAD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ViewChild,\n ElementRef,\n AfterViewInit,\n forwardRef,\n OnInit,\n ViewEncapsulation,\n ChangeDetectorRef,\n HostListener\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n ComposerSuggestionRequest,\n ComposerTriggerProvider,\n DiscoverComposerTriggerProviders,\n MentionSuggestion,\n MentionSuggestionPreset\n} from '../../composer-trigger-provider';\nimport { IMetadataProvider, UserInfo } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\n\n/**\n * Represents a pending attachment that hasn't been uploaded yet\n */\nexport interface PendingAttachment {\n /** Local ID for tracking */\n id: string;\n /** Original File object (null for artifact references) */\n file: File | null;\n /** Base64 data URL for display */\n dataUrl: string;\n /** MIME type */\n mimeType: string;\n /** Original filename */\n fileName: string;\n /** File size in bytes */\n sizeBytes: number;\n /** Width in pixels (for images) */\n width?: number;\n /** Height in pixels (for images) */\n height?: number;\n /** Small thumbnail URL for preview */\n thumbnailUrl?: string;\n /** MJStorage File ID (for artifact references, mutually exclusive with inline data) */\n fileID?: string;\n /** Source of the attachment */\n source?: 'upload' | 'artifact';\n /** Artifact Version ID (for artifact references, used to create ConversationDetailArtifact) */\n artifactVersionId?: string;\n}\n\n/**\n * ContentEditable-based mention editor with visual chips/pills\n * Provides Slack/Teams-style mention UX with immutable mention tokens\n */\n@Component({\n standalone: false,\n selector: 'mj-mention-editor',\n templateUrl: './mention-editor.component.html',\n styleUrls: ['./mention-editor.component.css'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MentionEditorComponent),\n multi: true\n }\n ]\n})\nexport class MentionEditorComponent implements OnInit, AfterViewInit, ControlValueAccessor {\n @ViewChild('editor', { static: false }) editorRef!: ElementRef<HTMLDivElement>;\n\n @Input() placeholder: string = 'Type @ to mention agents or users, # for entities...';\n @Input() disabled: boolean = false;\n @Input() currentUser?: UserInfo;\n /** Master switch for all mention/command triggers. When false no providers are consulted. */\n @Input() enableMentions: boolean = true;\n /**\n * Explicit trigger-provider list — when bound, EXACTLY these providers are active\n * (explicit list wins over discovery). Leave null to discover providers registered\n * with the ClassFactory via `@RegisterClass(ComposerTriggerProvider, '<Key>')`.\n */\n @Input() TriggerProviders: ComposerTriggerProvider[] | null = null;\n /**\n * Discovery-mode filter: providers whose stable `Key` appears here are skipped when\n * resolving registered providers. Ignored when `TriggerProviders` is bound.\n */\n @Input() ExcludedTriggerKeys: string[] = [];\n /** Optional metadata provider scoping this editor (multi-provider hosts); passed through to trigger providers. */\n @Input() Provider: IMetadataProvider | null = null;\n /** Auto-focus the editor after view init (the composer default). Disable when embedded in forms. */\n @Input() autoFocus: boolean = true;\n\n // Attachment settings\n @Input() enableAttachments: boolean = true;\n @Input() maxAttachments: number = 10;\n @Input() maxAttachmentSizeBytes: number = 20 * 1024 * 1024; // 20MB default\n @Input() acceptedFileTypes: string = 'image/*'; // MIME types to accept\n\n @Output() valueChange = new EventEmitter<string>();\n @Output() mentionSelected = new EventEmitter<MentionSuggestion>();\n @Output() enterPressed = new EventEmitter<string>();\n @Output() attachmentsChanged = new EventEmitter<PendingAttachment[]>();\n @Output() attachmentError = new EventEmitter<string>();\n @Output() attachmentClicked = new EventEmitter<PendingAttachment>();\n /** Fires when the contenteditable loses focus (hosts persist drafts on this). */\n @Output() editorBlurred = new EventEmitter<void>();\n\n // Pending attachments state\n public pendingAttachments: PendingAttachment[] = [];\n public isDragOver: boolean = false;\n\n // Mention dropdown state\n public showMentionDropdown: boolean = false;\n public mentionSuggestions: MentionSuggestion[] = [];\n public mentionDropdownPosition: { top: number; left: number } = { top: 0, left: 0 };\n public mentionDropdownShowAbove: boolean = false;\n /** Right-align the dropdown against its anchor. Only the button path sets this. */\n public mentionDropdownAlignRight: boolean = false;\n\n private mentionStartIndex: number = -1;\n private mentionQuery: string = '';\n /** The trigger char that opened the current mention dropdown */\n private activeTrigger: string = '@';\n /**\n * Set while a dropdown was opened by {@link OpenTrigger} rather than by typing.\n *\n * In this mode the trigger character is NOT in the editor — there is nothing to strip on\n * dismissal, and nothing for the user to see until they pick something. It also changes how the\n * query and the chip insertion are measured, since neither can anchor on a character that is not\n * there; {@link virtualTriggerBaseline} stands in for it.\n */\n private virtualTriggerOpen: boolean = false;\n /** Text length at the moment a virtual trigger opened — the origin for its query and deletion. */\n private virtualTriggerBaseline: number = 0;\n /**\n * The control that opened a virtual trigger, used to anchor the dropdown to it.\n *\n * STICKY for the whole session on purpose. `positionMentionDropdown()` re-runs on every keystroke\n * while the user filters, and once there is text the caret measures real coordinates — so\n * anchoring only on first paint would open at the button and then jump to the far-left caret on\n * the first keypress, which is worse than not anchoring at all.\n */\n private virtualTriggerAnchor: HTMLElement | null = null;\n /**\n * Monotonic sequence guarding the async suggestion fetch — a response only applies\n * when no newer keystroke (or dropdown close) has superseded it.\n */\n private suggestionRequestSeq: number = 0;\n /** Cap on the suggestions displayed; passed to providers as `MaxResults`. */\n private static readonly MaxSuggestions: number = 50;\n\n /**\n * The trigger providers this editor consults: the explicit `TriggerProviders` list\n * when bound, otherwise ClassFactory discovery filtered by `ExcludedTriggerKeys`.\n * Empty when `enableMentions` is off (or nothing is registered) — the editor then\n * behaves as a plain text editor.\n */\n private get activeProviders(): ComposerTriggerProvider[] {\n if (!this.enableMentions) {\n return [];\n }\n return this.TriggerProviders ?? DiscoverComposerTriggerProviders(this.ExcludedTriggerKeys);\n }\n\n /** Unique trigger characters across the active providers (priority order preserved). */\n private get mentionTriggers(): string[] {\n const triggers: string[] = [];\n for (const provider of this.activeProviders) {\n if (!triggers.includes(provider.TriggerChar)) {\n triggers.push(provider.TriggerChar);\n }\n }\n return triggers;\n }\n\n private onChange: (value: string) => void = () => {};\n public onTouched: () => void = () => {};\n /** Value written via writeValue() before the view (editorRef) exists — applied in ngAfterViewInit. */\n private pendingWriteValue: string | null = null;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private hostRef: ElementRef<HTMLElement>\n ) {}\n\n /**\n * Close the dropdown when the pointer goes down anywhere outside it.\n *\n * Dismissal previously relied entirely on the editor's blur, which is not enough: clicking a\n * non-focusable area (the message list, page background) does not blur a contenteditable, so the\n * dropdown stayed open with nothing to close it. That was always true for a typed trigger; the\n * Skills button makes it easy to hit, because the button deliberately keeps focus in the editor\n * so the user's next click is the FIRST thing that could dismiss it.\n *\n * `mousedown` rather than `click`: it fires before the browser moves focus, so this decides\n * before blur's own 200ms timer gets involved and the two cannot race.\n *\n * The dropdown renders with fixed positioning but stays inside this component's host, so the\n * containment check covers a click on a suggestion row — which must select, not dismiss.\n */\n @HostListener('document:mousedown', ['$event'])\n onDocumentMouseDown(event: MouseEvent): void {\n // Also fires for a press still awaiting suggestions: on a cold session the provider load takes\n // hundreds of ms, and without this the user's dismissing click is ignored and the menu pops\n // open afterwards, unbidden. closeMentionDropdown bumps the request sequence, which drops the\n // in-flight response.\n if (!this.showMentionDropdown && !this.virtualTriggerOpen) {\n return;\n }\n const target = event.target as Node | null;\n if (target && this.hostRef.nativeElement.contains(target)) {\n return;\n }\n this.closeMentionDropdown();\n this.cdr.markForCheck();\n }\n\n async ngOnInit(): Promise<void> {\n // Warm up the active providers (best-effort — a provider that fails to warm\n // simply serves its first real request cold).\n if (this.enableMentions) {\n const user = this.currentUser ?? null;\n await Promise.all(\n this.activeProviders.map((p) => p.Initialize(user).catch(() => undefined))\n );\n }\n }\n\n ngAfterViewInit(): void {\n // Apply any value written through the ControlValueAccessor before the view existed\n // (NgModel calls writeValue during directive init, before this component's view is ready)\n if (this.pendingWriteValue !== null) {\n this.setEditorContent(this.pendingWriteValue);\n this.pendingWriteValue = null;\n }\n\n // Auto-focus the editor\n if (this.autoFocus) {\n setTimeout(() => {\n this.editorRef?.nativeElement?.focus();\n }, 100);\n }\n }\n\n /**\n * Handle clicks on the container - focus the editor if clicking outside the contentEditable\n */\n onContainerClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n const editor = this.editorRef?.nativeElement;\n\n // Don't handle clicks on the dropdown or its children\n if (target.closest('mj-mention-dropdown')) {\n return;\n }\n\n // If clicking on container or any element that's not the editor itself, focus the editor\n if (target !== editor && !editor?.contains(target)) {\n editor?.focus();\n\n // Move cursor to end of content\n const selection = window.getSelection();\n const range = document.createRange();\n\n if (editor && selection) {\n range.selectNodeContents(editor);\n range.collapse(false); // Collapse to end\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n }\n\n /**\n * Handle input changes in contentEditable\n */\n onInput(): void {\n const plainText = this.getPlainText();\n this.onChange(plainText);\n this.valueChange.emit(plainText);\n\n // Handle mention/command autocomplete via the active trigger providers\n if (this.enableMentions) {\n this.handleMentionInput();\n }\n }\n\n /**\n * Handle blur event - close dropdown when editor loses focus\n */\n onBlur(): void {\n // Call form control touched callback\n this.onTouched();\n this.editorBlurred.emit();\n\n // Close dropdown when editor loses focus\n // Use setTimeout to allow mousedown events on dropdown to fire first\n setTimeout(() => {\n if (this.showMentionDropdown || this.virtualTriggerOpen) {\n this.closeMentionDropdown();\n }\n }, 200);\n }\n\n /**\n * Handle paste event - images or plain text\n */\n onPaste(event: ClipboardEvent): void {\n // Check for image data in clipboard\n if (this.enableAttachments && event.clipboardData?.items) {\n const items = Array.from(event.clipboardData.items);\n const imageItems = items.filter(item => item.type.startsWith('image/'));\n\n if (imageItems.length > 0) {\n event.preventDefault();\n\n // Process each image\n for (const item of imageItems) {\n const file = item.getAsFile();\n if (file) {\n this.processFile(file);\n }\n }\n return;\n }\n }\n\n // No images - handle as plain text\n event.preventDefault();\n\n // Get plain text from clipboard\n const text = event.clipboardData?.getData('text/plain') || '';\n\n if (!text) return;\n\n // Insert plain text at cursor position\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n const range = selection.getRangeAt(0);\n range.deleteContents();\n\n // Insert text as text node (not HTML)\n const textNode = document.createTextNode(text);\n range.insertNode(textNode);\n\n // Move cursor to end of inserted text\n range.setStartAfter(textNode);\n range.collapse(true);\n selection.removeAllRanges();\n selection.addRange(range);\n\n // Trigger input event to update model\n this.onInput();\n }\n\n /**\n * Handle keydown events\n */\n onKeyDown(event: KeyboardEvent): void {\n // Enter alone: Send message. The dropdown only earns Enter when it has something to pick. A\n // button-opened menu stays open on an empty result set (so the press is not a silent no-op),\n // which made \"showing but empty\" reachable for the first time — and there Enter was neither\n // handled nor prevented, so it fell through to the contenteditable and inserted a newline\n // instead of sending.\n if (event.key === 'Enter' && !event.shiftKey && (!this.showMentionDropdown || this.mentionSuggestions.length === 0)) {\n event.preventDefault();\n if (this.showMentionDropdown) {\n this.closeMentionDropdown();\n }\n const plainText = this.getPlainText();\n this.enterPressed.emit(plainText);\n return;\n }\n\n // Backspace: Check if deleting a mention chip\n if (event.key === 'Backspace') {\n this.handleBackspace(event);\n }\n\n // Handle mention dropdown navigation\n if (this.showMentionDropdown) {\n // Let the dropdown handle arrow keys, enter, escape\n // (We'll pass these through to mention-dropdown component)\n }\n }\n\n /**\n * Handle mention/command trigger detection — finds the nearest active trigger char\n * before the cursor and kicks off the (async) provider suggestion fetch.\n */\n private handleMentionInput(): void {\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n const activeTriggers = this.mentionTriggers;\n if (activeTriggers.length === 0) {\n this.closeMentionDropdown();\n return;\n }\n\n const range = selection.getRangeAt(0);\n const textBeforeCursor = this.getTextBeforeCursor(range);\n\n // Find the nearest active trigger char before the cursor — whichever is closest wins\n // A button-opened session only recognises trigger characters typed AFTER it opened. Without\n // this floor the scan runs over the whole message, so a URL ('.../docs'), an email ('a@b.io')\n // or a date ('9/11') already in the box is found instead, and the first keystroke either closes\n // the menu the button just opened or filters it by the wrong query. searchFrom is 0 on the\n // typed path, which leaves that path's behaviour byte-for-byte unchanged.\n const searchFrom = this.virtualTriggerOpen ? this.virtualTriggerBaseline : 0;\n let triggerIndex = -1;\n let triggerChar = '@';\n for (const t of activeTriggers) {\n const idx = textBeforeCursor.lastIndexOf(t);\n if (idx >= searchFrom && idx > triggerIndex) {\n triggerIndex = idx;\n triggerChar = t;\n }\n }\n\n if (triggerIndex === -1) {\n // A virtual trigger has no character in the text, so the search above finds nothing. Keep it\n // open and measure the query from where it opened, otherwise the first keystroke after\n // clicking the button would dismiss the list the button just produced.\n if (this.virtualTriggerOpen && textBeforeCursor.length >= this.virtualTriggerBaseline) {\n const query = textBeforeCursor.substring(this.virtualTriggerBaseline);\n if (!query.includes(' ')) {\n this.mentionQuery = query;\n void this.fetchSuggestions(this.activeTrigger, query);\n return;\n }\n }\n this.closeMentionDropdown();\n return;\n }\n\n // Check if there's a space between the trigger and cursor (means mention was completed)\n const textAfterTrigger = textBeforeCursor.substring(triggerIndex + 1);\n if (textAfterTrigger.includes(' ')) {\n this.closeMentionDropdown();\n return;\n }\n\n // A real trigger character now owns the session, so the virtual one must let go: otherwise\n // chip insertion still takes the virtual branch and deletes only the typed tail, orphaning the\n // trigger text, and the menu stays pinned to the button instead of the caret.\n if (this.virtualTriggerOpen) {\n this.virtualTriggerOpen = false;\n this.virtualTriggerBaseline = 0;\n this.virtualTriggerAnchor = null;\n this.mentionDropdownAlignRight = false;\n }\n\n // Extract query\n this.mentionQuery = textAfterTrigger;\n this.mentionStartIndex = triggerIndex;\n this.activeTrigger = triggerChar;\n\n // Fetch suggestions from the provider(s) owning this trigger (async, race-guarded)\n void this.fetchSuggestions(triggerChar, textAfterTrigger);\n }\n\n /**\n * Routes the suggestion request to every active provider whose TriggerChar matches,\n * concatenates their results in priority order, caps the merged list, and opens the\n * dropdown. A monotonic sequence drops stale responses when the user keeps typing.\n */\n private async fetchSuggestions(triggerChar: string, query: string): Promise<void> {\n const seq = ++this.suggestionRequestSeq;\n const providers = this.activeProviders.filter((p) => p.TriggerChar === triggerChar);\n\n const request: ComposerSuggestionRequest = {\n Query: query,\n MaxResults: MentionEditorComponent.MaxSuggestions,\n ContextUser: this.currentUser ?? null,\n Provider: this.Provider\n };\n\n const resultSets = await Promise.all(\n providers.map((p) => p.GetSuggestions(request).catch(() => [] as MentionSuggestion[]))\n );\n\n if (seq !== this.suggestionRequestSeq) {\n return; // superseded by a newer keystroke or an explicit close\n }\n\n const merged = resultSets.flat().slice(0, MentionEditorComponent.MaxSuggestions);\n this.mentionSuggestions = merged;\n\n if (merged.length > 0) {\n this.showMentionDropdown = true;\n this.positionMentionDropdown();\n } else if (this.virtualTriggerOpen) {\n // A button press must never be a silent no-op. Closing on empty results is right for a TYPED\n // trigger (the user is mid-word and nothing matched yet), but a host with zero skills clicking\n // the button would get no feedback at all and read it as broken. Staying open surfaces the\n // dropdown's own empty state, which was otherwise unreachable.\n this.showMentionDropdown = true;\n this.positionMentionDropdown();\n } else {\n this.closeMentionDropdown();\n }\n this.cdr.detectChanges();\n }\n\n /**\n * Get text before cursor position\n */\n private getTextBeforeCursor(range: Range): string {\n const tempRange = range.cloneRange();\n tempRange.selectNodeContents(this.editorRef.nativeElement);\n tempRange.setEnd(range.startContainer, range.startOffset);\n return tempRange.toString();\n }\n\n /**\n * Position the mention dropdown\n */\n private positionMentionDropdown(): void {\n const editor = this.editorRef?.nativeElement;\n if (!editor) return;\n\n // Get the parent container (message-input-box-container) for alignment\n const container = editor.closest('.message-input-box-container');\n const containerRect = container?.getBoundingClientRect();\n\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n // A button-opened trigger anchors to the BUTTON, not the caret. On the typed path the user's\n // eyes and query are at the caret so the caret is right; on the button path nobody is looking at\n // the caret, they are looking at the control they just pressed. Sticky for the session (see\n // virtualTriggerAnchor) so filtering does not yank the menu to the caret on the first keystroke.\n if (this.virtualTriggerOpen && this.virtualTriggerAnchor) {\n this.positionToAnchor(this.virtualTriggerAnchor, containerRect);\n return;\n }\n\n const range = selection.getRangeAt(0);\n let cursorRect = range.getBoundingClientRect();\n\n // A collapsed range in an EMPTY editor measures 0x0 at 0,0 in every browser, which pinned the\n // dropdown to the bottom-left corner of the viewport and ran it off screen. Rare while typing\n // (there is text to measure) but the normal case when a BUTTON opens the trigger on an empty\n // composer. Fall back to the editor's own box so the menu lands over the composer either way.\n if (cursorRect.width === 0 && cursorRect.height === 0 && cursorRect.top === 0 && cursorRect.left === 0) {\n const editorRect = editor.getBoundingClientRect();\n cursorRect = editorRect as DOMRect;\n }\n\n // Check space below vs above\n const spaceBelow = window.innerHeight - cursorRect.bottom;\n const spaceAbove = cursorRect.top;\n const dropdownHeight = Math.min(this.mentionSuggestions.length * 56, 300);\n\n // Prefer ABOVE. The composer sits at the bottom of the chat, so a dropdown that grows downward\n // lands on top of the very text being typed. Below is the fallback for the rare host that\n // mounts the composer high in a tall viewport.\n this.mentionDropdownAlignRight = false;\n this.mentionDropdownShowAbove = spaceAbove >= dropdownHeight || spaceAbove > spaceBelow;\n\n if (this.mentionDropdownShowAbove) {\n // Position above, aligning with container top if possible\n this.mentionDropdownPosition = {\n top: (containerRect ? containerRect.top : cursorRect.top) + window.scrollY - 8,\n left: cursorRect.left + window.scrollX\n };\n } else {\n // Position below cursor, but align bottom edge with container top\n this.mentionDropdownPosition = {\n top: containerRect ? containerRect.top + window.scrollY : cursorRect.bottom + window.scrollY + 4,\n left: cursorRect.left + window.scrollX\n };\n }\n }\n\n\n /**\n * Right-align the dropdown above a trigger control, matching where the voice-options picker puts\n * its popover so two buttons in the same strip do not open menus on opposite corners.\n *\n * Right alignment is applied as a transform in CSS (`align-right`) rather than computed here,\n * because the dropdown's width is content-based; `left` is still clamped so no anchor position can\n * push it off the left edge on a narrow viewport.\n */\n private positionToAnchor(anchor: HTMLElement, containerRect: DOMRect | undefined): void {\n const GUTTER = 16;\n const rect = anchor.getBoundingClientRect();\n // The dropdown is rendered with `useFixedPositioning`, so `top`/`left` are VIEWPORT coordinates.\n // Never add window.scrollX/scrollY here — getBoundingClientRect is already viewport-relative, and\n // adding scroll converts to document coordinates, which under `position: fixed` drags the menu\n // off by exactly the scroll offset.\n\n // HORIZONTAL. Align the box's LEFT edge to the button's left edge and let it grow rightward.\n // Right-alignment is wrong for this control: the Skills button sits in `.attach-buttons` on the\n // LEFT of the composer, so pinning the box's right edge to the button's right edge sends a\n // 280-400px menu off the left of the screen, and clamping it back parks it over the middle of\n // the composer. Flip to right-aligned only when growing right would overflow the viewport,\n // which is what a menu anchored to a right-hand control needs.\n const assumedWidth = Math.min(400, window.innerWidth - GUTTER * 2);\n const overflowsRight = rect.left + assumedWidth > window.innerWidth - GUTTER;\n this.mentionDropdownAlignRight = overflowsRight;\n // align-right shifts the box back by its own width, so `left` is then its RIGHT edge; otherwise\n // `left` is its left edge. Clamp both forms inside the gutter.\n //\n // When flipping, align to the CONTAINER's right edge, not the button's. `.attach-buttons` is\n // pinned to the composer's bottom-right and Skills is the leftmost of five icons, so pinning the\n // box to that one button's right edge hangs its whole 400px body out to the left of the icon the\n // user pressed. Aligning to the composer instead puts the menu above the button cluster, which is\n // what \"above the button\" means when the menu is ten times the button's width.\n const flippedRightEdge = containerRect\n ? Math.min(containerRect.right, window.innerWidth - GUTTER)\n : Math.min(rect.right, window.innerWidth - GUTTER);\n const left = overflowsRight\n ? Math.max(assumedWidth + GUTTER, flippedRightEdge)\n : Math.min(Math.max(GUTTER, rect.left), window.innerWidth - GUTTER - assumedWidth);\n\n // VERTICAL. Prefer the composer's top edge so the menu clears the whole input box rather than\n // overlapping the text the user is composing; fall back to the button when there is no container.\n // Not unconditional: `show-above` lifts the box by its own height, so forcing it where there is\n // no room renders it off the top of the viewport where it cannot be reached.\n const anchorTop = containerRect ? containerRect.top : rect.top;\n const dropdownHeight = Math.min(Math.max(this.mentionSuggestions.length, 1) * 56, 300);\n // Prefer above, but when it does not fit, take whichever side has MORE room rather than\n // dropping below unconditionally — the composer is bottom-docked, so below is usually the worse\n // side. In a short viewport (a popped-out chat, or mobile with the keyboard up) that difference\n // is the whole menu versus a clipped sliver.\n const spaceBelow = window.innerHeight - rect.bottom;\n const showAbove = anchorTop >= dropdownHeight + GUTTER || anchorTop > spaceBelow;\n this.mentionDropdownShowAbove = showAbove;\n // Above: `top` is the box's BOTTOM edge (the transform lifts it). Below: it is the top edge.\n // Clamped either way, because dropdownHeight is an estimate (rows with descriptions run taller\n // than 56px) and an underestimate would otherwise clip the first row off the top of the screen.\n const rawTop = showAbove ? anchorTop - 8 : rect.bottom + 8;\n const top = showAbove\n ? Math.max(GUTTER + dropdownHeight, Math.min(rawTop, window.innerHeight - GUTTER))\n : Math.max(GUTTER, Math.min(rawTop, window.innerHeight - GUTTER - dropdownHeight));\n\n this.mentionDropdownPosition = { top, left };\n }\n\n /**\n * Handle mention selection from dropdown\n */\n onMentionSelected(suggestion: MentionSuggestion): void {\n this.insertMentionChip(suggestion);\n this.closeMentionDropdown();\n this.mentionSelected.emit(suggestion);\n\n // Refocus the editor after selection\n setTimeout(() => {\n this.editorRef?.nativeElement?.focus();\n }, 50);\n }\n\n /**\n * Insert a mention chip at the current cursor position\n */\n /**\n * Programmatically inserts a RESOLVED mention chip (+ a single trailing space) at\n * the END of the editor content and places the caret after it — the exact state a\n * user reaches by typing a trigger and picking from the dropdown. Unlike the\n * dropdown path this needs no active trigger context, so hosts can pre-address a\n * message (e.g. the omnibar's '@agent' flow staging a Sage pill) and leave the\n * user ready to type.\n *\n * @returns false when the editor view isn't mounted yet — callers may retry.\n */\n /** Focuses the editor and places the caret at the very end of its content. */\n public FocusCaretAtEnd(): boolean {\n const editor = this.editorRef?.nativeElement;\n if (!editor) {\n return false;\n }\n editor.focus();\n const selection = window.getSelection();\n if (selection) {\n const range = document.createRange();\n range.selectNodeContents(editor);\n range.collapse(false);\n selection.removeAllRanges();\n selection.addRange(range);\n }\n return true;\n }\n\n /**\n * Open the suggestion dropdown for a trigger character, exactly as if the user had typed it.\n *\n * Exists so a trigger can have a BUTTON as well as a keystroke. `/` commands were previously\n * reachable only by knowing to type `/`, which is not an affordance — nothing on screen says the\n * feature is there.\n *\n * Deliberately inserts the character and re-runs the normal input path rather than opening the\n * dropdown directly. Everything downstream (which providers own the char, permission filtering,\n * the query the user then types, replacing the char with the chosen chip) is already driven by\n * that path; short-circuiting it would fork the flow and leave `mentionStartIndex` /\n * `activeTrigger` unset, so the first selection would insert in the wrong place.\n *\n * @returns false when the editor is disabled, unavailable, or no active provider owns the char.\n */\n public OpenTrigger(triggerChar: string, anchorEl?: HTMLElement | null): boolean {\n const editor = this.editorRef?.nativeElement;\n if (!editor || this.disabled) {\n return false;\n }\n if (!this.mentionTriggers.includes(triggerChar)) {\n return false;\n }\n if (!this.FocusCaretAtEnd()) {\n return false;\n }\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) {\n return false;\n }\n\n // NOTHING is written into the editor. An earlier version inserted the trigger character to\n // reuse the typed path, and cleaned it up on dismissal — but a character the user never typed,\n // appearing and then vanishing, is visible churn in their own message. The dropdown is opened\n // directly instead, and the character only ever exists as the chip the user chooses.\n this.virtualTriggerOpen = true;\n this.virtualTriggerAnchor = anchorEl ?? null;\n this.virtualTriggerBaseline = this.getTextBeforeCursor(selection.getRangeAt(0)).length;\n this.activeTrigger = triggerChar;\n this.mentionQuery = '';\n void this.fetchSuggestions(triggerChar, '');\n return true;\n }\n\n /**\n * True when the suggestion dropdown is open FOR THIS trigger character.\n *\n * Lets a control that opens a trigger render its own pressed state without duplicating the\n * editor's state. Both halves matter: `showMentionDropdown` alone would light the Skills button\n * while an unrelated `@` mention dropdown is open.\n */\n public IsTriggerOpen(triggerChar: string): boolean {\n // virtualTriggerOpen covers the window between the press and the provider's response. Reporting\n // \"closed\" there makes the second press of a quick double-click re-run the open path instead of\n // toggling, re-emitting the Before/After pair.\n return (this.showMentionDropdown || this.virtualTriggerOpen) && this.activeTrigger === triggerChar;\n }\n\n /** True when keyboard focus currently sits inside this editor. */\n public get HasFocus(): boolean {\n const editor = this.editorRef?.nativeElement;\n return !!editor && (editor === document.activeElement || editor.contains(document.activeElement));\n }\n\n public InsertMention(suggestion: MentionSuggestion, focus: boolean = true): boolean {\n const editor = this.editorRef?.nativeElement;\n if (!editor) {\n return false;\n }\n editor.focus();\n const selection = window.getSelection();\n if (!selection) {\n return false;\n }\n // Caret to the end of the current content, then chip + space + caret-after.\n const range = document.createRange();\n range.selectNodeContents(editor);\n range.collapse(false);\n const chip = this.createMentionChip(suggestion);\n range.insertNode(chip);\n const space = document.createTextNode(' ');\n range.setStartAfter(chip);\n range.collapse(true);\n range.insertNode(space);\n range.setStartAfter(space);\n range.collapse(true);\n selection.removeAllRanges();\n selection.addRange(range);\n if (!focus) {\n editor.blur();\n }\n this.onInput();\n return true;\n }\n\n private insertMentionChip(suggestion: MentionSuggestion): void {\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n const range = selection.getRangeAt(0);\n\n // Delete the trigger + query text (use the active trigger char). A VIRTUAL trigger has no\n // character in the editor, so the span to remove is only what the user typed since it opened —\n // anchoring on the trigger char here would delete an unrelated earlier one, or nothing.\n const textBeforeCursor = this.getTextBeforeCursor(range);\n const deleteLength = this.virtualTriggerOpen\n ? Math.max(0, textBeforeCursor.length - this.virtualTriggerBaseline)\n : textBeforeCursor.length - textBeforeCursor.lastIndexOf(this.activeTrigger);\n\n if (deleteLength > 0) {\n range.setStart(range.startContainer, range.startOffset - deleteLength);\n range.deleteContents();\n }\n\n // Create mention chip element\n const chip = this.createMentionChip(suggestion);\n\n // Insert chip\n range.insertNode(chip);\n\n // Add space after chip\n const space = document.createTextNode(' ');\n range.collapse(false);\n range.insertNode(space);\n\n // Move cursor after the space\n range.setStartAfter(space);\n range.collapse(true);\n selection.removeAllRanges();\n selection.addRange(range);\n\n // Trigger change detection\n this.onInput();\n }\n\n /**\n * Create a mention chip DOM element\n */\n private createMentionChip(suggestion: MentionSuggestion): HTMLSpanElement {\n const chip = document.createElement('span');\n chip.className = 'mention-chip';\n chip.contentEditable = 'false'; // Make chip non-editable\n chip.setAttribute('data-mention-id', suggestion.id);\n chip.setAttribute('data-mention-type', suggestion.type);\n chip.setAttribute('data-mention-name', suggestion.name);\n\n // Configuration presets ride along on the suggestion itself (supplied by the trigger\n // provider — e.g. the agent-mentions provider maps AI Agent Configuration presets in).\n // The composer has no knowledge of what a preset IS; it just stores the default's\n // ID/Name on the chip and offers a picker when there are 2+.\n const presets: MentionSuggestionPreset[] = suggestion.presets ?? [];\n if (presets.length > 0) {\n const defaultPreset = presets.find(p => p.IsDefault) || presets[0];\n if (defaultPreset) {\n chip.setAttribute('data-preset-id', defaultPreset.ID || '');\n chip.setAttribute('data-preset-name', defaultPreset.Name || '');\n }\n }\n\n // Apply inline styles directly — color by mention type. Skills carry their own accent Color\n // (AISkill.Color UX metadata); when present it drives the chip, otherwise the standard skill\n // green (--mj-status-success). Same color logic as the saved-message badge — keep in sync with\n // message-item's renderMentionHTML.\n const skillPalette = suggestion.type === 'skill'\n ? { bg: suggestion.color || 'var(--mj-status-success)', border: 'rgba(255, 255, 255, 0.35)' }\n : null;\n const palette =\n skillPalette\n ? skillPalette\n : suggestion.type === 'user'\n ? { bg: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', border: 'rgba(240, 147, 251, 0.4)' }\n : suggestion.type === 'entity'\n ? { bg: 'linear-gradient(135deg, #11998e 0%, #38ef7d 100%)', border: 'rgba(17, 153, 142, 0.4)' }\n : suggestion.type === 'query'\n ? { bg: 'linear-gradient(135deg, #FF6A00 0%, #FF9E2C 100%)', border: 'rgba(255, 106, 0, 0.4)' }\n : { bg: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', border: 'rgba(102, 126, 234, 0.4)' };\n // Skills render as a sharp-cornered rectangle (vs. the rounded pill for agents/users/entities)\n // — the shape is the at-a-glance differentiator. Same shape in the saved-message badge.\n const chipRadius = suggestion.type === 'skill' ? '4px' : '16px';\n chip.style.cssText = `\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 12px;\n margin: 0 3px;\n border-radius: ${chipRadius};\n font-size: 13px;\n font-weight: 600;\n cursor: default;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n pointer-events: all;\n background: ${palette.bg};\n color: white;\n border: 2px solid ${palette.border};\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);\n `;\n\n // Add icon or image\n if (suggestion.type === 'agent' && suggestion.imageUrl) {\n // Use image if available (LogoURL from agent)\n const img = document.createElement('img');\n img.src = suggestion.imageUrl;\n img.alt = suggestion.displayName;\n img.style.cssText = 'width: 16px; height: 16px; border-radius: 50%; object-fit: cover;';\n chip.appendChild(img);\n } else if (suggestion.type === 'agent' && suggestion.icon === 'mj-icon-skip') {\n // Special handling for mj-icon-skip: use the SVG data URI as an image\n const img = document.createElement('img');\n img.src = \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 101.89918457031249 96.83947368421053'%3E%3Cg transform='translate(-0.1288232421875,-0.0)'%3E%3Cpath d='M93.85,41.56c-.84,0-1.62.2-2.37.55-3-4.35-7.49-8.12-13.04-11.04l.04-7.18v-14.44h-10.24v17.6c-1.52-.43-3.07-.8-4.67-1.11V0h-10.24v24.72s-.09,0-.14,0h-4.38s-.1,0-.14,0V7.3h-10.24v18.62c-1.6.32-3.15.69-4.67,1.11v-11.67h-10.24v6.09l.04,9.6c-5.55,2.92-10.04,6.7-13.04,11.04-.75-.35-1.53-.55-2.37-.55-4.5,0-8.14,5.61-8.14,12.51s3.64,12.53,8.14,12.53c.58,0,1.14-.12,1.67-.29,4.1,6.62,11.54,12.06,20.98,15.28l.79.13v7.05c0,2.97,1.45,5.58,3.87,6.99,1.18.69,2.5,1.04,3.85,1.03,1.4,0,2.83-.37,4.15-1.12l7.54-4.29,7.56,4.3c1.31.74,2.73,1.12,4.13,1.12s2.67-.35,3.85-1.04c2.42-1.41,3.86-4.02,3.86-6.98v-7.05l.79-.13c9.44-3.22,16.89-8.66,20.98-15.28.54.17,1.09.29,1.68.29,4.5,0,8.14-5.61,8.14-12.53s-3.63-12.51-8.14-12.51' fill='%23AAAAAA'/%3E%3Cpath d='M86.69,50.87c0-12.22-13.6-19.1-28.94-20.66-4.48-.47-9.19-.54-13.52,0-15.34,1.53-28.93,8.41-28.93,20.66,0,8.55,5.7,15.55,12.68,15.55h7.94c3.05,2.5,6.93,4.1,11.08,4.71,2.65.4,5.44.46,8.01,0,4.15-.6,8.05-2.2,11.1-4.71h7.92c6.97,0,12.68-7,12.68-15.55' fill='white' opacity='0.9'/%3E%3Cpath d='M57.83,55.82c-1.19,2.58-3.8,4.35-6.84,4.35s-5.65-1.77-6.84-4.35h13.68Z' fill='%23AAAAAA'/%3E%3Cpath d='M32.52,41.14c1.74,0,3.18,2.13,3.18,4.76s-1.44,4.74-3.18,4.74-3.16-2.13-3.16-4.74,1.41-4.76,3.16-4.76' fill='%23AAAAAA'/%3E%3Cpath d='M69.46,41.14c1.74,0,3.16,2.13,3.16,4.76s-1.41,4.74-3.16,4.74-3.18-2.13-3.18-4.74,1.41-4.76,3.18-4.76' fill='%23AAAAAA'/%3E%3Cpath d='M63.91,76.15c-.82-.48-1.84-.43-2.8.12l-10.13,5.75-10.11-5.75c-.96-.55-1.98-.59-2.8-.12-.82.47-1.29,1.38-1.29,2.49v10.12c0,1.11.47,2.02,1.28,2.49.38.22.8.33,1.24.33.51,0,1.05-.15,1.57-.44l10.12-5.75,10.11,5.75c.52.29,1.05.44,1.56.44.44,0,.86-.11,1.24-.33.81-.48,1.28-1.38,1.28-2.49v-10.12c0-1.11-.47-2.02-1.28-2.49' fill='white' opacity='0.9'/%3E%3C/g%3E%3C/svg%3E\";\n img.alt = suggestion.displayName;\n img.style.cssText = 'width: 16px; height: 16px; border-radius: 50%; object-fit: cover;';\n chip.appendChild(img);\n } else {\n // Use icon for users or agents without images\n const icon = document.createElement('i');\n icon.style.cssText = 'font-size: 12px; opacity: 0.95;';\n if (suggestion.type === 'agent' && suggestion.icon) {\n icon.className = this.getIconClasses(suggestion.icon);\n } else if (suggestion.type === 'user') {\n icon.className = 'fa-solid fa-user';\n } else if (suggestion.type === 'entity') {\n icon.className = this.getIconClasses(suggestion.icon || 'fa-solid fa-table');\n } else if (suggestion.type === 'query') {\n icon.className = this.getIconClasses(suggestion.icon || 'fa-solid fa-database');\n } else if (suggestion.type === 'skill') {\n icon.className = this.getIconClasses(suggestion.icon || 'fa-solid fa-wand-magic-sparkles');\n } else {\n icon.className = 'fa-solid fa-robot';\n }\n chip.appendChild(icon);\n }\n\n // Add space between icon/image and text\n const space = document.createTextNode(' ');\n chip.appendChild(space);\n\n // Add text\n const text = document.createTextNode(suggestion.displayName);\n chip.appendChild(text);\n\n // Add dropdown when the suggestion carries 2+ presets\n if (presets.length >= 2) {\n this.addConfigurationDropdown(chip, presets);\n }\n\n return chip;\n }\n\n /**\n * Add configuration preset dropdown to a mention chip\n */\n private addConfigurationDropdown(chip: HTMLSpanElement, presets: MentionSuggestionPreset[]): void {\n // Store default preset for comparison\n const defaultPreset = presets.find(p => p.IsDefault) || presets[0];\n\n // Add preset indicator text (only shown when non-default selected)\n const presetIndicator = document.createElement('span');\n presetIndicator.className = 'preset-indicator';\n presetIndicator.style.cssText = `\n display: none;\n font-size: 10px;\n font-weight: 600;\n font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;\n background: rgba(255, 255, 255, 0.25);\n padding: 2px 6px;\n border-radius: 4px;\n margin-left: 4px;\n letter-spacing: 0.3px;\n text-transform: uppercase;\n border: 1px solid rgba(255, 255, 255, 0.15);\n `;\n chip.appendChild(presetIndicator);\n\n // Add dropdown chevron button\n const chevron = document.createElement('i');\n chevron.className = 'fa-solid fa-chevron-down';\n chevron.style.cssText = `\n font-size: 10px;\n opacity: 0.9;\n cursor: pointer;\n padding: 2px;\n `;\n chip.appendChild(chevron);\n\n // Create dropdown menu (initially hidden) - append to body for global positioning\n const dropdown = document.createElement('div');\n dropdown.className = 'preset-dropdown';\n dropdown.style.cssText = `\n display: none;\n position: fixed;\n background: white;\n border: 1px solid #ddd;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n min-width: 200px;\n max-width: 300px;\n z-index: 10000;\n overflow: hidden;\n `;\n\n // Add preset options to dropdown\n presets.forEach(preset => {\n const option = document.createElement('div');\n option.className = 'preset-option';\n option.style.cssText = `\n padding: 10px 12px;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n transition: background 0.2s;\n `;\n\n // Check if this is the selected preset\n const currentPresetId = chip.getAttribute('data-preset-id');\n const isSelected = UUIDsEqual(preset.ID, currentPresetId);\n\n // Add checkmark for selected option\n const checkmark = document.createElement('i');\n checkmark.className = 'fa-solid fa-check';\n checkmark.style.cssText = `\n font-size: 12px;\n color: #667eea;\n opacity: ${isSelected ? '1' : '0'};\n width: 14px;\n `;\n option.appendChild(checkmark);\n\n // Add preset text content\n const textContainer = document.createElement('div');\n textContainer.style.cssText = 'flex: 1;';\n\n const displayName = document.createElement('div');\n displayName.textContent = preset.DisplayName || preset.Name;\n displayName.style.cssText = `\n font-weight: 600;\n color: #333;\n font-size: 13px;\n `;\n textContainer.appendChild(displayName);\n\n if (preset.Description) {\n const description = document.createElement('div');\n description.textContent = preset.Description;\n description.style.cssText = `\n font-size: 11px;\n color: #666;\n margin-top: 2px;\n `;\n textContainer.appendChild(description);\n }\n\n option.appendChild(textContainer);\n\n // Hover effects\n option.addEventListener('mouseenter', () => {\n option.style.background = '#f5f5f5';\n });\n option.addEventListener('mouseleave', () => {\n option.style.background = 'white';\n });\n\n // Click handler to select preset\n option.addEventListener('click', (e) => {\n e.stopPropagation();\n\n // Update chip data attributes\n // IMPORTANT: Store preset.ID (AIAgentConfiguration.ID), not AIConfigurationID\n chip.setAttribute('data-preset-id', preset.ID || '');\n chip.setAttribute('data-preset-name', preset.Name || '');\n\n // Update preset indicator visibility and text\n const isDefault = UUIDsEqual(preset.ID, defaultPreset.ID);\n if (isDefault) {\n presetIndicator.style.display = 'none';\n } else {\n presetIndicator.style.display = 'inline';\n presetIndicator.textContent = preset.DisplayName || preset.Name;\n }\n\n // Update checkmarks\n dropdown.querySelectorAll('.preset-option').forEach((opt, idx) => {\n const check = opt.querySelector('i.fa-check') as HTMLElement;\n if (check) {\n check.style.opacity = idx === presets.indexOf(preset) ? '1' : '0';\n }\n });\n\n // Close dropdown\n dropdown.style.display = 'none';\n });\n\n dropdown.appendChild(option);\n });\n\n // Append dropdown to document body for global positioning\n document.body.appendChild(dropdown);\n\n // Helper function to position dropdown relative to chip\n const positionDropdown = () => {\n const chipRect = chip.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - chipRect.bottom;\n\n // Set left position (same for both above/below)\n dropdown.style.left = `${chipRect.left}px`;\n\n // First, show dropdown to measure its actual height\n const wasHidden = dropdown.style.display === 'none';\n if (wasHidden) {\n dropdown.style.visibility = 'hidden';\n dropdown.style.display = 'block';\n }\n\n const dropdownHeight = dropdown.offsetHeight;\n const spaceAbove = chipRect.top;\n\n // Position dropdown above chip if not enough space below\n if (spaceBelow < dropdownHeight && spaceAbove > spaceBelow) {\n // Show above - position so bottom of dropdown is 4px above top of chip\n dropdown.style.top = `${chipRect.top - dropdownHeight - 4}px`;\n } else {\n // Show below (default) - position 4px below bottom of chip\n dropdown.style.top = `${chipRect.bottom + 4}px`;\n }\n\n // Restore visibility\n if (wasHidden) {\n dropdown.style.visibility = 'visible';\n }\n };\n\n // Toggle dropdown on chevron click\n chevron.addEventListener('click', (e) => {\n e.stopPropagation();\n const isVisible = dropdown.style.display === 'block';\n\n if (isVisible) {\n dropdown.style.display = 'none';\n } else {\n positionDropdown();\n dropdown.style.display = 'block';\n }\n });\n\n // Close dropdown when clicking outside\n const closeDropdown = (e: MouseEvent) => {\n if (!dropdown.contains(e.target as Node) && !chip.contains(e.target as Node)) {\n dropdown.style.display = 'none';\n }\n };\n document.addEventListener('click', closeDropdown);\n\n // Cleanup: remove dropdown from body and event listeners when chip is removed\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n mutation.removedNodes.forEach((node) => {\n if (node === chip) {\n document.removeEventListener('click', closeDropdown);\n if (dropdown.parentNode) {\n dropdown.parentNode.removeChild(dropdown);\n }\n observer.disconnect();\n }\n });\n });\n });\n if (chip.parentNode) {\n observer.observe(chip.parentNode, { childList: true });\n }\n }\n\n /**\n * Get icon classes with proper FA prefix\n */\n private getIconClasses(iconClass: string): string {\n if (!iconClass) return 'fa-solid fa-robot';\n if (iconClass.includes('fa-')) {\n if (iconClass.match(/\\b(fa-solid|fa-regular|fa-light|fa-brands)\\b/)) {\n return iconClass;\n }\n return `fa-solid ${iconClass}`;\n }\n return iconClass;\n }\n\n /**\n * Handle backspace key - delete entire chip if cursor is right after one\n */\n private handleBackspace(event: KeyboardEvent): void {\n const selection = window.getSelection();\n if (!selection || selection.rangeCount === 0) return;\n\n const range = selection.getRangeAt(0);\n\n // Check if cursor is right after a mention chip\n if (range.collapsed && range.startOffset > 0) {\n const prevNode = range.startContainer.childNodes[range.startOffset - 1];\n\n if (prevNode && (prevNode as HTMLElement).classList?.contains('mention-chip')) {\n event.preventDefault();\n prevNode.remove();\n this.onInput();\n }\n }\n }\n\n /**\n * Close mention dropdown\n */\n closeMentionDropdown(): void {\n // No text cleanup: a virtual trigger never wrote anything into the editor, which is the whole\n // point of it. Dismissing leaves the message exactly as the user left it.\n this.virtualTriggerOpen = false;\n this.virtualTriggerBaseline = 0;\n this.virtualTriggerAnchor = null;\n this.mentionDropdownAlignRight = false;\n // Invalidate any in-flight suggestion fetch so a late response can't reopen the dropdown\n this.suggestionRequestSeq++;\n this.showMentionDropdown = false;\n this.mentionSuggestions = [];\n this.mentionStartIndex = -1;\n this.mentionQuery = '';\n this.activeTrigger = '@';\n }\n\n /**\n * Convert editor HTML to plain text with @mentions\n */\n private getPlainText(): string {\n const editor = this.editorRef?.nativeElement;\n if (!editor) return '';\n\n let text = '';\n const nodes = editor.childNodes;\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node.nodeType === Node.TEXT_NODE) {\n text += node.textContent || '';\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as HTMLElement;\n\n if (element.classList.contains('mention-chip')) {\n const name = element.getAttribute('data-mention-name') || '';\n const mentionType = element.getAttribute('data-mention-type');\n const prefix = mentionType === 'entity' || mentionType === 'query' ? '#' : mentionType === 'skill' ? '/' : '@';\n // Use quoted format if name has spaces\n text += name.includes(' ') ? `${prefix}\"${name}\"` : `${prefix}${name}`;\n } else if (element.tagName === 'BR') {\n text += '\\n';\n } else if (element.tagName === 'DIV') {\n // Handle line breaks from contentEditable\n if (i > 0) text += '\\n';\n text += this.getNodeText(element);\n } else {\n text += element.textContent || '';\n }\n }\n }\n\n return text;\n }\n\n /**\n * Get text from a node recursively\n */\n private getNodeText(node: Node): string {\n let text = '';\n const children = node.childNodes;\n\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n\n if (child.nodeType === Node.TEXT_NODE) {\n text += child.textContent || '';\n } else if (child.nodeType === Node.ELEMENT_NODE) {\n const element = child as HTMLElement;\n\n if (element.classList.contains('mention-chip')) {\n const name = element.getAttribute('data-mention-name') || '';\n const mentionType = element.getAttribute('data-mention-type');\n const prefix = mentionType === 'entity' || mentionType === 'query' ? '#' : mentionType === 'skill' ? '/' : '@';\n text += name.includes(' ') ? `${prefix}\"${name}\"` : `${prefix}${name}`;\n } else {\n text += this.getNodeText(element);\n }\n }\n }\n\n return text;\n }\n\n /**\n * Set editor content from plain text (for programmatic updates)\n */\n /**\n * Renders a value into the editor, REHYDRATING any serialized mention tokens\n * (the `@{\"type\":…,\"id\":…,\"name\":…}` format produced by\n * {@link getPlainTextWithJsonMentions}) back into real chips — so persisted\n * drafts and any host-written serialized value round-trip losslessly. Plain\n * strings (no tokens) take the fast path.\n */\n private setEditorContent(text: string): void {\n const editor = this.editorRef?.nativeElement;\n if (!editor) return;\n\n const segments = MentionEditorComponent.ParseSerializedMentions(text);\n if (segments.every((seg) => typeof seg === 'string')) {\n editor.textContent = text;\n return;\n }\n editor.textContent = '';\n for (const seg of segments) {\n if (typeof seg === 'string') {\n if (seg.length > 0) {\n editor.appendChild(document.createTextNode(seg));\n }\n } else {\n const chip = this.createMentionChip(seg.suggestion);\n if (seg.configId) {\n chip.setAttribute('data-preset-id', seg.configId);\n }\n if (seg.config) {\n chip.setAttribute('data-preset-name', seg.config);\n }\n editor.appendChild(chip);\n }\n }\n }\n\n /**\n * Splits text containing serialized mention tokens into plain-string segments and\n * parsed mention segments. Token = '@' followed by a JSON object with at least\n * {type,id,name}; brace matching is string-aware so names containing braces or\n * escaped quotes parse correctly. Malformed candidates stay as literal text.\n */\n public static ParseSerializedMentions(\n text: string\n ): Array<string | { suggestion: MentionSuggestion; configId?: string; config?: string }> {\n const segments: Array<string | { suggestion: MentionSuggestion; configId?: string; config?: string }> = [];\n let cursor = 0;\n let searchFrom = 0;\n while (true) {\n const start = text.indexOf('@{', searchFrom);\n if (start === -1) {\n break;\n }\n const end = MentionEditorComponent.findJsonEnd(text, start + 1);\n if (end === -1) {\n searchFrom = start + 2;\n continue;\n }\n const candidate = text.substring(start + 1, end + 1);\n let parsed: { type?: string; id?: string; name?: string; configId?: string; config?: string } | null = null;\n try {\n parsed = JSON.parse(candidate);\n } catch {\n parsed = null;\n }\n if (!parsed || typeof parsed.type !== 'string' || typeof parsed.id !== 'string' || typeof parsed.name !== 'string') {\n searchFrom = start + 2; // not a mention token — keep scanning past it\n continue;\n }\n if (start > cursor) {\n segments.push(text.substring(cursor, start));\n }\n segments.push({\n suggestion: { type: parsed.type, id: parsed.id, name: parsed.name, displayName: parsed.name },\n configId: parsed.configId,\n config: parsed.config,\n });\n cursor = end + 1;\n searchFrom = cursor;\n }\n if (cursor < text.length) {\n segments.push(text.substring(cursor));\n }\n if (segments.length === 0) {\n segments.push(text);\n }\n return segments;\n }\n\n /** Index of the matching closing brace for the object starting at `openIndex` ('{'), string-aware. -1 when unbalanced. */\n private static findJsonEnd(text: string, openIndex: number): number {\n let depth = 0;\n let inString = false;\n for (let i = openIndex; i < text.length; i++) {\n const ch = text[i];\n if (inString) {\n if (ch === '\\\\') {\n i++; // skip escaped char\n } else if (ch === '\"') {\n inString = false;\n }\n continue;\n }\n if (ch === '\"') {\n inString = true;\n } else if (ch === '{') {\n depth++;\n } else if (ch === '}') {\n depth--;\n if (depth === 0) {\n return i;\n }\n }\n }\n return -1;\n }\n\n // ControlValueAccessor implementation\n writeValue(value: string): void {\n const editor = this.editorRef?.nativeElement;\n if (!editor) {\n // View not created yet — buffer the value; ngAfterViewInit applies it\n this.pendingWriteValue = value ?? '';\n return;\n }\n if (value) {\n this.setEditorContent(value);\n } else {\n editor.textContent = '';\n }\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n if (this.editorRef?.nativeElement) {\n this.editorRef.nativeElement.contentEditable = (!isDisabled).toString();\n }\n }\n\n /**\n * Focus the editor\n */\n public focus(): void {\n this.editorRef?.nativeElement?.focus();\n }\n\n /**\n * Clear the editor content and pending attachments\n */\n public clear(): void {\n if (this.editorRef?.nativeElement) {\n this.editorRef.nativeElement.textContent = '';\n this.onInput();\n }\n this.clearPendingAttachments();\n }\n\n /**\n * Extract mention chips with their configuration data\n * Returns array of objects containing mention info and preset configuration\n */\n public getMentionChipsData(): Array<{ id: string; type: string; name: string; presetId?: string; presetName?: string }> {\n const editor = this.editorRef?.nativeElement;\n if (!editor) return [];\n\n const chips: Array<{ id: string; type: string; name: string; presetId?: string; presetName?: string }> = [];\n const mentionElements = editor.querySelectorAll('.mention-chip');\n\n mentionElements.forEach(chip => {\n const element = chip as HTMLElement;\n const id = element.getAttribute('data-mention-id') || '';\n const type = element.getAttribute('data-mention-type') || '';\n const name = element.getAttribute('data-mention-name') || '';\n const presetId = element.getAttribute('data-preset-id') || undefined;\n const presetName = element.getAttribute('data-preset-name') || undefined;\n\n chips.push({\n id,\n type,\n name,\n ...(presetId ? { presetId } : {}),\n ...(presetName ? { presetName } : {})\n });\n });\n\n return chips;\n }\n\n /**\n * Get the plain text value with mentions encoded as JSON\n * This format preserves configuration information when messages are saved\n * Format: @{type:\"agent\",id:\"uuid\",name:\"Agent Name\",configId:\"uuid\",config:\"High\"}\n */\n public getPlainTextWithJsonMentions(): string {\n const editor = this.editorRef?.nativeElement;\n if (!editor) return '';\n\n let plainText = '';\n const childNodes = Array.from(editor.childNodes);\n\n for (const node of childNodes) {\n if (node.nodeType === Node.TEXT_NODE) {\n // Regular text node\n plainText += node.textContent || '';\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as HTMLElement;\n\n if (element.classList.contains('mention-chip')) {\n // Extract mention data attributes\n const type = element.getAttribute('data-mention-type') || '';\n const id = element.getAttribute('data-mention-id') || '';\n const name = element.getAttribute('data-mention-name') || '';\n const presetId = element.getAttribute('data-preset-id');\n const presetName = element.getAttribute('data-preset-name');\n\n // Build JSON mention object (compact format - no spaces)\n const mentionObj: Record<string, string> = {\n type,\n id,\n name\n };\n\n // Add configuration fields if present (for agents with non-default presets)\n if (presetId) {\n mentionObj.configId = presetId;\n }\n if (presetName) {\n mentionObj.config = presetName;\n }\n\n // Encode as JSON mention\n // Don't remove spaces from the JSON string - spaces in values (like agent names) need to be preserved\n plainText += `@${JSON.stringify(mentionObj)}`;\n } else {\n // Other HTML element (e.g., <br>)\n if (element.tagName === 'BR') {\n plainText += '\\n';\n } else {\n plainText += element.textContent || '';\n }\n }\n }\n }\n\n return plainText;\n }\n\n // ==================== Attachment Handling Methods ====================\n\n /**\n * Handle drag over event\n */\n onDragOver(event: DragEvent): void {\n if (!this.enableAttachments) return;\n\n event.preventDefault();\n event.stopPropagation();\n this.isDragOver = true;\n }\n\n /**\n * Handle drag leave event\n */\n onDragLeave(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n this.isDragOver = false;\n }\n\n /**\n * Handle drop event\n */\n onDrop(event: DragEvent): void {\n if (!this.enableAttachments) return;\n\n event.preventDefault();\n event.stopPropagation();\n this.isDragOver = false;\n\n if (event.dataTransfer?.files) {\n const files = Array.from(event.dataTransfer.files);\n for (const file of files) {\n if (this.isAcceptedFile(file)) {\n this.processFile(file);\n }\n }\n }\n }\n\n /**\n * Handle file input change (from file picker)\n */\n onFileSelected(event: Event): void {\n const input = event.target as HTMLInputElement;\n if (input.files) {\n const files = Array.from(input.files);\n for (const file of files) {\n this.processFile(file);\n }\n // Reset input so same file can be selected again\n input.value = '';\n }\n }\n\n /**\n * Process a file for attachment\n */\n private async processFile(file: File): Promise<void> {\n // Validate file\n const validation = this.validateFile(file);\n if (!validation.valid) {\n this.attachmentError.emit(validation.error!);\n return;\n }\n\n // Read file as data URL\n const dataUrl = await this.readFileAsDataUrl(file);\n if (!dataUrl) {\n this.attachmentError.emit('Failed to read file');\n return;\n }\n\n // Get image dimensions if applicable\n let width: number | undefined;\n let height: number | undefined;\n\n if (file.type.startsWith('image/')) {\n const dimensions = await this.getImageDimensions(dataUrl);\n width = dimensions.width;\n height = dimensions.height;\n }\n\n // Create pending attachment\n const attachment: PendingAttachment = {\n id: this.generateAttachmentId(),\n file,\n dataUrl,\n mimeType: file.type,\n fileName: file.name,\n sizeBytes: file.size,\n width,\n height,\n thumbnailUrl: file.type.startsWith('image/') ? dataUrl : undefined\n };\n\n // Add to pending attachments\n this.pendingAttachments.push(attachment);\n this.attachmentsChanged.emit([...this.pendingAttachments]);\n this.cdr.detectChanges();\n }\n\n /**\n * Validate a file against settings\n */\n private validateFile(file: File): { valid: boolean; error?: string } {\n // Check count limit\n if (this.pendingAttachments.length >= this.maxAttachments) {\n return {\n valid: false,\n error: `Maximum ${this.maxAttachments} attachments allowed`\n };\n }\n\n // Check size limit\n if (file.size > this.maxAttachmentSizeBytes) {\n const maxMB = (this.maxAttachmentSizeBytes / (1024 * 1024)).toFixed(1);\n const fileMB = (file.size / (1024 * 1024)).toFixed(1);\n return {\n valid: false,\n error: `File size (${fileMB}MB) exceeds maximum (${maxMB}MB)`\n };\n }\n\n // Check file type\n if (!this.isAcceptedFile(file)) {\n return {\n valid: false,\n error: `File type ${file.type || 'unknown'} not accepted`\n };\n }\n\n return { valid: true };\n }\n\n /**\n * Check if file type is accepted\n */\n private isAcceptedFile(file: File): boolean {\n if (this.acceptedFileTypes === '*' || this.acceptedFileTypes === '*/*') {\n return true;\n }\n\n const acceptedTypes = this.acceptedFileTypes.split(',').map(t => t.trim());\n\n for (const accepted of acceptedTypes) {\n // Handle universal wildcard */* anywhere in the list\n if (accepted === '*/*') {\n return true;\n }\n // Handle wildcard MIME types like \"image/*\"\n if (accepted.endsWith('/*')) {\n const category = accepted.slice(0, -2);\n if (file.type.startsWith(category + '/')) {\n return true;\n }\n } else if (accepted.startsWith('.')) {\n // Handle file extensions like \".png\"\n if (file.name.toLowerCase().endsWith(accepted.toLowerCase())) {\n return true;\n }\n } else if (file.type === accepted) {\n // Exact MIME type match\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Read file as data URL\n */\n private readFileAsDataUrl(file: File): Promise<string | null> {\n return new Promise((resolve) => {\n const reader = new FileReader();\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = () => resolve(null);\n reader.readAsDataURL(file);\n });\n }\n\n /**\n * Get image dimensions\n */\n private getImageDimensions(dataUrl: string): Promise<{ width: number; height: number }> {\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n resolve({ width: img.naturalWidth, height: img.naturalHeight });\n };\n img.onerror = () => {\n resolve({ width: 0, height: 0 });\n };\n img.src = dataUrl;\n });\n }\n\n /**\n * Generate unique attachment ID\n */\n private generateAttachmentId(): string {\n return `att_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\n }\n\n /**\n * Remove a pending attachment by ID\n */\n public removeAttachment(id: string): void {\n const index = this.pendingAttachments.findIndex(a => a.id === id);\n if (index !== -1) {\n this.pendingAttachments.splice(index, 1);\n this.attachmentsChanged.emit([...this.pendingAttachments]);\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Get all pending attachments\n */\n public getPendingAttachments(): PendingAttachment[] {\n return [...this.pendingAttachments];\n }\n\n /**\n * Add an artifact as a pending attachment programmatically.\n * Used by the artifact picker to attach artifacts as conversation inputs.\n */\n public AddArtifactAttachment(artifact: {\n fileID: string; fileName: string; mimeType: string;\n sizeBytes: number; artifactVersionId?: string;\n }): PendingAttachment {\n const attachment: PendingAttachment = {\n id: crypto.randomUUID(),\n file: null,\n dataUrl: '',\n mimeType: artifact.mimeType,\n fileName: artifact.fileName,\n sizeBytes: artifact.sizeBytes,\n fileID: artifact.fileID,\n source: 'artifact',\n artifactVersionId: artifact.artifactVersionId\n };\n this.pendingAttachments.push(attachment);\n this.attachmentsChanged.emit([...this.pendingAttachments]);\n return attachment;\n }\n\n /**\n * Clear all pending attachments\n */\n public clearPendingAttachments(): void {\n this.pendingAttachments = [];\n this.attachmentsChanged.emit([]);\n this.cdr.detectChanges();\n }\n\n /**\n * Handle click on an attachment thumbnail\n */\n public onAttachmentClick(attachment: PendingAttachment): void {\n this.attachmentClicked.emit(attachment);\n }\n\n /**\n * Check if there are any pending attachments\n */\n public hasAttachments(): boolean {\n return this.pendingAttachments.length > 0;\n }\n\n /**\n * Trigger file picker programmatically\n */\n public openFilePicker(): void {\n const input = document.createElement('input');\n input.type = 'file';\n // If */* is in the list, accept all files (some browsers don't handle */* correctly)\n input.accept = this.acceptedFileTypes.includes('*/*') ? '' : this.acceptedFileTypes;\n input.multiple = true;\n input.onchange = (e) => this.onFileSelected(e);\n input.click();\n }\n}\n","<div class=\"mention-editor-container\"\n [class.drag-over]=\"isDragOver\"\n (click)=\"onContainerClick($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n\n <!-- Pending Attachments Preview -->\n @if (pendingAttachments.length > 0) {\n <div class=\"pending-attachments\">\n @for (attachment of pendingAttachments; track attachment) {\n <div class=\"attachment-thumbnail\"\n (click)=\"onAttachmentClick(attachment)\">\n @if (attachment.thumbnailUrl) {\n <img\n [src]=\"attachment.thumbnailUrl\"\n [alt]=\"attachment.fileName\"\n class=\"thumbnail-image\">\n }\n @if (!attachment.thumbnailUrl) {\n <div class=\"thumbnail-placeholder\">\n <i class=\"fa-solid fa-file\"></i>\n <span class=\"file-name\">{{ attachment.fileName }}</span>\n </div>\n }\n <button class=\"remove-attachment\"\n (click)=\"removeAttachment(attachment.id); $event.stopPropagation()\"\n title=\"Remove attachment\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n }\n </div>\n }\n\n <div\n #editor\n class=\"mention-editor\"\n contenteditable=\"true\"\n [attr.contenteditable]=\"!disabled\"\n [attr.data-placeholder]=\"placeholder\"\n (input)=\"onInput()\"\n (keydown)=\"onKeyDown($event)\"\n (blur)=\"onBlur()\"\n (paste)=\"onPaste($event)\"\n ></div>\n\n <!-- Drag & Drop Overlay -->\n @if (isDragOver) {\n <div class=\"drop-overlay\">\n <div class=\"drop-message\">\n <i class=\"fa-solid fa-cloud-arrow-up\"></i>\n <span>Drop files here</span>\n </div>\n </div>\n }\n\n <!-- Mention Dropdown -->\n @if (showMentionDropdown && enableMentions) {\n <mj-mention-dropdown\n [suggestions]=\"mentionSuggestions\"\n [position]=\"mentionDropdownPosition\"\n [showAbove]=\"mentionDropdownShowAbove\"\n [alignRight]=\"mentionDropdownAlignRight\"\n [useFixedPositioning]=\"true\"\n [visible]=\"true\"\n (suggestionSelected)=\"onMentionSelected($event)\"\n (closed)=\"closeMentionDropdown()\">\n </mj-mention-dropdown>\n }\n</div>\n"]}
@@ -361,14 +361,14 @@ export class MessageInputBoxComponent {
361
361
  } }, inputs: { Placeholder: "Placeholder", Disabled: "Disabled", Value: "Value", ShowCharacterCount: "ShowCharacterCount", EnableMentions: "EnableMentions", TriggerProviders: "TriggerProviders", ExcludedTriggerKeys: "ExcludedTriggerKeys", Provider: "Provider", CurrentUser: "CurrentUser", Rows: "Rows", EnableAttachments: "EnableAttachments", MaxAttachments: "MaxAttachments", MaxAttachmentSizeBytes: "MaxAttachmentSizeBytes", AcceptedFileTypes: "AcceptedFileTypes", EnableRealtime: "EnableRealtime", VoiceActive: "VoiceActive", CanStartRealtime: "CanStartRealtime", EnablePlanMode: "EnablePlanMode", PlanModeActive: "PlanModeActive", EnableSkills: "EnableSkills" }, outputs: { Blurred: "Blurred", TextSubmitted: "TextSubmitted", ValueChange: "ValueChange", AttachmentsChanged: "AttachmentsChanged", AttachmentError: "AttachmentError", AttachmentClicked: "AttachmentClicked", VoiceRequested: "VoiceRequested", VoiceOptionsRequested: "VoiceOptionsRequested", PlanModeToggle: "PlanModeToggle", BeforeSkillsOpened: "BeforeSkillsOpened", AfterSkillsOpened: "AfterSkillsOpened" }, standalone: false, decls: 7, vars: 14, consts: [["mentionEditor", ""], [1, "message-input-box-container", 3, "click"], [1, "input-wrapper"], [3, "ngModelChange", "valueChange", "enterPressed", "mentionSelected", "attachmentsChanged", "attachmentError", "attachmentClicked", "editorBlurred", "placeholder", "disabled", "currentUser", "enableMentions", "TriggerProviders", "ExcludedTriggerKeys", "Provider", "enableAttachments", "maxAttachments", "maxAttachmentSizeBytes", "acceptedFileTypes", "ngModel"], [1, "attach-buttons"], ["title", "Send message (Enter)", 1, "send-button-icon", 3, "click", "disabled"], [1, "fa-solid", "fa-paper-plane"], ["aria-haspopup", "true", "title", "Skills, or type / in the message box", "aria-label", "Show skills", 1, "attach-button-icon", "skills-button-icon", 3, "skills-button-icon--active", "disabled"], ["aria-label", "Toggle Plan Mode", 1, "attach-button-icon", "plan-mode-button-icon", 3, "plan-mode-button-icon--active", "disabled", "title"], ["title", "Attach file", 1, "attach-button-icon", 3, "disabled"], ["aria-haspopup", "true", "title", "Skills, or type / in the message box", "aria-label", "Show skills", 1, "attach-button-icon", "skills-button-icon", 3, "mousedown", "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-wand-magic-sparkles"], ["aria-label", "Toggle Plan Mode", 1, "attach-button-icon", "plan-mode-button-icon", 3, "click", "disabled", "title"], ["aria-hidden", "true", 1, "fa-solid", "fa-route"], ["title", "Attach file", 1, "attach-button-icon", 3, "click", "disabled"], [1, "fa-solid", "fa-paperclip"], ["aria-label", "Start a voice call", 1, "attach-button-icon", "voice-button-icon", 3, "click", "disabled", "title"], ["aria-hidden", "true", 1, "fa-solid", "fa-phone"], ["title", "Voice call options (choose agent and voice model)", "aria-label", "Voice call options", 1, "attach-button-icon", "voice-options-button-icon", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-chevron-down"]], template: function MessageInputBoxComponent_Template(rf, ctx) { if (rf & 1) {
362
362
  const _r1 = i0.ɵɵgetCurrentView();
363
363
  i0.ɵɵelementStart(0, "div", 1);
364
- i0.ɵɵlistener("click", function MessageInputBoxComponent_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnContainerClick($event)); });
364
+ i0.ɵɵlistener("click", function MessageInputBoxComponent_Template_div_click_0_listener($event) { return ctx.OnContainerClick($event); });
365
365
  i0.ɵɵelementStart(1, "div", 2)(2, "mj-mention-editor", 3, 0);
366
366
  i0.ɵɵtwoWayListener("ngModelChange", function MessageInputBoxComponent_Template_mj_mention_editor_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.Value, $event) || (ctx.Value = $event); return i0.ɵɵresetView($event); });
367
- i0.ɵɵlistener("valueChange", function MessageInputBoxComponent_Template_mj_mention_editor_valueChange_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnValueChange($event)); })("enterPressed", function MessageInputBoxComponent_Template_mj_mention_editor_enterPressed_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnEnterPressed($event)); })("mentionSelected", function MessageInputBoxComponent_Template_mj_mention_editor_mentionSelected_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnMentionSelected($event)); })("attachmentsChanged", function MessageInputBoxComponent_Template_mj_mention_editor_attachmentsChanged_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnAttachmentsChanged($event)); })("attachmentError", function MessageInputBoxComponent_Template_mj_mention_editor_attachmentError_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnAttachmentError($event)); })("attachmentClicked", function MessageInputBoxComponent_Template_mj_mention_editor_attachmentClicked_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnAttachmentClicked($event)); })("editorBlurred", function MessageInputBoxComponent_Template_mj_mention_editor_editorBlurred_2_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.Blurred.emit()); });
367
+ i0.ɵɵlistener("valueChange", function MessageInputBoxComponent_Template_mj_mention_editor_valueChange_2_listener($event) { return ctx.OnValueChange($event); })("enterPressed", function MessageInputBoxComponent_Template_mj_mention_editor_enterPressed_2_listener($event) { return ctx.OnEnterPressed($event); })("mentionSelected", function MessageInputBoxComponent_Template_mj_mention_editor_mentionSelected_2_listener($event) { return ctx.OnMentionSelected($event); })("attachmentsChanged", function MessageInputBoxComponent_Template_mj_mention_editor_attachmentsChanged_2_listener($event) { return ctx.OnAttachmentsChanged($event); })("attachmentError", function MessageInputBoxComponent_Template_mj_mention_editor_attachmentError_2_listener($event) { return ctx.OnAttachmentError($event); })("attachmentClicked", function MessageInputBoxComponent_Template_mj_mention_editor_attachmentClicked_2_listener($event) { return ctx.OnAttachmentClicked($event); })("editorBlurred", function MessageInputBoxComponent_Template_mj_mention_editor_editorBlurred_2_listener() { return ctx.Blurred.emit(); });
368
368
  i0.ɵɵelementEnd();
369
369
  i0.ɵɵconditionalCreate(4, MessageInputBoxComponent_Conditional_4_Template, 5, 4, "div", 4);
370
370
  i0.ɵɵelementStart(5, "button", 5);
371
- i0.ɵɵlistener("click", function MessageInputBoxComponent_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnSendClick()); });
371
+ i0.ɵɵlistener("click", function MessageInputBoxComponent_Template_button_click_5_listener() { return ctx.OnSendClick(); });
372
372
  i0.ɵɵelement(6, "i", 6);
373
373
  i0.ɵɵelementEnd()()();
374
374
  } if (rf & 2) {
@@ -379,7 +379,7 @@ export class MessageInputBoxComponent {
379
379
  i0.ɵɵconditional(ctx.EnableAttachments || ctx.EnableRealtime || ctx.EnablePlanMode || ctx.EnableSkills ? 4 : -1);
380
380
  i0.ɵɵadvance();
381
381
  i0.ɵɵproperty("disabled", !ctx.CanSend);
382
- } }, dependencies: [i1.NgControlStatus, i1.NgModel, i2.MentionEditorComponent], styles: [".message-input-box-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-surface-card);\n border: 2px solid var(--mj-border-default);\n border-radius: 12px;\n box-shadow: var(--mj-shadow-sm);\n transition: all 0.2s ease;\n overflow: visible;\n position: relative;\n cursor: text;\n}\n.message-input-box-container[_ngcontent-%COMP%]:focus-within {\n border-color: var(--mj-brand-primary);\n box-shadow: 0 4px 16px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n.input-wrapper[_ngcontent-%COMP%] {\n position: relative;\n display: flex;\n align-items: flex-end;\n padding: 5px;\n}\n.input-wrapper[_ngcontent-%COMP%] mj-mention-editor[_ngcontent-%COMP%] {\n flex: 1;\n display: block;\n}\n\n.message-input-box-textarea[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 100px;\n padding: 1rem;\n padding-right: 3.5rem;\n border: 0 !important;\n outline: 0 !important;\n box-shadow: none !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n font-family: inherit;\n font-size: 1rem;\n line-height: 1.5;\n resize: vertical;\n background: transparent;\n color: var(--mj-text-primary);\n border: 0 !important;\n}\n.message-input-box-textarea[_ngcontent-%COMP%]::placeholder {\n color: var(--mj-text-muted);\n}\n.message-input-box-textarea[_ngcontent-%COMP%]:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n background: var(--mj-bg-surface-sunken);\n}\n.message-input-box-textarea[_ngcontent-%COMP%]:focus, .message-input-box-textarea[_ngcontent-%COMP%]:active, .message-input-box-textarea[_ngcontent-%COMP%]:focus-visible {\n outline: 0 !important;\n box-shadow: none !important;\n}\n\n.send-button-icon[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 0.75rem;\n right: 0.75rem;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n}\n.send-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 1rem;\n}\n.send-button-icon[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n transform: scale(1.05);\n}\n.send-button-icon[_ngcontent-%COMP%]:active:not(:disabled) {\n transform: scale(0.95);\n}\n.send-button-icon[_ngcontent-%COMP%]:disabled {\n background: var(--mj-border-default);\n color: var(--mj-text-muted);\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n\n\n.attach-buttons[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 0.75rem;\n right: 3rem;\n display: flex;\n gap: 2px;\n}\n.attach-button-icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n color: var(--mj-text-secondary);\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n}\n.attach-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 1rem;\n}\n.attach-button-icon[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-text-primary) 5%, transparent);\n color: var(--mj-brand-primary);\n transform: scale(1.05);\n}\n.attach-button-icon[_ngcontent-%COMP%]:active:not(:disabled) {\n transform: scale(0.95);\n}\n.attach-button-icon[_ngcontent-%COMP%]:disabled {\n color: var(--mj-text-muted);\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n\n\n\n.plan-mode-button-icon--active[_ngcontent-%COMP%]:not(:disabled) {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n.plan-mode-button-icon--active[_ngcontent-%COMP%]:not(:disabled):hover {\n background: var(--mj-brand-primary-hover, var(--mj-brand-primary));\n color: var(--mj-text-inverse);\n}\n\n\n\n\n.skills-button-icon--active[_ngcontent-%COMP%]:not(:disabled) {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n.skills-button-icon--active[_ngcontent-%COMP%]:not(:disabled):hover {\n background: var(--mj-brand-primary-hover, var(--mj-brand-primary));\n color: var(--mj-text-inverse);\n}\n\n\n\n@media (max-width: 768px) {\n .message-input-box-container[_ngcontent-%COMP%] {\n border-radius: 10px;\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-text-primary) 6%, transparent);\n }\n .message-input-box-textarea[_ngcontent-%COMP%] {\n min-height: 80px;\n padding: 0.75rem;\n padding-right: 3rem;\n font-size: 16px;\n line-height: 1.4;\n }\n .send-button-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n bottom: 0.625rem;\n right: 0.625rem;\n border-radius: 6px;\n }\n .send-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n }\n .attach-buttons[_ngcontent-%COMP%] {\n bottom: 0.625rem;\n right: 2.75rem;\n }\n .attach-button-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n }\n .attach-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n }\n}\n\n\n@media (max-width: 480px) {\n .message-input-box-container[_ngcontent-%COMP%] {\n border-radius: 8px;\n border-width: 1.5px;\n }\n .message-input-box-textarea[_ngcontent-%COMP%] {\n min-height: 60px;\n padding: 0.625rem;\n padding-right: 2.75rem;\n font-size: 16px;\n line-height: 1.3;\n }\n .send-button-icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n bottom: 0.5rem;\n right: 0.5rem;\n border-radius: 6px;\n }\n .send-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n }\n .attach-buttons[_ngcontent-%COMP%] {\n bottom: 0.5rem;\n right: 2.75rem;\n }\n .attach-button-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n }\n .attach-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n }\n}\n\n\n\n\n\n\n.voice-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n.voice-button-icon[_ngcontent-%COMP%]:hover:not(:disabled) i[_ngcontent-%COMP%] {\n filter: drop-shadow(0 0 4px color-mix(in srgb, var(--mj-brand-primary) 55%, transparent));\n}\n.voice-button-icon[_ngcontent-%COMP%]:disabled i[_ngcontent-%COMP%] {\n color: var(--mj-text-disabled);\n}\n.voice-button-icon--active[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n}\n.voice-button-icon--active[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-brand-primary) 18%, transparent);\n}\n\n\n\n\n\n.voice-options-button-icon[_ngcontent-%COMP%] {\n width: 20px;\n margin-left: -4px;\n}\n.voice-options-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.7rem;\n color: var(--mj-text-muted);\n}\n.voice-options-button-icon[_ngcontent-%COMP%]:hover:not(:disabled) i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n.voice-options-button-icon[_ngcontent-%COMP%]:disabled i[_ngcontent-%COMP%] {\n color: var(--mj-text-disabled);\n}"] });
382
+ } }, dependencies: [i1.NgControlStatus, i1.NgModel, i2.MentionEditorComponent], styles: [".message-input-box-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-surface-card);\n border: 2px solid var(--mj-border-default);\n border-radius: 12px;\n box-shadow: var(--mj-shadow-sm);\n transition: all 0.2s ease;\n overflow: visible;\n position: relative;\n cursor: text;\n}\n.message-input-box-container[_ngcontent-%COMP%]:focus-within {\n border-color: var(--mj-brand-primary);\n box-shadow: 0 4px 16px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n.input-wrapper[_ngcontent-%COMP%] {\n position: relative;\n display: flex;\n align-items: flex-end;\n padding: 5px;\n}\n.input-wrapper[_ngcontent-%COMP%] mj-mention-editor[_ngcontent-%COMP%] {\n flex: 1;\n display: block;\n}\n\n.message-input-box-textarea[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 100px;\n padding: 1rem;\n padding-right: 3.5rem;\n border: 0 !important;\n outline: 0 !important;\n box-shadow: none !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n font-family: inherit;\n font-size: 1rem;\n line-height: 1.5;\n resize: vertical;\n background: transparent;\n color: var(--mj-text-primary);\n border: 0 !important;\n}\n.message-input-box-textarea[_ngcontent-%COMP%]::placeholder {\n color: var(--mj-text-muted);\n}\n.message-input-box-textarea[_ngcontent-%COMP%]:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n background: var(--mj-bg-surface-sunken);\n}\n.message-input-box-textarea[_ngcontent-%COMP%]:focus, .message-input-box-textarea[_ngcontent-%COMP%]:active, .message-input-box-textarea[_ngcontent-%COMP%]:focus-visible {\n outline: 0 !important;\n box-shadow: none !important;\n}\n\n.send-button-icon[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 0.75rem;\n right: 0.75rem;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n}\n.send-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 1rem;\n}\n.send-button-icon[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n transform: scale(1.05);\n}\n.send-button-icon[_ngcontent-%COMP%]:active:not(:disabled) {\n transform: scale(0.95);\n}\n.send-button-icon[_ngcontent-%COMP%]:disabled {\n background: var(--mj-border-default);\n color: var(--mj-text-muted);\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n\n.attach-buttons[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 0.75rem;\n right: 3rem;\n display: flex;\n gap: 2px;\n}\n.attach-button-icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n color: var(--mj-text-secondary);\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n}\n.attach-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 1rem;\n}\n.attach-button-icon[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-text-primary) 5%, transparent);\n color: var(--mj-brand-primary);\n transform: scale(1.05);\n}\n.attach-button-icon[_ngcontent-%COMP%]:active:not(:disabled) {\n transform: scale(0.95);\n}\n.attach-button-icon[_ngcontent-%COMP%]:disabled {\n color: var(--mj-text-muted);\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n\n\n.plan-mode-button-icon--active[_ngcontent-%COMP%]:not(:disabled) {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n.plan-mode-button-icon--active[_ngcontent-%COMP%]:not(:disabled):hover {\n background: var(--mj-brand-primary-hover, var(--mj-brand-primary));\n color: var(--mj-text-inverse);\n}\n\n\n\n.skills-button-icon--active[_ngcontent-%COMP%]:not(:disabled) {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n.skills-button-icon--active[_ngcontent-%COMP%]:not(:disabled):hover {\n background: var(--mj-brand-primary-hover, var(--mj-brand-primary));\n color: var(--mj-text-inverse);\n}\n\n\n@media (max-width: 768px) {\n .message-input-box-container[_ngcontent-%COMP%] {\n border-radius: 10px;\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-text-primary) 6%, transparent);\n }\n .message-input-box-textarea[_ngcontent-%COMP%] {\n min-height: 80px;\n padding: 0.75rem;\n padding-right: 3rem;\n font-size: 16px;\n line-height: 1.4;\n }\n .send-button-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n bottom: 0.625rem;\n right: 0.625rem;\n border-radius: 6px;\n }\n .send-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n }\n .attach-buttons[_ngcontent-%COMP%] {\n bottom: 0.625rem;\n right: 2.75rem;\n }\n .attach-button-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n }\n .attach-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n }\n}\n\n@media (max-width: 480px) {\n .message-input-box-container[_ngcontent-%COMP%] {\n border-radius: 8px;\n border-width: 1.5px;\n }\n .message-input-box-textarea[_ngcontent-%COMP%] {\n min-height: 60px;\n padding: 0.625rem;\n padding-right: 2.75rem;\n font-size: 16px;\n line-height: 1.3;\n }\n .send-button-icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n bottom: 0.5rem;\n right: 0.5rem;\n border-radius: 6px;\n }\n .send-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n }\n .attach-buttons[_ngcontent-%COMP%] {\n bottom: 0.5rem;\n right: 2.75rem;\n }\n .attach-button-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n }\n .attach-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n }\n}\n\n\n\n\n\n.voice-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n.voice-button-icon[_ngcontent-%COMP%]:hover:not(:disabled) i[_ngcontent-%COMP%] {\n filter: drop-shadow(0 0 4px color-mix(in srgb, var(--mj-brand-primary) 55%, transparent));\n}\n.voice-button-icon[_ngcontent-%COMP%]:disabled i[_ngcontent-%COMP%] {\n color: var(--mj-text-disabled);\n}\n.voice-button-icon--active[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n}\n.voice-button-icon--active[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-brand-primary) 18%, transparent);\n}\n\n\n\n\n.voice-options-button-icon[_ngcontent-%COMP%] {\n width: 20px;\n margin-left: -4px;\n}\n.voice-options-button-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.7rem;\n color: var(--mj-text-muted);\n}\n.voice-options-button-icon[_ngcontent-%COMP%]:hover:not(:disabled) i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n.voice-options-button-icon[_ngcontent-%COMP%]:disabled i[_ngcontent-%COMP%] {\n color: var(--mj-text-disabled);\n}"] });
383
383
  }
384
384
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MessageInputBoxComponent, [{
385
385
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"message-input-box.component.js","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input-box.component.ts","../../../../src/lib/components/message/message-input-box.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAIlF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;;;;;;;ICyBnE,kCAUG;IAHD,AADA,+JAAa,uBAAuB,wBAAE,wBAAwB,KAAC,8KACtD,4BAAqB,wBAAE,wBAAwB,KAAC;IAIzD,wBAAkE;IACpE,iBAAS;;;IAVP,iEAAiD;IACjD,0CAAqB;;;;;IAYvB,kCAQG;IAHD,2LAAS,4BAAqB,wBAAE,wBAAwB,KAAC;IAIzD,wBAAoD;IACtD,iBAAS;;;IARP,sEAAsD;IAItD,AAHA,0CAAqB,iMAG+J;;;;;IAOtL,kCAKG;IAFD,2LAAS,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,8IAAS,4BAAwB,KAAC;YAEvE,AADF,8BAA2B,8BAqBU;YAPjC,+PAAmB;YAOnB,AADA,AADA,AADA,AADA,AADA,AADA,wKAAe,yBAAqB,KAAC,6JACrB,0BAAsB,KAAC,mKACpB,6BAAyB,KAAC,yKACvB,gCAA4B,KAAC,mKAChC,6BAAyB,KAAC,uKACxB,+BAA2B,KAAC,yJAChC,kBAAc,KAAC;YAClC,iBAAoB;YAGpB,0FAA6E;YAmE7E,iCAKG;YAFD,2IAAS,iBAAa,KAAC;YAGvB,uBAAuC;YAG7C,AADE,AADE,iBAAS,EACL,EACF;;YAlGA,eAA2B;YAU3B,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,6CAA2B,0BACN,gCACM,sCACM,0CACI,gDACM,0BACtB,4CACkB,sCACN,sDACgB,4CACV;YACvC,yCAAmB;YAWrB,eAgEC;YAhED,gHAgEC;YAKC,cAAqB;YAArB,uCAAqB;;;iFDpEd,wBAAwB;cANpC,SAAS;6BACI,KAAK,YACP,sBAAsB;;kBAK/B,SAAS;mBAAC,eAAe;;kBAEzB,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAGL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAGL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAQL,KAAK;;kBAmBL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAEN,MAAM;;kBAMN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBAMN,MAAM;;kFA1FI,wBAAwB","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';\nimport { IMetadataProvider, UserInfo } from '@memberjunction/core';\nimport { ComposerTriggerProvider, MentionSuggestion } from '../../composer-trigger-provider';\nimport { MentionEditorComponent, PendingAttachment } from '../mention/mention-editor.component';\nimport { BeforeSkillsOpenedEventArgs } from '../../events/composer-events';\n\n/**\n * Reusable message input box component (presentational)\n * Now uses MentionEditorComponent for rich @mention functionality with chips\n *\n * Handles:\n * - Text input with keyboard shortcuts via MentionEditorComponent\n * - @mention autocomplete with visual chips (contentEditable)\n * - Send button\n *\n * Does NOT handle:\n * - Saving messages to database\n * - Agent invocation\n * - Artifact creation\n * - Conversation management\n */\n@Component({\n standalone: false,\n selector: 'mj-message-input-box',\n templateUrl: './message-input-box.component.html',\n styleUrls: ['./message-input-box.component.css']\n})\nexport class MessageInputBoxComponent {\n @ViewChild('mentionEditor') mentionEditor?: MentionEditorComponent;\n\n @Input() Placeholder: string = 'Type your message to start a new conversation...';\n @Input() Disabled: boolean = false;\n @Input() Value: string = '';\n @Input() ShowCharacterCount: boolean = false;\n /** Master switch for all mention/command triggers (pass-through to the mention editor). */\n @Input() EnableMentions: boolean = true;\n /** Explicit trigger-provider list (pass-through to the mention editor; explicit list wins over discovery). */\n @Input() TriggerProviders: ComposerTriggerProvider[] | null = null;\n /** Discovery-mode filter: provider Keys to skip (pass-through to the mention editor). */\n @Input() ExcludedTriggerKeys: string[] = [];\n /** Optional metadata provider scoping this composer (pass-through to the mention editor). */\n @Input() Provider: IMetadataProvider | null = null;\n @Input() CurrentUser?: UserInfo;\n @Input() Rows: number = 3;\n\n // Attachment settings\n @Input() EnableAttachments: boolean = true;\n @Input() MaxAttachments: number = 10;\n @Input() MaxAttachmentSizeBytes: number = 20 * 1024 * 1024; // 20MB\n @Input() AcceptedFileTypes: string = 'image/*';\n\n /** Shows the in-composer mic button when true. */\n @Input() EnableRealtime: boolean = false;\n /** Whether a realtime voice session is currently active (mic renders in its active state). */\n @Input() VoiceActive: boolean = false;\n /** Whether a voice session can be started right now (mic Disabled when false). */\n @Input() CanStartRealtime: boolean = true;\n /** Shows the in-composer Plan Mode toggle button when true. */\n @Input() EnablePlanMode: boolean = false;\n /** Current Plan Mode toggle state (renders the button in its active state). */\n @Input() PlanModeActive: boolean = false;\n /**\n * Shows the in-composer Skills button when true.\n *\n * Gated separately from `EnableMentions` because a host can have the `/` trigger active and\n * still not want the button — but the common case is that a composer offering skill commands\n * should advertise them, since `/` is otherwise invisible.\n */\n @Input() EnableSkills: boolean = false;\n /**\n * True while the skill dropdown is open, driving the button's expanded state.\n *\n * Note the ARIA differs from Plan Mode next to it, deliberately: Plan Mode is a toggle BUTTON\n * (a mode that stays on), so `aria-pressed` is right there. This one opens a popup, so it is\n * `aria-expanded` + `aria-haspopup`. Using `aria-pressed` here would have a screen reader\n * announce \"pressed\" for something that actually just revealed a list.\n *\n * DERIVED, not an @Input, and this is the difference from Plan Mode. Plan Mode's active state is\n * a persisted user preference the host owns and threads down. \"Is the skill dropdown open\" is\n * intrinsic to this composer, so an @Input would be an API the host cannot meaningfully answer\n * and would leave the button permanently unpressed if nobody bound it.\n */\n get SkillsActive(): boolean {\n return this.mentionEditor?.IsTriggerOpen('/') ?? false;\n }\n\n /** Composer lost focus — hosts persist drafts on this. */\n @Output() Blurred = new EventEmitter<void>();\n @Output() TextSubmitted = new EventEmitter<string>();\n @Output() ValueChange = new EventEmitter<string>();\n @Output() AttachmentsChanged = new EventEmitter<PendingAttachment[]>();\n @Output() AttachmentError = new EventEmitter<string>();\n @Output() AttachmentClicked = new EventEmitter<PendingAttachment>();\n /** Emitted when the user clicks the mic button to start/stop a voice session. */\n @Output() VoiceRequested = new EventEmitter<void>();\n /**\n * Emitted when the user clicks the small caret next to the phone button — the host opens the\n * voice agent/model picker so call options (which agent, which voice model) stay reachable\n * without adding friction to the plain phone click's instant-start path.\n */\n @Output() VoiceOptionsRequested = new EventEmitter<void>();\n /** Emitted when the user clicks the in-composer Plan Mode toggle button. */\n @Output() PlanModeToggle = new EventEmitter<void>();\n /**\n * Fired BEFORE the Skills button opens the dropdown. Flip `Cancel` to veto — a host gating\n * skills by entitlement, or surfacing them elsewhere, blocks it here.\n *\n * A pair rather than a lone emitter because this is an ACTION a host might reasonably refuse\n * (UI_LAYERING_GUIDE section 6, rule 1). Handlers must be synchronous; `Cancel` travels back\n * through EventEmitter's synchronous dispatch.\n */\n @Output() BeforeSkillsOpened = new EventEmitter<BeforeSkillsOpenedEventArgs>();\n /**\n * Fired AFTER the dropdown actually opened. Not emitted on the canceled path, and not emitted\n * when no active provider owns the trigger — so a host counting this counts dropdowns the user\n * saw, rather than clicks.\n */\n @Output() AfterSkillsOpened = new EventEmitter<void>();\n\n /**\n * Open the skill-command dropdown, the same one `/` opens.\n *\n * Routed through the editor's OpenTrigger rather than a parallel menu so permission filtering,\n * per-skill icons and chip insertion all stay in one implementation.\n */\n /**\n * NOTE: the template pairs this with\n * `(mousedown)=\"$event.preventDefault(); $event.stopPropagation()\"`, and BOTH halves are\n * load-bearing.\n *\n * `preventDefault` — a <button> takes focus on mousedown, which blurs the editor, and the editor\n * closes its dropdown 200ms after losing focus. Without it the menu opened and then shut itself.\n *\n * `stopPropagation` — the editor's click-away listener is on `document:mousedown` and exempts only\n * presses inside the EDITOR's host. This button is a sibling of `<mj-mention-editor>`, so a press\n * on it read as an outside press: mousedown closed the dropdown, then click saw `SkillsActive`\n * already false and reopened it. The menu blinked, could not be dismissed by the button that\n * opened it, and the Before/After pair fired on every click — the exact over-counting the toggle\n * branch below exists to prevent. Stopping propagation states that this press belongs to the\n * dropdown machinery.\n */\n OnSkillsClick(event?: Event): void {\n // Toggle closed first. A disclosure button has to be able to close what it opened, and without\n // this a second click re-ran the open path: it re-emitted the Before/After pair (so a host\n // counting opens over-counted) and re-captured the trigger's baseline at the new caret, which\n // corrupts the query offset once anything has been typed.\n if (this.SkillsActive) {\n this.mentionEditor?.closeMentionDropdown();\n return;\n }\n const args = new BeforeSkillsOpenedEventArgs();\n this.BeforeSkillsOpened.emit(args);\n if (args.Cancel) {\n return;\n }\n const anchor = (event?.currentTarget as HTMLElement | undefined) ?? null;\n if (this.mentionEditor?.OpenTrigger('/', anchor)) {\n this.AfterSkillsOpened.emit();\n }\n }\n\n OnRealtimeClick(): void {\n this.VoiceRequested.emit();\n }\n\n OnRealtimeOptionsClick(): void {\n this.VoiceOptionsRequested.emit();\n }\n\n get CanSend(): boolean {\n const hasText = this.Value.trim().length > 0;\n const hasAttachments = this.mentionEditor?.hasAttachments() || false;\n return !this.Disabled && (hasText || hasAttachments);\n }\n\n /**\n * Handle Value changes from MentionEditorComponent\n */\n OnValueChange(newValue: string): void {\n this.Value = newValue;\n this.ValueChange.emit(this.Value);\n }\n\n /**\n * Handle attachment changes from MentionEditorComponent\n */\n OnAttachmentsChanged(attachments: PendingAttachment[]): void {\n this.AttachmentsChanged.emit(attachments);\n }\n\n /**\n * Handle attachment errors from MentionEditorComponent\n */\n OnAttachmentError(error: string): void {\n this.AttachmentError.emit(error);\n }\n\n /**\n * Handle attachment click from MentionEditorComponent\n */\n OnAttachmentClicked(attachment: PendingAttachment): void {\n this.AttachmentClicked.emit(attachment);\n }\n\n /**\n * Handle Enter key from MentionEditorComponent\n * Extracts plain text with JSON-encoded mentions for message submission\n */\n OnEnterPressed(_text: string): void {\n this.OnSendClick();\n }\n\n /**\n * Handle mention selection from MentionEditorComponent\n */\n OnMentionSelected(suggestion: MentionSuggestion): void {\n // MentionEditorComponent already inserts the mention chip\n // This is just for additional tracking/analytics if needed\n }\n\n /**\n * Send the message\n * Extracts plain text with JSON-encoded mentions for proper persistence\n */\n OnSendClick(): void {\n if (this.CanSend) {\n // Get plain text with JSON-encoded mentions (preserves configuration info)\n const textToSend = this.mentionEditor?.getPlainTextWithJsonMentions() || this.Value.trim();\n this.TextSubmitted.emit(textToSend);\n this.Value = ''; // Clear input after sending\n\n // Clear the editor content\n if (this.mentionEditor) {\n this.mentionEditor.clear();\n }\n\n this.ValueChange.emit(this.Value);\n }\n }\n\n /**\n * Handle clicks on the container - focus the mention editor\n * Only moves cursor to end if clicking outside the contentEditable area\n */\n OnContainerClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n\n // Don't handle clicks on the send button\n if (target.closest('.send-button-icon')) {\n return;\n }\n\n const editor = this.mentionEditor?.editorRef?.nativeElement;\n if (!editor) return;\n\n // If clicking directly on the editor or its children, let the browser handle cursor placement\n if (target === editor || editor.contains(target)) {\n return;\n }\n\n // Only if clicking on the container (empty space), focus and move cursor to end\n editor.focus();\n const selection = window.getSelection();\n const range = document.createRange();\n\n if (selection) {\n range.selectNodeContents(editor);\n range.collapse(false); // Collapse to end\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n\n /**\n * Public method to focus the input programmatically\n */\n /** Inserts a resolved mention chip + space and focuses (see MentionEditorComponent.InsertMention). */\n InsertMention(suggestion: MentionSuggestion, focus: boolean = true): boolean {\n return this.mentionEditor?.InsertMention(suggestion, focus) ?? false;\n }\n\n /** Focus with the caret at the end of content (see MentionEditorComponent.FocusCaretAtEnd). */\n FocusCaretAtEnd(): boolean {\n return this.mentionEditor?.FocusCaretAtEnd() ?? false;\n }\n\n focus(): void {\n const editor = this.mentionEditor?.editorRef?.nativeElement;\n if (editor) {\n editor.focus();\n }\n }\n\n /**\n * Get mention chip data including configuration presets\n */\n GetMentionChipsData(): Array<{ id: string; type: string; name: string; presetId?: string; presetName?: string }> {\n return this.mentionEditor?.getMentionChipsData() || [];\n }\n\n /**\n * Get pending attachments from the editor\n */\n GetPendingAttachments(): PendingAttachment[] {\n return this.mentionEditor?.getPendingAttachments() || [];\n }\n\n /**\n * Open file picker programmatically\n */\n OpenFilePicker(): void {\n this.mentionEditor?.openFilePicker();\n }\n\n /**\n * Add an artifact as a pending attachment (called by parent after artifact selection)\n */\n AddArtifactAttachment(artifact: {\n fileID: string; fileName: string; mimeType: string;\n sizeBytes: number; artifactVersionId?: string;\n }): PendingAttachment | undefined {\n return this.mentionEditor?.AddArtifactAttachment(artifact);\n }\n}\n","<div class=\"message-input-box-container\" (click)=\"OnContainerClick($event)\">\n <div class=\"input-wrapper\">\n <mj-mention-editor\n #mentionEditor\n [placeholder]=\"Placeholder\"\n [disabled]=\"Disabled\"\n [currentUser]=\"CurrentUser\"\n [enableMentions]=\"EnableMentions\"\n [TriggerProviders]=\"TriggerProviders\"\n [ExcludedTriggerKeys]=\"ExcludedTriggerKeys\"\n [Provider]=\"Provider\"\n [enableAttachments]=\"EnableAttachments\"\n [maxAttachments]=\"MaxAttachments\"\n [maxAttachmentSizeBytes]=\"MaxAttachmentSizeBytes\"\n [acceptedFileTypes]=\"AcceptedFileTypes\"\n [(ngModel)]=\"Value\"\n (valueChange)=\"OnValueChange($event)\"\n (enterPressed)=\"OnEnterPressed($event)\"\n (mentionSelected)=\"OnMentionSelected($event)\"\n (attachmentsChanged)=\"OnAttachmentsChanged($event)\"\n (attachmentError)=\"OnAttachmentError($event)\"\n (attachmentClicked)=\"OnAttachmentClicked($event)\"\n (editorBlurred)=\"Blurred.emit()\">\n </mj-mention-editor>\n\n <!-- Attach + voice + plan-mode buttons - Positioned over editor -->\n @if (EnableAttachments || EnableRealtime || EnablePlanMode || EnableSkills) {\n <div class=\"attach-buttons\">\n @if (EnableSkills) {\n <button\n class=\"attach-button-icon skills-button-icon\"\n [class.skills-button-icon--active]=\"SkillsActive\"\n [disabled]=\"Disabled\"\n [attr.aria-expanded]=\"SkillsActive\"\n aria-haspopup=\"true\"\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation()\"\n (click)=\"OnSkillsClick($event); $event.stopPropagation()\"\n title=\"Skills, or type / in the message box\"\n aria-label=\"Show skills\"\n >\n <i class=\"fa-solid fa-wand-magic-sparkles\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (EnablePlanMode) {\n <button\n class=\"attach-button-icon plan-mode-button-icon\"\n [class.plan-mode-button-icon--active]=\"PlanModeActive\"\n [disabled]=\"Disabled\"\n [attr.aria-pressed]=\"PlanModeActive\"\n (click)=\"PlanModeToggle.emit(); $event.stopPropagation()\"\n [title]=\"PlanModeActive ? 'Plan Mode ON — the agent presents a plan for your approval before it acts' : 'Plan Mode: have the agent present a plan for your approval before it acts'\"\n aria-label=\"Toggle Plan Mode\"\n >\n <i class=\"fa-solid fa-route\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (EnableAttachments) {\n <button\n class=\"attach-button-icon\"\n [disabled]=\"Disabled\"\n (click)=\"OpenFilePicker(); $event.stopPropagation()\"\n title=\"Attach file\"\n >\n <i class=\"fa-solid fa-paperclip\"></i>\n </button>\n }\n @if (EnableRealtime) {\n <button\n class=\"attach-button-icon voice-button-icon\"\n [class.voice-button-icon--active]=\"VoiceActive\"\n [disabled]=\"!CanStartRealtime\"\n (click)=\"OnRealtimeClick(); $event.stopPropagation()\"\n [title]=\"VoiceActive ? 'Voice call active' : 'Start a voice call'\"\n aria-label=\"Start a voice call\"\n >\n <i class=\"fa-solid fa-phone\" aria-hidden=\"true\"></i>\n </button>\n <!-- Caret beside the phone: opens the agent/model picker so call OPTIONS stay one\n click away while the plain phone click keeps its instant-start behavior. -->\n <button\n class=\"attach-button-icon voice-options-button-icon\"\n [disabled]=\"!CanStartRealtime\"\n (click)=\"OnRealtimeOptionsClick(); $event.stopPropagation()\"\n title=\"Voice call options (choose agent and voice model)\"\n aria-label=\"Voice call options\"\n >\n <i class=\"fa-solid fa-chevron-down\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n }\n\n <!-- Send Button (Icon Only) - Positioned over editor -->\n <button\n class=\"send-button-icon\"\n [disabled]=\"!CanSend\"\n (click)=\"OnSendClick()\"\n title=\"Send message (Enter)\"\n >\n <i class=\"fa-solid fa-paper-plane\"></i>\n </button>\n </div>\n</div>\n"]}
1
+ {"version":3,"file":"message-input-box.component.js","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input-box.component.ts","../../../../src/lib/components/message/message-input-box.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAIlF,OAAO,EAAE,2BAA2B,EAAE,MA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KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAQL,KAAK;;kBAmBL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAEN,MAAM;;kBAMN,MAAM;;kBAEN,MAAM;;kBASN,MAAM;;kBAMN,MAAM;;kFA1FI,wBAAwB","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';\nimport { IMetadataProvider, UserInfo } from '@memberjunction/core';\nimport { ComposerTriggerProvider, MentionSuggestion } from '../../composer-trigger-provider';\nimport { MentionEditorComponent, PendingAttachment } from '../mention/mention-editor.component';\nimport { BeforeSkillsOpenedEventArgs } from '../../events/composer-events';\n\n/**\n * Reusable message input box component (presentational)\n * Now uses MentionEditorComponent for rich @mention functionality with chips\n *\n * Handles:\n * - Text input with keyboard shortcuts via MentionEditorComponent\n * - @mention autocomplete with visual chips (contentEditable)\n * - Send button\n *\n * Does NOT handle:\n * - Saving messages to database\n * - Agent invocation\n * - Artifact creation\n * - Conversation management\n */\n@Component({\n standalone: false,\n selector: 'mj-message-input-box',\n templateUrl: './message-input-box.component.html',\n styleUrls: ['./message-input-box.component.css']\n})\nexport class MessageInputBoxComponent {\n @ViewChild('mentionEditor') mentionEditor?: MentionEditorComponent;\n\n @Input() Placeholder: string = 'Type your message to start a new conversation...';\n @Input() Disabled: boolean = false;\n @Input() Value: string = '';\n @Input() ShowCharacterCount: boolean = false;\n /** Master switch for all mention/command triggers (pass-through to the mention editor). */\n @Input() EnableMentions: boolean = true;\n /** Explicit trigger-provider list (pass-through to the mention editor; explicit list wins over discovery). */\n @Input() TriggerProviders: ComposerTriggerProvider[] | null = null;\n /** Discovery-mode filter: provider Keys to skip (pass-through to the mention editor). */\n @Input() ExcludedTriggerKeys: string[] = [];\n /** Optional metadata provider scoping this composer (pass-through to the mention editor). */\n @Input() Provider: IMetadataProvider | null = null;\n @Input() CurrentUser?: UserInfo;\n @Input() Rows: number = 3;\n\n // Attachment settings\n @Input() EnableAttachments: boolean = true;\n @Input() MaxAttachments: number = 10;\n @Input() MaxAttachmentSizeBytes: number = 20 * 1024 * 1024; // 20MB\n @Input() AcceptedFileTypes: string = 'image/*';\n\n /** Shows the in-composer mic button when true. */\n @Input() EnableRealtime: boolean = false;\n /** Whether a realtime voice session is currently active (mic renders in its active state). */\n @Input() VoiceActive: boolean = false;\n /** Whether a voice session can be started right now (mic Disabled when false). */\n @Input() CanStartRealtime: boolean = true;\n /** Shows the in-composer Plan Mode toggle button when true. */\n @Input() EnablePlanMode: boolean = false;\n /** Current Plan Mode toggle state (renders the button in its active state). */\n @Input() PlanModeActive: boolean = false;\n /**\n * Shows the in-composer Skills button when true.\n *\n * Gated separately from `EnableMentions` because a host can have the `/` trigger active and\n * still not want the button — but the common case is that a composer offering skill commands\n * should advertise them, since `/` is otherwise invisible.\n */\n @Input() EnableSkills: boolean = false;\n /**\n * True while the skill dropdown is open, driving the button's expanded state.\n *\n * Note the ARIA differs from Plan Mode next to it, deliberately: Plan Mode is a toggle BUTTON\n * (a mode that stays on), so `aria-pressed` is right there. This one opens a popup, so it is\n * `aria-expanded` + `aria-haspopup`. Using `aria-pressed` here would have a screen reader\n * announce \"pressed\" for something that actually just revealed a list.\n *\n * DERIVED, not an @Input, and this is the difference from Plan Mode. Plan Mode's active state is\n * a persisted user preference the host owns and threads down. \"Is the skill dropdown open\" is\n * intrinsic to this composer, so an @Input would be an API the host cannot meaningfully answer\n * and would leave the button permanently unpressed if nobody bound it.\n */\n get SkillsActive(): boolean {\n return this.mentionEditor?.IsTriggerOpen('/') ?? false;\n }\n\n /** Composer lost focus — hosts persist drafts on this. */\n @Output() Blurred = new EventEmitter<void>();\n @Output() TextSubmitted = new EventEmitter<string>();\n @Output() ValueChange = new EventEmitter<string>();\n @Output() AttachmentsChanged = new EventEmitter<PendingAttachment[]>();\n @Output() AttachmentError = new EventEmitter<string>();\n @Output() AttachmentClicked = new EventEmitter<PendingAttachment>();\n /** Emitted when the user clicks the mic button to start/stop a voice session. */\n @Output() VoiceRequested = new EventEmitter<void>();\n /**\n * Emitted when the user clicks the small caret next to the phone button — the host opens the\n * voice agent/model picker so call options (which agent, which voice model) stay reachable\n * without adding friction to the plain phone click's instant-start path.\n */\n @Output() VoiceOptionsRequested = new EventEmitter<void>();\n /** Emitted when the user clicks the in-composer Plan Mode toggle button. */\n @Output() PlanModeToggle = new EventEmitter<void>();\n /**\n * Fired BEFORE the Skills button opens the dropdown. Flip `Cancel` to veto — a host gating\n * skills by entitlement, or surfacing them elsewhere, blocks it here.\n *\n * A pair rather than a lone emitter because this is an ACTION a host might reasonably refuse\n * (UI_LAYERING_GUIDE section 6, rule 1). Handlers must be synchronous; `Cancel` travels back\n * through EventEmitter's synchronous dispatch.\n */\n @Output() BeforeSkillsOpened = new EventEmitter<BeforeSkillsOpenedEventArgs>();\n /**\n * Fired AFTER the dropdown actually opened. Not emitted on the canceled path, and not emitted\n * when no active provider owns the trigger — so a host counting this counts dropdowns the user\n * saw, rather than clicks.\n */\n @Output() AfterSkillsOpened = new EventEmitter<void>();\n\n /**\n * Open the skill-command dropdown, the same one `/` opens.\n *\n * Routed through the editor's OpenTrigger rather than a parallel menu so permission filtering,\n * per-skill icons and chip insertion all stay in one implementation.\n */\n /**\n * NOTE: the template pairs this with\n * `(mousedown)=\"$event.preventDefault(); $event.stopPropagation()\"`, and BOTH halves are\n * load-bearing.\n *\n * `preventDefault` — a <button> takes focus on mousedown, which blurs the editor, and the editor\n * closes its dropdown 200ms after losing focus. Without it the menu opened and then shut itself.\n *\n * `stopPropagation` — the editor's click-away listener is on `document:mousedown` and exempts only\n * presses inside the EDITOR's host. This button is a sibling of `<mj-mention-editor>`, so a press\n * on it read as an outside press: mousedown closed the dropdown, then click saw `SkillsActive`\n * already false and reopened it. The menu blinked, could not be dismissed by the button that\n * opened it, and the Before/After pair fired on every click — the exact over-counting the toggle\n * branch below exists to prevent. Stopping propagation states that this press belongs to the\n * dropdown machinery.\n */\n OnSkillsClick(event?: Event): void {\n // Toggle closed first. A disclosure button has to be able to close what it opened, and without\n // this a second click re-ran the open path: it re-emitted the Before/After pair (so a host\n // counting opens over-counted) and re-captured the trigger's baseline at the new caret, which\n // corrupts the query offset once anything has been typed.\n if (this.SkillsActive) {\n this.mentionEditor?.closeMentionDropdown();\n return;\n }\n const args = new BeforeSkillsOpenedEventArgs();\n this.BeforeSkillsOpened.emit(args);\n if (args.Cancel) {\n return;\n }\n const anchor = (event?.currentTarget as HTMLElement | undefined) ?? null;\n if (this.mentionEditor?.OpenTrigger('/', anchor)) {\n this.AfterSkillsOpened.emit();\n }\n }\n\n OnRealtimeClick(): void {\n this.VoiceRequested.emit();\n }\n\n OnRealtimeOptionsClick(): void {\n this.VoiceOptionsRequested.emit();\n }\n\n get CanSend(): boolean {\n const hasText = this.Value.trim().length > 0;\n const hasAttachments = this.mentionEditor?.hasAttachments() || false;\n return !this.Disabled && (hasText || hasAttachments);\n }\n\n /**\n * Handle Value changes from MentionEditorComponent\n */\n OnValueChange(newValue: string): void {\n this.Value = newValue;\n this.ValueChange.emit(this.Value);\n }\n\n /**\n * Handle attachment changes from MentionEditorComponent\n */\n OnAttachmentsChanged(attachments: PendingAttachment[]): void {\n this.AttachmentsChanged.emit(attachments);\n }\n\n /**\n * Handle attachment errors from MentionEditorComponent\n */\n OnAttachmentError(error: string): void {\n this.AttachmentError.emit(error);\n }\n\n /**\n * Handle attachment click from MentionEditorComponent\n */\n OnAttachmentClicked(attachment: PendingAttachment): void {\n this.AttachmentClicked.emit(attachment);\n }\n\n /**\n * Handle Enter key from MentionEditorComponent\n * Extracts plain text with JSON-encoded mentions for message submission\n */\n OnEnterPressed(_text: string): void {\n this.OnSendClick();\n }\n\n /**\n * Handle mention selection from MentionEditorComponent\n */\n OnMentionSelected(suggestion: MentionSuggestion): void {\n // MentionEditorComponent already inserts the mention chip\n // This is just for additional tracking/analytics if needed\n }\n\n /**\n * Send the message\n * Extracts plain text with JSON-encoded mentions for proper persistence\n */\n OnSendClick(): void {\n if (this.CanSend) {\n // Get plain text with JSON-encoded mentions (preserves configuration info)\n const textToSend = this.mentionEditor?.getPlainTextWithJsonMentions() || this.Value.trim();\n this.TextSubmitted.emit(textToSend);\n this.Value = ''; // Clear input after sending\n\n // Clear the editor content\n if (this.mentionEditor) {\n this.mentionEditor.clear();\n }\n\n this.ValueChange.emit(this.Value);\n }\n }\n\n /**\n * Handle clicks on the container - focus the mention editor\n * Only moves cursor to end if clicking outside the contentEditable area\n */\n OnContainerClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n\n // Don't handle clicks on the send button\n if (target.closest('.send-button-icon')) {\n return;\n }\n\n const editor = this.mentionEditor?.editorRef?.nativeElement;\n if (!editor) return;\n\n // If clicking directly on the editor or its children, let the browser handle cursor placement\n if (target === editor || editor.contains(target)) {\n return;\n }\n\n // Only if clicking on the container (empty space), focus and move cursor to end\n editor.focus();\n const selection = window.getSelection();\n const range = document.createRange();\n\n if (selection) {\n range.selectNodeContents(editor);\n range.collapse(false); // Collapse to end\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n\n /**\n * Public method to focus the input programmatically\n */\n /** Inserts a resolved mention chip + space and focuses (see MentionEditorComponent.InsertMention). */\n InsertMention(suggestion: MentionSuggestion, focus: boolean = true): boolean {\n return this.mentionEditor?.InsertMention(suggestion, focus) ?? false;\n }\n\n /** Focus with the caret at the end of content (see MentionEditorComponent.FocusCaretAtEnd). */\n FocusCaretAtEnd(): boolean {\n return this.mentionEditor?.FocusCaretAtEnd() ?? false;\n }\n\n focus(): void {\n const editor = this.mentionEditor?.editorRef?.nativeElement;\n if (editor) {\n editor.focus();\n }\n }\n\n /**\n * Get mention chip data including configuration presets\n */\n GetMentionChipsData(): Array<{ id: string; type: string; name: string; presetId?: string; presetName?: string }> {\n return this.mentionEditor?.getMentionChipsData() || [];\n }\n\n /**\n * Get pending attachments from the editor\n */\n GetPendingAttachments(): PendingAttachment[] {\n return this.mentionEditor?.getPendingAttachments() || [];\n }\n\n /**\n * Open file picker programmatically\n */\n OpenFilePicker(): void {\n this.mentionEditor?.openFilePicker();\n }\n\n /**\n * Add an artifact as a pending attachment (called by parent after artifact selection)\n */\n AddArtifactAttachment(artifact: {\n fileID: string; fileName: string; mimeType: string;\n sizeBytes: number; artifactVersionId?: string;\n }): PendingAttachment | undefined {\n return this.mentionEditor?.AddArtifactAttachment(artifact);\n }\n}\n","<div class=\"message-input-box-container\" (click)=\"OnContainerClick($event)\">\n <div class=\"input-wrapper\">\n <mj-mention-editor\n #mentionEditor\n [placeholder]=\"Placeholder\"\n [disabled]=\"Disabled\"\n [currentUser]=\"CurrentUser\"\n [enableMentions]=\"EnableMentions\"\n [TriggerProviders]=\"TriggerProviders\"\n [ExcludedTriggerKeys]=\"ExcludedTriggerKeys\"\n [Provider]=\"Provider\"\n [enableAttachments]=\"EnableAttachments\"\n [maxAttachments]=\"MaxAttachments\"\n [maxAttachmentSizeBytes]=\"MaxAttachmentSizeBytes\"\n [acceptedFileTypes]=\"AcceptedFileTypes\"\n [(ngModel)]=\"Value\"\n (valueChange)=\"OnValueChange($event)\"\n (enterPressed)=\"OnEnterPressed($event)\"\n (mentionSelected)=\"OnMentionSelected($event)\"\n (attachmentsChanged)=\"OnAttachmentsChanged($event)\"\n (attachmentError)=\"OnAttachmentError($event)\"\n (attachmentClicked)=\"OnAttachmentClicked($event)\"\n (editorBlurred)=\"Blurred.emit()\">\n </mj-mention-editor>\n\n <!-- Attach + voice + plan-mode buttons - Positioned over editor -->\n @if (EnableAttachments || EnableRealtime || EnablePlanMode || EnableSkills) {\n <div class=\"attach-buttons\">\n @if (EnableSkills) {\n <button\n class=\"attach-button-icon skills-button-icon\"\n [class.skills-button-icon--active]=\"SkillsActive\"\n [disabled]=\"Disabled\"\n [attr.aria-expanded]=\"SkillsActive\"\n aria-haspopup=\"true\"\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation()\"\n (click)=\"OnSkillsClick($event); $event.stopPropagation()\"\n title=\"Skills, or type / in the message box\"\n aria-label=\"Show skills\"\n >\n <i class=\"fa-solid fa-wand-magic-sparkles\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (EnablePlanMode) {\n <button\n class=\"attach-button-icon plan-mode-button-icon\"\n [class.plan-mode-button-icon--active]=\"PlanModeActive\"\n [disabled]=\"Disabled\"\n [attr.aria-pressed]=\"PlanModeActive\"\n (click)=\"PlanModeToggle.emit(); $event.stopPropagation()\"\n [title]=\"PlanModeActive ? 'Plan Mode ON — the agent presents a plan for your approval before it acts' : 'Plan Mode: have the agent present a plan for your approval before it acts'\"\n aria-label=\"Toggle Plan Mode\"\n >\n <i class=\"fa-solid fa-route\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (EnableAttachments) {\n <button\n class=\"attach-button-icon\"\n [disabled]=\"Disabled\"\n (click)=\"OpenFilePicker(); $event.stopPropagation()\"\n title=\"Attach file\"\n >\n <i class=\"fa-solid fa-paperclip\"></i>\n </button>\n }\n @if (EnableRealtime) {\n <button\n class=\"attach-button-icon voice-button-icon\"\n [class.voice-button-icon--active]=\"VoiceActive\"\n [disabled]=\"!CanStartRealtime\"\n (click)=\"OnRealtimeClick(); $event.stopPropagation()\"\n [title]=\"VoiceActive ? 'Voice call active' : 'Start a voice call'\"\n aria-label=\"Start a voice call\"\n >\n <i class=\"fa-solid fa-phone\" aria-hidden=\"true\"></i>\n </button>\n <!-- Caret beside the phone: opens the agent/model picker so call OPTIONS stay one\n click away while the plain phone click keeps its instant-start behavior. -->\n <button\n class=\"attach-button-icon voice-options-button-icon\"\n [disabled]=\"!CanStartRealtime\"\n (click)=\"OnRealtimeOptionsClick(); $event.stopPropagation()\"\n title=\"Voice call options (choose agent and voice model)\"\n aria-label=\"Voice call options\"\n >\n <i class=\"fa-solid fa-chevron-down\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n }\n\n <!-- Send Button (Icon Only) - Positioned over editor -->\n <button\n class=\"send-button-icon\"\n [disabled]=\"!CanSend\"\n (click)=\"OnSendClick()\"\n title=\"Send message (Enter)\"\n >\n <i class=\"fa-solid fa-paper-plane\"></i>\n </button>\n </div>\n</div>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-composer",
3
- "version": "6.1.0-edge.5",
3
+ "version": "6.1.0-edge.7",
4
4
  "description": "MemberJunction: Generic message composer components — mention editor with pluggable trigger providers (ComposerTriggerProvider), mention dropdown, and send-button input box wrapper. Ships zero AI knowledge; trigger plugins are supplied by hosts (see @memberjunction/ng-conversations).",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -11,20 +11,20 @@
11
11
  "author": "",
12
12
  "license": "BUSL-1.1",
13
13
  "devDependencies": {
14
- "@angular/compiler": "21.1.3",
15
- "@angular/compiler-cli": "21.1.3",
16
- "@memberjunction/ng-test-utils": "6.1.0-edge.5",
14
+ "@angular/compiler": "21.2.22",
15
+ "@angular/compiler-cli": "21.2.22",
16
+ "@memberjunction/ng-test-utils": "6.1.0-edge.7",
17
17
  "vitest": "^4.0.18"
18
18
  },
19
19
  "peerDependencies": {
20
- "@angular/common": "^21.1.3",
21
- "@angular/core": "^21.1.3",
22
- "@angular/forms": "^21.1.3"
20
+ "@angular/common": "^21.2.22",
21
+ "@angular/core": "^21.2.22",
22
+ "@angular/forms": "^21.2.22"
23
23
  },
24
24
  "dependencies": {
25
- "@memberjunction/core": "6.1.0-edge.5",
26
- "@memberjunction/global": "6.1.0-edge.5",
27
- "@memberjunction/ng-ui-components": "6.1.0-edge.5",
25
+ "@memberjunction/core": "6.1.0-edge.7",
26
+ "@memberjunction/global": "6.1.0-edge.7",
27
+ "@memberjunction/ng-ui-components": "6.1.0-edge.7",
28
28
  "tslib": "^2.8.1"
29
29
  },
30
30
  "sideEffects": false,