// ==UserScript==
// @name StudyStream Unlimited Time
// @namespace https://greasyfork.org/users/1470715
// @icon https://app.studystream.live/assets/favicon/study-stream-fav.png
// @version 1.2.1
// @description Unlimited time limit as a guest viewer. You can also use pin feature if you are logged in to an account, but those pin(s) are temporary and will be reset at any time.
// @author cattishly6060
// @match https://app.studystream.live/*
// @grant none
// @license MIT
// ==/UserScript==
const mainFunction = (sc, Ut, c) => {
c.r(Ut),
c.d(Ut, {
LivekitModule: () => nc
});
var X = c(3248)
, G = c(68)
, h = c(1368)
, de = c(7048)
, b = c(6504)
, Ft = c(3840)
, ue = c(1725)
, pe = c(3576)
, me = c(9120)
, p = c(2864)
, tt = c(1788)
, et = c(9880)
, z = c(7488)
, it = c(7760)
, Ot = c(7300)
, R = c(6496)
, nt = c(1592)
, he = c(3308)
, ge = c(3763)
, fe = c(1304)
, _e = c(5800)
, ve = c(6780)
, Ce = c(5688)
, t = c(4496)
, _ = c(8572)
, x = c(3476)
, u = c(132)
, L = c(7444)
, g = c(2420)
, be = c(8500)
, ke = c(380)
, y = c(2564)
, I = c(96)
, k = c(1488)
, Pe = c(5668)
, O = c(6132)
, C = c(5024)
, ot = c(3564);
let At = ( () => {
class o {
get forceGridView() {
return this.livekit.room.forceGridView
}
get tooltipText() {
return `Switch to ${this.forceGridView ? "Pinned" : "Grid"} view`
}
get buttonText() {
return this.forceGridView ? `Pinned view (${this.livekit.room.pinnedParticipants.length})` : "Grid view"
}
constructor(e, n) {
this.livekit = e,
this.analyticsService = n
}
ngOnDestroy() {
this.livekit.room.animateViewToggleButton = !1
}
switchView() {
this.forceGridView && (this.livekit.room.lastOpenedGridPage = this.livekit.room.paginator.currentPage),
this.livekit.room.forceGridView = !this.livekit.room.forceGridView,
this.analyticsService.markActivity(this.livekit.room.forceGridView ? u.kP.LivekitGridViewTurnedOn : u.kP.LivekitPinViewTurnedOn),
this.livekit.room.sortAndAssignDisplayedParticipants(),
this.livekit.recalculateGrid.next(),
this.forceGridView && this.livekit.room.paginator.goToPage(this.livekit.room.lastOpenedGridPage)
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(u.uc))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-switch-room-view-button"]],
decls: 3,
vars: 5,
consts: [["color", "focus-room", 1, "switch-view-button", 3, "matTooltip", "iconVariant", "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "ss-button", 0),
t.qCj("buttonClick", function() {
return i.switchView()
}),
t.I0R(1, "div"),
t.OEk(2),
t.C$Y()()),
2 & n && (t.eAK("animate", i.livekit.room.animateViewToggleButton),
t.E7m("matTooltip", i.tooltipText)("iconVariant", 20),
t.yG2(2),
t.cNF(i.buttonText))
},
dependencies: [O.k, R.a4],
styles: ["[_nghost-%COMP%]{position:relative;display:block}.switch-view-button[_ngcontent-%COMP%]{margin-left:6px}.switch-view-button.animate[_ngcontent-%COMP%]{animation:shakeX;animation-duration:1s;animation-delay:.5s}"]
})
}
return o
}
)();
function ye(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-focus-room-select", 18),
t.iHE("ngModelChange", function(i) {
t.usT(e);
const s = t.GaO();
return t.kNx(s.livekit.room.filter.selectedUserTypes, i) || (s.livekit.room.filter.selectedUserTypes = i),
t.CGJ(i)
}),
t.qCj("ngModelChange", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.onUserTypeFilterUpdated())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.OKB("ngModel", e.livekit.room.filter.selectedUserTypes),
t.E7m("options", e.userTypes)("multiple", !0)
}
}
function Oe(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 19),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.toggleShowParticipantsWithReportsOnly())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("matTooltip", e.reportsOnly ? "Show all participants" : "Show participants with reports only")("active", e.reportsOnly)("iconSize", 24)("iconOnly", !0)
}
}
function Me(o, r) {
1 & o && t.wR5(0, "ss-switch-room-view-button")
}
let Lt = ( () => {
class o {
get isModerator() {
return !!this.livekit.room.localParticipant.userInfo?.isModerator
}
get reportsOnly() {
return this.livekit.room.filter.participantsWithReportsOnly
}
get newUsersOnly() {
return this.livekit.room.filter.participantsWithNewMarkerOnly
}
get anyPinnedUsers() {
return this.livekit.room.pinnedParticipants.length > 0
}
constructor(e, n, i, s, a, d, m, v) {
this.settingsService = e,
this.livekit = n,
this.countryService = i,
this.areaOfStudyService = s,
this.accountService = a,
this.analyticsService = d,
this.utilityService = m,
this.toastService = v,
this.closeFilter = new t._w7,
this.countries = [],
this.areasOfStudy = [],
this.userTypes = [{
label: "Professional",
value: x.sD.Professional
}, {
label: "Uni Student",
value: x.sD.UniStudent
}, {
label: "Pre Uni Student",
value: x.sD.PreUniStudent
}],
this.firstChanges = {
countryFilter: !0,
areaOfStudyFilter: !0,
userTypeFilter: !0,
sort: !0
},
this.skipMarkActivity = {
countryFilter: !1,
areaOfStudyFilter: !1,
userTypeFilter: !1,
sort: !1
},
this.isMobile = !1,
this.subscriptions = [],
this.sortOptions = [{
label: "Most pins (default)",
value: _.I9.MostPins
}, {
label: "Ignore pin counts",
value: _.I9.IgnorePinCounts
}]
}
ngOnInit() {
this.countryService.getAll().subscribe({
next: e => this.countries = e,
error: e => this.handleErrors(e)
}),
this.areaOfStudyService.getAllActive().subscribe({
next: e => this.areasOfStudy = e,
error: e => this.handleErrors(e)
}),
this.subscriptions.push(this.utilityService.isMobile.subscribe(e => {
this.isMobile = e,
this.isMobile && this.clearFilters()
}
))
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe())
}
onCountryFilterUpdated() {
this.firstChanges.countryFilter ? this.firstChanges.countryFilter = !1 : (this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next(),
this.skipMarkActivity.countryFilter ? this.skipMarkActivity.countryFilter = !1 : this.analyticsService.markActivity(u.kP.FocusRoomCountryFilterChange))
}
onAreaOfStudyFilterUpdated() {
this.firstChanges.areaOfStudyFilter ? this.firstChanges.areaOfStudyFilter = !1 : (this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next(),
this.skipMarkActivity.areaOfStudyFilter ? this.skipMarkActivity.areaOfStudyFilter = !1 : this.analyticsService.markActivity(u.kP.FocusRoomAreaOfStudyFilterChange))
}
onUserTypeFilterUpdated() {
this.firstChanges.userTypeFilter ? this.firstChanges.userTypeFilter = !1 : (this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next(),
this.skipMarkActivity.userTypeFilter ? this.skipMarkActivity.userTypeFilter = !1 : this.analyticsService.markActivity(u.kP.FocusRoomUserTypeFilterChange))
}
onSortUpdated() {
this.firstChanges.sort ? this.firstChanges.sort = !1 : (this.skipMarkActivity.sort ? this.skipMarkActivity.sort = !1 : this.analyticsService.markActivity(this.livekit.room.filter.selectedSortOption === _.I9.MostPins ? u.kP.FocusRoomSortByMostPins : u.kP.FocusRoomSortByIgnorePinCounts),
this.livekit.room.sortAndAssignDisplayedParticipants())
}
toggleShowParticipantsWithReportsOnly() {
this.livekit.room.filter.participantsWithReportsOnly = !this.livekit.room.filter.participantsWithReportsOnly,
this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next()
}
toggleShowParticipantsWithNewMarkerOnly() {
this.livekit.room.filter.participantsWithNewMarkerOnly = !this.livekit.room.filter.participantsWithNewMarkerOnly,
this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next(),
this.analyticsService.markActivity(u.kP.NewUsersFilter, {
active: this.livekit.room.filter.participantsWithNewMarkerOnly
})
}
clearFilters() {
this.skipMarkActivity.countryFilter = !0,
this.skipMarkActivity.areaOfStudyFilter = !0,
this.skipMarkActivity.userTypeFilter = !0,
this.skipMarkActivity.sort = this.livekit.room.filter.selectedSortOption !== _.I9.MostPins,
this.analyticsService.markActivity(u.kP.ClearedFilters),
this.livekit.room.clearFilters()
}
close() {
this.livekit.room.animateViewToggleButton = !1,
this.closeFilter.emit()
}
handleErrors(e) {
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(L.Y),t.GI1(g.A),t.GI1(be.C),t.GI1(ke.S),t.GI1(y.uE),t.GI1(u.uc),t.GI1(I.UZ),t.GI1(k.s))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-filter"]],
outputs: {
closeFilter: "closeFilter"
},
decls: 24,
vars: 21,
consts: [[1, "left-group"], [1, "filters"], [1, "section-title"], ["iconName", "filter", "color", "accent-blue", 3, "size"], [1, "interactable"], ["id", "country", "name", "country", "placeholder", "Country", "labelProperty", "name", "valueProperty", "id", 3, "ngModel", "options", "multiple", "ngModelChange"], ["id", "area-of-study", "name", "areaOfStudy", "labelProperty", "name", "valueProperty", "id", 3, "ngModel", "placeholder", "options", "multiple", "ngModelChange"], ["id", "user-type", "name", "userType", "placeholder", "Choose user type", "labelProperty", "label", "valueProperty", "value", 3, "ngModel", "options", "multiple", "ngModelChange", 4, "ngIf"], [3, "vertical"], [1, "sort"], ["iconName", "arrow_sort_down_lines", "color", "accent-blue", 3, "size"], ["id", "sort-option", "name", "sortOption", "placeholder", "Sort by...", "labelProperty", "label", "valueProperty", "value", 3, "ngModel", "options", "ngModelChange"], [1, "right-group"], ["color", "focus-room", "iconName", "warning", 3, "matTooltip", "active", "iconSize", "iconOnly", "buttonClick", 4, "ngIf"], ["color", "focus-room", "iconName", "people_team", 3, "matTooltip", "active", "iconSize", "iconOnly", "buttonClick"], [4, "ngIf"], ["color", "secondary", "iconName", "eraser", 3, "disabled", "iconVariant", "buttonClick"], [3, "buttonClick"], ["id", "user-type", "name", "userType", "placeholder", "Choose user type", "labelProperty", "label", "valueProperty", "value", 3, "ngModel", "options", "multiple", "ngModelChange"], ["color", "focus-room", "iconName", "warning", 3, "matTooltip", "active", "iconSize", "iconOnly", "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "div", 1)(2, "div", 2),
t.wR5(3, "ss-icon", 3),
t.I0R(4, "span", 4),
t.OEk(5, "Filter"),
t.C$Y()(),
t.I0R(6, "ss-focus-room-select", 5),
t.iHE("ngModelChange", function(a) {
return t.kNx(i.livekit.room.filter.selectedCountries, a) || (i.livekit.room.filter.selectedCountries = a),
a
}),
t.qCj("ngModelChange", function() {
return i.onCountryFilterUpdated()
}),
t.C$Y(),
t.I0R(7, "ss-focus-room-select", 6),
t.iHE("ngModelChange", function(a) {
return t.kNx(i.livekit.room.filter.selectedAreasOfStudy, a) || (i.livekit.room.filter.selectedAreasOfStudy = a),
a
}),
t.qCj("ngModelChange", function() {
return i.onAreaOfStudyFilterUpdated()
}),
t.C$Y(),
t.yuY(8, ye, 1, 3, "ss-focus-room-select", 7),
t.wR5(9, "ss-divider", 8),
t.C$Y(),
t.I0R(10, "div", 9)(11, "div", 2),
t.wR5(12, "ss-icon", 10),
t.I0R(13, "span", 4),
t.OEk(14, "Sort"),
t.C$Y()(),
t.I0R(15, "ss-focus-room-select-long", 11),
t.iHE("ngModelChange", function(a) {
return t.kNx(i.livekit.room.filter.selectedSortOption, a) || (i.livekit.room.filter.selectedSortOption = a),
a
}),
t.qCj("ngModelChange", function() {
return i.onSortUpdated()
}),
t.C$Y()()(),
t.I0R(16, "div", 12),
t.yuY(17, Oe, 1, 4, "ss-button", 13),
t.I0R(18, "ss-button", 14),
t.qCj("buttonClick", function() {
return i.toggleShowParticipantsWithNewMarkerOnly()
}),
t.C$Y(),
t.yuY(19, Me, 1, 0, "ss-switch-room-view-button", 15),
t.I0R(20, "ss-button", 16),
t.qCj("buttonClick", function() {
return i.clearFilters()
}),
t.OEk(21, " Clear "),
t.C$Y(),
t.I0R(22, "ss-button", 17),
t.qCj("buttonClick", function() {
return i.close()
}),
t.OEk(23, "Done"),
t.C$Y()()),
2 & n && (t.yG2(3),
t.E7m("size", 20),
t.yG2(3),
t.OKB("ngModel", i.livekit.room.filter.selectedCountries),
t.E7m("options", i.countries)("multiple", !0),
t.yG2(),
t.OKB("ngModel", i.livekit.room.filter.selectedAreasOfStudy),
t.E7m("placeholder", i.settingsService.isB2BApp() ? "Industry" : "Subject")("options", i.areasOfStudy)("multiple", !0),
t.yG2(),
t.E7m("ngIf", !i.settingsService.isB2BApp()),
t.yG2(),
t.E7m("vertical", !0),
t.yG2(3),
t.E7m("size", 20),
t.yG2(3),
t.OKB("ngModel", i.livekit.room.filter.selectedSortOption),
t.E7m("options", i.sortOptions),
t.yG2(2),
t.E7m("ngIf", i.isModerator),
t.yG2(),
t.E7m("matTooltip", i.newUsersOnly ? "Show all participants" : "Show new users only")("active", i.newUsersOnly)("iconSize", 24)("iconOnly", !0),
t.yG2(),
t.E7m("ngIf", !i.isMobile && i.anyPinnedUsers),
t.yG2(),
t.E7m("disabled", !i.livekit.room.anyFiltersSelectedOrSortChanged)("iconVariant", 20))
},
dependencies: [h.u_, Pe.u, O.k, C.g, ot.cn, ot.uS, b.ue, b._G, R.a4, At],
styles: ["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.mobile-version[_nghost-%COMP%]{flex-direction:column;margin-top:15px}.mobile-version[_nghost-%COMP%] .filters[_ngcontent-%COMP%], .mobile-version[_nghost-%COMP%] .sort[_ngcontent-%COMP%]{flex-direction:column;margin-bottom:7px}.mobile-version[_nghost-%COMP%] .left-group[_ngcontent-%COMP%]{flex-direction:column}.mobile-version[_nghost-%COMP%] .right-group[_ngcontent-%COMP%]{align-self:baseline}.mobile-version[_nghost-%COMP%] .right-group[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%]:last-of-type{display:none}.mobile-version[_nghost-%COMP%] .filters[_ngcontent-%COMP%] ss-focus-room-select[_ngcontent-%COMP%]{margin-bottom:24px}.mobile-version[_nghost-%COMP%] .left-group[_ngcontent-%COMP%], .mobile-version[_nghost-%COMP%] .filters[_ngcontent-%COMP%], .mobile-version[_nghost-%COMP%] .sort[_ngcontent-%COMP%], .mobile-version[_nghost-%COMP%] ss-focus-room-select[_ngcontent-%COMP%], .mobile-version[_nghost-%COMP%] ss-focus-room-select-long[_ngcontent-%COMP%]{width:100%}@media only screen and (max-width: 767px){.mobile-version[_nghost-%COMP%] ss-focus-room-select[_ngcontent-%COMP%] mat-select, .mobile-version[_nghost-%COMP%] ss-focus-room-select-long[_ngcontent-%COMP%] mat-select{height:48px}}.mobile-version[_nghost-%COMP%] ss-divider[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 1599px){[_nghost-%COMP%]{width:calc(100vw - 76px);overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){[_nghost-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}[_nghost-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}[_nghost-%COMP%]::-webkit-scrollbar, [_nghost-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}[_nghost-%COMP%]::-webkit-scrollbar{width:8px;height:8px}}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{flex-direction:column}}@media only screen and (max-width: 767px){[_nghost-%COMP%] ss-focus-room-select[_ngcontent-%COMP%] mat-select, [_nghost-%COMP%] ss-focus-room-select-long[_ngcontent-%COMP%] mat-select{height:40px}}.left-group[_ngcontent-%COMP%], .right-group[_ngcontent-%COMP%], .section-title[_ngcontent-%COMP%]{display:flex;align-items:center}.right-group[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%] button{padding:0 8px}.filters[_ngcontent-%COMP%], .sort[_ngcontent-%COMP%]{display:flex}@media only screen and (max-width: 767px){.filters[_ngcontent-%COMP%], .sort[_ngcontent-%COMP%]{flex-direction:column;margin-bottom:7px}}@media only screen and (max-width: 1024px){.left-group[_ngcontent-%COMP%]{margin-bottom:12px}}@media only screen and (max-width: 767px){.left-group[_ngcontent-%COMP%]{flex-direction:column}}@media only screen and (max-width: 767px){.filters[_ngcontent-%COMP%] ss-focus-room-select[_ngcontent-%COMP%]{margin-bottom:5px}}.section-title[_ngcontent-%COMP%]{margin-right:24px}@media only screen and (max-width: 1024px){.section-title[_ngcontent-%COMP%]{margin-bottom:16px}}.section-title[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{margin-right:4px}ss-focus-room-select[_ngcontent-%COMP%], ss-focus-room-select-long[_ngcontent-%COMP%]{width:176px;margin-right:24px;margin-bottom:0}@media only screen and (max-width: 767px){ss-focus-room-select[_ngcontent-%COMP%], ss-focus-room-select-long[_ngcontent-%COMP%]{width:284px;margin-right:0}}ss-divider.vertical[_ngcontent-%COMP%]{height:40px;margin-right:24px}@media only screen and (max-width: 767px){ss-divider.vertical[_ngcontent-%COMP%]{display:none}}ss-button[_ngcontent-%COMP%]{flex-shrink:0;height:36px;margin-right:6px}ss-button[_ngcontent-%COMP%]:last-of-type{margin-right:0}"]
})
}
return o
}
)();
var l = c(2228)
, Mt = c(8068)
, st = c(5880);
const we = ["videoTile"];
let Yt = ( () => {
class o {
handleClickOutside(e) {
this.videoTile.elementRef.nativeElement.contains(e.target) || this.dialogRef.close()
}
constructor(e, n, i, s, a, d, m) {
this.participant = e,
this.dialogRef = n,
this.userService = i,
this.livekit = s,
this.themeService = a,
this.toastService = d,
this.utilityService = m,
this.isMobile = !1,
this.subscriptions = [],
this.onRemoteParticipantDisconnected = this.onRemoteParticipantDisconnected.bind(this)
}
ngOnInit() {
this.livekit.room.on(l.OO.ParticipantDisconnected, this.onRemoteParticipantDisconnected),
this.livekit.room.currentlyFullscreenedParticipant = this.participant,
this.userService.markVideoTileView(this.participant.identity, this.livekit.room.name).subscribe(),
this.subscriptions.push(this.utilityService.isMobile.subscribe(e => this.isMobile = e), this.themeService.themeChange.subscribe(e => this.theme = e))
}
ngOnDestroy() {
this.livekit.room.off(l.OO.ParticipantDisconnected, this.onRemoteParticipantDisconnected),
this.livekit.room.currentlyFullscreenedParticipant = null,
this.subscriptions.forEach(e => e.unsubscribe())
}
onRemoteParticipantDisconnected(e) {
this.participant.identity === e.identity && (this.toastService.info({
title: "Fullscreen preview closed",
message: "The user has left the room."
}),
this.dialogRef.close())
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(p.sR),t.GI1(p.yI),t.GI1(Mt.o),t.GI1(g.A),t.GI1(st.a),t.GI1(k.s),t.GI1(I.UZ))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-tile-view-modal"]],
viewQuery: function(n, i) {
if (1 & n && t.CC$(we, 5),
2 & n) {
let s;
t.wto(s = t.Gqi()) && (i.videoTile = s.first)
}
},
hostBindings: function(n, i) {
1 & n && t.qCj("click", function(a) {
return i.handleClickOutside(a)
})
},
decls: 4,
vars: 5,
consts: [[1, "actions-wrapper"], ["mat-dialog-close", "", "role", "button", "iconName", "dismiss", "color", "default-60", 3, "size"], [3, "participant", "isMobile", "isViewModalTile", "theme"], ["videoTile", ""]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0),
t.wR5(1, "ss-icon", 1),
t.C$Y(),
t.wR5(2, "ss-focus-room-tile", 2, 3)),
2 & n && (t.yG2(),
t.E7m("size", 24),
t.yG2(),
t.E7m("participant", i.participant)("isMobile", i.isMobile)("isViewModalTile", !0)("theme", i.theme))
},
styles: ["[_nghost-%COMP%]{position:relative}.actions-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center}ss-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:40px;height:40px;margin-bottom:8px;border-radius:50%;background:var(--grayscale)}ss-focus-room-tile[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;max-width:177.7777777778vh;width:100%;margin:0 auto}ss-focus-room-tile[_ngcontent-%COMP%] video{width:100%;height:100%;object-fit:contain}ss-focus-room-tile[_ngcontent-%COMP%] .hover-top-menu{top:0}"]
})
}
return o
}
)();
var S = c(1528)
, M = c(6512)
, wt = c(5657)
, w = c(4548)
, St = c(3616)
, Se = c(2948)
, T = c(6716)
, D = c(2744)
, Y = c(837)
, F = c(2308)
, V = c(6036)
, vt = c(900)
, Ct = c(4516)
, xe = c(1868)
, Ie = c(3676)
, Z = c(436)
, xt = c(760)
, It = c(5760)
, Te = c(7188)
, K = c(9312)
, rt = c(8624)
, N = c(2476)
, at = c(1468)
, Ge = c(8484)
, Re = c(7411)
, Vt = c(8868)
, Nt = c(7692)
, Bt = c(5316)
, H = c(2480)
, Dt = c(5220)
, ct = c(8588);
function Ee(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.encourageUser(i.encouragements[0]))
}),
t.wR5(1, "ss-icon", 6),
t.I0R(2, "span"),
t.OEk(3, "Encourage"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
function Ue(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.messageUser())
}),
t.wR5(1, "ss-icon", 7),
t.I0R(2, "span"),
t.OEk(3, "Message"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
function Fe(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.removeParticipant())
}),
t.wR5(1, "ss-icon", 8),
t.I0R(2, "span"),
t.OEk(3, "Remove user"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
function Ae(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.forceCameraOff())
}),
t.wR5(1, "ss-icon", 9),
t.I0R(2, "span"),
t.OEk(3, "Turn off camera"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
function Le(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.forceAudioOff())
}),
t.wR5(1, "ss-icon", 10),
t.I0R(2, "span"),
t.OEk(3, "Turn off audio"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
function Ye(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.showTaskHistory())
}),
t.wR5(1, "ss-icon", 11),
t.I0R(2, "span"),
t.OEk(3, "Focused tasks history"),
t.C$Y()(),
t.I0R(4, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.showUserBio())
}),
t.wR5(5, "ss-icon", 12),
t.I0R(6, "span"),
t.OEk(7, "User bio"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24),
t.yG2(4),
t.E7m("iconVariant", 20)("size", 24))
}
function Ve(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.reportUser())
}),
t.wR5(1, "ss-icon", 13),
t.I0R(2, "span"),
t.OEk(3, "Report user"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
function Ne(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.blockUser())
}),
t.wR5(1, "ss-icon", 14),
t.I0R(2, "span"),
t.OEk(3, "Block user"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
function Be(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.banUser())
}),
t.wR5(1, "ss-icon", 15),
t.I0R(2, "span"),
t.OEk(3, "Ban user"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
function De(o, r) {
if (1 & o && t.wR5(0, "ss-upgrade-cta", 21),
2 & o) {
const e = t.GaO(4);
t.E7m("short", !0)("openedFromSource", e.TriggeredUpgradeFromSourceRef.TwoWayHide)
}
}
function $e(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 18)(1, "button", 19),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.hideUser(!0))
}),
t.wR5(2, "ss-icon", 16),
t.I0R(3, "span"),
t.OEk(4, "Two-way hide"),
t.C$Y()(),
t.yuY(5, De, 1, 2, "ss-upgrade-cta", 20),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.yG2(),
t.E7m("disabled", !e.subscriptionService.hasPremiumFeatures),
t.yG2(),
t.E7m("size", 24),
t.yG2(3),
t.E7m("ngIf", !e.subscriptionService.hasPremiumFeatures)
}
}
function ze(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.hideUser())
}),
t.wR5(1, "ss-icon", 16),
t.I0R(2, "span"),
t.OEk(3, "Hide user"),
t.C$Y()(),
t.yuY(4, $e, 6, 3, "div", 17)
}
if (2 & o) {
const e = t.GaO(2);
t.yG2(),
t.E7m("size", 24),
t.yG2(3),
t.E7m("ngIf", !e.participant.userInfo.isModerator)
}
}
function je(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.unhideUser())
}),
t.wR5(1, "ss-icon", 22),
t.I0R(2, "span"),
t.OEk(3, "Unhide user"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("size", 24))
}
function He(o, r) {
if (1 & o && (t.SAx(0),
t.yuY(1, ze, 5, 2)(2, je, 4, 1, "button", 3),
t.k70()),
2 & o) {
const e = t.GaO();
t.yG2(),
t.C0Y(1, e.showHideUserOptions && !e.isHiddenParticipant ? 1 : -1),
t.yG2(),
t.E7m("ngIf", e.isHiddenParticipant)
}
}
function Ke(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 5),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.saveAsTestimonial())
}),
t.wR5(1, "ss-icon", 23),
t.I0R(2, "span"),
t.OEk(3, "Save status as testimonial"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
let $t = ( () => {
class o {
get isModerator() {
return !!this.livekit.room.localParticipant.userInfo?.isModerator
}
get isAdministrator() {
return this.accountService.isInRole(Y.Q5.Administrator)
}
get encouragements() {
return this.livekit.encouragements
}
get isCurrentUser() {
return this.accountService.currentUser.id === this.participant.identity
}
get isActiveGroupOwner() {
return this.activeGroup?.createdByUserId === this.accountService.currentUser.id
}
get localParticipant() {
return this.livekit.room.localParticipant
}
constructor(e, n, i, s, a, d, m, v, P, U, A, $, j) {
this.settingsService = e,
this.dialog = n,
this.livekit = i,
this.subscriptionService = s,
this.accountService = a,
this.testimonialService = d,
this.encouragementService = m,
this.chatService = v,
this.utilityService = P,
this.accountModalsService = U,
this.notificationService = A,
this.toastService = $,
this.badgeService = j,
this.isHiddenParticipant = !1,
this.isRoomTileMenu = !1,
this.isGroupTile = !1,
this.showHideUserOptions = !1,
this.participantMenuOpened = new t._w7,
this.openUserBio = new t._w7,
this.openTaskHistory = new t._w7,
this.menuOpened = !1,
this.TriggeredUpgradeFromSourceRef = F.AD,
this.subscriptions = [],
this.isMobile = !1
}
ngOnInit() {
this.subscriptions.push(this.utilityService.isMobile.subscribe(e => this.isMobile = e), this.livekit.room.activeGroup.subscribe(e => this.activeGroup = e))
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe())
}
removeParticipant() {
this.dialog.open(Ge.Y, {
width: "420px",
data: {
userId: this.participant.identity,
roomName: this.livekit.room.roomName,
isLivekit: !0
}
})
}
reportUser() {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.dialog.open(Vt.O, {
panelClass: "fullscreen-dialog",
width: "480px",
disableClose: !0,
data: {
reportedUser: this.participant.userInfo,
roomName: this.livekit.room.roomName,
reportSource: Nt.w.FocusRoom,
elementToScreenshotSelector: "ss-dashboard"
}
})
}
blockUser() {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.dialog.open(Re._, {
panelClass: "fullscreen-dialog",
width: "414px",
data: {
user: this.participant.userInfo
}
})
}
banUser() {
this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Are you sure?",
description: "BanUserConfirmation",
confirmButtonLabel: "Yes, ban this user"
}
}).afterClosed().subscribe(n => {
!n || null === this.activeGroup || this.livekit.banUserForFocusRoomSessionGroup(this.livekit.room.name, this.activeGroup.id, this.participant.identity).subscribe({
error: i => this.handleErrors(i)
})
}
)
}
encourageUser(e) {
var s, n = this;
this.accountModalsService.ensureUserCompletedBasicInfo() && !this.livekit.room.checkEncouragementsDisabled(this.participant) && this.encouragementService.postEncouragement(this.participant.identity, {
encouragementTypeId: e.id
}).subscribe({
next: (s = (0,
S.c)(function*(a) {
n.livekit.room.milestones.encouragedSomeone || n.subscriptions.push((0,
w.k)(2e3).subscribe( () => n.badgeService.checkForNewBadges.next())),
n.livekit.room.milestones.encouragedSomeone = !0,
a.receiverWasInFocusMode ? yield n.notificationService.info({
message: "This user is currently in Focus+ or Lite mode. They'll see your encouragement later on."
}) : null !== a.encouragementsPerDayLeft ? yield n.notificationService.info({
message: `Encouragement sent. You have ${a.encouragementsPerDayLeft} encouragements left for today.`
}) : yield n.notificationService.info({
message: "Encouragement sent."
})
}),
function(d) {
return s.apply(this, arguments)
}
),
error: s => {
"EncouragementTimeLimit" === s[0].errorCode ? this.toastService.info({
title: "Please wait",
exceptionDetail: s[0]
}) : "MaxEncouragementsPerDayReached" === s[0].errorCode ? this.toastService.info({
title: "Maximum encouragements reached",
exceptionDetail: s[0],
paidFeatureText: "Upgrade to encourage more",
triggeredUpgradeFromSource: F.AD.MaxEncouragementsReached,
autoClose: !1
}) : "MaxEncouragementsPerDayReachedPremium" === s[0].errorCode ? this.toastService.info({
title: "Maximum encouragements reached",
exceptionDetail: s[0]
}) : this.handleErrors(s)
}
})
}
messageUser() {
if (!this.accountModalsService.ensureUserCompletedBasicInfo())
return;
const e = {
otherUserIds: [this.participant.identity]
};
this.chatService.checkIfChatExists(e.otherUserIds[0]).subscribe({
next: () => {
this.chatService.startChat(e).subscribe({
next: n => this.navigateToChat(n.id),
error: n => {
n.length && "ChatAlreadyExists" === n[0].errorCode ? this.navigateToChat(n[0].params.chatId) : this.handleErrors(n)
}
})
}
,
error: n => {
n.length && "ChatDoesNotExist" === n[0].errorCode ? this.isMobile ? window.open(`${T.O.appUrl}/conversations/chats/create?userId=${e.otherUserIds[0]}`, "_blank") : this.utilityService.requestChatNavigation.next(e.otherUserIds[0]) : this.handleErrors(n)
}
})
}
shouldShowHideControls() {
return !this.livekit.room.isPinned(this.participant.identity) && !this.isCurrentUser
}
forceCameraOff() {
this.livekit.forceTurnOffCameraForParticipant(this.livekit.room.name, this.participant.identity).subscribe()
}
forceAudioOff() {
this.livekit.forceTurnOffAudioForParticipant(this.livekit.room.name, this.participant.identity).subscribe()
}
hideUser(e=!1) {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.livekit.room.hide(this.participant, e)
}
unhideUser() {
this.livekit.room.unhide(this.participant.identity)
}
onMenuOpened() {
this.participantMenuOpened.emit(!0),
this.menuOpened = !0
}
onMenuClosed() {
this.participantMenuOpened.emit(!1),
this.menuOpened = !1
}
showUserBio() {
this.openUserBio.emit()
}
showTaskHistory() {
this.openTaskHistory.emit()
}
saveAsTestimonial() {
var n, e = this;
this.participant.status && this.testimonialService.saveTestimonial(Bt.G.LivekitUserStatus, this.participant.status.id).subscribe({
next: (n = (0,
S.c)(function*() {
return yield e.notificationService.info({
message: "Saved as testimonial."
})
}),
function() {
return n.apply(this, arguments)
}
),
error: n => this.handleErrors(n)
})
}
navigateToChat(e) {
this.isMobile ? window.open(`${T.O.appUrl}/conversations/chats/${e}`, "_blank") : this.utilityService.openDmTrayChat.next(e)
}
handleErrors(e) {
"ErrorChattingAgeRestriction" !== e[0].errorCode ? this.toastService.error({
exceptionDetail: e[0]
}) : this.toastService.info({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(L.Y),t.GI1(p.qW),t.GI1(g.A),t.GI1(H.k),t.GI1(y.uE),t.GI1(Dt.y),t.GI1(vt.a),t.GI1(Ct.e),t.GI1(I.UZ),t.GI1(V.E),t.GI1(It.g),t.GI1(k.s),t.GI1(Z.A))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-participant-menu"]],
inputs: {
participant: "participant",
isHiddenParticipant: "isHiddenParticipant",
isRoomTileMenu: "isRoomTileMenu",
isGroupTile: "isGroupTile",
showHideUserOptions: "showHideUserOptions"
},
outputs: {
participantMenuOpened: "participantMenuOpened",
openUserBio: "openUserBio",
openTaskHistory: "openTaskHistory"
},
decls: 14,
vars: 18,
consts: [["role", "button", "iconName", "more_horizontal", 3, "matMenuTriggerFor", "color", "size", "menuOpened", "menuClosed"], ["xPosition", "before", "yPosition", "below"], ["participantMenu", "matMenu"], ["mat-menu-item", "", 3, "click", 4, "ngIf"], [4, "ngIf"], ["mat-menu-item", "", 3, "click"], ["iconName", "thumb_like", 3, "iconVariant", "size"], ["iconName", "chat", 3, "iconVariant", "size"], ["iconName", "person_subtract", 3, "iconVariant", "size"], ["iconName", "camera_off", 3, "iconVariant", "size"], ["iconName", "mic_off", 3, "iconVariant", "size"], ["iconName", "tasks_app", 3, "iconVariant", "size"], ["iconName", "person", 3, "iconVariant", "size"], ["iconName", "shield_error", 3, "iconVariant", "size"], ["iconName", "dismiss_square", 3, "iconVariant", "size"], ["iconName", "chat_dismiss", 3, "iconVariant", "size"], ["iconName", "eye_off", 3, "size"], ["class", "two-way-hide", 4, "ngIf"], [1, "two-way-hide"], ["mat-menu-item", "", "matTooltip", "This feature will hide this user from your grid and also prevent them from seeing your video tile.", 3, "disabled", "click"], [3, "short", "openedFromSource", 4, "ngIf"], [3, "short", "openedFromSource"], ["iconName", "eye", 3, "size"], ["iconName", "mail_inbox", 3, "iconVariant", "size"]],
template: function(n, i) {
if (1 & n && (t.I0R(0, "ss-icon", 0),
t.qCj("menuOpened", function() {
return i.onMenuOpened()
})("menuClosed", function() {
return i.onMenuClosed()
}),
t.C$Y(),
t.I0R(1, "mat-menu", 1, 2),
t.yuY(3, Ee, 4, 2, "button", 3)(4, Ue, 4, 2, "button", 3)(5, Fe, 4, 2, "button", 3)(6, Ae, 4, 2, "button", 3)(7, Le, 4, 2, "button", 3)(8, Ye, 8, 4)(9, Ve, 4, 2, "button", 3)(10, Ne, 4, 2, "button", 3)(11, Be, 4, 2, "button", 3)(12, He, 3, 2, "ng-container", 4)(13, Ke, 4, 2, "button", 3),
t.C$Y()),
2 & n) {
const s = t.Gew(2);
t.eAK("room-tile-menu", i.isRoomTileMenu)("active", i.menuOpened),
t.E7m("matMenuTriggerFor", s)("color", i.isRoomTileMenu ? "contrast" : "default-60")("size", 18),
t.yG2(3),
t.E7m("ngIf", i.encouragements.length > 0 && !i.isCurrentUser && !i.isRoomTileMenu && !i.isHiddenParticipant),
t.yG2(),
t.E7m("ngIf", !(i.isCurrentUser || i.isRoomTileMenu || i.isHiddenParticipant || i.settingsService.isB2BApp())),
t.yG2(),
t.E7m("ngIf", i.isModerator && !i.participant.userInfo.isModerator),
t.yG2(),
t.E7m("ngIf", i.isModerator && i.participant.isCameraEnabled && !i.participant.userInfo.isModerator),
t.yG2(),
t.E7m("ngIf", i.isModerator && i.participant.isMicrophoneEnabled && !i.participant.userInfo.isModerator),
t.yG2(),
t.C0Y(8, i.isRoomTileMenu ? 8 : -1),
t.yG2(),
t.E7m("ngIf", !i.isCurrentUser),
t.yG2(),
t.E7m("ngIf", !i.isCurrentUser),
t.yG2(),
t.E7m("ngIf", i.isGroupTile && !i.isCurrentUser && i.isActiveGroupOwner),
t.yG2(),
t.E7m("ngIf", i.shouldShowHideControls()),
t.yG2(),
t.E7m("ngIf", i.isAdministrator && i.participant.status)
}
},
dependencies: [h.u_, ct._, C.g, et.aM, et.OQ, et.yG, R.a4],
styles: ["[_nghost-%COMP%]{display:flex}.room-tile-menu.active[_ngcontent-%COMP%] i, .room-tile-menu[_ngcontent-%COMP%]:hover i{color:var(--accent-blue-20);opacity:1}.two-way-hide[_ngcontent-%COMP%]{display:flex}"]
})
}
return o
}
)();
var zt = c(2808);
function Je(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 12),
t.qCj("click", function() {
const s = t.usT(e).$implicit
, a = t.GaO(2);
return t.CGJ(a.selectedCharCode = s.reactionCharCode)
}),
t.wR5(1, "span", 13),
t.wVc(2, "emoji"),
t.OEk(3),
t.C$Y()
}
if (2 & o) {
const e = r.$implicit
, n = t.GaO(2);
t.eAK("my-reaction", n.currentUserHasReacted(e))("active", e.reactionCharCode === n.selectedCharCode),
t.yG2(),
t.E7m("innerHTML", t.kDX(2, 6, e.reactionCharCode), t.E3n),
t.yG2(2),
t.oRS("\xa0\xa0", e.usersReacted.length > 999 ? "999+" : e.usersReacted.length, " ")
}
}
function qe(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-icon", 20),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO().$implicit
, s = t.GaO(2);
return t.CGJ(s.removeReaction(i))
}),
t.C$Y()
}
2 & o && t.E7m("size", 20)("iconVariant", 20)
}
function We(o, r) {
1 & o && t.wR5(0, "mat-spinner", 21)
}
function Qe(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 14)(1, "div", 15),
t.qCj("click", function() {
const s = t.usT(e).$implicit
, a = t.GaO(2);
return t.CGJ(a.togglePopup(s.id))
}),
t.wR5(2, "ss-user-avatar", 16),
t.I0R(3, "span", 17),
t.OEk(4),
t.C$Y()(),
t.yuY(5, qe, 1, 2, "ss-icon", 18)(6, We, 1, 0, "mat-spinner", 19),
t.C$Y()
}
if (2 & o) {
const e = r.$implicit
, n = t.GaO(2);
t.yG2(2),
t.E7m("size", 24)("title", e.displayName)("initials", e.initials)("avatarColor", e.avatarColor)("avatarThumbUrl", e.avatarThumbUrl)("userId", e.id)("showOnlineStatus", !1),
t.yG2(2),
t.CAO("", e.displayName, "", n.isMyReaction(e) ? " (me)" : "", ""),
t.yG2(),
t.E7m("ngIf", n.removingReactionUserId !== e.id && n.canRemoveReaction(e)),
t.yG2(),
t.E7m("ngIf", n.removingReactionUserId === e.id)
}
}
function Xe(o, r) {
if (1 & o && (t.SAx(0),
t.I0R(1, "div", 8),
t.yuY(2, Je, 4, 8, "div", 9),
t.C$Y(),
t.I0R(3, "div", 10),
t.yuY(4, Qe, 7, 11, "div", 11),
t.C$Y(),
t.k70()),
2 & o) {
const e = t.GaO();
t.yG2(2),
t.E7m("ngForOf", e.reactions),
t.yG2(2),
t.E7m("ngForOf", e.filteredUsersPerReaction)
}
}
function Ze(o, r) {
1 & o && (t.I0R(0, "div", 22),
t.wR5(1, "mat-spinner", 21),
t.C$Y())
}
function ti(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-user-popup", 24),
t.qCj("closePopup", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.togglePopup())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.E7m("userId", e.userForPopupId)
}
}
function ei(o, r) {
if (1 & o && t.yuY(0, ti, 1, 1, "ss-user-popup", 23),
2 & o) {
const e = t.GaO();
t.E7m("ngIf", e.userForPopupId)
}
}
let ii = ( () => {
class o {
get filteredUsersPerReaction() {
const e = this.reactions.find(n => n.reactionCharCode === this.selectedCharCode);
return e ? e.usersReacted : []
}
constructor(e, n, i, s, a) {
this.participant = e,
this.dialogRef = n,
this.livekit = i,
this.accountService = s,
this.toastService = a,
this.reactions = [],
this.selectedCharCode = null,
this.popupOpened = !1,
this.loadingReactions = !0,
this.userForPopupId = null,
e.status && this.livekit.getAllReactionsToUserStatus(this.livekit.room.name, e.status.id).subscribe({
next: d => {
this.loadingReactions = !1,
this.reactions = d,
this.reactions.length > 0 && (this.selectedCharCode = this.reactions[0].reactionCharCode),
this.participant.status && (this.participant.status.totalReactions = this.reactions.map(m => m.usersReacted.length).reduce( (m, v) => m + v, 0),
this.participant.status.topReaction = this.reactions.length > 0 ? {
reactionCharCode: this.reactions[0].reactionCharCode,
reactionsCount: this.reactions[0].usersReacted.length
} : null)
}
,
error: d => this.handleErrors(d)
})
}
togglePopup(e=null, n=null) {
n && n.stopPropagation(),
e && (this.userForPopupId = e),
this.popupOpened = !this.popupOpened
}
currentUserHasReacted(e) {
return e.usersReacted.some(n => n.id === this.accountService.currentUser.id)
}
isMyReaction(e) {
return e.id === this.accountService.currentUser.id
}
canRemoveReaction(e) {
return this.participant.identity === this.accountService.currentUser.id || this.isMyReaction(e) || this.accountService.isInRole(Y.Q5.Administrator) || this.accountService.isInRole(Y.Q5.Moderator)
}
removeReaction(e) {
!this.selectedCharCode || !this.participant.status || (this.removingReactionUserId = e.id,
this.livekit.reactToUserStatus(this.livekit.room.name, this.participant.status.id, this.selectedCharCode, e.id).subscribe({
next: () => {
this.removingReactionUserId = null;
const n = this.participant.status;
if (!n || !n.topReaction)
return;
const i = this.filteredUsersPerReaction.find(d => d.id === e.id);
if (i && this.filteredUsersPerReaction.splice(this.filteredUsersPerReaction.indexOf(i), 1),
n.topReaction.reactionCharCode === this.selectedCharCode && (n.topReaction.reactionsCount--,
0 === n.topReaction.reactionsCount && 0 === this.filteredUsersPerReaction.length && 1 === this.reactions.length && (n.topReaction = null)),
n.totalReactions--,
this.filteredUsersPerReaction.length > 0)
return;
const s = this.reactions.find(d => d.reactionCharCode === this.selectedCharCode);
if (s && this.reactions.splice(this.reactions.indexOf(s), 1),
0 === this.reactions.length)
return void this.dialogRef.close();
const a = this.reactions[0];
this.selectedCharCode = a.reactionCharCode,
n.topReaction = {
reactionCharCode: a.reactionCharCode,
reactionsCount: a.usersReacted.length
}
}
}))
}
handleErrors(e) {
this.removingReactionUserId = null,
this.loadingReactions = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(p.sR),t.GI1(p.yI),t.GI1(g.A),t.GI1(y.uE),t.GI1(k.s))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-status-reactions-modal"]],
decls: 10,
vars: 8,
consts: [["cdkOverlayOrigin", "", 1, "mat-header"], ["trigger", "cdkOverlayOrigin"], ["mat-dialog-title", ""], ["mat-dialog-close", "", 1, "close-modal"], ["iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant"], [4, "ngIf"], ["class", "loader-wrapper", 4, "ngIf"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "transparent", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayDisableClose", "backdropClick"], [1, "reactions"], ["class", "reaction", "role", "button", 3, "my-reaction", "active", "click", 4, "ngFor", "ngForOf"], [1, "users"], ["class", "user-wrapper", 4, "ngFor", "ngForOf"], ["role", "button", 1, "reaction", 3, "click"], [3, "innerHTML"], [1, "user-wrapper"], [1, "user", 3, "click"], [3, "size", "title", "initials", "avatarColor", "avatarThumbUrl", "userId", "showOnlineStatus"], [1, "interactable"], ["iconName", "dismiss", "role", "button", "color", "default-20", 3, "size", "iconVariant", "click", 4, "ngIf"], ["diameter", "20", "strokeWidth", "2", 4, "ngIf"], ["iconName", "dismiss", "role", "button", "color", "default-20", 3, "size", "iconVariant", "click"], ["diameter", "20", "strokeWidth", "2"], [1, "loader-wrapper"], ["cssClass", "margin-horizontal", 3, "userId", "closePopup", 4, "ngIf"], ["cssClass", "margin-horizontal", 3, "userId", "closePopup"]],
template: function(n, i) {
if (1 & n && (t.I0R(0, "div", 0, 1)(2, "h2", 2),
t.OEk(3, "Reactions"),
t.C$Y(),
t.I0R(4, "button", 3),
t.wR5(5, "ss-icon", 4),
t.C$Y()(),
t.I0R(6, "mat-dialog-content"),
t.yuY(7, Xe, 5, 2, "ng-container", 5)(8, Ze, 2, 0, "div", 6),
t.C$Y(),
t.yuY(9, ei, 1, 1, "ng-template", 7),
t.qCj("backdropClick", function(a) {
return i.togglePopup(null, a)
})),
2 & n) {
const s = t.Gew(1);
t.yG2(5),
t.E7m("size", 20)("iconVariant", 20),
t.yG2(2),
t.E7m("ngIf", !i.loadingReactions && i.reactions.length > 0),
t.yG2(),
t.E7m("ngIf", i.loadingReactions),
t.yG2(),
t.E7m("cdkConnectedOverlayOrigin", s)("cdkConnectedOverlayOpen", i.popupOpened)("cdkConnectedOverlayHasBackdrop", !0)("cdkConnectedOverlayDisableClose", !0)
}
},
dependencies: [h.ay, h.u_, C.g, K.A, rt.w, p.qq, p.WQ, p.iU, G.eC, G.wW, z.cm, zt.I],
styles: [".loader-wrapper[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin:20px auto}mat-dialog-content[_ngcontent-%COMP%]{display:flex}.reactions[_ngcontent-%COMP%]{width:90px;margin:5px 24px 0 0;overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){.reactions[_ngcontent-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}.reactions[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}.reactions[_ngcontent-%COMP%]::-webkit-scrollbar, .reactions[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}.reactions[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.reaction[_ngcontent-%COMP%]{display:flex;align-items:center;width:68px;height:30px;padding-left:4px;border-radius:5px;color:var(--default-40)}.reaction.my-reaction[_ngcontent-%COMP%]{border:1px solid var(--accent-blurple-60)}.reaction[_ngcontent-%COMP%]:hover{color:var(--default-20);background:var(--alt-60)}.reaction.active[_ngcontent-%COMP%]{color:var(--default);background:var(--alt-40)}.reaction[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;align-items:center}.reaction[_ngcontent-%COMP%] span.emoji-pipe-image{width:20px!important;height:20px!important}.users[_ngcontent-%COMP%]{width:100%;overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){.users[_ngcontent-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}.users[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}.users[_ngcontent-%COMP%]::-webkit-scrollbar, .users[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}.users[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.user-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:8px 7px;margin-right:20px;border-bottom:1px solid var(--alt-40)}.user-wrapper[_ngcontent-%COMP%]:hover{background:var(--alt-40)}.user-wrapper[_ngcontent-%COMP%]:last-child{border-bottom:none}.user[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:13px;line-height:20px;color:var(--default);cursor:pointer}.user[_ngcontent-%COMP%] ss-user-avatar[_ngcontent-%COMP%]{margin-right:8px}"]
})
}
return o
}
)();
var ni = c(2660)
, jt = c(7952);
function oi(o, r) {
1 & o && t.wR5(0, "ss-premium-tick")
}
function si(o, r) {
if (1 & o && t.wR5(0, "ss-badge", 12),
2 & o) {
const e = t.GaO(2);
t.E7m("badge", e.participant.userInfo.userBadge)
}
}
function ri(o, r) {
if (1 & o && (t.I0R(0, "div", 13),
t.OEk(1, " NEW \u{1f389} "),
t.C$Y()),
2 & o) {
const e = t.GaO(2);
t.E7m("matTooltip", e.participant.isLocal ? "This new tag is shown during your first week. You can toggle it off in video settings." : "New user - give them a warm welcome!")
}
}
function ai(o, r) {
if (1 & o && (t.I0R(0, "div", 14),
t.wR5(1, "ss-icon", 15),
t.I0R(2, "small"),
t.OEk(3),
t.C$Y()()),
2 & o) {
const e = t.GaO(2);
t.yG2(),
t.E7m("size", 16),
t.yG2(2),
t.cNF(e.selectedTask.text)
}
}
function ci(o, r) {
if (1 & o && (t.I0R(0, "small"),
t.OEk(1),
t.C$Y()),
2 & o) {
const e = t.GaO(2);
t.yG2(),
t.cNF(e.participant.userInfo.areaOfStudyName)
}
}
function li(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-user-popup", 16),
t.qCj("focusRoomUnauthenticatedActionAttempt", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.handleUnauthenticatedActionAttempt())
})("closePopup", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.userInfoPopupOpened = !1)
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.E7m("userId", e.participant.identity)("openedFromSource", e.OpenedFromSourceRef.FocusRoom)
}
}
function di(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 3, 4),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.openUserPopup())
}),
t.I0R(2, "div", 5),
t.yuY(3, oi, 1, 0, "ss-premium-tick", 6),
t.I0R(4, "div", 7),
t.OEk(5),
t.C$Y(),
t.yuY(6, si, 1, 1, "ss-badge", 8)(7, ri, 2, 1, "div", 9),
t.C$Y(),
t.yuY(8, ai, 4, 2, "div", 10)(9, ci, 2, 1)(10, li, 1, 2, "ng-template", 11),
t.qCj("backdropClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.userInfoPopupOpened = !1)
}),
t.C$Y()
}
if (2 & o) {
const e = t.Gew(1)
, n = t.GaO();
t.eAK("hide", n.userStatusPopupOpened),
t.yG2(3),
t.E7m("ngIf", !n.settingsService.isB2BApp() && n.participant.userInfo.showPremiumTick),
t.yG2(2),
t.CAO(" ", n.participant.userInfo.displayName, "", n.participant.isLocal ? " (you)" : "", " "),
t.yG2(),
t.E7m("ngIf", n.participant.userInfo.userBadge),
t.yG2(),
t.E7m("ngIf", n.showNewUserMarker),
t.yG2(),
t.C0Y(8, n.selectedTask ? 8 : 9),
t.yG2(2),
t.E7m("cdkConnectedOverlayOrigin", e)("cdkConnectedOverlayOpen", n.userInfoPopupOpened)("cdkConnectedOverlayHasBackdrop", !0)("cdkConnectedOverlayDisableClose", !0)
}
}
function ui(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-user-avatar", 26),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.userStatusPopupOpened = !0)
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.E7m("size", 28)("avatarColor", e.participant.userInfo.avatarColor)("avatarThumbUrl", e.participant.userInfo.avatarThumbUrl)("showOnlineStatus", !1)("userId", e.participant.identity)("initials", e.participant.userInfo.initials)
}
}
function pi(o, r) {
1 & o && t.wR5(0, "ss-premium-tick")
}
function mi(o, r) {
if (1 & o && (t.I0R(0, "div", 13),
t.OEk(1, " NEW \u{1f389} "),
t.C$Y()),
2 & o) {
const e = t.GaO(2);
t.E7m("matTooltip", e.participant.isLocal ? "This new tag is shown during your first week. You can toggle it off in video settings." : "New user - give them a warm welcome!")
}
}
function hi(o, r) {
if (1 & o && (t.I0R(0, "span"),
t.OEk(1),
t.C$Y()),
2 & o) {
const e = t.GaO(4);
t.yG2(),
t.oRS("+", e.otherReactionsCount, "")
}
}
function gi(o, r) {
if (1 & o) {
const e = t.KQA();
t.SAx(0),
t.I0R(1, "ss-button-small", 29),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.reactToUserStatus(i.participant.status.topReaction.reactionCharCode))
}),
t.wR5(2, "span", 30),
t.wVc(3, "emoji"),
t.OEk(4),
t.C$Y(),
t.I0R(5, "ss-button-small", 31),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.showAllReactionsModal())
}),
t.yuY(6, hi, 2, 1, "span", 6),
t.C$Y(),
t.k70()
}
if (2 & o) {
const e = t.GaO(3);
t.yG2(),
t.E7m("isLoading", e.reactionLoading),
t.yG2(),
t.E7m("innerHTML", t.kDX(3, 5, e.participant.status.topReaction.reactionCharCode), t.E3n),
t.yG2(2),
t.oRS(" ", e.participant.status.topReaction.reactionsCount, " "),
t.yG2(),
t.E7m("iconName", e.otherReactionsCount ? "" : "emoji_multiple"),
t.yG2(),
t.E7m("ngIf", e.otherReactionsCount > 0)
}
}
function fi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 27),
t.yuY(1, gi, 7, 7, "ng-container", 6),
t.I0R(2, "ss-emoji-picker", 28),
t.qCj("emojiSelected", function(i) {
t.usT(e);
const s = t.GaO(2);
return t.CGJ(s.onReactionChanged(i))
}),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO(2);
t.yG2(),
t.E7m("ngIf", e.participant.status && e.participant.status.topReaction),
t.yG2(),
t.E7m("isMobile", e.isMobile)("iconSize", 20)("isReaction", !0)
}
}
function _i(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-user-popup", 16),
t.qCj("focusRoomUnauthenticatedActionAttempt", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.handleUnauthenticatedActionAttempt())
})("closePopup", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.userStatusPopupOpened = !1)
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.E7m("userId", e.participant.identity)("openedFromSource", e.OpenedFromSourceRef.FocusRoom)
}
}
function vi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 17, 18),
t.qCj("mouseenter", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.onStatusMouseEnter())
})("mouseleave", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.onStatusMouseLeave())
}),
t.I0R(2, "div", 19, 20),
t.yuY(4, ui, 1, 6, "ss-user-avatar", 21)(5, pi, 1, 0, "ss-premium-tick", 6),
t.I0R(6, "div", 22),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.userStatusPopupOpened = !0)
}),
t.OEk(7),
t.C$Y(),
t.yuY(8, mi, 2, 1, "div", 9),
t.C$Y(),
t.I0R(9, "div", 23),
t.yuY(10, fi, 3, 4, "div", 24),
t.I0R(11, "div", 25),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.userStatusPopupOpened = !0)
}),
t.OEk(12),
t.C$Y()(),
t.yuY(13, _i, 1, 2, "ng-template", 11),
t.qCj("backdropClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.userStatusPopupOpened = !1)
}),
t.C$Y()
}
if (2 & o) {
const e = t.Gew(3)
, n = t.GaO();
t.eAK("active", n.userStatusPopupOpened),
t.yG2(4),
t.E7m("ngIf", n.participant.userInfo),
t.yG2(),
t.E7m("ngIf", !n.settingsService.isB2BApp() && n.participant.userInfo.showPremiumTick),
t.yG2(),
t.eAK("no-tick", n.settingsService.isB2BApp() || !n.participant.userInfo.showPremiumTick),
t.yG2(),
t.CAO(" ", n.participant.userInfo.displayName, "", n.participant.isLocal ? " (you)" : "", " "),
t.yG2(),
t.E7m("ngIf", n.showNewUserMarker),
t.yG2(2),
t.E7m("ngIf", !n.focusPlusActive),
t.yG2(),
t.eAK("expanded", n.statusHoverExpanded),
t.yG2(),
t.oRS(" ", null == n.participant.status ? null : n.participant.status.text, " "),
t.yG2(),
t.E7m("cdkConnectedOverlayOrigin", e)("cdkConnectedOverlayOpen", n.userStatusPopupOpened)("cdkConnectedOverlayHasBackdrop", !0)("cdkConnectedOverlayDisableClose", !0)
}
}
let Ci = ( () => {
class o {
get otherReactionsCount() {
return this.participant.status?.topReaction ? this.participant.status.totalReactions - this.participant.status.topReaction.reactionsCount : 0
}
get hasStatus() {
return !(!this.participant.status || this.participant.isLocal && this.livekit.room.userActiveStatus?.clearedAt)
}
get showNewUserMarker() {
return this.participant.userInfo.showNewUserMarker
}
get focusPlusActive() {
return !!this.livekit.room?.focusPlus.active
}
get selectedTask() {
return this.participant.isLocal ? this.accountService.currentUser.selectedTask : this.participant.selectedTask
}
constructor(e, n, i, s, a, d) {
this.settingsService = e,
this.accountModalsService = n,
this.dialog = i,
this.toastService = s,
this.livekit = a,
this.accountService = d,
this.userInfoPopupOpened = !1,
this.userStatusPopupOpened = !1,
this.statusHoverExpanded = !1,
this.reactionLoading = !1,
this.OpenedFromSourceRef = x.Qf
}
ngOnDestroy() {
this.statusReactionsModalSubscription?.unsubscribe()
}
openUserPopup() {
this.isMobile || (this.userInfoPopupOpened = !0)
}
onStatusMouseEnter() {
this.statusHoverExpanded = !0
}
onStatusMouseLeave() {
setTimeout( () => {
this.statusHoverExpanded = !1
}
, 300)
}
onReactionChanged(e) {
this.accountModalsService.ensureUserCompletedBasicInfo() && (!this.participant.status || !e.native || this.reactToUserStatus(e.native))
}
reactToUserStatus(e) {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.participant.status && (this.reactionLoading = !0,
this.livekit.reactToUserStatus(this.livekit.room.name, this.participant.status.id, e).subscribe({
next: n => this.onReactionSuccess(n, e),
error: n => this.handleErrors(n)
}))
}
showAllReactionsModal() {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.participant.status && this.dialog.open(ii, {
panelClass: "fullscreen-dialog",
width: "600px",
data: this.participant
})
}
handleUnauthenticatedActionAttempt() {
this.reactionLoading = !1,
this.accountModalsService.ensureUserCompletedBasicInfo()
}
onReactionSuccess(e, n) {
const i = this.participant.status;
if (i)
if (e) {
if (!i.topReaction)
return i.topReaction = {
reactionCharCode: e.reactionCharCode,
reactionsCount: 1
},
i.totalReactions = 1,
void (this.reactionLoading = !1);
i.topReaction.reactionCharCode === e.reactionCharCode && i.topReaction.reactionsCount++,
i.totalReactions++,
this.reactionLoading = !1
} else if (i.totalReactions--,
i.topReaction && i.topReaction.reactionCharCode === n) {
if (i.topReaction.reactionsCount--,
0 === i.totalReactions)
return i.topReaction = null,
void (this.reactionLoading = !1);
if (i.topReaction.reactionsCount > 0)
return void (this.reactionLoading = !1);
this.livekit.getTopReactionToUserStatus(this.livekit.room.name, i.id).subscribe({
next: s => {
i.topReaction = s,
this.reactionLoading = !1
}
,
error: s => this.handleErrors(s)
})
} else
this.reactionLoading = !1;
else
this.reactionLoading = !1
}
handleErrors(e) {
this.reactionLoading = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(L.Y),t.GI1(V.E),t.GI1(p.qW),t.GI1(k.s),t.GI1(g.A),t.GI1(y.uE))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-user-info-status"]],
inputs: {
participant: "participant",
isMobile: "isMobile"
},
decls: 3,
vars: 2,
consts: [[1, "user-info-wrapper"], ["class", "user-info", "cdkOverlayOrigin", "", "role", "button", 3, "hide", "click", 4, "ngIf"], ["class", "status-wrapper", 3, "active", "mouseenter", "mouseleave", 4, "ngIf"], ["cdkOverlayOrigin", "", "role", "button", 1, "user-info", 3, "click"], ["userInfoTrigger", "cdkOverlayOrigin"], [1, "name-wrapper"], [4, "ngIf"], [1, "notification"], [3, "badge", 4, "ngIf"], ["class", "new-user-marker", 3, "matTooltip", 4, "ngIf"], ["class", "selected-task"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "transparent", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayDisableClose", "backdropClick"], [3, "badge"], [1, "new-user-marker", 3, "matTooltip"], [1, "selected-task"], ["iconName", "target", "color", "accent-blue", 3, "size"], ["cssClass", "margin-horizontal", 3, "userId", "openedFromSource", "focusRoomUnauthenticatedActionAttempt", "closePopup"], [1, "status-wrapper", 3, "mouseenter", "mouseleave"], ["statusWrapperElement", ""], ["cdkOverlayOrigin", "", 1, "status-name-wrapper"], ["userStatusTrigger", "cdkOverlayOrigin"], ["status", "online", 3, "size", "avatarColor", "avatarThumbUrl", "showOnlineStatus", "userId", "initials", "click", 4, "ngIf"], [1, "notification", "display-name", 3, "click"], [1, "reaction-status-wrapper"], ["class", "reactions", 4, "ngIf"], [1, "status", "notification", 3, "click"], ["status", "online", 3, "size", "avatarColor", "avatarThumbUrl", "showOnlineStatus", "userId", "initials", "click"], [1, "reactions"], ["matTooltip", "Emoji React", "matTooltipPosition", "above", 3, "isMobile", "iconSize", "isReaction", "emojiSelected"], ["matTooltip", "Top reaction", "matTooltipPosition", "above", 3, "isLoading", "buttonClick"], [3, "innerHTML"], ["matTooltip", "User reactions", "matTooltipPosition", "above", 3, "iconName", "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0),
t.yuY(1, di, 11, 12, "div", 1),
t.C$Y(),
t.yuY(2, vi, 14, 17, "div", 2)),
2 & n && (t.yG2(),
t.E7m("ngIf", i.participant.userInfo),
t.yG2(),
t.E7m("ngIf", i.hasStatus))
},
dependencies: [h.u_, ni.C, C.g, K.A, rt.w, N.S, at.I, jt.k, G.eC, G.wW, R.a4, zt.I],
styles: ["[_nghost-%COMP%]{display:block}.user-info-wrapper[_ngcontent-%COMP%]{position:absolute;bottom:2px;left:2px;z-index:3;display:flex}.user-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;align-items:baseline;max-width:280px;padding:2px 8px;border-radius:10px;background:var(--video-overlay)}.user-info[_ngcontent-%COMP%] .name-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.user-info[_ngcontent-%COMP%] .selected-task[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:4px}.user-info[_ngcontent-%COMP%] .selected-task[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{margin-right:4px}.user-info[_ngcontent-%COMP%] ss-badge[_ngcontent-%COMP%]{flex-shrink:0;margin-left:5px}.user-info[_ngcontent-%COMP%] .notification[_ngcontent-%COMP%], .user-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:-webkit-box;overflow:hidden;color:var(--contrast);word-break:break-all;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}.user-info[_ngcontent-%COMP%] .new-user-marker[_ngcontent-%COMP%]{margin-left:6px}.new-user-marker[_ngcontent-%COMP%]{font-size:8px;font-weight:600;color:var(--positive)}.status-wrapper[_ngcontent-%COMP%]{position:absolute;bottom:2px;left:2px;z-index:1;width:calc(100% - 4px);padding:2px;border-radius:10px;background:rgba(var(--blue-black-rgb),.85);cursor:pointer}.status-wrapper[_ngcontent-%COMP%]:hover .status-name-wrapper[_ngcontent-%COMP%], .status-wrapper.active[_ngcontent-%COMP%] .status-name-wrapper[_ngcontent-%COMP%]{bottom:0;height:20px;opacity:1;transition:bottom .3s ease-out,height .3s ease-out,opacity .3s .15s ease-out}.status-wrapper[_ngcontent-%COMP%]:hover .status[_ngcontent-%COMP%], .status-wrapper.active[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{max-height:52px}.status-wrapper[_ngcontent-%COMP%] .new-user-marker[_ngcontent-%COMP%]{margin-left:2px}.status-name-wrapper[_ngcontent-%COMP%]{position:relative;bottom:-19px;display:flex;align-items:center;height:0;opacity:0;transition:bottom .3s ease-out,height .3s ease-out,opacity .15s ease-out}.status-name-wrapper[_ngcontent-%COMP%] ss-user-avatar[_ngcontent-%COMP%]{position:relative;top:-5px}.status-name-wrapper[_ngcontent-%COMP%] ss-premium-tick[_ngcontent-%COMP%]{position:relative;top:-2px;margin-left:4px}.status-name-wrapper[_ngcontent-%COMP%] .display-name[_ngcontent-%COMP%]{position:relative;bottom:1px;display:-webkit-box;overflow:hidden;padding-right:3px;color:var(--contrast);text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}.status-name-wrapper[_ngcontent-%COMP%] .display-name.no-tick[_ngcontent-%COMP%]{margin-left:4px}.reaction-status-wrapper[_ngcontent-%COMP%]{position:relative}.reactions[_ngcontent-%COMP%]{position:absolute;top:-23px;right:10px;display:flex;align-items:center;gap:0 6px}.reactions[_ngcontent-%COMP%] ss-button-small[_ngcontent-%COMP%] button{height:24px;border:1px solid var(--accent-gradient-60-dark);border-radius:5px;background-color:var(--accent-blue-80-dark)}.reactions[_ngcontent-%COMP%] ss-button-small[_ngcontent-%COMP%] button ss-icon{margin-right:0;background:var(--accent-blue);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.reactions[_ngcontent-%COMP%] ss-emoji-picker[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:24px;padding:0 5px;border:1px solid var(--accent-gradient-60-dark);border-radius:5px;background-color:var(--accent-blue-80-dark)}.reactions[_ngcontent-%COMP%] ss-emoji-picker[_ngcontent-%COMP%] ss-icon i{background:var(--accent-blue);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.status[_ngcontent-%COMP%]{display:-webkit-box;max-height:20px;overflow:hidden;padding:2px 8px;border-radius:8px;color:var(--contrast);text-overflow:ellipsis;white-space:pre-wrap;background:var(--widget-super-subtle);transition:max-height .3s ease-out;-webkit-line-clamp:1;-webkit-box-orient:vertical}.status.expanded[_ngcontent-%COMP%]{-webkit-line-clamp:3}"]
})
}
return o
}
)();
var f = c(676)
, bi = c(2851)
, ki = c(7192)
, q = c(4008);
function Pi(o, r) {
1 & o && t.wR5(0, "mat-spinner", 11)
}
const yi = (o, r) => r.id;
function Oi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 15),
t.qCj("click", function() {
const s = t.usT(e).$implicit
, a = t.GaO(3);
return t.CGJ(a.sendFeedback(s.id))
}),
t.OEk(1),
t.C$Y()
}
if (2 & o) {
const e = r.$implicit;
t.yG2(),
t.cNF(e.text)
}
}
function Mi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 15),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.otherInputVisible = !0)
}),
t.OEk(1, "Other"),
t.C$Y()
}
}
function wi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 16)(1, "ss-input", 17),
t.iHE("ngModelChange", function(i) {
t.usT(e);
const s = t.GaO(3);
return t.kNx(s.otherOptionText, i) || (s.otherOptionText = i),
t.CGJ(i)
}),
t.qCj("keyup.enter", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.sendFeedback(null))
}),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO(3);
t.yG2(),
t.E7m("actions", e.inputActions),
t.OKB("ngModel", e.otherOptionText),
t.E7m("maxlength", 50)
}
}
function Si(o, r) {
if (1 & o && (t.I0R(0, "div", 12),
t.c53(1, Oi, 2, 1, "div", 18, yi),
t.yuY(3, Mi, 2, 0, "div", 13),
t.C$Y(),
t.yuY(4, wi, 2, 3, "div", 14)),
2 & o) {
const e = t.GaO(2);
t.yG2(),
t.oho(e.options),
t.yG2(2),
t.E7m("ngIf", !e.otherInputVisible),
t.yG2(),
t.E7m("ngIf", e.otherInputVisible)
}
}
function xi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 4)(1, "div", 5)(2, "div", 6),
t.wR5(3, "ss-icon", 7),
t.I0R(4, "div", 8)(5, "h4"),
t.OEk(6),
t.C$Y()()(),
t.I0R(7, "ss-button", 9),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.closePopup())
}),
t.C$Y()(),
t.I0R(8, "div", 10),
t.yuY(9, Pi, 1, 0, "mat-spinner", 11)(10, Si, 5, 2),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO();
t.yG2(3),
t.E7m("size", 24),
t.yG2(3),
t.oRS("Why did you pin ", e.participant.userInfo.displayName, "?"),
t.yG2(),
t.E7m("iconVariant", 20)("iconSize", 24)("iconOnly", !0),
t.yG2(),
t.eAK("scrollable", !e.feedbackPopupInViewport),
t.yG2(),
t.C0Y(9, e.loadingOptions ? 9 : 10)
}
}
let Ii = ( () => {
class o {
constructor(e, n, i, s) {
this.livekit = e,
this.accountService = n,
this.toastService = i,
this.userInteractionsService = s,
this.popupOpened = !1,
this.options = [],
this.otherOptionText = "",
this.loadingOptions = !1,
this.sendingAnswer = !1,
this.otherInputVisible = !1,
this.positionPairs = [{
offsetY: -52,
originX: "end",
originY: "bottom",
overlayX: "end",
overlayY: "top"
}],
this.inputActions = {
send: {
iconName: "send",
loading: this.sendingAnswer,
onClick: () => this.sendFeedback(null),
disabled: () => this.otherOptionText.length < 3
}
},
this.PIN_REASON_NO_ANSWER_ID_REF = f.oh,
this.feedbackPopupInViewport = !0
}
openPopup() {
this.loadingOptions = !0,
this.popupOpened = !0,
this.userInteractionsService.getInteractionOptions(bi.A.Pin).subscribe({
next: e => {
this.loadingOptions = !1,
this.options = e.filter(n => n.id !== f.oh),
setTimeout( () => {
const n = document.querySelector(".feedback-popup");
n && (this.feedbackPopupInViewport = (0,
I.GP)(n))
}
)
}
,
error: e => this.handleErrors(e)
})
}
closePopup() {
this.popupOpened = !1,
this.otherOptionText = "",
this.otherInputVisible = !1,
this.feedbackPopupInViewport = !0
}
sendFeedback(e) {
if (this.sendingAnswer)
return;
const n = {
userInteractedWithId: this.participant.identity
};
e ? n.optionId = e : n.otherOptionText = this.otherOptionText,
this.sendingAnswer = !0,
this.userInteractionsService.postAnswer(n).subscribe({
next: () => {
this.loadingOptions = !1,
this.popupOpened = !1,
this.sendingAnswer = !1,
this.participant.shouldShowPinQuestion = !1
}
,
error: i => this.handleErrors(i)
})
}
handleErrors(e) {
this.loadingOptions = !1,
this.sendingAnswer = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(y.uE),t.GI1(k.s),t.GI1(ki.k))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-pin-feedback"]],
hostVars: 2,
hostBindings: function(n, i) {
2 & n && t.eAK("popup-opened", i.popupOpened)
},
inputs: {
participant: "participant"
},
decls: 5,
vars: 8,
consts: [["cdkOverlayOrigin", "", 1, "feedback-circle", 3, "click"], ["pinningReasonOptionTrigger", "cdkOverlayOrigin"], ["color", "website-transparent", "iconName", "dismiss", 1, "close-modal", 3, "iconVariant", "iconSize", "iconOnly", "buttonClick"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "transparent", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayPositions", "backdropClick"], [1, "feedback-popup"], [1, "header"], [1, "left"], ["iconName", "pin", "color", "accent-blue", 3, "size"], [1, "text"], ["color", "website-transparent", "iconName", "dismiss", 1, "close-popup", 3, "iconVariant", "iconSize", "iconOnly", "buttonClick"], [1, "popup-content-wrapper"], ["diameter", "20", "strokeWidth", "2"], [1, "reasons-list"], ["class", "interactable", 3, "click", 4, "ngIf"], ["class", "input-wrapper", 4, "ngIf"], [1, "interactable", 3, "click"], [1, "input-wrapper"], ["name", "otherOption", "placeholder", "Enter other reason...", "autocomplete", "off", 3, "actions", "ngModel", "maxlength", "ngModelChange", "keyup.enter"], ["class", "interactable"]],
template: function(n, i) {
if (1 & n && (t.I0R(0, "div", 0, 1),
t.qCj("click", function() {
return i.openPopup()
}),
t.OEk(2, " Pin reason "),
t.C$Y(),
t.I0R(3, "ss-button", 2),
t.qCj("buttonClick", function() {
return i.sendFeedback(i.PIN_REASON_NO_ANSWER_ID_REF)
}),
t.C$Y(),
t.yuY(4, xi, 11, 8, "ng-template", 3),
t.qCj("backdropClick", function() {
return i.closePopup()
})),
2 & n) {
const s = t.Gew(1);
t.yG2(3),
t.E7m("iconVariant", 20)("iconSize", 12)("iconOnly", !0),
t.yG2(),
t.E7m("cdkConnectedOverlayOrigin", s)("cdkConnectedOverlayOpen", i.popupOpened)("cdkConnectedOverlayHasBackdrop", !0)("cdkConnectedOverlayDisableClose", !0)("cdkConnectedOverlayPositions", i.positionPairs)
}
},
dependencies: [h.u_, O.k, C.g, q.g, b.ue, b.Mj, b._G, G.eC, G.wW, z.cm],
styles: ["[_nghost-%COMP%]{position:absolute;top:40px;right:10px;z-index:1;filter:drop-shadow(var(--inner-strong))}.popup-opened[_nghost-%COMP%] .feedback-circle[_ngcontent-%COMP%], .popup-opened[_nghost-%COMP%] .close-modal[_ngcontent-%COMP%]{visibility:hidden}.feedback-circle[_ngcontent-%COMP%]{display:flex;align-items:center;width:52px;height:52px;border-radius:50%;font-size:13px;line-height:normal;color:var(--contrast);background:var(--accent-blue-80-dark);cursor:pointer;text-align:center}.feedback-circle[_ngcontent-%COMP%]:hover{background:var(--accent-blue-60-dark)}.close-modal[_ngcontent-%COMP%]{position:absolute;top:-2px;right:0;width:20px;border-radius:50%;background:var(--accent-blue-80-dark)}.close-modal[_ngcontent-%COMP%]:hover{background:var(--accent-blue-60-dark)}.close-modal[_ngcontent-%COMP%] button{width:20px;height:20px;padding:10px}.close-popup[_ngcontent-%COMP%] button{width:20px;height:20px;padding:0}.close-popup[_ngcontent-%COMP%] button ss-icon i{color:var(--default-60)}.popup-content-wrapper.scrollable[_ngcontent-%COMP%]{height:120px;overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){.popup-content-wrapper.scrollable[_ngcontent-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}.popup-content-wrapper.scrollable[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}.popup-content-wrapper.scrollable[_ngcontent-%COMP%]::-webkit-scrollbar, .popup-content-wrapper.scrollable[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}.popup-content-wrapper.scrollable[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.feedback-popup[_ngcontent-%COMP%]{width:300px;border:1px solid var(--alt);border-radius:20px;background:var(--contrast)}.feedback-popup[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{margin-right:8px}.feedback-popup[_ngcontent-%COMP%] .header[_ngcontent-%COMP%], .feedback-popup[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.feedback-popup[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:12px}.feedback-popup[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{margin-right:20px}.feedback-popup[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .feedback-popup[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--default-40)}mat-spinner[_ngcontent-%COMP%]{margin:0 auto 12px}.input-wrapper[_ngcontent-%COMP%]{padding:6px 12px 0;margin:0}.reasons-list[_ngcontent-%COMP%] .interactable[_ngcontent-%COMP%]{padding:6px 12px;color:var(--default-40);cursor:pointer}.reasons-list[_ngcontent-%COMP%] .interactable[_ngcontent-%COMP%]:last-of-type{border-bottom-right-radius:20px;border-bottom-left-radius:20px}.reasons-list[_ngcontent-%COMP%] .interactable[_ngcontent-%COMP%]:hover{background-color:var(--alt-60)}"]
})
}
return o
}
)();
const Ti = ["videoElement"];
function Gi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 21),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.onVideoClicked())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.eAK("ad-user", e.adUser && e.adUser.adUrl)
}
}
function Ri(o, r) {
if (1 & o && t.wR5(0, "div", 25),
2 & o) {
const e = t.GaO(3);
t.eAK("premium", e.participant.userInfo.includePremiumFeatures)
}
}
function Ei(o, r) {
if (1 & o && (t.I0R(0, "div", 26),
t.wR5(1, "ss-icon", 27),
t.I0R(2, "small"),
t.OEk(3),
t.C$Y()()),
2 & o) {
const e = t.GaO(3);
t.yG2(),
t.E7m("size", 12),
t.yG2(2),
t.cNF(e.participant.pinnedCount)
}
}
function Ui(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 28)(1, "img", 29),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.openSpotifyUrl(i.participant.spotifyData.url))
}),
t.C$Y(),
t.I0R(2, "span"),
t.OEk(3),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO(3);
t.E7m("matTooltip", e.isVideoPill ? e.participant.spotifyData.currentlyPlaying : ""),
t.yG2(3),
t.cNF(e.participant.spotifyData.currentlyPlaying)
}
}
function Fi(o, r) {
if (1 & o && (t.I0R(0, "div", 22),
t.yuY(1, Ri, 1, 2, "div", 23)(2, Ei, 4, 2, "div", 24)(3, Ui, 4, 2, "div", 11),
t.C$Y()),
2 & o) {
const e = t.GaO(2);
t.yG2(),
t.E7m("ngIf", e.participant.isHandRaised && !e.focusPlusActive),
t.yG2(),
t.E7m("ngIf", e.participant.pinnedCount > 0 && !e.focusPlusActive),
t.yG2(),
t.E7m("ngIf", e.participant.spotifyData && (!e.showHoverTopMenu || e.isVideoPill))
}
}
function Ai(o, r) {
if (1 & o && (t.I0R(0, "div", 30),
t.OEk(1, " P4P "),
t.C$Y()),
2 & o) {
const e = t.GaO(2);
t.eAK("selected-task", e.selectedTask)
}
}
function Li(o, r) {
if (1 & o && t.wR5(0, "ss-icon", 31),
2 & o) {
const e = t.GaO(2);
t.E7m("size", 20)("matTooltip", e.selectedTask ? "Current task - " + e.selectedTask.text : "")
}
}
function Yi(o, r) {
if (1 & o && t.wR5(0, "ss-badge", 32),
2 & o) {
const e = t.GaO(2);
t.E7m("size", 20)("badge", e.participant.userInfo.userBadge)
}
}
function Vi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 33),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.toggleHdFlag())
}),
t.wR5(1, "ss-icon", 34),
t.I0R(2, "small"),
t.OEk(3, "HD"),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO(2);
t.eAK("active", e.participant.hd),
t.E7m("matTooltip", e.participant.hd ? "Click to unmark HD flag" : "Click to mark HD flag"),
t.yG2(),
t.E7m("size", 20)
}
}
function Ni(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 35),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.showUserReports())
}),
t.wR5(1, "ss-icon", 36),
t.I0R(2, "small"),
t.OEk(3),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO(2);
t.yG2(),
t.E7m("size", 12),
t.yG2(2),
t.cNF(e.participant.reportCount)
}
}
function Bi(o, r) {
1 & o && (t.I0R(0, "div", 37),
t.wR5(1, "ss-icon", 38),
t.C$Y()),
2 & o && (t.yG2(),
t.E7m("size", 12))
}
function Di(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 28)(1, "img", 29),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.openSpotifyUrl(i.participant.spotifyData.url))
}),
t.C$Y(),
t.I0R(2, "span"),
t.OEk(3),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO(2);
t.E7m("matTooltip", e.participant.spotifyData.currentlyPlaying),
t.yG2(3),
t.cNF(e.participant.spotifyData.currentlyPlaying)
}
}
function $i(o, r) {
1 & o && (t.I0R(0, "div", 52),
t.wR5(1, "mat-spinner", 53),
t.C$Y())
}
function zi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "img", 55),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(4);
return t.CGJ(i.encourageUser(i.encouragements[0]))
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(4);
t.E7m("matTooltipPosition", e.isGroupTile ? "below" : "above")("src", e.encouragements[0].iconUrl, t.K6U)
}
}
function ji(o, r) {
if (1 & o && t.yuY(0, zi, 1, 2, "img", 54),
2 & o) {
const e = t.GaO(3);
t.E7m("ngIf", e.encouragements.length > 0 && e.participant.identity !== e.currentUser.id)
}
}
function Hi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 56),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.showTaskHistory())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.eAK("active", e.taskHistoryOpened),
t.E7m("matTooltipPosition", e.isGroupTile ? "below" : "above")("iconOnly", !0)("iconSize", 20)("isLoading", e.loadingTaskHistory)("disabled", e.loadingTaskHistory)
}
}
function Ki(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 57),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.messageUser())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.eAK("disabled", e.focusPlusActive),
t.E7m("matTooltipPosition", e.isGroupTile ? "below" : "above")("matTooltip", e.focusPlusActive ? "Cannot message in Focus+" : "Message")("iconOnly", !0)("iconSize", 20)
}
}
function Ji(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 58),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.livekit.room.selfViewVideoVisibility = !i.livekit.room.selfViewVideoVisibility)
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.E7m("matTooltipPosition", e.isGroupTile ? "below" : "above")("matTooltip", (e.livekit.room.selfViewVideoVisibility ? "Hide" : "Show") + " self view video")("iconName", e.livekit.room.selfViewVideoVisibility ? "camera" : "camera_off")("iconOnly", !0)("iconSize", 20)
}
}
function qi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 59),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.showFullscreenTile())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.E7m("matTooltipPosition", e.isGroupTile ? "below" : "above")("iconOnly", !0)("iconSize", 20)
}
}
function Wi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-task-calendar", 61),
t.qCj("closePopup", function() {
t.usT(e);
const i = t.GaO(4);
return t.CGJ(i.taskHistoryOpened = !1)
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(4);
t.E7m("userInfo", e.participant.userInfo)("initialTaskHistoryLoad", e.tasksHistory)
}
}
function Qi(o, r) {
if (1 & o && t.yuY(0, Wi, 1, 2, "ss-task-calendar", 60),
2 & o) {
const e = t.GaO(3);
t.E7m("ngIf", e.taskHistoryOpened)
}
}
function Xi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-user-popup", 62),
t.qCj("focusRoomUnauthenticatedActionAttempt", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.accountModalsService.ensureUserCompletedBasicInfo())
})("closePopup", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.userBioPopupOpened = !1)
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.E7m("userId", e.participant.identity)("openedFromSource", e.OpenedFromSourceRef.FocusRoom)
}
}
function Zi(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 63),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.sendAGift(i.participant.userInfo.displayName))
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.E7m("matTooltipPosition", e.isGroupTile ? "below" : "above")("iconOnly", !0)("iconSize", 20)
}
}
function tn(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 64)(1, "ss-participant-menu", 65),
t.qCj("participantMenuOpened", function(i) {
t.usT(e);
const s = t.GaO(3);
return t.CGJ(s.onParticipantMenuOpened(i))
})("openUserBio", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.onOpenUserBio())
})("openTaskHistory", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.showTaskHistory())
}),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO(3);
t.yG2(),
t.E7m("matTooltipPosition", e.isGroupTile ? "below" : "above")("isRoomTileMenu", !0)("isGroupTile", e.isGroupTile)("participant", e.participant)
}
}
function en(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 39)(1, "div", 40, 41)(3, "ss-button", 42),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.isPinned ? i.unpin() : i.pin())
}),
t.C$Y(),
t.yuY(4, $i, 2, 0, "div", 43)(5, ji, 1, 1),
t.I0R(6, "ss-button", 44),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.participant.favorited ? i.removeFavorite() : i.favoriteUser())
}),
t.C$Y(),
t.yuY(7, Hi, 1, 7, "ss-button", 45)(8, Ki, 1, 6, "ss-button", 46)(9, Ji, 1, 5, "ss-button", 47)(10, qi, 1, 3, "ss-button", 48)(11, Qi, 1, 1, "ng-template", 49),
t.qCj("backdropClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.taskHistoryOpened = !1)
}),
t.yuY(12, Xi, 1, 2, "ng-template", 49),
t.qCj("backdropClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.userBioPopupOpened = !1)
}),
t.yuY(13, Zi, 1, 3, "ss-button", 50)(14, tn, 2, 4, "div", 51),
t.C$Y()()
}
if (2 & o) {
const e = t.Gew(2)
, n = t.GaO(2);
t.yG2(3),
t.E7m("matTooltipPosition", n.isGroupTile ? "below" : "above")("matTooltip", n.isPinned ? "Unpin" : "Pin")("iconName", n.isPinned ? "pin_off" : "pin")("iconOnly", !0)("iconSize", 20)("isLoading", null !== n.livekit.room.pinningUserIds && n.livekit.room.pinningUserIds.includes(n.participant.identity))("disabled", null !== n.livekit.room.pinningUserIds && !n.livekit.room.pinningUserIds.includes(n.participant.identity)),
t.yG2(),
t.C0Y(4, n.livekit.room.encouragingUserId === n.participant.identity ? 4 : 5),
t.yG2(2),
t.E7m("matTooltipPosition", n.isGroupTile ? "below" : "above")("matTooltip", n.participant.favorited ? "Remove favorite" : "Favorite")("iconColor", n.participant.favorited ? "gold" : "contrast")("iconOnly", !0)("iconSize", 20)("isLoading", n.favoriteLoading)("disabled", n.favoriteLoading),
t.yG2(),
t.E7m("ngIf", n.isCurrentUser),
t.yG2(),
t.E7m("ngIf", !n.isCurrentUser && !n.settingsService.isB2BApp()),
t.yG2(),
t.E7m("ngIf", n.isCurrentUser && n.livekit.room.settings.selfViewVideoEnabled && !n.focusPlusActive),
t.yG2(),
t.E7m("ngIf", n.allowFullscreening),
t.yG2(),
t.E7m("cdkConnectedOverlayOrigin", e)("cdkConnectedOverlayOpen", n.taskHistoryOpened)("cdkConnectedOverlayHasBackdrop", !0)("cdkConnectedOverlayDisableClose", !0),
t.yG2(),
t.E7m("cdkConnectedOverlayOrigin", e)("cdkConnectedOverlayOpen", n.userBioPopupOpened)("cdkConnectedOverlayHasBackdrop", !0)("cdkConnectedOverlayDisableClose", !0),
t.yG2(),
t.E7m("ngIf", n.isTop40 && !n.isCurrentUser),
t.yG2(),
t.E7m("ngIf", !n.isMobile && !n.isCurrentUser && !n.isAnonymousUser)
}
}
function nn(o, r) {
if (1 & o && t.wR5(0, "ss-user-avatar", 66),
2 & o) {
const e = t.GaO(2);
t.E7m("size", 100)("avatarColor", e.participant.userInfo.avatarColor)("avatarThumbUrl", e.participant.userInfo.avatarThumbUrl)("showOnlineStatus", !1)("userId", e.participant.identity)("initials", e.participant.userInfo.initials)
}
}
function on(o, r) {
1 & o && t.wR5(0, "mat-spinner", 71)
}
function sn(o, r) {
if (1 & o && (t.I0R(0, "span", 72),
t.OEk(1),
t.C$Y()),
2 & o) {
const e = t.GaO(3);
t.yG2(),
t.cNF(null == e.participant.focusRoomGroup ? null : e.participant.focusRoomGroup.usersCount)
}
}
function rn(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 67),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.handleJoiningToPrivateGroup())
}),
t.yuY(1, on, 1, 0, "mat-spinner", 68)(2, sn, 2, 1, "span", 69),
t.wR5(3, "ss-icon", 70),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.E7m("matTooltip", e.setPrivateSpaceTooltip()),
t.yG2(),
t.E7m("ngIf", e.joining),
t.yG2(),
t.E7m("ngIf", !e.joining),
t.yG2(),
t.E7m("size", 16)
}
}
function an(o, r) {
if (1 & o && t.wR5(0, "ss-pin-feedback", 73),
2 & o) {
const e = t.GaO(2);
t.E7m("participant", e.participant)
}
}
function cn(o, r) {
if (1 & o && (t.I0R(0, "div"),
t.OEk(1),
t.C$Y()),
2 & o) {
const e = r.$implicit;
t.yG2(),
t.CAO(" ", e.key, ": ", e.value, " ")
}
}
function ln(o, r) {
if (1 & o && (t.SAx(0),
t.I0R(1, "div"),
t.OEk(2),
t.C$Y(),
t.I0R(3, "div"),
t.OEk(4),
t.C$Y(),
t.I0R(5, "div"),
t.OEk(6),
t.C$Y(),
t.k70()),
2 & o) {
const e = t.GaO(3);
let n, i;
t.yG2(2),
t.oRS("tileRenderedAt: ", e.statsForNerds.dateRendered.toLocaleString(e.timeWithSecondsRef), ""),
t.yG2(2),
t.CAO("subscribe req/res: ", null !== (n = e.statsForNerds.timeToSubscribeRequest) && void 0 !== n ? n : "N/A", "s - ", null !== (n = e.statsForNerds.timeToSubscribeResponse) && void 0 !== n ? n : "N/A", "s"),
t.yG2(2),
t.CAO("trackAttach req/res: ", null !== (i = e.statsForNerds.timeToTrackAttachRequest) && void 0 !== i ? i : "N/A", "s - ", null !== (i = e.statsForNerds.timeToTrackAttachResponse) && void 0 !== i ? i : "N/A", "s")
}
}
function dn(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 74)(1, "div", 75)(2, "ss-button-small", 76),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.logTracksToConsole())
}),
t.OEk(3, "Log tracks"),
t.C$Y(),
t.I0R(4, "ss-button-small", 76),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.logParticipantToConsole())
}),
t.OEk(5, "Log participant"),
t.C$Y()(),
t.yuY(6, cn, 2, 2, "div", 77),
t.wVc(7, "keyvalue"),
t.I0R(8, "div"),
t.OEk(9),
t.C$Y(),
t.yuY(10, ln, 7, 5, "ng-container", 78),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.yG2(6),
t.E7m("ngForOf", t.kDX(7, 3, e.getParticipantStatsForNerds())),
t.yG2(3),
t.oRS("participantSid: ", e.participant.sid, ""),
t.yG2(),
t.E7m("ngIf", e.statsForNerds.dateRendered)
}
}
function un(o, r) {
if (1 & o) {
const e = t.KQA();
t.yuY(0, Gi, 1, 2, "div", 0),
t.I0R(1, "div", 1),
t.yuY(2, Fi, 4, 3, "div", 2),
t.I0R(3, "div", 3),
t.yuY(4, Ai, 2, 2, "div", 4)(5, Li, 1, 2, "ss-icon", 5)(6, Yi, 1, 2, "ss-badge", 6),
t.C$Y()(),
t.I0R(7, "div", 7),
t.yuY(8, Vi, 4, 4, "div", 8)(9, Ni, 4, 2, "div", 9)(10, Bi, 2, 1, "div", 10)(11, Di, 4, 2, "div", 11),
t.C$Y(),
t.yuY(12, en, 15, 29, "div", 12)(13, nn, 1, 6, "ss-user-avatar", 13),
t.wR5(14, "ss-user-info-status", 14),
t.yuY(15, rn, 4, 4, "div", 15)(16, an, 1, 1, "ss-pin-feedback", 16),
t.I0R(17, "video", 17, 18),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.onVideoClicked())
}),
t.C$Y(),
t.I0R(19, "div", 19),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.onMobileOverlayClicked())
}),
t.C$Y(),
t.yuY(20, dn, 11, 5, "div", 20)
}
if (2 & o) {
const e = t.GaO();
t.E7m("ngIf", e.participant.userInfo.showNewUserMarker),
t.yG2(),
t.eAK("hover-active", e.showHoverTopMenu && !e.isVideoPill),
t.yG2(),
t.E7m("ngIf", !e.showHoverTopMenu || e.isVideoPill),
t.yG2(2),
t.E7m("ngIf", e.showHoverTopMenu && e.participant.userInfo.pinForPinEnabled),
t.yG2(),
t.E7m("ngIf", null == e.selectedTask ? null : e.selectedTask.text),
t.yG2(),
t.E7m("ngIf", e.participant.userInfo.userBadge),
t.yG2(2),
t.E7m("ngIf", e.isAdministrator),
t.yG2(),
t.E7m("ngIf", e.isModerator && e.participant.reportCount > 0),
t.yG2(),
t.E7m("ngIf", e.participant.reinstatedPin),
t.yG2(),
t.E7m("ngIf", e.participant.spotifyData && e.showHoverTopMenu && !e.isVideoPill),
t.yG2(),
t.E7m("ngIf", !e.isMobile),
t.yG2(),
t.E7m("ngIf", e.participant.userInfo && !e.isCameraOn),
t.yG2(),
t.E7m("participant", e.participant)("isMobile", e.isMobile),
t.yG2(),
t.E7m("ngIf", !e.isGroupTile && (null == e.participant.focusRoomGroup ? null : e.participant.focusRoomGroup.id)),
t.yG2(),
t.E7m("ngIf", !e.forceGridView && e.isPinned && !e.isCurrentUser && e.participant.shouldShowPinQuestion),
t.yG2(),
t.m4B("transform", e.transformValue),
t.eAK("ad-user", e.adUser && e.adUser.adUrl),
t.E7m("poster", e.isDarkTheme ? "/assets/images/poster-dark.jpg" : "/assets/images/poster-light.png", t.K6U),
t.yG2(3),
t.E7m("ngIf", e.statsForNerdsVisible)
}
}
let lt = ( () => {
class o {
onMouseEnter() {
this.showHoverTopMenu = !0
}
onMouseLeave() {
this.participantMenuOpened || (this.showHoverTopMenu = !1)
}
onDoubleClick(e) {
this.allowFullscreening && e.target === this.videoElement.nativeElement && this.showFullscreenTile(!0)
}
get id() {
return this.participant.identity
}
get tileWidth() {
return this.isViewModalTile ? null : this.livekit.room.tileDimensions.width
}
get tileHeight() {
return this.isViewModalTile ? null : this.livekit.room.tileDimensions.height
}
get isLocal() {
return this.participant.isLocal
}
get isVideoAd() {
return !this.participant.identity
}
get isHighlighted() {
return this.participant.highlighted
}
get isPinningMe() {
return this.livekit.room.pinnedByUserIds.some(e => e === this.participant.identity)
}
get isActiveTile() {
return this.participantMenuOpened || this.userBioPopupOpened || this.taskHistoryOpened
}
get isSpeaking() {
return this.livekit.room.speakingParticipants.some(e => e.identity === this.participant.identity)
}
get isCameraOff() {
return !this.isCameraOn
}
get hasStatus() {
return !(!this.participant.status || this.participant.isLocal && this.livekit.room.userActiveStatus?.clearedAt)
}
get zoomToFitDisabled() {
return !this.participant.zoomToFit && this.participant.isCameraEnabled
}
get isSmallTile() {
return !!this.livekit.room.tileDimensions.width && this.livekit.room.tileDimensions.width < 210
}
get allowFullscreening() {
return this.allowFullscreenView && !this.isAdTile && this.participant.isCameraEnabled
}
get showNewUserMarker() {
return this.participant.userInfo.showNewUserMarker
}
get isPinned() {
return this.livekit.room.isPinned(this.participant.identity)
}
get isCurrentUser() {
return this.accountService.currentUser.id === this.participant.identity
}
get isAnonymousUser() {
return this.livekit.room.localParticipant.anonymous
}
get localParticipant() {
return this.livekit.room.localParticipant
}
get focusPlusActive() {
return this.livekit.room.focusPlus.active
}
get adUser() {
return this.participant.userInfo.adUser
}
get isCameraOn() {
return this.participant.isCameraEnabled
}
get isTop40() {
return !1
}
get statsForNerdsVisible() {
return this.livekit.room.statsForNerdsVisible
}
get forceGridView() {
return this.livekit.room.forceGridView
}
get transformValue() {
if (!this.isCameraOn)
return "";
let e = null;
this.participant.zoomToFit && this.videoElement?.nativeElement?.videoHeight && (e = 16 / 9 / (this.videoElement.nativeElement.videoWidth / this.videoElement.nativeElement.videoHeight));
let i = null === e || 1 === e ? "" : `scale(${e})`;
return i += this.participant.isLocal && this.livekit.room.settings.mirrorMode ? " scaleX(-1)" : "",
i = i.trim(),
i
}
get isModerator() {
return !!this.livekit.room.localParticipant.userInfo?.isModerator
}
get isAdministrator() {
return this.accountService.isInRole(Y.Q5.Administrator)
}
get encouragements() {
return this.livekit.encouragements
}
get isDarkTheme() {
return this.theme === x.ru.Dark
}
get milestones() {
return this.livekit.room.milestones
}
get selectedTask() {
return this.participant.isLocal ? this.accountService.currentUser.selectedTask : this.participant.selectedTask
}
get showSpotifyNowPlaying() {
return this.participant.isLocal ? this.livekit.room.roomSettings?.enableSpotifyNowPlaying : this.participant.showSpotifyNowPlaying
}
get isAdTile() {
return !this.participant.identity
}
constructor(e, n, i, s, a, d, m, v, P, U, A, $, j, Q, ht, gt, ft) {
this.settingsService = e,
this.livekit = n,
this.elementRef = i,
this.accountModalsService = s,
this.accountService = a,
this.userService = d,
this.encouragementService = m,
this.analyticsService = v,
this.chatService = P,
this.utilityService = U,
this.userTaskService = A,
this.toastService = $,
this.livekitAdUserService = j,
this.badgeService = Q,
this.userFavoriteService = ht,
this.notificationService = gt,
this.dialog = ft,
this.isGroupTile = !1,
this.isVideoPill = !1,
this.allowFullscreenView = !1,
this.isViewModalTile = !1,
this.statsForNerds = {},
this.currentUser = this.accountService.currentUser,
this.userBioPopupOpened = !1,
this.showHoverTopMenu = !1,
this.taskHistoryOpened = !1,
this.joining = !1,
this.loadingTaskHistory = !1,
this.loadingHdFlagChange = !1,
this.favoriteLoading = !1,
this.tasksHistory = [],
this.timeWithSecondsRef = M.CS.TIME_WITH_SECONDS,
this.activeGroup = null,
this.OpenedFromSourceRef = x.Qf,
this.retryModel = {
delay: 500,
interval: 1e3,
maxAttempts: 10,
timesRetried: 1,
stopRetries: new wt.E
},
this.subscriptions = [],
this.participantMenuOpened = !1,
this.onTrackSubscribed = this.onTrackSubscribed.bind(this),
this.onTrackPublished = this.onTrackPublished.bind(this),
this.onLocalTrackPublished = this.onLocalTrackPublished.bind(this)
}
ngOnInit() {
this.participant.on(l.Cu.TrackSubscribed, this.onTrackSubscribed).on(l.Cu.TrackPublished, this.onTrackPublished).on(l.Cu.LocalTrackPublished, this.onLocalTrackPublished)
}
ngAfterViewInit() {
if (this.statsForNerds.dateRendered = M.CS.now(),
this.participant.isLocal ? this.tryBindingActivePublication() : (this.setVideoTracksSubscribedState(!0),
(0,
w.k)(this.retryModel.delay, this.retryModel.interval).pipe((0,
St.a)(this.retryModel.stopRetries)).subscribe( () => this.retrySubscribingAndBinding())),
this.subscriptions.push(this.livekit.room.activeGroup.subscribe(e => this.activeGroup = e), this.livekit.participantHighlight.hide.subscribe( () => this.participant.highlighted = !1)),
this.isAdTile) {
const e = new CustomEvent("ssAdTileCreated",{
detail: {
payload: this.elementRef.nativeElement
}
});
window.dispatchEvent(e)
}
}
ngOnDestroy() {
if (this.retryModel.stopRetries.next(),
this.isGroupTile ? this.setAudioTracksSubscribedState(!1) : !this.livekit.room.activeGroupParticipants.some(s => s.identity === this.participant.identity) && !this.livekit.room.activePredefinedGroupParticipants.some(s => s.participant && s.participant.identity === this.participant.identity) && this.utilityService.groupInviteParticipantActive?.identity !== this.participant.identity && this.livekit.room.currentlyFullscreenedParticipant !== this.participant && this.setVideoTracksSubscribedState(!1),
this.participant.off(l.Cu.TrackSubscribed, this.onTrackSubscribed).off(l.Cu.TrackPublished, this.onTrackPublished).off(l.Cu.LocalTrackPublished, this.onLocalTrackPublished),
this.subscriptions.forEach(e => e.unsubscribe()),
this.isAdTile) {
const e = new CustomEvent("ssAdTileDestroyed",{
detail: {
payload: this.elementRef.nativeElement
}
});
window.dispatchEvent(e)
}
}
showFullscreenTile(e=!1) {
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.analyticsService.markActivity(u.kP.LivekitEnlargeVideoTile, {
isDoubleClick: e
}),
this.dialog.open(Yt, {
panelClass: "preview-modal",
width: "calc(100% - 40px)",
maxWidth: "100vw",
maxHeight: "calc(100vh - 20px)",
data: this.participant
}))
}
onParticipantMenuOpened(e) {
this.participantMenuOpened = e,
this.participantMenuOpened || (this.showHoverTopMenu = !1)
}
onOpenUserBio() {
this.participantMenuOpened = !1,
this.userBioPopupOpened = !0
}
encourageUser(e) {
var n = this;
if (!this.accountModalsService.ensureUserCompletedBasicInfo() || this.livekit.room.checkEncouragementsDisabled(this.participant))
return;
const i = {
encouragementTypeId: e.id
};
var s;
this.livekit.room.encouragingUserId = this.participant.identity,
this.encouragementService.postEncouragement(this.participant.identity, i).subscribe({
next: (s = (0,
S.c)(function*(a) {
n.livekit.room.milestones.encouragedSomeone || n.subscriptions.push((0,
w.k)(2e3).subscribe( () => n.badgeService.checkForNewBadges.next())),
n.livekit.room.encouragingUserId = null,
n.livekit.room.milestones.encouragedSomeone = !0,
a.receiverWasInFocusMode ? yield n.notificationService.info({
message: "This user is currently in Focus+ or Lite mode. They'll see your encouragement later on."
}) : null !== a.encouragementsPerDayLeft ? yield n.notificationService.info({
message: `Encouragement sent. You have ${a.encouragementsPerDayLeft} encouragements left for today.`
}) : yield n.notificationService.info({
message: "Encouragement sent."
})
}),
function(d) {
return s.apply(this, arguments)
}
),
error: s => {
"EncouragementTimeLimit" === s[0].errorCode ? this.toastService.info({
title: "Please wait",
exceptionDetail: s[0]
}) : "MaxEncouragementsPerDayReached" === s[0].errorCode ? this.toastService.info({
title: "Maximum encouragements reached",
exceptionDetail: s[0],
paidFeatureText: "Upgrade to encourage more",
triggeredUpgradeFromSource: F.AD.MaxEncouragementsReached,
autoClose: !1
}) : "MaxEncouragementsPerDayReachedPremium" === s[0].errorCode ? this.toastService.info({
title: "Maximum encouragements reached",
exceptionDetail: s[0]
}) : this.handleErrors(s),
this.livekit.room.encouragingUserId = null
}
})
}
getParticipantStatsForNerds() {
const e = this.participant.getTrackPublications().filter(s => s.kind === l.oh.Kind.Video);
if (0 === e.length)
return {};
const n = e[0];
if (!this.videoElement)
return {};
const i = this.videoElement.nativeElement;
return {
videoDimensions: `${i.videoHeight}p (${i.videoWidth}x${i.videoHeight})`,
videoQuality: this.videoQualityToJSON(n.videoQuality),
subscriptionStatus: n.subscriptionStatus,
pubDimensions: n.dimensions ? `${n.dimensions.height}p (${n.dimensions.width}x${n.dimensions.height})` : "",
bitrate: `${(n.track?.currentBitrate ?? 0).toFixed(2)} bps`
}
}
showUserReports() {
this.dialog.open(Se.M, {
width: "600px",
data: this.participant.identity
})
}
toggleHdFlag() {
if (this.loadingHdFlagChange)
return;
const e = !this.participant.hd;
this.loadingHdFlagChange = !0,
this.userService.updateUserHdFlag(this.participant.identity, e).subscribe({
next: n => {
this.loadingHdFlagChange = !1,
n && (this.participant.hd = e)
}
,
error: n => this.handleErrors(n)
})
}
logTracksToConsole() {
console.log("[LoggedTrack]"),
console.log(this.participant.getTrackPublications())
}
logParticipantToConsole() {
console.log("[LoggedParticipant]"),
console.log(this.participant)
}
handleUnauthenticatedActionAttempt() {
this.accountModalsService.ensureUserCompletedBasicInfo()
}
pin() {
this.livekit.room.pin({
participant: this.participant
})
}
unpin() {
this.livekit.room.unpin({
pinnedUserId: this.participant.identity
})
}
messageUser() {
if (!this.accountModalsService.ensureUserCompletedBasicInfo() || this.focusPlusActive)
return;
const e = {
otherUserIds: [this.participant.identity]
};
this.chatService.checkIfChatExists(e.otherUserIds[0]).subscribe({
next: () => {
this.chatService.startChat(e).subscribe({
next: n => this.navigateToChat(n.id),
error: n => {
n.length && "ChatAlreadyExists" === n[0].errorCode ? this.navigateToChat(n[0].params.chatId) : this.handleErrors(n)
}
})
}
,
error: n => {
n.length && "ChatDoesNotExist" === n[0].errorCode ? this.isMobile ? window.open(`${T.O.appUrl}/conversations/chats/create?userId=${e.otherUserIds[0]}`, "_blank") : this.utilityService.requestChatNavigation.next(e.otherUserIds[0]) : this.handleErrors(n)
}
})
}
onMobileOverlayClicked() {
this.isMobile && (!this.adUser || !this.adUser.adUrl) && this.livekit.participantInfoMobile.next(this.participant)
}
onVideoClicked() {
this.adUser && this.adUser.adUrl && (window.open(this.adUser.adUrl, "_blank"),
this.livekitAdUserService.storeUrlClick(this.livekit.room.name, this.participant.identity).subscribe(),
this.analyticsService.markActivity(u.kP.LivekitAdUserLinkClick, {
userId: this.participant.identity,
adUrl: this.adUser.adUrl
}))
}
sendAGift(e) {
const n = {
userId: this.participant.identity
};
this.analyticsService.markActivity(u.kP.LivekitGiftACoffeeModalOpened, n),
this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Gift a coffee",
description: "GiveACoffeeGift",
descriptionParams: {
participantName: e,
giftValue: this.settingsService.settings.giftStripeValue
},
confirmButtonLabel: "Payment link"
}
}).afterClosed().subscribe(s => {
s && (this.analyticsService.markActivity(u.kP.LivekitGiftACoffeeButtonClick, n),
window.open(`${this.settingsService.settings.giftStripeUrl}?prefilled_email=${this.currentUser.email}`, "_blank"))
}
)
}
inviteUser() {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.livekit.inviteUser(this.participant)
}
setPrivateSpaceTooltip() {
if (!this.participant.focusRoomGroup)
return "";
const e = this.participant.focusRoomGroup.usersCount > 1 ? ` There are ${this.participant.focusRoomGroup.usersCount} people focusing together.` : "";
return `Click to join ${this.participant.userInfo.displayName?.trim()}'s space.${e}`
}
handleJoiningToPrivateGroup() {
this.accountModalsService.ensureUserCompletedBasicInfo() && !this.joining && (this.activeGroup?.createdByUserId !== this.participant.identity ? (this.joining = !0,
this.activeGroup ? this.leaveActiveAndJoinNewPrivateGroup() : this.joinPrivateGroup()) : this.livekit.room.privateGroupMinimized = !1)
}
showTaskHistory() {
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.loadingTaskHistory = !0,
this.userTaskService.getHistory(this.participant.identity, null).subscribe({
next: e => {
this.tasksHistory = e,
this.loadingTaskHistory = !1,
this.taskHistoryOpened = !0
}
,
error: e => this.handleErrors(e)
}))
}
openSpotifyUrl(e) {
e && window.open(e)
}
favoriteUser() {
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.favoriteLoading = !0,
this.userFavoriteService.addUserToFavorites(this.participant.identity).subscribe({
next: () => this.favoriteLoading = !1,
error: e => this.handleErrors(e)
}))
}
removeFavorite() {
this.favoriteLoading = !0,
this.userFavoriteService.removeUserFromFavorites(this.participant.identity).subscribe({
next: () => this.favoriteLoading = !1,
error: e => this.handleErrors(e)
})
}
leaveActiveAndJoinNewPrivateGroup() {
this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Are you sure?",
description: this.activeGroup?.createdByUserId === this.accountService.currentUser.id ? "LeaveMyPrivatePod" : "LeavePrivatePod",
confirmButtonLabel: "Leave & Join"
}
}).afterClosed().subscribe(i => {
i ? this.livekit.leaveActiveGroups(this.livekit.room.name, !0).subscribe({
next: () => this.joinPrivateGroup(),
error: s => this.handleErrors(s)
}) : this.joining = !1
}
)
}
joinPrivateGroup() {
if (!this.participant.focusRoomGroup)
return this.toastService.info({
message: "The owner has ended this space."
}),
void (this.joining = !1);
this.analyticsService.markActivity(u.kP.JoinVideoTilePodAttempted),
this.livekit.joinPrivateGroup(this.livekit.room.name, this.participant.focusRoomGroup.id).subscribe({
next: () => {
this.livekit.room.privateGroupMinimized = !1,
this.joining = !1
}
,
error: e => {
"LivekitRoomMaxSamePeerSessionsReached" !== e[0].errorCode ? this.handleErrors(e) : this.toastService.info({
exceptionDetail: e[0]
})
}
})
}
navigateToChat(e) {
this.isMobile ? window.open(`${T.O.appUrl}/conversations/chats/${e}`, "_blank") : this.utilityService.openDmTrayChat.next(e)
}
retrySubscribingAndBinding() {
(!this.participant.isCameraEnabled || this.retryModel.timesRetried === this.retryModel.maxAttempts) && this.retryModel.stopRetries.next(),
this.setVideoTracksSubscribedState(!0),
this.tryBindingActivePublication(),
this.retryModel.timesRetried++
}
setVideoTracksSubscribedState(e) {
this.participant.videoTrackPublications.forEach(n => {
n instanceof l.Sw && (n.setSubscribed(e),
this.statsForNerds.timeToSubscribeRequest = this.getSecondsSinceRenderTime())
}
)
}
setAudioTracksSubscribedState(e) {
this.livekit.room.privateGroupMinimized || this.participant.audioTrackPublications.forEach(n => {
n instanceof l.Sw && n.setSubscribed(e)
}
)
}
onTrackSubscribed(e, n) {
e.kind === l.oh.Kind.Video && (this.statsForNerds.timeToSubscribeResponse = this.getSecondsSinceRenderTime(),
this.tryToAttachVideoElement(n))
}
onTrackPublished(e) {
e.isSubscribed || this.setVideoTracksSubscribedState(!0)
}
onLocalTrackPublished(e) {
!e.track || e.track.kind !== l.oh.Kind.Video || this.tryToAttachVideoElement(e)
}
tryBindingActivePublication() {
const e = this.participant.getTrackPublications().find(n => n.kind === l.oh.Kind.Video && n.isSubscribed);
e && this.tryToAttachVideoElement(e)
}
tryToAttachVideoElement(e) {
const n = e.track;
if (!n)
return;
const i = this.videoElement.nativeElement;
n.attachedElements.includes(i) || (this.statsForNerds.timeToTrackAttachRequest = this.getSecondsSinceRenderTime(),
n.attach(i),
this.statsForNerds.timeToTrackAttachResponse = this.getSecondsSinceRenderTime(),
this.retryModel.stopRetries.next())
}
getSecondsSinceRenderTime() {
return this.statsForNerds.dateRendered ? +(M.CS.now().diff(this.statsForNerds.dateRendered, "seconds").seconds ?? 0).toFixed(3) : 0
}
videoQualityToJSON(e) {
switch (e) {
case l.gj.LOW:
return "LOW";
case l.gj.MEDIUM:
return "MEDIUM";
case l.gj.HIGH:
return "HIGH";
default:
return "UNRECOGNIZED"
}
}
handleErrors(e) {
if (this.joining = !1,
this.loadingHdFlagChange = !1,
this.favoriteLoading = !1,
"MaxFavoriteUsersCountReached" !== e[0].errorCode)
return "LivekitRoomSessionGroupEnded" === e[0].errorCode ? (this.participant.focusRoomGroup = null,
void this.toastService.info({
autoClose: !1,
exceptionDetail: {
errorCode: "LivekitRoomSessionGroupEndedUserAction"
}
})) : "ErrorShowSelectedTaskHistoryPrivacy" === e[0].errorCode ? (this.loadingTaskHistory = !1,
void this.toastService.info({
exceptionDetail: e[0]
})) : void ("ErrorChattingAgeRestriction" !== e[0].errorCode ? this.toastService.error({
exceptionDetail: e[0]
}) : this.toastService.info({
exceptionDetail: e[0]
}));
this.toastService.info({
title: "Maximum favorites reached",
exceptionDetail: e[0],
paidFeatureText: "Upgrade to add more",
triggeredUpgradeFromSource: F.AD.MaxFavoriteUsersReached,
autoClose: !1
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(L.Y),t.GI1(g.A),t.GI1(t.GMv),t.GI1(V.E),t.GI1(y.uE),t.GI1(Mt.o),t.GI1(vt.a),t.GI1(u.uc),t.GI1(Ct.e),t.GI1(I.UZ),t.GI1(xe.W),t.GI1(k.s),t.GI1(Ie.W),t.GI1(Z.A),t.GI1(xt.C),t.GI1(It.g),t.GI1(p.qW))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-tile"]],
viewQuery: function(n, i) {
if (1 & n && t.CC$(Ti, 5),
2 & n) {
let s;
t.wto(s = t.Gqi()) && (i.videoElement = s.first)
}
},
hostVars: 25,
hostBindings: function(n, i) {
1 & n && t.qCj("mouseenter", function() {
return i.onMouseEnter()
})("mouseleave", function() {
return i.onMouseLeave()
})("dblclick", function(a) {
return i.onDoubleClick(a)
}),
2 & n && (t.e48("data-id", i.id),
t.m4B("width", i.tileWidth, "px")("height", i.tileHeight, "px"),
t.eAK("is-local", i.isLocal)("is-video-ad", i.isVideoAd)("highlighted", i.isHighlighted)("pinning-me", i.isPinningMe)("active", i.isActiveTile)("is-speaking", i.isSpeaking)("camera-off", i.isCameraOff)("has-status", i.hasStatus)("zoom-to-fit-disabled", i.zoomToFitDisabled)("small-tile", i.isSmallTile))
},
inputs: {
participant: "participant",
theme: "theme",
isMobile: "isMobile",
isGroupTile: "isGroupTile",
isVideoPill: "isVideoPill",
allowFullscreenView: "allowFullscreenView",
isViewModalTile: "isViewModalTile"
},
decls: 1,
vars: 1,
consts: [["class", "new-user-border", 3, "ad-user", "click", 4, "ngIf"], [1, "top-line"], ["class", "left-part", 4, "ngIf"], [1, "right-part"], ["matTooltip", "User has pin-for-pin enabled", "class", "pin-for-pin", 3, "selected-task", 4, "ngIf"], ["class", "header-selected-task", "iconName", "target", "color", "accent-blue", "matTooltipPosition", "above", 3, "size", "matTooltip", 4, "ngIf"], ["class", "header-badge", 3, "size", "badge", 4, "ngIf"], [1, "second-line"], ["class", "hd-toggle", 3, "active", "matTooltip", "click", 4, "ngIf"], ["class", "reports-count", 3, "click", 4, "ngIf"], ["class", "recently-restored-pin", "matTooltip", "Automatically re-instated pin: this user might have recently refreshed or lost their pins. You can unpin them manually if you wish.", 4, "ngIf"], ["class", "spotify-playing", 3, "matTooltip", 4, "ngIf"], ["class", "hover-top-menu", 4, "ngIf"], ["class", "avatar-placeholder", "status", "online", 3, "size", "avatarColor", "avatarThumbUrl", "showOnlineStatus", "userId", "initials", 4, "ngIf"], [3, "participant", "isMobile"], ["class", "private-space-indicator", 3, "matTooltip", "click", 4, "ngIf"], [3, "participant", 4, "ngIf"], ["autoplay", "", "playsInline", "", 3, "poster", "click"], ["videoElement", ""], [1, "transparent-mobile-overlay", 3, "click"], ["class", "stats-for-nerds", 4, "ngIf"], [1, "new-user-border", 3, "click"], [1, "left-part"], ["class", "boost", 3, "premium", 4, "ngIf"], ["class", "pined-count", "matTooltip", "The number of others that have pinned this user", 4, "ngIf"], [1, "boost"], ["matTooltip", "The number of others that have pinned this user", 1, "pined-count"], ["iconName", "pin", "color", "light-widget-active", 3, "size"], [1, "spotify-playing", 3, "matTooltip"], ["draggable", "false", "src", "/assets/icons/socials/spotify.svg", "alt", "spotify icon", 3, "click"], ["matTooltip", "User has pin-for-pin enabled", 1, "pin-for-pin"], ["iconName", "target", "color", "accent-blue", "matTooltipPosition", "above", 1, "header-selected-task", 3, "size", "matTooltip"], [1, "header-badge", 3, "size", "badge"], [1, "hd-toggle", 3, "matTooltip", "click"], ["iconName", "glasses", "color", "light-widget-active", 3, "size"], [1, "reports-count", 3, "click"], ["iconName", "warning", "color", "light-widget-active", 3, "size"], ["matTooltip", "Automatically re-instated pin: this user might have recently refreshed or lost their pins. You can unpin them manually if you wish.", 1, "recently-restored-pin"], ["iconName", "info", "color", "light-widget-active", 3, "size"], [1, "hover-top-menu"], ["cdkOverlayOrigin", "", 1, "actions-wrapper"], ["actionWrapperTrigger", "cdkOverlayOrigin"], ["color", "website-transparent", 1, "pin-button", 3, "matTooltipPosition", "matTooltip", "iconName", "iconOnly", "iconSize", "isLoading", "disabled", "buttonClick"], ["class", "spinner-wrapper"], ["color", "website-transparent", "iconName", "star", 1, "favorite-user", 3, "matTooltipPosition", "matTooltip", "iconColor", "iconOnly", "iconSize", "isLoading", "disabled", "buttonClick"], ["matTooltip", "View history of focused tasks", "color", "website-transparent", "iconName", "tasks_app", 3, "active", "matTooltipPosition", "iconOnly", "iconSize", "isLoading", "disabled", "buttonClick", 4, "ngIf"], ["color", "website-transparent", "iconName", "chat", 3, "matTooltipPosition", "matTooltip", "iconOnly", "iconSize", "disabled", "buttonClick", 4, "ngIf"], ["color", "website-transparent", 3, "matTooltipPosition", "matTooltip", "iconName", "iconOnly", "iconSize", "buttonClick", 4, "ngIf"], ["matTooltip", "Enlarge tile (you can also double-click on video)", "color", "website-transparent", "iconName", "full_screen_maximize", 3, "matTooltipPosition", "iconOnly", "iconSize", "buttonClick", 4, "ngIf"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "transparent", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayDisableClose", "backdropClick"], ["matTooltip", "Gift a coffee", "color", "website-transparent", "iconName", "drink_coffee", 3, "matTooltipPosition", "iconOnly", "iconSize", "buttonClick", 4, "ngIf"], ["class", "menu-wrapper", 4, "ngIf"], [1, "spinner-wrapper"], ["diameter", "20", "strokeWidth", "3"], ["height", "20", "matTooltip", "Encourage", "class", "thumbs-up", "alt", "thumbs-up", 3, "matTooltipPosition", "src", "click", 4, "ngIf"], ["height", "20", "matTooltip", "Encourage", "alt", "thumbs-up", 1, "thumbs-up", 3, "matTooltipPosition", "src", "click"], ["matTooltip", "View history of focused tasks", "color", "website-transparent", "iconName", "tasks_app", 3, "matTooltipPosition", "iconOnly", "iconSize", "isLoading", "disabled", "buttonClick"], ["color", "website-transparent", "iconName", "chat", 3, "matTooltipPosition", "matTooltip", "iconOnly", "iconSize", "buttonClick"], ["color", "website-transparent", 3, "matTooltipPosition", "matTooltip", "iconName", "iconOnly", "iconSize", "buttonClick"], ["matTooltip", "Enlarge tile (you can also double-click on video)", "color", "website-transparent", "iconName", "full_screen_maximize", 3, "matTooltipPosition", "iconOnly", "iconSize", "buttonClick"], [3, "userInfo", "initialTaskHistoryLoad", "closePopup", 4, "ngIf"], [3, "userInfo", "initialTaskHistoryLoad", "closePopup"], ["cssClass", "margin-horizontal", 3, "userId", "openedFromSource", "focusRoomUnauthenticatedActionAttempt", "closePopup"], ["matTooltip", "Gift a coffee", "color", "website-transparent", "iconName", "drink_coffee", 3, "matTooltipPosition", "iconOnly", "iconSize", "buttonClick"], [1, "menu-wrapper"], ["matTooltip", "More options", 3, "matTooltipPosition", "isRoomTileMenu", "isGroupTile", "participant", "participantMenuOpened", "openUserBio", "openTaskHistory"], ["status", "online", 1, "avatar-placeholder", 3, "size", "avatarColor", "avatarThumbUrl", "showOnlineStatus", "userId", "initials"], [1, "private-space-indicator", 3, "matTooltip", "click"], ["diameter", "16", "strokeWidth", "2", 4, "ngIf"], ["class", "interactable-bold", 4, "ngIf"], ["iconName", "grid", "color", "contrast", 3, "size"], ["diameter", "16", "strokeWidth", "2"], [1, "interactable-bold"], [3, "participant"], [1, "stats-for-nerds"], [1, "button-wrapper"], [3, "buttonClick"], [4, "ngFor", "ngForOf"], [4, "ngIf"]],
template: function(n, i) {
1 & n && t.yuY(0, un, 21, 23),
2 & n && t.C0Y(0, i.participant.identity ? 0 : -1)
},
dependencies: [h.ay, h.u_, Te.c, O.k, C.g, K.A, rt.w, N.S, at.I, G.eC, G.wW, R.a4, z.cm, $t, Ci, Ii, h.uq],
styles: ["[_nghost-%COMP%]{position:relative;display:flex;justify-content:center;overflow:hidden;border-radius:12px;background:var(--grayscale)}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{z-index:initial;border-radius:0;box-shadow:none}.active[_nghost-%COMP%], [_nghost-%COMP%]:hover{z-index:initial;box-shadow:none}}.active[_nghost-%COMP%], [_nghost-%COMP%]:hover{z-index:1}.active[_nghost-%COMP%] .hover-top-menu[_ngcontent-%COMP%], [_nghost-%COMP%]:hover .hover-top-menu[_ngcontent-%COMP%]{opacity:1}[_nghost-%COMP%]:hover .hd-toggle[_ngcontent-%COMP%]{display:flex}.has-status[_nghost-%COMP%] {container-type:inline-size}.has-status[_nghost-%COMP%] .user-info{display:none}@container (max-width: 165px){.has-status[_nghost-%COMP%] .status{-webkit-line-clamp:2}}.video-pill[_nghost-%COMP%]{width:310px;aspect-ratio:16/9}@media only screen and (max-width: 1024px){.video-pill[_nghost-%COMP%]{width:100%}}.video-pill.active[_nghost-%COMP%], .video-pill[_nghost-%COMP%]:hover{box-shadow:none}.camera-off[_nghost-%COMP%]{box-sizing:border-box}.camera-off[_nghost-%COMP%] video[_ngcontent-%COMP%]{display:none}.highlighted[_nghost-%COMP%]{position:relative;z-index:1001;border-color:var(--contrast);background:var(--grayscale)}.zoom-to-fit-disabled[_nghost-%COMP%]{background:var(--video-poster-background)}.is-speaking[_nghost-%COMP%]{border-color:var(--positive)}.small-tile[_nghost-%COMP%] .hover-top-menu[_ngcontent-%COMP%] .actions-wrapper[_ngcontent-%COMP%]{margin-left:6px}.small-tile[_nghost-%COMP%] .hover-top-menu[_ngcontent-%COMP%] .actions-wrapper[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%] {width:18px;height:18px;margin-right:6px}.small-tile[_nghost-%COMP%] .hover-top-menu[_ngcontent-%COMP%] .actions-wrapper[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%] ss-icon{font-size:18px!important}.small-tile[_nghost-%COMP%] .hover-top-menu[_ngcontent-%COMP%] .actions-wrapper[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{font-size:18px!important}.pinning-me[_nghost-%COMP%]{outline:2px solid var(--accent-blue)}[_nghost-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:12px}@media only screen and (max-width: 1024px){[_nghost-%COMP%] video[_ngcontent-%COMP%]{border-radius:0}[_nghost-%COMP%] video[_ngcontent-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%}}[_nghost-%COMP%] .transparent-mobile-overlay[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 1024px){[_nghost-%COMP%] .transparent-mobile-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;display:block;width:100%;height:100%}}[_nghost-%COMP%] ss-participant-menu[_ngcontent-%COMP%]{margin-right:14px}.animated[_nghost-%COMP%]{animation:shakeX;animation-duration:1s;animation-delay:.5s}.new-user-border[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;border:2px solid var(--positive-d1);border-radius:12px}@media only screen and (max-width: 1024px){.new-user-border[_ngcontent-%COMP%]{border-radius:0}}.top-line[_ngcontent-%COMP%]{position:absolute;top:4px;z-index:3;display:flex;justify-content:space-between;align-items:center;width:100%;height:25px;padding:0 8px 0 6px}.top-line.hover-active[_ngcontent-%COMP%]{right:0;width:auto}.left-part[_ngcontent-%COMP%]{display:flex;align-items:center;max-width:calc(100% - 46px)}.spotify-playing[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;padding:2px 6px;border-radius:8px;color:var(--contrast);text-overflow:ellipsis;white-space:nowrap;background:var(--video-overlay);font-size:12px;line-height:16px}.spotify-playing[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:21px;height:21px;margin-right:4px;cursor:pointer}.spotify-playing[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.right-part[_ngcontent-%COMP%]{display:flex;align-items:center}.right-part[_ngcontent-%COMP%] .pin-for-pin[_ngcontent-%COMP%]{margin-right:4px;font-size:12px;color:var(--contrast)}.right-part[_ngcontent-%COMP%] .pin-for-pin.selected-task[_ngcontent-%COMP%]{right:56px}.right-part[_ngcontent-%COMP%] .header-selected-task[_ngcontent-%COMP%]{margin-right:4px}.hover-top-menu[_ngcontent-%COMP%]{position:absolute;z-index:2;display:flex;width:100%;height:32px;background:var(--light-default);opacity:0}.actions-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:14px}.actions-wrapper[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%]{margin-right:10px}.actions-wrapper[_ngcontent-%COMP%] ss-button.active[_ngcontent-%COMP%] ss-icon i{color:var(--accent-blue-20)}.actions-wrapper[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%] button{width:20px;height:20px}.actions-wrapper[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%] button:hover ss-icon i{color:var(--accent-blue-20)}.actions-wrapper[_ngcontent-%COMP%] .fb-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:10px;background:var(--accent-blurple-20) url(/assets/icons/fb-icon.svg) center no-repeat;cursor:pointer}.actions-wrapper[_ngcontent-%COMP%] .fb-icon.active[_ngcontent-%COMP%], .actions-wrapper[_ngcontent-%COMP%] .fb-icon[_ngcontent-%COMP%]:hover{background:var(--accent-blurple-40) url(/assets/icons/fb-icon.svg) center no-repeat}.boost[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:19px;height:20px;margin-right:4px;border-radius:8px;background:url(/assets/icons/boost-tile.svg) center no-repeat var(--video-overlay);background-size:16px}@media only screen and (max-width: 1024px){.boost[_ngcontent-%COMP%]{background-size:14px}}.boost.premium[_ngcontent-%COMP%]{width:24px;height:24px;background:url(/assets/icons/premium-boost-tile.svg) center no-repeat var(--video-overlay);background-size:16px}.spinner-wrapper[_ngcontent-%COMP%]{width:20px;margin-right:10px}.pined-count[_ngcontent-%COMP%], .hd-toggle[_ngcontent-%COMP%], .reports-count[_ngcontent-%COMP%], .recently-restored-pin[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;max-width:100px;height:16px;padding:0 6px 0 4px;border-radius:8px;background:var(--video-overlay)}.pined-count[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%], .hd-toggle[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%], .reports-count[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%], .recently-restored-pin[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{margin-right:4px}.pined-count[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .hd-toggle[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .reports-count[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .recently-restored-pin[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--contrast)}.pined-count[_ngcontent-%COMP%]{margin-right:4px}.hd-toggle[_ngcontent-%COMP%]{display:none}.hd-toggle.active[_ngcontent-%COMP%]{display:flex;background:var(--accent-blurple-20)}.second-line[_ngcontent-%COMP%]{position:absolute;top:40px;left:0;z-index:3;display:flex;align-items:center;height:25px;padding:0 6px}.second-line[_ngcontent-%COMP%] .hd-toggle[_ngcontent-%COMP%], .second-line[_ngcontent-%COMP%] .reports-count[_ngcontent-%COMP%]{margin-right:4px;cursor:pointer}.second-line[_ngcontent-%COMP%] .hd-toggle[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .second-line[_ngcontent-%COMP%] .reports-count[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{position:relative;top:1px}.recently-restored-pin[_ngcontent-%COMP%]{margin-right:4px}.recently-restored-pin[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{padding:0;margin-right:0}.menu-wrapper[_ngcontent-%COMP%]{position:relative;top:3px}.thumbs-up[_ngcontent-%COMP%]{margin-right:10px;cursor:pointer}.thumbs-up[_ngcontent-%COMP%]:hover{opacity:.7}.avatar-placeholder[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;z-index:1;transform:translate(-50%,-50%)}.status-name-wrapper[_ngcontent-%COMP%]{position:relative;bottom:-19px;display:flex;align-items:center;height:0;opacity:0;transition:bottom .3s ease-out,height .3s ease-out,opacity .15s ease-out}.status-name-wrapper[_ngcontent-%COMP%] ss-user-avatar[_ngcontent-%COMP%]{position:absolute;top:-10px;left:4px}.status-name-wrapper[_ngcontent-%COMP%] .display-name[_ngcontent-%COMP%]{position:relative;bottom:1px;display:-webkit-box;overflow:hidden;padding-right:3px;margin-left:36px;color:var(--contrast);text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}.stats-for-nerds[_ngcontent-%COMP%]{position:absolute;z-index:3;width:100%;height:100%;padding:12px;font-size:12px;line-height:12px;color:var(--grayscale);background:rgba(var(--helper-dark),.7)}.stats-for-nerds[_ngcontent-%COMP%] .button-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:4px}.stats-for-nerds[_ngcontent-%COMP%] ss-button-small[_ngcontent-%COMP%]{margin-right:2px}.stats-for-nerds[_ngcontent-%COMP%] ss-button-small[_ngcontent-%COMP%]:last-of-type{margin-right:0}.private-space-indicator[_ngcontent-%COMP%]{position:absolute;top:50%;right:0;z-index:1;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:22px 8px;border-top-left-radius:30px;border-bottom-left-radius:30px;color:var(--contrast);background:var(--private-space-indicator);cursor:pointer;transform:translateY(-50%)}.private-space-indicator[_ngcontent-%COMP%]:hover{opacity:.85}.private-space-indicator[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-bottom:4px}.ad-user[_ngcontent-%COMP%]{cursor:pointer}"]
})
}
return o
}
)();
var W = c(1236)
, pn = c(2115)
, mn = c(4704);
let hn = ( () => {
class o {
constructor(e, n) {
this.livekit = e,
this.accountService = n
}
canDeactivate(e, n, i) {
return !e.token || !!confirm("Are you sure you want to leave this room?") && (this.accountService.isFullyVerifiedUser() && this.livekit.room.storeLivekitSettings(),
(0,
pn.Q)(this.livekit.unpinAllAndLowerHandAndKeepAlive(this.livekit.room.name)).pipe((0,
mn.k)(s => !0)))
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.CoB(g.A),t.CoB(y.uE))
}
;
static #e = this.\u0275prov = t.wxM({
token: o,
factory: o.\u0275fac,
providedIn: "root"
})
}
return o
}
)();
var Ht = c(6684)
, gn = c(2496)
, bt = c(2572)
, Tt = c(2800)
, kt = c(1652)
, fn = c(4860)
, _n = c(3992)
, Kt = c(3716)
, Jt = c(1980)
, qt = c(7980)
, vn = c(9852)
, Cn = c(248);
const bn = ["tilesWrapper"];
function kn(o, r) {
if (1 & o && t.wR5(0, "ss-focus-room-tile", 3),
2 & o) {
const e = r.$implicit
, n = t.GaO();
t.E7m("participant", e)("isMobile", n.isMobile)("theme", n.theme)("allowFullscreenView", !0)
}
}
let Wt = ( () => {
class o {
constructor(e, n, i, s) {
this.livekit = e,
this.elementRef = n,
this.sidebarService = i,
this.utilityService = s,
this.participants = [],
this.isMobile = !1,
this.tileGridResizeObserver = new ResizeObserver(a => {
requestAnimationFrame( () => {
this.isMobile && (this.setMobileWrapperStyleAndTileDimensions(),
this.onGridElementResized(a[0].target)),
this.setWrapperDimensions()
}
)
}
),
this.subscriptions = [],
this.allowedAspectRatios = [[{
rows: 1,
columns: 1
}, {
rows: 1,
columns: 2
}, {
rows: 1,
columns: 3
}, {
rows: 1,
columns: 4
}, {
rows: 1,
columns: 5
}], [{
rows: 2,
columns: 1
}, {
rows: 2,
columns: 2
}, {
rows: 2,
columns: 3
}, {
rows: 2,
columns: 4
}, {
rows: 2,
columns: 5
}], [{
rows: 3,
columns: 1
}, {
rows: 3,
columns: 2
}, {
rows: 3,
columns: 3
}, {
rows: 3,
columns: 4
}, {
rows: 3,
columns: 5
}], [{
rows: 4,
columns: 1
}, {
rows: 4,
columns: 2
}, {
rows: 4,
columns: 3
}, {
rows: 4,
columns: 4
}, {
rows: 4,
columns: 5
}], [{
rows: 5,
columns: 1
}, {
rows: 5,
columns: 2
}, {
rows: 5,
columns: 3
}, {
rows: 5,
columns: 4
}]],
this.gridDimensions = {
width: 0,
height: 0
},
this.sidebarExpanded = !1,
this.activeGroup = null,
this.activePredefinedGroup = null,
this.numberOfTilesOnPage = null
}
ngOnInit() {
this.subscriptions.push(this.livekit.recalculateGrid.subscribe( () => {
this.recalculateGridAndTiles(!0)
}
))
}
ngAfterViewInit() {
this.tileGridResizeObserver.observe(this.elementRef.nativeElement),
this.subscriptions.push(this.livekit.room.activeGroup.subscribe(e => {
this.activeGroup !== e && (this.activeGroup = e,
this.setWrapperDimensions())
}
), this.livekit.room.activePredefinedGroup.subscribe(e => {
this.activePredefinedGroup !== e && (this.activePredefinedGroup = e,
this.setWrapperDimensions())
}
), this.utilityService.isMobile.subscribe(e => {
this.isMobile !== e && (this.isMobile && !e && this.livekit.recalculateGrid.next(),
this.isMobile = e,
this.setWrapperDimensions(),
this.isMobile && (this.livekit.room.filter.visible = !1))
}
), this.sidebarService.sidebarStateChange.subscribe(e => {
this.sidebarExpanded !== e && (this.sidebarExpanded = e,
this.setWrapperDimensions())
}
))
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe()),
(0,
I.hq)(this.tileGridResizeObserver, this.elementRef?.nativeElement)
}
setWrapperDimensions() {
this.isMobile ? this.setMobileWrapperStyleAndTileDimensions() : setTimeout( () => {
const e = document.querySelector("ss-focus-room-session-group")
, n = document.querySelector("ss-focus-room-predefined-groups")
, m = 24 + (this.sidebarExpanded ? 199 : 55) + (e?.clientWidth ?? 0) + (n?.clientWidth ?? 0)
, v = document.querySelector("ss-main-app-header")
, P = document.querySelector("ss-focus-room-actions")
, U = document.querySelector("ss-focus-room-milestones-bar")
, A = document.querySelector(".dashboard-wrapper.ads-shown .router-wrapper + div")
, ft = (v?.clientHeight ?? 0) + (P?.clientHeight ?? 0) + (U ? U.clientHeight + 8 : 0) + 8 + (A?.clientHeight ?? 0)
, _t = this.elementRef.nativeElement;
_t.style.width = `calc(100vw - ${m}px)`,
_t.style.height = `calc(100vh - ${ft}px)`,
this.onGridElementResized(_t)
}
)
}
setMobileWrapperStyleAndTileDimensions() {
setTimeout( () => {
this.elementRef.nativeElement.style.width = "100vw",
this.elementRef.nativeElement.style.height = "";
const e = Math.ceil(this.livekit.room.paginator.maxTilesAllowed / 8);
this.tilesWrapper.nativeElement.style.gridTemplateColumns = "1fr ".repeat(e).trim(),
this.tilesWrapper.nativeElement.style.gridTemplateRows = "",
this.livekit.room.tileDimensions.width = Math.round(this.elementRef.nativeElement.clientWidth / e),
this.livekit.room.tileDimensions.height = Math.round(9 * this.livekit.room.tileDimensions.width / 16)
}
)
}
onGridElementResized(e) {
this.gridDimensions.width === e.clientWidth && this.gridDimensions.height === e.clientHeight || (this.gridDimensions.width = e.clientWidth,
this.gridDimensions.height = e.clientHeight,
this.recalculateGridAndTiles())
}
recalculateGridAndTiles(e=!1) {
if (0 === this.gridDimensions.width || 0 === this.gridDimensions.height)
return;
this.livekit.room.setMaxAllowedTiles(this.elementRef.nativeElement.clientWidth);
const s = Math.min(this.livekit.room.focusPlus.active ? this.livekit.room.focusPlus.participants.length : (this.livekit.room.pinnedParticipants.length > 0 && !this.livekit.room.forceGridView ? this.livekit.room.pinnedParticipants : this.livekit.room.filteredParticipants).length, this.livekit.room.paginator.tilesPerPage, this.livekit.room.paginator.maxTilesAllowed);
if (e && s === this.numberOfTilesOnPage || (this.numberOfTilesOnPage = s,
0 === s || this.isMobile))
return;
const a = this.getOptimalGridRatio(s);
null !== a && (this.tilesWrapper.nativeElement.style.gridTemplateRows = "1fr ".repeat(a.rows).trim(),
this.tilesWrapper.nativeElement.style.gridTemplateColumns = "1fr ".repeat(a.columns).trim(),
this.setTileDimensions(a))
}
getOptimalGridRatio(e) {
const n = [];
for (const d of this.allowedAspectRatios)
for (const m of d) {
const v = m.rows * m.columns;
if (v >= e) {
v - e < m.columns && n.push(m);
break
}
}
if (0 === n.length)
return null;
const i = this.gridDimensions.width / this.gridDimensions.height * (16 / 9);
let s = Number.MAX_VALUE
, a = null;
for (let d = 0; d < n.length; d++) {
const m = n[d]
, P = Math.abs(m.columns / m.rows * (16 / 9) - i);
P < s && (s = P,
a = m)
}
return a
}
setTileDimensions(e) {
const n = {
width: 0,
height: 0
}
, i = Math.floor((this.gridDimensions.width - 5 * (e.columns - 1)) / e.columns)
, s = 9 * i / 16;
if (s * e.rows + 5 * (e.rows - 1) > this.gridDimensions.height) {
const d = Math.floor((this.gridDimensions.height - 5 * (e.rows - 1)) / e.rows);
n.width = 16 * d / 9,
n.height = d
} else
n.width = i,
n.height = s;
this.livekit.room.tileDimensions.width = n.width,
this.livekit.room.tileDimensions.height = n.height
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(t.GMv),t.GI1(qt.Q),t.GI1(I.UZ))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-tile-grid"]],
viewQuery: function(n, i) {
if (1 & n && t.CC$(bn, 5),
2 & n) {
let s;
t.wto(s = t.Gqi()) && (i.tilesWrapper = s.first)
}
},
inputs: {
theme: "theme",
participants: "participants"
},
decls: 3,
vars: 1,
consts: [[1, "tiles-wrapper"], ["tilesWrapper", ""], [3, "participant", "isMobile", "theme", "allowFullscreenView", 4, "ngFor", "ngForOf"], [3, "participant", "isMobile", "theme", "allowFullscreenView"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0, 1),
t.yuY(2, kn, 1, 4, "ss-focus-room-tile", 2),
t.C$Y()),
2 & n && (t.yG2(2),
t.E7m("ngForOf", i.participants))
},
dependencies: [h.ay, lt],
styles: ["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{height:auto}}.tiles-wrapper[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr;grid-template-rows:1fr;grid-gap:5px}@media only screen and (max-width: 1024px){.tiles-wrapper[_ngcontent-%COMP%]{grid-gap:0}}"]
})
}
return o
}
)();
var Qt = c(3808)
, dt = c(2552)
, Gt = c(4592);
function Pn(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-user-popup", 11),
t.qCj("focusRoomUnauthenticatedActionAttempt", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.handleUnauthenticatedActionAttempt())
})("closePopup", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.popupOpened = !1)
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.E7m("userId", e.user.id)("openedFromSource", e.OpenedFromSourceRef.FocusRoom)
}
}
function yn(o, r) {
if (1 & o && t.wR5(0, "ss-badge", 12),
2 & o) {
const e = t.GaO(2);
t.E7m("badge", e.user.userBadge)("size", 20)
}
}
function On(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 5, 6)(2, "ss-user-avatar", 7),
t.qCj("click", function(i) {
t.usT(e);
const s = t.GaO();
return t.CGJ(s.openUserPopup(i))
}),
t.C$Y(),
t.yuY(3, Pn, 1, 2, "ng-template", 8),
t.qCj("backdropClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.popupOpened = !1)
}),
t.yuY(4, yn, 1, 2, "ss-badge", 9),
t.I0R(5, "p", 10),
t.qCj("click", function(i) {
t.usT(e);
const s = t.GaO();
return t.CGJ(s.openUserPopup(i))
}),
t.OEk(6),
t.C$Y()()
}
if (2 & o) {
const e = t.Gew(1)
, n = t.GaO();
t.yG2(2),
t.E7m("size", 40)("title", n.user.displayName)("initials", n.user.initials)("avatarColor", n.user.avatarColor)("avatarThumbUrl", n.user.avatarThumbUrl)("lastOnline", n.user.lastActive)("userId", n.user.id),
t.yG2(),
t.E7m("cdkConnectedOverlayOrigin", e)("cdkConnectedOverlayOpen", n.popupOpened)("cdkConnectedOverlayHasBackdrop", !0)("cdkConnectedOverlayDisableClose", !0),
t.yG2(),
t.E7m("ngIf", n.user.userBadge),
t.yG2(2),
t.CAO("", n.user.displayName, "", n.user.isModerator ? " (Moderator)" : "", "")
}
}
function Mn(o, r) {
if (1 & o && t.wR5(0, "mat-checkbox", 13),
2 & o) {
const e = t.GaO();
t.E7m("checked", e.user.selectedForGroupInvite)
}
}
function wn(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button-small", 14),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.createGroupOrContinueExistingChat())
}),
t.OEk(1, " Message\n"),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("isLoading", e.startingChat)("color", e.ButtonColorRef.Secondary)
}
}
let Sn = ( () => {
class o {
onListItemClick() {
this.suggestedUser || (this.user.selectedForGroupInvite = !this.user.selectedForGroupInvite)
}
constructor(e, n, i, s, a, d, m, v) {
this.settingsService = e,
this.livekit = n,
this.chatService = i,
this.utilityService = s,
this.accountModalsService = a,
this.elementRef = d,
this.toastService = m,
this.router = v,
this.suggestedUser = !1,
this.messageUser = new t._w7,
this.popupOpened = !1,
this.startingChat = !1,
this.OpenedFromSourceRef = x.Qf,
this.ButtonColorRef = N.k
}
openUserPopup(e) {
e.stopPropagation(),
this.popupOpened = !0
}
handleUnauthenticatedActionAttempt() {
this.accountModalsService.ensureUserCompletedBasicInfo()
}
showParticipantHighlight() {
if (this.isMobile)
return;
this.livekit.participantHighlight.hideOverlay.next(!0);
const e = this.elementRef.nativeElement.getBoundingClientRect()
, n = document.querySelector(".dashboard-wrapper").clientHeight;
this.livekit.participantHighlight.show.next({
id: this.user.id,
left: e.left - 234,
bottom: n - e.top - 94,
source: _.W4.ParticipantListItem
})
}
createGroupOrContinueExistingChat() {
this.chatService.checkIfChatExists(this.user.id).subscribe({
next: () => {
this.startChat()
}
,
error: e => {
e.length && "ChatDoesNotExist" === e[0].errorCode ? this.utilityService.requestChatNavigation.next(this.user.id) : this.handleErrors(e)
}
})
}
onChatStarted(e) {
this.messageUser.emit(),
this.startingChat = !1,
this.isMobile ? this.router.navigate([`/conversations/chats/${e}`]) : this.utilityService.openDmTrayChat.next(e)
}
startChat() {
this.startingChat = !0,
this.chatService.startChat({
otherUserIds: [this.user.id]
}).subscribe({
next: n => this.onChatStarted(n.id),
error: n => {
n.length && "ChatAlreadyExists" === n[0].errorCode ? this.onChatStarted(n[0].params.chatId) : this.handleErrors(n)
}
})
}
handleErrors(e) {
"ErrorChattingAgeRestriction" !== e[0].errorCode ? this.toastService.error({
exceptionDetail: e[0]
}) : this.toastService.info({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(L.Y),t.GI1(g.A),t.GI1(Ct.e),t.GI1(I.UZ),t.GI1(V.E),t.GI1(t.GMv),t.GI1(k.s),t.GI1(W.E5))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-session-group-list-item"]],
hostVars: 2,
hostBindings: function(n, i) {
1 & n && t.qCj("click", function() {
return i.onListItemClick()
}),
2 & n && t.eAK("suggested-user", i.suggestedUser)
},
inputs: {
user: "user",
suggestedUser: "suggestedUser"
},
outputs: {
messageUser: "messageUser"
},
decls: 5,
vars: 4,
consts: [[1, "hover-highlight", 3, "click"], ["iconName", "eye", 3, "size"], ["class", "user-info", "cdkOverlayOrigin", "", 4, "ngIf"], ["name", "selected", 3, "checked", 4, "ngIf"], [3, "isLoading", "color", "buttonClick", 4, "ngIf"], ["cdkOverlayOrigin", "", 1, "user-info"], ["trigger", "cdkOverlayOrigin"], ["role", "button", 3, "size", "title", "initials", "avatarColor", "avatarThumbUrl", "lastOnline", "userId", "click"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "transparent", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayDisableClose", "backdropClick"], ["class", "user-marker", 3, "badge", "size", 4, "ngIf"], ["role", "button", 3, "click"], ["cssClass", "margin-horizontal", 3, "userId", "openedFromSource", "focusRoomUnauthenticatedActionAttempt", "closePopup"], [1, "user-marker", 3, "badge", "size"], ["name", "selected", 3, "checked"], [3, "isLoading", "color", "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0),
t.qCj("click", function() {
return i.showParticipantHighlight()
}),
t.wR5(1, "ss-icon", 1),
t.C$Y(),
t.yuY(2, On, 7, 14, "div", 2)(3, Mn, 1, 1, "mat-checkbox", 3)(4, wn, 2, 2, "ss-button-small", 4)),
2 & n && (t.yG2(),
t.E7m("size", 18),
t.yG2(),
t.E7m("ngIf", i.user),
t.yG2(),
t.E7m("ngIf", !i.suggestedUser),
t.yG2(),
t.E7m("ngIf", i.suggestedUser && !i.settingsService.isB2BApp()))
},
dependencies: [h.u_, C.g, K.A, rt.w, N.S, at.I, G.eC, G.wW, Ft.WK],
styles: ["[_nghost-%COMP%]{position:relative;display:flex;justify-content:space-between;align-items:center;width:100%;padding:10px 10px 10px 0;cursor:pointer}.suggested-user[_nghost-%COMP%]{cursor:initial}.hover-highlight[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:20px;margin-right:5px}.hover-highlight[_ngcontent-%COMP%]:hover ss-icon[_ngcontent-%COMP%] i{background:var(--accent-gradient);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}@media only screen and (max-width: 1024px){.hover-highlight[_ngcontent-%COMP%]{display:none}}.user-info[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:auto}ss-user-avatar[_ngcontent-%COMP%]{margin-right:15px}ss-badge[_ngcontent-%COMP%]{margin-right:6px}"]
})
}
return o
}
)();
function xn(o, r) {
if (1 & o && (t.I0R(0, "div")(1, "div"),
t.OEk(2),
t.C$Y(),
t.I0R(3, "div"),
t.OEk(4, "You can only add users to a private space who follow you or have pinned you in the past."),
t.C$Y(),
t.I0R(5, "div"),
t.OEk(6, "Try these:"),
t.C$Y(),
t.I0R(7, "ol")(8, "li"),
t.OEk(9, "Follow others and encourage them to follow you back \u2705"),
t.C$Y(),
t.I0R(10, "li"),
t.OEk(11, "Turn your video on \u{1f3a5} and do something interesting \u{1f57a} to receive some pins \u{1f4cc}"),
t.C$Y()()()),
2 & o) {
const e = t.GaO(2);
t.yG2(2),
t.oRS("None of your ", e.settingsService.isB2BApp() || e.settingsService.isCoWork() ? "connections" : "friends", " are currently online \u{1f614}")
}
}
function In(o, r) {
1 & o && (t.I0R(0, "div")(1, "h4"),
t.OEk(2, "Choose someone to invite to your private space"),
t.C$Y(),
t.I0R(3, "div"),
t.OEk(4, "To add more people they either need to follow you or have pinned you in the past."),
t.C$Y()())
}
function Tn(o, r) {
if (1 & o && (t.I0R(0, "div", 13),
t.OEk(1),
t.C$Y()),
2 & o) {
const e = t.GaO(3);
t.yG2(),
t.oRS(" No search results. ", e.selectedUserIds.length > 0 ? e.selectedUserIds.length + " user" + (1 === e.selectedUserIds.length ? "" : "s") + " selected." : "", " ")
}
}
function Gn(o, r) {
if (1 & o) {
const e = t.KQA();
t.SAx(0),
t.I0R(1, "ss-input", 11),
t.iHE("ngModelChange", function(i) {
t.usT(e);
const s = t.GaO(2);
return t.kNx(s.searchTerm, i) || (s.searchTerm = i),
t.CGJ(i)
}),
t.C$Y(),
t.yuY(2, Tn, 2, 1, "div", 12),
t.k70()
}
if (2 & o) {
const e = t.GaO(2);
t.yG2(),
t.OKB("ngModel", e.searchTerm),
t.yG2(),
t.E7m("ngIf", 0 === e.searchResults.length)
}
}
function Rn(o, r) {
if (1 & o && (t.SAx(0),
t.yuY(1, xn, 12, 1, "div", 4)(2, In, 5, 0, "div", 4)(3, Gn, 3, 2, "ng-container", 4),
t.k70()),
2 & o) {
const e = t.GaO();
t.yG2(),
t.E7m("ngIf", 0 === e.availableUsers.length),
t.yG2(),
t.E7m("ngIf", e.availableUsers.length > 0),
t.yG2(),
t.E7m("ngIf", e.availableUsers.length >= e.minAvailableUsersToShowSearch)
}
}
function En(o, r) {
1 & o && t.wR5(0, "mat-spinner", 14)
}
function Un(o, r) {
if (1 & o && t.wR5(0, "ss-focus-room-session-group-list-item", 16),
2 & o) {
const e = t.GaO().$implicit;
t.E7m("user", e)
}
}
function Fn(o, r) {
if (1 & o && (t.SAx(0),
t.yuY(1, Un, 1, 1, "ss-focus-room-session-group-list-item", 15),
t.k70()),
2 & o) {
const e = r.$implicit
, n = t.GaO();
t.yG2(),
t.E7m("ngIf", n.isASearchMatch(e))
}
}
function An(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-focus-room-session-group-list-item", 19),
t.qCj("messageUser", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.closeModal())
}),
t.C$Y()
}
2 & o && t.E7m("user", r.$implicit)("suggestedUser", !0)
}
function Ln(o, r) {
if (1 & o && (t.SAx(0),
t.I0R(1, "h4", 17),
t.OEk(2),
t.C$Y(),
t.yuY(3, An, 1, 2, "ss-focus-room-session-group-list-item", 18),
t.k70()),
2 & o) {
const e = t.GaO();
t.yG2(2),
t.cNF(e.suggestedUsersMessage),
t.yG2(),
t.E7m("ngForOf", e.suggestedUsers)
}
}
function Yn(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 20)(1, "div", 21),
t.OEk(2, "To get better matches complete your profile. Click 'Edit Profile' while you wait."),
t.C$Y(),
t.I0R(3, "ss-button", 22),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.editAdditionalProfileSettings())
}),
t.OEk(4, "Edit Profile"),
t.C$Y()()
}
}
let Rt = ( () => {
class o {
get selectedUserIds() {
return this.availableUsers.filter(e => e.selectedForGroupInvite).map(e => e.id)
}
get ctaButtonText() {
return 0 === this.selectedUserIds.length ? "Invite later" : `Invite ${this.selectedUserIds.length} user${1 === this.selectedUserIds.length ? "" : "s"}`
}
get searchResults() {
if (!this.searchTerm)
return this.availableUsers;
const e = this.searchTerm.trim().toLowerCase();
return this.availableUsers.filter(n => n.displayName && n.displayName.toLowerCase().includes(e))
}
constructor(e, n, i, s, a, d, m, v, P) {
this.podName = e,
this.livekit = n,
this.settingsService = i,
this.dialogRef = s,
this.translateService = a,
this.analyticsService = d,
this.dialog = m,
this.accountService = v,
this.toastService = P,
this.availableUsers = [],
this.suggestedUsers = [],
this.activeGroup = null,
this.availableUsersLoaded = !1,
this.loadingInvite = !1,
this.suggestedUsersMessage = "Try messaging these people that are also",
this.searchTerm = null,
this.minAvailableUsersToShowSearch = 20,
this.subscriptions = []
}
ngOnInit() {
this.subscriptions.push(this.livekit.room.activeGroup.subscribe(e => this.activeGroup = e)),
this.livekit.getInteractableParticipants(this.livekit.room.name).subscribe({
next: e => {
this.availableUsers = this.activeGroup ? e.filter(n => !this.activeGroup?.members.some(i => i.id == n.id)) : e,
this.availableUsersLoaded = !0,
this.availableUsers.length < 10 && this.livekit.room.milestones.completedProfileSetup && this.setSuggestedUsers()
}
,
error: e => this.handleErrors(e)
})
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe())
}
inviteUsers() {
this.loadingInvite = !0,
this.analyticsService.markActivity(u.kP.LivekitPrivatePodInviteUsersButtonClick),
this.activeGroup ? this.livekit.inviteUserToFocusRoomSessionGroup(this.livekit.room.name, this.activeGroup.id, this.selectedUserIds).subscribe({
next: () => {
this.loadingInvite = !1,
this.dialogRef.close()
}
,
error: e => {
"LivekitRoomMaxSamePeerSessionsReached" !== e[0].errorCode ? this.handleErrors(e) : this.toastService.info({
exceptionDetail: e[0]
})
}
}) : this.livekit.createFocusRoomSessionGroup(this.livekit.room.name, this.selectedUserIds, void 0, this.podName).subscribe({
next: e => {
this.livekit.room.activeGroup.next(e),
this.loadingInvite = !1,
this.dialogRef.close(),
e.name && e.id && this.toastService.createdNamedPrivateSpace(e.name, this.livekit.room.name, e.id, e.wasJustReopened)
}
,
error: e => this.handleErrors(e)
})
}
closeModal() {
this.dialogRef.close()
}
isASearchMatch(e) {
return this.searchResults.includes(e)
}
editAdditionalProfileSettings() {
this.dialog.open(Gt.C, {
panelClass: "fullscreen-dialog",
width: "600px",
disableClose: !0
}).afterClosed().subscribe( () => {
if (!this.livekit.room.milestones)
return;
const n = this.accountService.currentUser;
this.livekit.room.milestones.completedProfileSetup = !!n.countryId && !!n.bio && !!n.areaOfStudyId && n.hasUserInterests,
this.availableUsers.length < 10 && this.livekit.room.milestones.completedProfileSetup && (this.setSuggestedUsers(),
this.livekit.updateMetadata(this.livekit.room.name, this.livekit.room.settings.zoomToFit).subscribe())
}
)
}
setSuggestedUsers() {
const e = this.accountService.currentUser
, i = this.livekit.room.allParticipants.filter(d => !d.isLocal && d.userInfo && !this.availableUsers.some(m => m.id === d.identity) && (e.areaOfStudyId && d.userInfo.areaOfStudyId == e.areaOfStudyId || e.countryId && d.userInfo.countryId == e.countryId)).map(d => ({
areaOfStudyMatch: d.userInfo.areaOfStudyId == e.areaOfStudyId,
countryMatch: d.userInfo.countryId == e.countryId,
userInfo: d.userInfo
})).sort((0,
dt.firstBy)(d => d.areaOfStudyMatch, {
direction: "desc"
})).slice(0, 10)
, s = i.some(d => d.areaOfStudyMatch)
, a = i.some(d => d.countryMatch);
this.suggestedUsersMessage = s && a ? `${this.suggestedUsersMessage} studying ${e.areaOfStudyName} or are from ${e.countryName}:` : s ? `${this.suggestedUsersMessage} studying ${e.areaOfStudyName}:` : `${this.suggestedUsersMessage} from ${e.countryName}:`,
this.suggestedUsers = i.map(d => d.userInfo)
}
handleErrors(e, n=!1) {
var i = this;
return (0,
S.c)(function*() {
if (i.availableUsersLoaded = !0,
i.loadingInvite = !1,
n) {
const s = yield(0,
Qt.o)(i.translateService.get("errors." + e[0].errorCode, e[0].params));
i.toastService.info({
title: "Please note",
message: s
})
} else
i.toastService.error({
exceptionDetail: e[0]
})
})()
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(p.sR),t.GI1(g.A),t.GI1(L.Y),t.GI1(p.yI),t.GI1(nt.qS),t.GI1(u.uc),t.GI1(p.qW),t.GI1(y.uE),t.GI1(k.s))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-session-group-invite-modal"]],
decls: 17,
vars: 10,
consts: [[1, "mat-header"], ["mat-dialog-title", ""], ["mat-dialog-close", "", 1, "close-modal"], ["iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant"], [4, "ngIf"], [1, "loader-wrapper"], ["diameter", "30", "strokeWidth", "3", 4, "ngIf"], [4, "ngFor", "ngForOf"], ["class", "edit-profile-wrapper", 4, "ngIf"], ["color", "tertiary", "mat-dialog-close", ""], [3, "isLoading", "buttonClick"], ["id", "user-search", "name", "userSearch", "placeholder", "Search people to invite...", 3, "ngModel", "ngModelChange"], ["class", "no-results-message", 4, "ngIf"], [1, "no-results-message"], ["diameter", "30", "strokeWidth", "3"], [3, "user", 4, "ngIf"], [3, "user"], [1, "suggested-users-title"], [3, "user", "suggestedUser", "messageUser", 4, "ngFor", "ngForOf"], [3, "user", "suggestedUser", "messageUser"], [1, "edit-profile-wrapper"], [1, "notification"], ["color", "secondary", 3, "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "h2", 1),
t.OEk(2),
t.C$Y(),
t.I0R(3, "button", 2),
t.wR5(4, "ss-icon", 3),
t.C$Y()(),
t.I0R(5, "mat-dialog-content"),
t.yuY(6, Rn, 4, 3, "ng-container", 4),
t.I0R(7, "div", 5),
t.yuY(8, En, 1, 0, "mat-spinner", 6),
t.C$Y(),
t.yuY(9, Fn, 2, 1, "ng-container", 7)(10, Ln, 4, 2, "ng-container", 4)(11, Yn, 5, 0, "div", 8),
t.C$Y(),
t.I0R(12, "mat-dialog-actions")(13, "ss-button", 9),
t.OEk(14, "Cancel"),
t.C$Y(),
t.I0R(15, "ss-button", 10),
t.qCj("buttonClick", function() {
return i.inviteUsers()
}),
t.OEk(16),
t.C$Y()()),
2 & n && (t.yG2(2),
t.oRS("Invite users to ", i.podName || "this space", ""),
t.yG2(2),
t.E7m("size", 20)("iconVariant", 20),
t.yG2(2),
t.E7m("ngIf", i.availableUsersLoaded),
t.yG2(2),
t.E7m("ngIf", !i.availableUsersLoaded),
t.yG2(),
t.E7m("ngForOf", i.availableUsers),
t.yG2(),
t.E7m("ngIf", i.suggestedUsers.length > 0 && i.livekit.room.milestones.completedProfileSetup),
t.yG2(),
t.E7m("ngIf", !i.livekit.room.milestones.completedProfileSetup),
t.yG2(4),
t.E7m("isLoading", i.loadingInvite),
t.yG2(),
t.oRS(" ", i.ctaButtonText, " "))
},
dependencies: [h.ay, h.u_, O.k, C.g, q.g, b.ue, b._G, p.qq, p.WQ, p.Yp, p.iU, z.cm, Sn],
styles: [".loader-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}h4[_ngcontent-%COMP%]{margin-bottom:10px}.suggested-users-title[_ngcontent-%COMP%]{margin-top:10px}.edit-profile-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding-top:20px;border-top:1px solid var(--alt)}ss-input[_ngcontent-%COMP%]{margin-top:8px;margin-bottom:8px}.no-results-message[_ngcontent-%COMP%]{padding:12px 0;text-align:center}"]
})
}
return o
}
)();
function Vn(o, r) {
1 & o && (t.I0R(0, "h2", 7),
t.OEk(1, "Name your space? (Optional)"),
t.C$Y())
}
function Nn(o, r) {
1 & o && (t.I0R(0, "h2", 7),
t.OEk(1, "Private Spaces"),
t.C$Y())
}
function Bn(o, r) {
if (1 & o && (t.SAx(0),
t.yuY(1, Vn, 2, 0, "h2", 6)(2, Nn, 2, 0, "h2", 6),
t.k70()),
2 & o) {
const e = t.GaO();
t.yG2(),
t.E7m("ngIf", e.createNewNameState),
t.yG2(),
t.E7m("ngIf", !e.createNewNameState)
}
}
function Dn(o, r) {
1 & o && t.wR5(0, "mat-spinner", 8)
}
function $n(o, r) {
1 & o && t.wR5(0, "mat-spinner", 8)
}
function zn(o, r) {
if (1 & o) {
const e = t.KQA();
t.SAx(0),
t.I0R(1, "div", 9),
t.OEk(2, "Give your private space a name"),
t.C$Y(),
t.I0R(3, "ss-input", 10),
t.iHE("ngModelChange", function(i) {
t.usT(e);
const s = t.GaO();
return t.kNx(s.spaceName, i) || (s.spaceName = i),
t.CGJ(i)
}),
t.C$Y(),
t.k70()
}
if (2 & o) {
const e = t.GaO();
t.yG2(3),
t.OKB("ngModel", e.spaceName)
}
}
function jn(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "h3", 13),
t.qCj("click", function() {
const s = t.usT(e).$implicit
, a = t.GaO(2);
return t.CGJ(a.useExistingName(s))
}),
t.OEk(1),
t.C$Y()
}
if (2 & o) {
const e = r.$implicit;
t.yG2(),
t.oRS(" ", e, " ")
}
}
function Hn(o, r) {
if (1 & o && (t.SAx(0),
t.yuY(1, jn, 2, 1, "h3", 11),
t.I0R(2, "div", 12),
t.OEk(3, "or"),
t.C$Y(),
t.k70()),
2 & o) {
const e = t.GaO();
t.yG2(),
t.E7m("ngForOf", e.groupNames)
}
}
function Kn(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "mat-dialog-actions")(1, "ss-button", 14),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.createNewNameState ? i.createPrivateSpace() : i.createNewNameState = !0)
}),
t.OEk(2),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO();
t.yG2(2),
t.oRS(" ", e.createNewNameState ? e.spaceName ? "Create" : "Create without a name" : "Create new private space", " ")
}
}
let Jn = ( () => {
class o {
constructor(e, n, i, s, a) {
this.livekit = e,
this.dialogRef = n,
this.analyticsService = i,
this.dialog = s,
this.toastService = a,
this.spaceName = "",
this.groupNames = [],
this.loading = !0,
this.createNewNameState = !1
}
ngOnInit() {
this.livekit.getGroupNamesCreatedByMe(this.livekit.room.name).subscribe({
next: e => {
this.groupNames = e,
this.loading = !1,
0 === this.groupNames.length && (this.createNewNameState = !0)
}
,
error: e => this.handleErrors(e)
})
}
useExistingName(e) {
this.spaceName = e,
this.createPrivateSpace()
}
createPrivateSpace() {
this.dialogRef.close(),
this.analyticsService.markActivity(u.kP.LivekitAudioPodModalOpen),
this.dialog.open(Rt, {
panelClass: "fullscreen-dialog",
width: "640px",
data: this.spaceName.trim()
})
}
handleErrors(e) {
this.loading = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(p.yI),t.GI1(u.uc),t.GI1(p.qW),t.GI1(k.s))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-session-group-name"]],
decls: 12,
vars: 8,
consts: [[1, "mat-header"], [4, "ngIf"], [1, "loader-wrapper"], ["diameter", "30", "strokeWidth", "3", 4, "ngIf"], ["mat-dialog-close", "", 1, "close-modal"], ["iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant"], ["mat-dialog-title", "", 4, "ngIf"], ["mat-dialog-title", ""], ["diameter", "30", "strokeWidth", "3"], [1, "interactable"], ["id", "new-space-name", "name", "spaceName", "placeholder", "Name your private space...", "maxlength", "100", 3, "ngModel", "ngModelChange"], ["class", "space-name", 3, "click", 4, "ngFor", "ngForOf"], [1, "separator"], [1, "space-name", 3, "click"], [3, "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0),
t.yuY(1, Bn, 3, 2, "ng-container", 1),
t.I0R(2, "div", 2),
t.yuY(3, Dn, 1, 0, "mat-spinner", 3),
t.C$Y(),
t.I0R(4, "button", 4),
t.wR5(5, "ss-icon", 5),
t.C$Y()(),
t.I0R(6, "mat-dialog-content")(7, "div", 2),
t.yuY(8, $n, 1, 0, "mat-spinner", 3),
t.C$Y(),
t.yuY(9, zn, 4, 1, "ng-container", 1)(10, Hn, 4, 1, "ng-container", 1),
t.C$Y(),
t.yuY(11, Kn, 3, 1, "mat-dialog-actions", 1)),
2 & n && (t.yG2(),
t.E7m("ngIf", !i.loading),
t.yG2(2),
t.E7m("ngIf", i.loading),
t.yG2(2),
t.E7m("size", 20)("iconVariant", 20),
t.yG2(3),
t.E7m("ngIf", i.loading),
t.yG2(),
t.E7m("ngIf", i.createNewNameState),
t.yG2(),
t.E7m("ngIf", !i.createNewNameState),
t.yG2(),
t.E7m("ngIf", !i.loading))
},
dependencies: [h.ay, h.u_, O.k, C.g, q.g, b.ue, b.Mj, b._G, p.qq, p.WQ, p.Yp, p.iU, z.cm],
styles: [".loader-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.interactable[_ngcontent-%COMP%]{margin-bottom:8px;color:var(--default-40)}.space-name[_ngcontent-%COMP%]{overflow:hidden;padding:16px;margin-bottom:4px;border-radius:16px;text-overflow:ellipsis;white-space:nowrap;background-color:var(--alt);cursor:pointer}.space-name[_ngcontent-%COMP%]:hover{background-color:var(--alt-40)}.space-name[_ngcontent-%COMP%]:last-of-type{margin-bottom:0}.separator[_ngcontent-%COMP%]{margin-top:16px;text-align:center}ss-button[_ngcontent-%COMP%]{width:100%}"]
})
}
return o
}
)();
function qn(o, r) {
1 & o && (t.SAx(0),
t.I0R(1, "h2", 9),
t.OEk(2, "Waiting for a match"),
t.C$Y(),
t.I0R(3, "small"),
t.OEk(4, "We're looking for someone to match you with. Don't refresh the page while you're waiting, but you can close this window."),
t.C$Y(),
t.k70())
}
function Wn(o, r) {
1 & o && (t.SAx(0),
t.I0R(1, "h2"),
t.OEk(2, "Nobody is available"),
t.C$Y(),
t.I0R(3, "small"),
t.OEk(4, "Try again in a few minutes."),
t.C$Y(),
t.k70())
}
function Qn(o, r) {
1 & o && (t.I0R(0, "span"),
t.OEk(1, " while you wait"),
t.C$Y())
}
function Xn(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 10)(1, "div", 11),
t.OEk(2, " To get better matches complete your profile. Click 'Edit Profile'"),
t.yuY(3, Qn, 2, 0, "span", 5),
t.OEk(4, ". "),
t.C$Y(),
t.I0R(5, "ss-button", 12),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.editProfile())
}),
t.OEk(6, "Edit Profile"),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO();
t.yG2(3),
t.E7m("ngIf", e.waitingForGroupMatch)
}
}
function Zn(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 13),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.cancelRandomMatching())
}),
t.OEk(1, " Cancel matching "),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("isLoading", e.cancellingMatchRequest)
}
}
let Xt = ( () => {
class o {
get waitingForGroupMatch() {
return this.livekit.room.groupMatch.waiting
}
get hasCompletedProfile() {
const e = this.accountService.currentUser;
return !!e.countryId && !!e.bio && !!e.areaOfStudyId && e.hasUserInterests
}
constructor(e, n, i, s, a, d) {
this.accountService = e,
this.livekit = n,
this.dialog = i,
this.dialogRef = s,
this.signalRService = a,
this.toastService = d,
this.cancellingMatchRequest = !1,
this.subscriptions = []
}
ngOnInit() {
this.getGroupMatch(),
this.subscriptions.push(this.signalRService.roomSessionGroupMatched.subscribe(e => this.onRoomSessionGroupMatched()))
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe())
}
editProfile() {
this.dialog.open(Gt.C, {
panelClass: "fullscreen-dialog",
width: "600px",
disableClose: !0
})
}
cancelRandomMatching() {
this.cancellingMatchRequest = !0,
this.livekit.cancelGroupMatch(this.livekit.room.name).subscribe({
next: () => {
this.cancellingMatchRequest = !1,
this.livekit.room.groupMatch.waiting = !1,
this.dialogRef.close()
}
,
error: e => this.handleErrors(e)
})
}
onRoomSessionGroupMatched() {
this.dialogRef.close()
}
getGroupMatch() {
this.livekit.getGroupMatch(this.livekit.room.name).subscribe({
next: e => {
e.expiryDate ? this.livekit.room.groupMatch.startTimer(e.expiryDate) : (this.livekit.room.activeGroup.next({
id: e.groupId,
members: e.members
}),
this.livekit.room.groupMatch.waiting = !1,
this.dialogRef.close())
}
,
error: e => this.handleErrors(e)
})
}
handleErrors(e) {
this.cancellingMatchRequest = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(y.uE),t.GI1(g.A),t.GI1(p.qW),t.GI1(p.yI),t.GI1(kt.f),t.GI1(k.s))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-random-match-modal"]],
decls: 14,
vars: 8,
consts: [[1, "mat-header"], ["mat-dialog-title", ""], ["mat-dialog-close", "", 1, "close-modal"], ["iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant"], [1, "modal-info"], [4, "ngIf"], ["class", "edit-profile", 4, "ngIf"], ["color", "tertiary", 3, "isLoading", "buttonClick", 4, "ngIf"], ["mat-dialog-close", "", 3, "isLoading"], [1, "loading"], [1, "edit-profile"], [1, "notification"], ["color", "secondary", 3, "buttonClick"], ["color", "tertiary", 3, "isLoading", "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "h2", 1),
t.OEk(2, "Random match"),
t.C$Y(),
t.I0R(3, "button", 2),
t.wR5(4, "ss-icon", 3),
t.C$Y()(),
t.I0R(5, "mat-dialog-content")(6, "div", 4),
t.yuY(7, qn, 5, 0, "ng-container", 5)(8, Wn, 5, 0, "ng-container", 5),
t.C$Y(),
t.yuY(9, Xn, 7, 1, "div", 6),
t.C$Y(),
t.I0R(10, "mat-dialog-actions"),
t.yuY(11, Zn, 2, 1, "ss-button", 7),
t.I0R(12, "ss-button", 8),
t.OEk(13),
t.C$Y()()),
2 & n && (t.yG2(4),
t.E7m("size", 20)("iconVariant", 20),
t.yG2(3),
t.E7m("ngIf", i.waitingForGroupMatch),
t.yG2(),
t.E7m("ngIf", !i.waitingForGroupMatch),
t.yG2(),
t.E7m("ngIf", !i.hasCompletedProfile),
t.yG2(2),
t.E7m("ngIf", i.waitingForGroupMatch),
t.yG2(),
t.E7m("isLoading", i.cancellingMatchRequest),
t.yG2(),
t.oRS(" Close", i.waitingForGroupMatch ? " and wait" : "", " "))
},
dependencies: [h.u_, O.k, C.g, p.qq, p.WQ, p.Yp, p.iU],
styles: ['@charset "UTF-8";.modal-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;height:200px;padding-bottom:24px}.modal-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:8px}.modal-info[_ngcontent-%COMP%] h2.loading[_ngcontent-%COMP%]{width:220px}@media only screen and (max-width: 1024px){.modal-info[_ngcontent-%COMP%] h2.loading[_ngcontent-%COMP%]{width:310px}}.modal-info[_ngcontent-%COMP%] h2.loading[_ngcontent-%COMP%]:after{content:"\\2026";display:inline-block;width:0;overflow:hidden;vertical-align:bottom;animation:_ngcontent-%COMP%_ellipsis steps(4,end) .9s infinite}.modal-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{width:260px;text-align:center}@media only screen and (max-width: 1024px){.modal-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{width:auto}}.edit-profile[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding-top:24px;border-top:1px solid var(--alt-40)}@media only screen and (max-width: 767px){.edit-profile[_ngcontent-%COMP%]{flex-wrap:wrap}}.edit-profile[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%]{min-width:104px;margin-left:8px}@media only screen and (max-width: 767px){.edit-profile[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%]{margin:12px 0 0}}@keyframes _ngcontent-%COMP%_ellipsis{to{width:1.25em}}']
})
}
return o
}
)()
, to = ( () => {
class o {
constructor(e, n, i, s) {
this.livekit = e,
this.analyticsService = n,
this.dialogRef = i,
this.dialog = s
}
inviteRandomMatch() {
this.livekit.room.groupMatch.waiting = !0,
this.dialogRef.close(),
this.dialog.open(Xt, {
panelClass: "fullscreen-dialog",
width: "480px"
})
}
inviteFriends() {
this.livekit.room.groupMatch.waiting = !1,
this.dialogRef.close(),
this.analyticsService.markActivity(u.kP.LivekitAudioPodModalOpen),
this.dialog.open(Rt, {
panelClass: "fullscreen-dialog",
width: "640px"
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(u.uc),t.GI1(p.yI),t.GI1(p.qW))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-pods-modal"]],
decls: 16,
vars: 2,
consts: [[1, "mat-header"], ["mat-dialog-title", ""], ["mat-dialog-close", "", 1, "close-modal"], ["iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant"], [1, "pod-option-item", "random", 3, "click"], [1, "pod-option-item", "friends", 3, "click"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "h2", 1),
t.OEk(2, "Spaces"),
t.C$Y(),
t.I0R(3, "button", 2),
t.wR5(4, "ss-icon", 3),
t.C$Y()(),
t.I0R(5, "mat-dialog-content")(6, "div", 4),
t.qCj("click", function() {
return i.inviteRandomMatch()
}),
t.I0R(7, "h2"),
t.OEk(8, "Random match"),
t.C$Y(),
t.I0R(9, "small"),
t.OEk(10, "Someone else who is looking for a random focus buddy"),
t.C$Y()(),
t.I0R(11, "div", 5),
t.qCj("click", function() {
return i.inviteFriends()
}),
t.I0R(12, "h2"),
t.OEk(13, "Invite friends"),
t.C$Y(),
t.I0R(14, "small"),
t.OEk(15, "Invite people who are following or have pinned you"),
t.C$Y()()()),
2 & n && (t.yG2(4),
t.E7m("size", 20)("iconVariant", 20))
},
dependencies: [C.g, p.qq, p.WQ, p.iU],
styles: [".pod-option-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;height:143px;padding:0 24px;margin-bottom:20px;border:1px solid var(--alt-20);border-radius:16px;cursor:pointer;transition:all .3s ease-in-out}.pod-option-item[_ngcontent-%COMP%]:last-of-type{margin:0}.pod-option-item.random[_ngcontent-%COMP%]{background:url(/assets/images/pods-item-2.svg) 96% 80% no-repeat,url(/assets/images/pods-item-1.svg) 80% center no-repeat}.pod-option-item.friends[_ngcontent-%COMP%]{background:url(/assets/images/pods-item-3.svg) 116% 0 no-repeat}.pod-option-item[_ngcontent-%COMP%]:hover{border-color:var(--accent-blue);box-shadow:var(--elevation-l1)}.pod-option-item[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:block;width:182px}.dark-theme[_nghost-%COMP%] .pod-option-item.random[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pod-option-item.random[_ngcontent-%COMP%]{background:url(/assets/images/pods-item-2.svg) 96% 80% no-repeat,url(/assets/images/pods-item-1-dark.svg) 80% center no-repeat}.dark-theme[_nghost-%COMP%] .pod-option-item.friends[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pod-option-item.friends[_ngcontent-%COMP%]{background:url(/assets/images/pods-item-3-dark.svg) 116% 0 no-repeat}"]
})
}
return o
}
)();
var eo = c(6092);
let Zt = ( () => {
class o {
get paginator() {
return this.livekit.room.paginator
}
constructor(e) {
this.livekit = e,
this.lastFiredPageChangeEvent = null
}
onKeyDown(e) {
e.repeat || ("ArrowRight" === e.key ? this.nextPage() : "ArrowLeft" === e.key && this.previousPage())
}
nextPage() {
this.shouldDisableKeyNavigation() || this.livekit.room.paginator.next() && this.tryToFireCustomEvent()
}
previousPage() {
this.shouldDisableKeyNavigation() || this.livekit.room.paginator.previous() && this.tryToFireCustomEvent()
}
skipTenForward() {
this.livekit.room.paginator.skipTenForward() && this.tryToFireCustomEvent()
}
skipTenBack() {
this.livekit.room.paginator.skipTenBack() && this.tryToFireCustomEvent()
}
tryToFireCustomEvent() {
if (this.lastFiredPageChangeEvent && M.CS.now().diff(this.lastFiredPageChangeEvent, "seconds").seconds < 10)
return;
const e = new CustomEvent("ssRoomPageChanged",{
detail: {
payload: "pageChangeEvent"
}
});
window.dispatchEvent(e),
this.lastFiredPageChangeEvent = M.CS.now()
}
shouldDisableKeyNavigation() {
return document.activeElement?.classList.contains("ql-editor") || "input" === document.activeElement?.tagName.toLowerCase() || "textarea" === document.activeElement?.tagName.toLowerCase()
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-paginator"]],
hostBindings: function(n, i) {
1 & n && t.qCj("keydown", function(a) {
return i.onKeyDown(a)
}, !1, t.wLc)
},
decls: 6,
vars: 16,
consts: [["iconName", "chevron_double_left", 3, "role", "color", "iconVariant", "size", "click"], ["iconName", "chevron_left", 3, "role", "color", "size", "click"], ["iconName", "chevron_right", 3, "role", "color", "size", "click"], ["iconName", "chevron_double_right", 3, "role", "color", "iconVariant", "size", "click"]],
template: function(n, i) {
1 & n && (t.I0R(0, "ss-icon", 0),
t.qCj("click", function() {
return i.skipTenBack()
}),
t.C$Y(),
t.I0R(1, "ss-icon", 1),
t.qCj("click", function() {
return i.previousPage()
}),
t.C$Y(),
t.I0R(2, "span"),
t.OEk(3),
t.C$Y(),
t.I0R(4, "ss-icon", 2),
t.qCj("click", function() {
return i.nextPage()
}),
t.C$Y(),
t.I0R(5, "ss-icon", 3),
t.qCj("click", function() {
return i.skipTenForward()
}),
t.C$Y()),
2 & n && (t.E7m("role", i.paginator.currentPage > 1 ? "button" : "icon")("color", i.paginator.currentPage > 1 ? "accent-blue-60" : "default-80")("iconVariant", 20)("size", 24),
t.yG2(),
t.E7m("role", i.paginator.currentPage > 1 ? "button" : "icon")("color", i.paginator.currentPage > 1 ? "accent-blue-60" : "default-80")("size", 24),
t.yG2(2),
t.CAO("", i.paginator.currentPage, " / ", i.paginator.totalPages || 1, ""),
t.yG2(),
t.E7m("role", i.paginator.currentPage !== (i.paginator.totalPages || 1) ? "button" : "icon")("color", i.paginator.currentPage !== (i.paginator.totalPages || 1) ? "accent-blue-60" : "default-80")("size", 24),
t.yG2(),
t.E7m("role", i.paginator.currentPage !== (i.paginator.totalPages || 1) ? "button" : "icon")("color", i.paginator.currentPage !== (i.paginator.totalPages || 1) ? "accent-blue-60" : "default-80")("iconVariant", 20)("size", 24))
},
dependencies: [C.g],
styles: ["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;flex-shrink:0;width:150px;margin:1px 10px 0;-webkit-user-select:none;user-select:none}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{margin-bottom:30px}}ss-icon[_ngcontent-%COMP%]{width:20px}span[_ngcontent-%COMP%]{display:inline-block;margin:0 6px}"]
})
}
return o
}
)();
var te = c(6072)
, ut = c(4500);
function io(o, r) {
1 & o && t.wR5(0, "mat-spinner", 7)
}
function no(o, r) {
1 & o && t.wR5(0, "ss-icon", 8),
2 & o && t.E7m("size", 20)("iconVariant", 20)
}
function oo(o, r) {
1 & o && (t.I0R(0, "small"),
t.OEk(1, "Note: everyone is muted inside the room but you can use audio inside private spaces (if you join/create one)."),
t.C$Y())
}
function so(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-select", 9),
t.iHE("ngModelChange", function(i) {
t.usT(e);
const s = t.GaO();
return t.kNx(s.settings.activeAudioDevice, i) || (s.settings.activeAudioDevice = i),
t.CGJ(i)
}),
t.C$Y(),
t.yuY(1, oo, 2, 0, "small")
}
if (2 & o) {
const e = t.GaO();
t.OKB("ngModel", e.settings.activeAudioDevice),
t.E7m("options", e.availableAudioDevices)("disabled", 0 === e.availableAudioDevices.length),
t.yG2(),
t.C0Y(1, e.allowOnlyGroupAudio ? 1 : -1)
}
}
let ro = ( () => {
class o {
get isDarkTheme() {
return this.theme === x.ru.Dark
}
get canPublishAudio() {
return this.livekit.room.canPublishAudio
}
get allowOnlyGroupAudio() {
return this.livekit.room.allowOnlyGroupAudio
}
get zoomToFitDisabled() {
return !this.settings.zoomToFit && this.settings.isCameraEnabled
}
constructor(e, n, i, s, a) {
this.livekit = e,
this.theme = n,
this.mediaDevicesService = i,
this.loaderService = s,
this.dialogRef = a,
this.availableAudioDevices = [],
this.mediaDevicesLoaded = !1,
this.mediaDevicesPromptDisplayed = !1,
this.ButtonLoadersRef = pt,
this.closeModalHeaderButtonLoading = !1,
this.saveButtonLoading = !1,
this.setAvailableDevices = this.setAvailableDevices.bind(this),
this.settings = JSON.parse(JSON.stringify(this.livekit.room.settings))
}
ngOnInit() {
var e = this;
return (0,
S.c)(function*() {
if (e.loaderService.stop(),
!navigator.userAgent.toLowerCase().includes("firefox") && "denied" === (yield navigator.permissions.query({
name: "camera"
})).state)
return e.mediaDevicesLoaded = !0,
void e.tryClosing();
window.navigator && navigator.mediaDevices.addEventListener("devicechange", e.setAvailableDevices),
e.mediaDevicesService.getDevices("audioinput", !0).then(i => {
if (e.availableAudioDevices = i,
e.mediaDevicesLoaded = !0,
e.tryClosing(),
0 === e.availableAudioDevices.length)
return;
const s = e.livekit.room.settings.activeAudioDevice
, a = s ? e.availableAudioDevices.find(d => d.deviceId === s) : null;
e.settings.activeAudioDevice = a?.deviceId ?? e.availableAudioDevices[0].deviceId
}
)
})()
}
ngOnDestroy() {
window.navigator && navigator.mediaDevices.removeEventListener("devicechange", this.setAvailableDevices)
}
onClose(e) {
if (e !== pt.Save)
return this.closeModalHeaderButtonLoading = !0,
void this.dialogRef.close();
this.mediaDevicesLoaded || this.mediaDevicesPromptDisplayed ? (this.dialogRef.close(this.settings),
this.availableAudioDevices = []) : this.saveButtonLoading = !0
}
setAvailableDevices() {
this.mediaDevicesService.getDevices("audioinput", !0).then(e => {
this.availableAudioDevices = e
}
)
}
tryClosing() {
this.closeModalHeaderButtonLoading ? (this.closeModalHeaderButtonLoading = !1,
this.onClose(pt.Close)) : this.saveButtonLoading && (this.saveButtonLoading = !1,
this.onClose(pt.Save))
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(p.sR),t.GI1(ut.Y1),t.GI1(Tt.i),t.GI1(p.yI))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-audio-source-modal"]],
decls: 13,
vars: 5,
consts: [[1, "mat-header"], ["mat-dialog-title", ""], [1, "close-modal", 3, "click"], ["diameter", "20", "strokeWidth", "2", 4, "ngIf"], ["iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant", 4, "ngIf"], ["color", "tertiary", 3, "isLoading", "buttonClick"], ["color", "positive", 3, "isLoading", "buttonClick"], ["diameter", "20", "strokeWidth", "2"], ["iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant"], ["id", "activeDevice", "name", "activeDevice", "placeholder", "Select audio device", "labelProperty", "label", "valueProperty", "deviceId", 3, "ngModel", "options", "disabled", "ngModelChange"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "h2", 1),
t.OEk(2, "Audio Settings"),
t.C$Y(),
t.I0R(3, "button", 2),
t.qCj("click", function() {
return i.onClose(i.ButtonLoadersRef.Close)
}),
t.yuY(4, io, 1, 0, "mat-spinner", 3)(5, no, 1, 2, "ss-icon", 4),
t.C$Y()(),
t.I0R(6, "mat-dialog-content"),
t.yuY(7, so, 2, 4),
t.C$Y(),
t.I0R(8, "mat-dialog-actions")(9, "ss-button", 5),
t.qCj("buttonClick", function() {
return i.onClose(i.ButtonLoadersRef.Close)
}),
t.OEk(10, " Cancel "),
t.C$Y(),
t.I0R(11, "ss-button", 6),
t.qCj("buttonClick", function() {
return i.onClose(i.ButtonLoadersRef.Save)
}),
t.OEk(12, " Unmute "),
t.C$Y()()),
2 & n && (t.yG2(4),
t.E7m("ngIf", i.closeModalHeaderButtonLoading),
t.yG2(),
t.E7m("ngIf", !i.closeModalHeaderButtonLoading),
t.yG2(2),
t.C0Y(7, i.canPublishAudio ? 7 : -1),
t.yG2(2),
t.E7m("isLoading", i.saveButtonLoading),
t.yG2(2),
t.E7m("isLoading", i.saveButtonLoading))
},
dependencies: [h.u_, O.k, C.g, ot.YD, b.ue, b._G, p.WQ, p.Yp, p.iU, z.cm],
styles: ["[_nghost-%COMP%]{position:relative;display:flex;flex-direction:row;flex-direction:column;justify-content:center;align-items:flex-start;width:100%;height:100%}.toggle-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;padding:10px 0}ss-select[_ngcontent-%COMP%]{margin:10px 0}mat-checkbox[_ngcontent-%COMP%]{margin-top:20px}.mat-header[_ngcontent-%COMP%], mat-dialog-content[_ngcontent-%COMP%], mat-dialog-actions[_ngcontent-%COMP%]{width:100%}"]
})
}
return o
}
)();
var pt = function(o) {
return o.Close = "Close",
o.Save = "Save",
o
}(pt || {});
function ao(o, r) {
1 & o && t.wR5(0, "mat-spinner", 8)
}
function co(o, r) {
1 & o && t.wR5(0, "ss-icon", 9),
2 & o && t.E7m("size", 20)("iconVariant", 20)
}
let lo = ( () => {
class o {
get zoomToFitDisabled() {
return !this.settings.zoomToFit && this.settings.isCameraEnabled
}
constructor(e, n, i, s) {
this.livekit = e,
this.mediaDevicesService = n,
this.loaderService = i,
this.dialogRef = s,
this.availableVideoDevices = [],
this.mediaDevicesLoaded = !1,
this.mediaDevicesPromptDisplayed = !1,
this.ButtonLoadersRef = mt,
this.closeModalHeaderButtonLoading = !1,
this.saveButtonLoading = !1,
this.setAvailableDevices = this.setAvailableDevices.bind(this),
this.settings = JSON.parse(JSON.stringify(this.livekit.room.settings))
}
ngOnInit() {
var e = this;
return (0,
S.c)(function*() {
if (e.loaderService.stop(),
!navigator.userAgent.toLowerCase().includes("firefox") && "denied" === (yield navigator.permissions.query({
name: "camera"
})).state)
return e.mediaDevicesLoaded = !0,
void e.tryClosing();
window.navigator && navigator.mediaDevices.addEventListener("devicechange", e.setAvailableDevices),
e.mediaDevicesService.getDevices("videoinput", !1).then(i => e.mediaDevicesPromptDisplayed = !0),
e.mediaDevicesService.getDevices("videoinput", !0).then(i => {
if (e.availableVideoDevices = i,
e.mediaDevicesLoaded = !0,
e.tryClosing(),
0 === e.availableVideoDevices.length)
return;
const s = e.livekit.room.settings.activeVideoDevice
, a = s ? e.availableVideoDevices.find(d => d.deviceId === s) : null;
e.settings.activeVideoDevice = a?.deviceId ?? e.availableVideoDevices[0].deviceId,
e.changeActiveVideoDevice()
}
).catch(i => {
console.log(i)
}
)
})()
}
ngOnDestroy() {
window.navigator && navigator.mediaDevices.removeEventListener("devicechange", this.setAvailableDevices)
}
onShowCameraChange(e) {
if (e.checked)
return this.settings.activeVideoDevice = this.availableVideoDevices[0].deviceId,
void this.changeActiveVideoDevice();
this.settings.activeVideoDevice = null,
this.settings.isCameraEnabled = !1
}
changeActiveVideoDevice() {
this.settings.activeVideoDevice && (this.settings.isCameraEnabled = !0)
}
onZoomToFitChange(e) {
this.settings.zoomToFit = e.checked
}
onClose(e) {
if (e !== mt.Save)
return this.settings.activeVideoDevice = null,
this.settings.isCameraEnabled = !1,
this.closeModalHeaderButtonLoading = !0,
void this.dialogRef.close();
this.mediaDevicesLoaded || this.mediaDevicesPromptDisplayed ? this.dialogRef.close(this.settings) : this.saveButtonLoading = !0
}
setAvailableDevices() {
this.mediaDevicesService.getDevices("videoinput", !0).then(e => {
this.availableVideoDevices = e
}
)
}
tryClosing() {
this.closeModalHeaderButtonLoading ? (this.closeModalHeaderButtonLoading = !1,
this.onClose(mt.Close)) : this.saveButtonLoading && (this.saveButtonLoading = !1,
this.onClose(mt.Save))
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(ut.Y1),t.GI1(Tt.i),t.GI1(p.yI))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-video-source-modal"]],
decls: 13,
vars: 7,
consts: [[1, "mat-header"], ["mat-dialog-title", ""], [1, "close-modal", 3, "click"], ["diameter", "20", "strokeWidth", "2", 4, "ngIf"], ["iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant", 4, "ngIf"], ["id", "activeDevice", "name", "activeDevice", "placeholder", "Select video device", "labelProperty", "label", "valueProperty", "deviceId", 3, "ngModel", "options", "disabled", "ngModelChange", "selectionChange"], ["color", "tertiary", 3, "isLoading", "buttonClick"], ["color", "positive", 3, "isLoading", "buttonClick"], ["diameter", "20", "strokeWidth", "2"], ["iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "h2", 1),
t.OEk(2, "Video Settings"),
t.C$Y(),
t.I0R(3, "button", 2),
t.qCj("click", function() {
return i.onClose(i.ButtonLoadersRef.Close)
}),
t.yuY(4, ao, 1, 0, "mat-spinner", 3)(5, co, 1, 2, "ss-icon", 4),
t.C$Y()(),
t.I0R(6, "mat-dialog-content")(7, "ss-select", 5),
t.iHE("ngModelChange", function(a) {
return t.kNx(i.settings.activeVideoDevice, a) || (i.settings.activeVideoDevice = a),
a
}),
t.qCj("selectionChange", function() {
return i.changeActiveVideoDevice()
}),
t.C$Y()(),
t.I0R(8, "mat-dialog-actions")(9, "ss-button", 6),
t.qCj("buttonClick", function() {
return i.onClose(i.ButtonLoadersRef.Close)
}),
t.OEk(10, " Cancel "),
t.C$Y(),
t.I0R(11, "ss-button", 7),
t.qCj("buttonClick", function() {
return i.onClose(i.ButtonLoadersRef.Save)
}),
t.OEk(12, " Turn camera on "),
t.C$Y()()),
2 & n && (t.yG2(4),
t.E7m("ngIf", i.closeModalHeaderButtonLoading),
t.yG2(),
t.E7m("ngIf", !i.closeModalHeaderButtonLoading),
t.yG2(2),
t.OKB("ngModel", i.settings.activeVideoDevice),
t.E7m("options", i.availableVideoDevices)("disabled", 0 === i.availableVideoDevices.length),
t.yG2(2),
t.E7m("isLoading", i.saveButtonLoading),
t.yG2(2),
t.E7m("isLoading", i.saveButtonLoading))
},
dependencies: [h.u_, O.k, C.g, ot.YD, b.ue, b._G, p.WQ, p.Yp, p.iU, z.cm],
styles: ["[_nghost-%COMP%]{position:relative;display:flex;flex-direction:row;flex-direction:column;justify-content:center;align-items:flex-start;width:100%;height:100%}.toggle-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;padding:10px 0}ss-select[_ngcontent-%COMP%]{margin:10px 0}mat-checkbox[_ngcontent-%COMP%]{margin-top:20px}.mat-header[_ngcontent-%COMP%], mat-dialog-content[_ngcontent-%COMP%], mat-dialog-actions[_ngcontent-%COMP%]{width:100%}"]
})
}
return o
}
)();
var mt = function(o) {
return o.Close = "Close",
o.Save = "Save",
o
}(mt || {})
, uo = c(1177)
, ee = c(1892)
, po = c(5344);
let mo = ( () => {
class o {
get documentPictureInPicture() {
return "documentPictureInPicture"in window ? window.documentPictureInPicture : null
}
get documentPictureInPictureAvailable() {
return "documentPictureInPicture"in window
}
get tooltipText() {
return this.documentPictureInPictureAvailable ? 0 === this.pipParticipants.length ? "In order to use picture-in-picture please go to a page where someone has their camera on." : this.loadingPiP ? "Loading..." : this.isPiPOn ? "Turn picture-in-picture off" : "Turn picture-in-picture on" : "Picture-in-picture is only available in desktop versions of Chrome, Edge, Brave and other Chromium based browsers (versions \u2265 111)."
}
get isChromeOrEdge() {
return this.browser === ut.im.Chrome || this.browser === ut.im.Edge
}
constructor(e, n, i, s, a, d, m, v) {
this.settingsService = e,
this.livekit = n,
this.dialog = i,
this.themeService = s,
this.accountModalsService = a,
this.utilityService = d,
this.analyticsService = m,
this.toastService = v,
this.displayedParticipants = [],
this.pipParticipants = [],
this.isPiPOn = !1,
this.loadingPiP = !1,
this.browser = (0,
ut.M0)(),
this.pipWindow = null,
this.subscriptions = []
}
ngOnInit() {
this.setParticipantsToShow(),
this.subscriptions.push(this.themeService.themeChange.subscribe( () => setTimeout( () => this.setDocumentBackgroundColor())), this.utilityService.isMobile.subscribe(e => this.isMobile = e), this.livekit.pipWindowClose.subscribe( () => this.tryClosingPipWindow()), this.livekit.recalculateGrid.subscribe( () => {
this.setParticipantsToShow(),
this.pipWindow && this.redrawPipElements(this.pipWindow)
}
))
}
ngOnChanges(e) {
e.displayedParticipants && !e.displayedParticipants.firstChange && (this.setParticipantsToShow(),
this.pipWindow && this.redrawPipElements(this.pipWindow))
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe())
}
tryToTogglePictureInPicture() {
var e = this;
return (0,
S.c)(function*() {
const n = e.livekit.room.pipOptions;
if (!n.usePip)
return n.doNotAskMeAgain ? (e.analyticsService.markActivity(u.kP.LivekitPiPInfoShown),
void e.toastService.info({
message: "You chose not to be asked about picture-in-picture again. If you want us to ask you again, please log out and log back in."
})) : void e.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Enable picture-in-picture?",
description: "EnablePictureInPictureWarning",
confirmButtonLabel: "Reload",
cancelButtonLabel: "Cancel",
checkboxLabel: "Remember my choice"
}
}).afterClosed().subscribe(s => {
s && (e.livekit.room.pipOptions = {
usePip: s.dialogResult,
doNotAskMeAgain: s.checkboxValue
},
s.dialogResult && window.location.reload())
}
);
e.isPiPOn ? e.onLeavePiP() : yield e.enterPiP()
})()
}
tryClosingPipWindow() {
this.pipWindow?.close(),
this.pipWindow = null,
this.isPiPOn = !1
}
enterPiP() {
var e = this;
return (0,
S.c)(function*() {
e.documentPictureInPicture && e.accountModalsService.ensureUserCompletedBasicInfo() && (e.setParticipantsToShow(),
0 !== e.pipParticipants.length) && (e.pipWindow = yield e.documentPictureInPicture.requestWindow({
width: 640,
height: 390
}),
e.setDocumentBackgroundColor(),
e.drawPiPElements(e.pipWindow),
e.pipWindow.addEventListener("pagehide", e.onLeavePiP.bind(e), {
once: !0
}),
e.isPiPOn = !0,
e.analyticsService.markActivity(u.kP.LivekitPiPStart))
})()
}
onLeavePiP() {
this.tryClosingPipWindow(),
this.analyticsService.markActivity(u.kP.LivekitPiPStop)
}
drawPiPElements(e) {
e.document.body.style.margin = "0px",
this.createAndAddContainerElement(e);
for (const n of this.pipParticipants)
this.createAndAddVideoElement(n, e)
}
redrawPipElements(e) {
const n = e.document.querySelector(".container");
this.resetContainerStyles(n);
const i = Array.from(e.document.querySelectorAll("video"));
for (const s of i)
void 0 === this.pipParticipants.find(a => a.sid == s.id) && s.remove();
for (const s of this.pipParticipants)
null === e.document.querySelector(`video#${s.sid}`) && this.createAndAddVideoElement(s, e)
}
createAndAddContainerElement(e) {
const n = document.createElement("div");
this.resetContainerStyles(n),
e.document.body.append(n)
}
resetContainerStyles(e) {
e.className = "container",
e.style.display = "grid",
e.style.alignItems = "center",
e.style.gridTemplateColumns = this.pipParticipants.length > 1 ? "1fr 1fr" : "1fr",
e.style.gridTemplateRows = this.pipParticipants.length > 2 ? "1fr 1fr" : "1fr",
e.style.width = "100%",
e.style.height = "calc((100vw / 16) * 9)"
}
createAndAddVideoElement(e, n) {
const i = n.document.createElement("video");
i.id = e.sid,
i.style.width = "100%",
e.isLocal && this.livekit.room.settings.mirrorMode && (i.style.transform = "scaleX(-1)"),
n.document.querySelector(".container").append(i),
this.tryBindingActivePublication(e)
}
tryBindingActivePublication(e) {
const n = e.getTrackPublications().find(i => i.kind === l.oh.Kind.Video && i.isSubscribed);
n ? this.tryToAttachVideoElement(e.sid, n) : e.on(l.Cu.TrackSubscribed, (i, s) => {
i.kind === l.oh.Kind.Video && this.tryToAttachVideoElement(e.sid, s)
}
)
}
tryToAttachVideoElement(e, n) {
if (!this.pipWindow)
return;
const i = n.track;
if (!i)
return;
const s = this.pipWindow.document.querySelector(`video#${e}`);
i.attachedElements.includes(s) || i.attach(s)
}
setParticipantsToShow() {
this.pipParticipants = [];
const e = this.displayedParticipants.filter(n => n.isCameraEnabled && n.identity);
this.pipParticipants = e.slice(0, 4),
window.pipParticipants = this.pipParticipants
}
setDocumentBackgroundColor() {
if (!this.pipWindow)
return;
const e = getComputedStyle(document.body).backgroundColor;
this.pipWindow.document.body.style.background = e
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(L.Y),t.GI1(g.A),t.GI1(p.qW),t.GI1(st.a),t.GI1(V.E),t.GI1(I.UZ),t.GI1(u.uc),t.GI1(k.s))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-document-picture-in-picture"]],
inputs: {
displayedParticipants: "displayedParticipants"
},
features: [t.SYr],
decls: 1,
vars: 6,
consts: [["iconName", "picture_in_picture_enter", 3, "matTooltip", "active", "iconSize", "iconOnly", "isLoading", "disabled", "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "ss-button", 0),
t.qCj("buttonClick", function() {
return i.tryToTogglePictureInPicture()
}),
t.C$Y()),
2 & n && t.E7m("matTooltip", i.tooltipText)("active", i.isPiPOn)("iconSize", i.isMobile ? 24 : 20)("iconOnly", !0)("isLoading", i.loadingPiP)("disabled", 0 === i.pipParticipants.length || !i.documentPictureInPictureAvailable)
},
dependencies: [O.k, R.a4],
styles: ["[_nghost-%COMP%]{display:inline-block}@media only screen and (max-width: 767px){[_nghost-%COMP%]{display:none}}[_nghost-%COMP%] ss-button[_ngcontent-%COMP%]{margin-right:10px}[_nghost-%COMP%] ss-button[_ngcontent-%COMP%] button.primary{height:auto;padding:0;background:none}[_nghost-%COMP%] ss-button[_ngcontent-%COMP%] button.primary:hover{background:none}[_nghost-%COMP%] ss-button[_ngcontent-%COMP%] button.primary.active ss-icon i{color:var(--contrast)}"]
})
}
return o
}
)()
, ho = ( () => {
class o {
get localParticipant() {
return this.livekit.room.localParticipant
}
get hasActiveStatus() {
return null !== this.livekit.room.userActiveStatus && !this.livekit.room.userActiveStatus.clearedAt
}
constructor(e, n, i, s) {
this.livekit = e,
this.accountModalsService = n,
this.toastService = i,
this.badgeService = s,
this.mobileStatus = !1,
this.currentUserStatus = {
text: ""
},
this.currentUserStatusActions = {
send: {
iconName: "send",
loading: !1,
onClick: () => this.sendStatus(),
disabled: () => this.shouldDisableSendingStatuses(),
tooltipText: () => {
const a = this.getStatusTimeoutDateTime();
if (!a || M.CS.now() > a)
return this.currentUserStatus.text.length < 2 ? "Type at least 2 characters." : "Post";
const d = a.diffNow(["seconds"]) ?? "";
return `You can update again in ${Math.floor(d.seconds)}s`
}
},
undo: {
iconName: "arrow_undo",
loading: !1,
onClick: () => this.clearStatus(),
disabled: () => !this.localParticipant.status,
tooltipText: () => this.localParticipant.status ? "Clear" : ""
}
},
this.subscriptions = []
}
ngOnInit() {
this.subscriptions.push(this.livekit.participantMetadataUpdated.subscribe(e => {
this.livekit.room.localParticipant.identity === e.identity && this.setStatus()
}
)),
this.setStatus()
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe())
}
shouldDisableSendingStatuses() {
return this.currentUserStatus.text.length < 2 || this.shouldDisableStatusInput()
}
shouldDisableStatusInput() {
const e = this.getStatusTimeoutDateTime();
return !!e && M.CS.now() < e
}
sendStatus() {
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.currentUserStatusActions.send.loading = !0,
this.livekit.createUserStatus(this.livekit.room.name, {
text: this.currentUserStatus.text,
localParticipantTilePage: this.livekit.room.paginator.currentPage
}).subscribe({
next: n => {
this.livekit.room.milestones.createdTileStatus || this.subscriptions.push((0,
w.k)(5e3).subscribe( () => this.badgeService.checkForNewBadges.next())),
this.livekit.room.milestones.createdTileStatus = !0,
this.currentUserStatusActions.send.loading = !1,
this.livekit.room.userActiveStatus ? (this.livekit.room.userActiveStatus.id = n.id,
this.livekit.room.userActiveStatus.text = n.text,
this.livekit.room.userActiveStatus.postedAt = n.postedAt,
this.livekit.room.userActiveStatus.clearedAt = null,
this.livekit.room.userActiveStatus.topReaction = null,
this.livekit.room.userActiveStatus.totalReactions = 0) : this.livekit.room.userActiveStatus = n,
this.livekit.room.localParticipant.status = this.livekit.room.userActiveStatus
}
,
error: n => this.handleErrors(n)
}))
}
setStatus() {
const e = this.livekit.room.userActiveStatus;
this.currentUserStatus.text = e && !e.clearedAt ? e.text : ""
}
clearStatus() {
this.currentUserStatusActions.undo.loading = !0,
this.livekit.clearUserStatus(this.livekit.room.name).subscribe({
next: () => {
this.currentUserStatusActions.undo.loading = !1,
this.currentUserStatus.text = "",
this.livekit.room.userActiveStatus = null,
this.livekit.room.localParticipant.status = null
}
,
error: e => this.handleErrors(e)
})
}
getStatusTimeoutDateTime() {
const e = this.localParticipant.status?.postedAt;
return e ? M.CS.fromISO(e).plus({
seconds: 10
}) : null
}
handleErrors(e) {
this.currentUserStatusActions.send.loading = !1,
this.currentUserStatusActions.undo.loading = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(V.E),t.GI1(k.s),t.GI1(Z.A))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-status"]],
hostVars: 2,
hostBindings: function(n, i) {
2 & n && t.eAK("mobile-status", i.mobileStatus)
},
inputs: {
mobileStatus: "mobileStatus"
},
decls: 1,
vars: 5,
consts: [["id", "status-text", "name", "currentUserStatusText", "type", "search", "placeholder", "Post video tile message...", "autocomplete", "off", 3, "actions", "ngModel", "disabled", "ngModelChange", "keyup.enter"]],
template: function(n, i) {
1 & n && (t.I0R(0, "ss-input", 0),
t.iHE("ngModelChange", function(a) {
return t.kNx(i.currentUserStatus.text, a) || (i.currentUserStatus.text = a),
a
}),
t.qCj("keyup.enter", function() {
return i.sendStatus()
}),
t.C$Y()),
2 & n && (t.eAK("has-status", i.hasActiveStatus),
t.E7m("actions", i.currentUserStatusActions),
t.OKB("ngModel", i.currentUserStatus.text),
t.E7m("disabled", i.shouldDisableStatusInput()))
},
dependencies: [q.g, b.ue, b._G],
styles: ["@media only screen and (max-width: 1300px){.mobile-status[_nghost-%COMP%]{position:absolute;top:100;z-index:5;width:100%;padding:10px 5px}}@media only screen and (max-width: 1024px){.mobile-status[_nghost-%COMP%]{position:absolute;top:auto;bottom:63px;z-index:5;width:100%;padding:10px 5px}}@media only screen and (max-height: 480px){.mobile-status[_nghost-%COMP%]{bottom:-63px;left:-146px;width:100vw}}.mobile-status[_nghost-%COMP%] ss-input[_ngcontent-%COMP%]{width:100%}.mobile-status[_nghost-%COMP%] ss-input[_ngcontent-%COMP%] input{height:48px}[_nghost-%COMP%] ss-input[_ngcontent-%COMP%]{margin-bottom:0}[_nghost-%COMP%] ss-input.has-status[_ngcontent-%COMP%] input{border:1px solid var(--positive)!important}[_nghost-%COMP%] ss-input[_ngcontent-%COMP%] .mdc-text-field--disabled{pointer-events:initial}[_nghost-%COMP%] ss-input[_ngcontent-%COMP%] input{padding:6px 72px 6px 16px;border:1px solid var(--alt-20)}[_nghost-%COMP%] ss-input[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:36px}"]
})
}
return o
}
)();
const go = (o, r) => r.id;
function fo(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 2),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO().$implicit
, s = t.GaO();
return t.CGJ(s.setBackgroundOption(i))
}),
t.OEk(1),
t.C$Y()
}
if (2 & o) {
const e = t.GaO().$implicit
, n = t.GaO();
t.eAK("active", e.id === n.activeVirtualBackgroundOptionId)("soft-blur", e.name === n.BackgroundOptionNameRef.SoftBlur)("hard-blur", e.name === n.BackgroundOptionNameRef.HardBlur)("disabled", !n.localParticipant.isCameraEnabled || n.virtualBackgroundLoading),
t.E7m("matTooltip", n.localParticipant.isCameraEnabled ? "" : "Turn on camera to apply virtual background"),
t.yG2(),
t.oRS(" ", e.name, " ")
}
}
function _o(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "img", 3),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO().$implicit
, s = t.GaO();
return t.CGJ(s.setBackgroundOption(i))
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO().$implicit
, n = t.GaO();
t.eAK("active", e.id === n.activeVirtualBackgroundOptionId)("disabled", !n.localParticipant.isCameraEnabled || n.virtualBackgroundLoading),
t.E7m("matTooltip", n.localParticipant.isCameraEnabled ? "" : "Turn on camera to apply virtual background")("src", e.imageUrl, t.K6U)("alt", e.name)
}
}
function vo(o, r) {
if (1 & o && t.yuY(0, fo, 2, 10, "div", 0)(1, _o, 1, 7, "img", 1),
2 & o) {
const e = r.$implicit
, n = t.GaO();
t.E7m("ngIf", e.type === n.BackgroundOptionTypeRef.Blur || e.type === n.BackgroundOptionTypeRef.None),
t.yG2(),
t.E7m("ngIf", e.type === n.BackgroundOptionTypeRef.Image)
}
}
let Co = ( () => {
class o {
get localParticipant() {
return this.livekit.room.localParticipant
}
constructor(e, n) {
this.livekit = e,
this.analyticsService = n,
this.updateActiveVirtualBackgroundOptionId = new t._w7,
this.backgroundOptions = [{
id: 1,
type: E.None,
name: B.None
}, {
id: 2,
type: E.Blur,
blurLevel: 5,
name: B.SoftBlur
}, {
id: 3,
type: E.Blur,
blurLevel: 10,
name: B.HardBlur
}, {
id: 4,
type: E.Image,
imageUrl: `${T.O.blobStorageRootUrl}/virtual-backgrounds/classic/fondo-virtual-foto-oficina-blanco.png`,
name: B.Classic1
}, {
id: 5,
type: E.Image,
imageUrl: `${T.O.blobStorageRootUrl}/virtual-backgrounds/classic/professional-office.png`,
name: B.Classic2
}, {
id: 6,
type: E.Image,
imageUrl: `${T.O.blobStorageRootUrl}/virtual-backgrounds/nature/fondo-virtual-foto-grupo-de-suricatas.png`,
name: B.Natural1
}, {
id: 7,
type: E.Image,
imageUrl: `${T.O.blobStorageRootUrl}/virtual-backgrounds/nature/green-and-blue-clean-and-corporate-empowerment.png`,
name: B.Natural2
}, {
id: 8,
type: E.Image,
imageUrl: `${T.O.blobStorageRootUrl}/virtual-backgrounds/fun-and-silly/blue-bright-sun-zoom.png`,
name: B.Fun1
}, {
id: 9,
type: E.Image,
imageUrl: `${T.O.blobStorageRootUrl}/virtual-backgrounds/fun-and-silly/naranja-verde-retro-tropical-colorido-plantas.png`,
name: B.Fun2
}, {
id: 10,
type: E.Image,
imageUrl: `${T.O.blobStorageRootUrl}/virtual-backgrounds/simple/abstract-textured-shapes-creative-zoom.png`,
name: B.Simple1
}, {
id: 11,
type: E.Image,
imageUrl: `${T.O.blobStorageRootUrl}/virtual-backgrounds/simple/brown-and-orange-abstract-zoom.png`,
name: B.Simple2
}, {
id: 12,
type: E.Image,
imageUrl: `${T.O.blobStorageRootUrl}/virtual-backgrounds/simple/pink-abstract-watercolor-zoom.png`,
name: B.Simple3
}],
this.BackgroundOptionTypeRef = E,
this.BackgroundOptionNameRef = B,
this.virtualBackgroundLoading = !1
}
setBackgroundOption(e) {
var n = this;
return (0,
S.c)(function*() {
if (!n.virtualBackgroundLoading && n.localParticipant.isCameraEnabled) {
if (n.virtualBackgroundLoading = !0,
n.analyticsService.markActivity(u.kP.LivekitVirtualBackground, {
newState: e.type,
imageName: e.name || "",
blur: e.blurLevel || ""
}),
n.activeVirtualBackgroundOptionId === e.id || e.type === E.None)
return yield n.livekit.room.disableVirtualBackground(),
n.updateActiveVirtualBackgroundOptionId.emit(1),
void (n.virtualBackgroundLoading = !1);
n.updateActiveVirtualBackgroundOptionId.emit(e.id),
e.type === E.Image && e.imageUrl ? yield n.livekit.room.enableBackgroundImage(e.imageUrl) : e.type === E.Blur && e.blurLevel && (yield n.livekit.room.enableBackgroundBlur(e.blurLevel)),
n.virtualBackgroundLoading = !1
}
})()
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(u.uc))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-virtual-backgrounds"]],
inputs: {
activeVirtualBackgroundOptionId: "activeVirtualBackgroundOptionId"
},
outputs: {
updateActiveVirtualBackgroundOptionId: "updateActiveVirtualBackgroundOptionId"
},
decls: 2,
vars: 0,
consts: [[3, "matTooltip", "active", "soft-blur", "hard-blur", "disabled", "click", 4, "ngIf"], [3, "matTooltip", "active", "disabled", "src", "alt", "click", 4, "ngIf"], [3, "matTooltip", "click"], [3, "matTooltip", "src", "alt", "click"]],
template: function(n, i) {
1 & n && t.c53(0, vo, 2, 2, null, null, go),
2 & n && t.oho(i.backgroundOptions)
},
dependencies: [h.u_, R.a4],
styles: ["[_nghost-%COMP%]{position:absolute;left:343px;display:grid;grid-template-columns:1fr 1fr 1fr;width:312px;box-sizing:content-box;padding:6px;border-radius:8px;background:var(--alt-90);gap:6px}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{position:static}}[_nghost-%COMP%] > div[_ngcontent-%COMP%], [_nghost-%COMP%] img[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100px;object-fit:cover;border:2px solid var(--alt-90);border-radius:8px;cursor:pointer;transition:border .3s ease;aspect-ratio:16/9;font-size:13px;line-height:20px}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:hover:not(.disabled), [_nghost-%COMP%] img[_ngcontent-%COMP%]:hover:not(.disabled){border:2px solid var(--accent-blue-40)}[_nghost-%COMP%] > div.active[_ngcontent-%COMP%], [_nghost-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--accent-blue)}[_nghost-%COMP%] > div.disabled[_ngcontent-%COMP%], [_nghost-%COMP%] img.disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.5}[_nghost-%COMP%] > div.soft-blur[_ngcontent-%COMP%], [_nghost-%COMP%] img.soft-blur[_ngcontent-%COMP%]{background-image:url(/assets/images/blur-background.jpg);background-position:bottom left}[_nghost-%COMP%] > div.hard-blur[_ngcontent-%COMP%], [_nghost-%COMP%] img.hard-blur[_ngcontent-%COMP%]{background-image:url(/assets/images/blur-background.jpg);background-size:cover}"]
})
}
return o
}
)();
var E = function(o) {
return o.Image = "image",
o.Blur = "blur",
o.None = "none",
o
}(E || {})
, B = function(o) {
return o.None = "None",
o.SoftBlur = "Soft Blur",
o.HardBlur = "Hard Blur",
o.Classic1 = "Classic 1",
o.Classic2 = "Classic 2",
o.Natural1 = "Natural 1",
o.Natural2 = "Natural 2",
o.Fun1 = "Fun 1",
o.Fun2 = "Fun 2",
o.Simple1 = "Simple 1",
o.Simple2 = "Simple 2",
o.Simple3 = "Simple 3",
o
}(B || {});
function bo(o, r) {
1 & o && t.wR5(0, "div", 15)
}
function ko(o, r) {
1 & o && (t.I0R(0, "div"),
t.OEk(1, "Turn off boost"),
t.C$Y())
}
function Po(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div"),
t.OEk(1, ' We also have a "superboost" feature for premium users. Upgrade and try it! \u{1f680} '),
t.C$Y(),
t.I0R(2, "ss-button", 16),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.upgradeForSuperboost())
}),
t.OEk(3),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.yG2(2),
t.E7m("autoSize", !0),
t.yG2(),
t.oRS(" ", e.buttonText, " ")
}
}
function yo(o, r) {
if (1 & o && (t.I0R(0, "div"),
t.OEk(1, "Get ahead of the crowd. Boost yourself forward."),
t.C$Y(),
t.yuY(2, Po, 4, 2)),
2 & o) {
const e = t.GaO();
t.yG2(2),
t.C0Y(2, e.subscriptionService.hasPremiumFeatures ? -1 : 2)
}
}
function Oo(o, r) {
if (1 & o && t.wR5(0, "ss-document-picture-in-picture", 11),
2 & o) {
const e = t.GaO();
t.E7m("displayedParticipants", e.livekit.room.displayedParticipants)
}
}
function Mo(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-icon", 17),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.closeDrawer())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("size", e.isMobile ? 24 : 20)
}
}
function wo(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-icon", 18),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.openDrawer())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("size", e.isMobile ? 24 : 20)
}
}
function So(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 34),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.goToPage())
}),
t.I0R(1, "em"),
t.OEk(2),
t.C$Y(),
t.wR5(3, "ss-icon", 35),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.eAK("current-page", e.userPageNumber === e.livekit.room.paginator.currentPage),
t.yG2(2),
t.cNF(e.goToPageTitle),
t.yG2(),
t.E7m("size", 20)
}
}
function xo(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-icon", 36),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.removeNewUserMarker())
}),
t.C$Y()
}
2 & o && t.E7m("size", 20)
}
function Io(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-virtual-backgrounds", 37),
t.qCj("updateActiveVirtualBackgroundOptionId", function(i) {
t.usT(e);
const s = t.GaO(2);
return t.CGJ(s.activeVirtualBackgroundOptionId = i)
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.E7m("activeVirtualBackgroundOptionId", e.activeVirtualBackgroundOptionId)
}
}
function To(o, r) {
if (1 & o && t.wR5(0, "ss-upgrade-cta", 42),
2 & o) {
const e = t.GaO(3);
t.E7m("short", !0)("openedFromSource", e.TriggeredUpgradeFromSourceRef.ConnectingSpotify)
}
}
function Go(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button-small", 43),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.disconnectSpotify())
}),
t.OEk(1, " Disconnect Spotify "),
t.C$Y()
}
}
function Ro(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button-small", 44),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.connectSpotify())
}),
t.OEk(1, " Connect Spotify "),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.E7m("matTooltip", e.subscriptionService.hasPremiumFeatures ? "" : "Upgrade to premium to connect Spotify")("disabled", !e.subscriptionService.hasPremiumFeatures)
}
}
function Eo(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 38)(1, "div", 39)(2, "mat-slide-toggle", 40),
t.qCj("change", function(i) {
t.usT(e);
const s = t.GaO(2);
return t.CGJ(s.toggleEnableSpotifyNowPlaying(i))
}),
t.C$Y(),
t.I0R(3, "div"),
t.OEk(4, "Show now playing"),
t.C$Y(),
t.yuY(5, To, 1, 2, "ss-upgrade-cta", 41),
t.C$Y(),
t.yuY(6, Go, 2, 0, "ss-button-small")(7, Ro, 2, 2),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.yG2(2),
t.E7m("checked", null == e.livekit.room.roomSettings ? null : e.livekit.room.roomSettings.enableSpotifyNowPlaying)("matTooltip", e.subscriptionService.hasPremiumFeatures && !e.currentUser.hasSpotifyConnected ? "Connect Spotify first" : "")("disabled", !e.subscriptionService.hasPremiumFeatures || e.savingEnableSpotifyPlaying || !e.currentUser.hasSpotifyConnected),
t.yG2(3),
t.E7m("ngIf", !e.subscriptionService.hasPremiumFeatures),
t.yG2(),
t.C0Y(6, e.currentUser.hasSpotifyConnected ? 6 : 7)
}
}
function Uo(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 19)(1, "div", 20)(2, "em"),
t.OEk(3, "Your video tile"),
t.C$Y(),
t.yuY(4, So, 4, 4, "div", 21),
t.C$Y(),
t.I0R(5, "div", 22)(6, "div", 23)(7, "mat-slide-toggle", 24),
t.qCj("change", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.toggleLocalVideo())
}),
t.C$Y(),
t.wR5(8, "ss-icon", 25),
t.I0R(9, "div", 26),
t.OEk(10),
t.C$Y()(),
t.I0R(11, "div", 27)(12, "ss-icon", 28),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.showBackgroundOptions = !i.showBackgroundOptions)
}),
t.C$Y(),
t.yuY(13, xo, 1, 1, "ss-icon", 29),
t.C$Y()(),
t.yuY(14, Io, 1, 1, "ss-virtual-backgrounds", 30),
t.wR5(15, "ss-focus-room-tile", 31)(16, "ss-focus-room-status", 32),
t.yuY(17, Eo, 8, 5, "div", 33),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.yG2(4),
t.E7m("ngIf", e.localParticipant.isCameraEnabled && e.userPageNumber),
t.yG2(3),
t.E7m("matTooltip", e.getToggleCameraTooltipText())("checked", e.localParticipant.isCameraEnabled)("disabled", e.toggleCameraDisabled),
t.yG2(),
t.E7m("color", e.localParticipant.isCameraEnabled ? "negative" : "accent-blue-40")("iconName", e.localParticipant.isCameraEnabled ? "video" : "video_off")("size", 20),
t.yG2(2),
t.oRS(" Video ", e.localParticipant.isCameraEnabled ? "on" : "off", " "),
t.yG2(2),
t.E7m("size", 24)("iconVariant", 24)("color", e.showBackgroundOptions ? "accent-blue-40" : "contrast"),
t.yG2(),
t.E7m("ngIf", e.localParticipant.userInfo.showNewUserMarker),
t.yG2(),
t.E7m("ngIf", e.showBackgroundOptions),
t.yG2(),
t.E7m("isVideoPill", !0)("participant", e.localParticipant),
t.yG2(2),
t.E7m("ngIf", e.settingsService.settings.spotifyEnabled)
}
}
let Et = ( () => {
class o {
get getVideoPillButtonClass() {
switch (this.buttonLocation) {
case _.uY.FocusRoom:
return "focus-room";
case _.uY.PrivatePod:
return "private-pod";
case _.uY.PublicPod:
return "public-pod";
default:
return null
}
}
get isCameraEnabled() {
return this.localParticipant.isCameraEnabled
}
get isPrivateGroupMinimized() {
return this.livekit.room.privateGroupMinimized
}
get localParticipant() {
return this.livekit.room.localParticipant
}
get loadingVideo() {
return this.livekit.room.loadingVideo
}
get allowOnlyGroupAudio() {
return this.livekit.room.allowOnlyGroupAudio
}
get canPublishAudio() {
return this.livekit.room.canPublishAudio
}
get performedFirstConnect() {
return this.livekit.room.performedFirstConnect
}
get audioEnabled() {
return this.performedFirstConnect && this.canPublishAudio && (!this.allowOnlyGroupAudio || null !== this.activeGroup)
}
get anyPinnedUsers() {
return this.livekit.room.pinnedParticipants.length > 0
}
get zoomToFitDisabled() {
return !this.livekit.room.settings.zoomToFit && this.livekit.room.settings.isCameraEnabled
}
get userPageNumber() {
const e = this.livekit.room.filteredParticipants.indexOf(this.localParticipant);
return e < 0 ? null : Math.ceil((e + 1) / Math.min(this.livekit.room.paginator.tilesPerPage, this.livekit.room.paginator.maxTilesAllowed))
}
get goToPageTitle() {
return this.userPageNumber === this.livekit.room.paginator.currentPage ? "On this page" : `Page ${this.userPageNumber}`
}
get getHeaderTitle() {
if (this.localParticipant.anonymous)
return "guest";
if (this.activeGroup) {
if (this.activeGroupName)
return this.activeGroupName;
switch (this.buttonLocation) {
case _.uY.PrivatePod:
return "private space";
case _.uY.PublicPod:
return "public pod"
}
}
return this.localParticipant.isCameraEnabled ? "live" : "viewer"
}
constructor(e, n, i, s, a, d, m, v, P, U, A, $, j) {
this.livekit = e,
this.subscriptionService = n,
this.settingsService = i,
this.elementRef = s,
this.accountService = a,
this.subscriptionNavigationService = d,
this.accountModalsService = m,
this.analyticsService = v,
this.utilityService = P,
this.spotifyService = U,
this.signalRService = A,
this.toastService = $,
this.dialog = j,
this.expanded = !1,
this.toggleCameraDisabled = !1,
this.handRaiseToggling = !1,
this.savingEnableSpotifyPlaying = !1,
this.showBackgroundOptions = !1,
this.activeVirtualBackgroundOptionId = 1,
this.TriggeredUpgradeFromSourceRef = F.AD,
this.subscriptions = [],
this.currentUser = this.accountService.currentUser,
this.buttonText = this.accountService.authenticated() ? "Upgrade" : "Register"
}
ngOnInit() {
var e = this;
return (0,
S.c)(function*() {
e.subscriptions.push(e.livekit.room.activeGroup.subscribe(n => e.activeGroup = n), e.utilityService.isMobile.subscribe(n => e.isMobile = n), e.livekit.room.videoPillButtonExpanded.subscribe(n => e.setExpandedState(n))),
e.accountService.isFullyVerifiedUser()
})()
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe()),
window.clearTimeout(this.toggleCameraDisableTimeoutRef)
}
openDrawer() {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.livekit.room.videoPillButtonExpanded.next(!0)
}
closeDrawer() {
this.elementRef.nativeElement.style.marginRight = "initial",
this.livekit.room.videoPillButtonExpanded.next(!1),
this.isMobile && (this.elementRef.nativeElement.style.position = "static",
setTimeout( () => {
this.elementRef.nativeElement.style.position = ""
}
, 100))
}
setExpandedState(e) {
if (this.accountModalsService.ensureUserCompletedBasicInfo())
return this.expanded = e,
!this.expanded || this.isMobile ? (this.elementRef.nativeElement.style.marginRight = "",
void (this.showBackgroundOptions = !1)) : void (this.elementRef.nativeElement.style.marginRight = this.elementRef.nativeElement.clientWidth - 342 + "px")
}
toggleLocalVideo() {
var e = this;
return (0,
S.c)(function*() {
e.livekit.participantHighlight.hide.next(),
e.accountModalsService.ensureUserCompletedBasicInfo() && (e.livekit.room.settings.activeVideoDevice ? e.livekit.room.toggleLocalVideo() : e.showFocusRoomVideoSourceModal( () => e.livekit.room.toggleLocalVideo()),
e.toggleCameraDisabled = !0,
e.toggleCameraDisableTimeoutRef = window.setTimeout( () => e.toggleCameraDisabled = !1, 2e3))
})()
}
toggleLocalAudio() {
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.livekit.room.settings.activeAudioDevice ? this.livekit.room.toggleLocalAudio() : this.showFocusRoomAudioSourceModal( () => this.livekit.room.toggleLocalAudio()))
}
editPrivacySettings() {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.dialog.open(te.M, {
panelClass: "fullscreen-dialog",
width: "600px",
data: te.I.Other,
disableClose: !0
})
}
getToggleCameraTooltipText() {
return this.toggleCameraDisabled ? "You can only toggle your video every 2 seconds" : this.localParticipant.isCameraEnabled ? "Turn camera off" : "Turn camera on"
}
getToggleAudioTooltipText() {
return this.audioEnabled ? "Microphone " + (this.localParticipant.isMicrophoneEnabled ? "on" : "off") : "Mics are disabled."
}
goToPage() {
null !== this.userPageNumber && (this.anyPinnedUsers && !this.livekit.room.forceGridView ? (this.livekit.room.forceGridView = !0,
(0,
w.k)(100).subscribe( () => {
this.livekit.room.assignDisplayedParticipants(),
this.livekit.room.recalculateGrid.next(),
this.navigateToUserPage()
}
)) : this.navigateToUserPage())
}
raiseHand() {
!this.accountModalsService.ensureUserCompletedBasicInfo() || this.handRaiseToggling || (this.handRaiseToggling = !0,
this.livekit.raiseHand(this.livekit.room.roomName ?? "").subscribe({
next: () => {
this.livekit.room.localParticipant.isHandRaised = !0,
this.livekit.room.localParticipant.handRaiseTimestamp = Date.now() / 1e3,
this.livekit.room.sortAndAssignDisplayedParticipants(),
this.handRaiseToggling = !1
}
,
error: e => this.handleErrors(e)
}))
}
lowerHand() {
!this.accountModalsService.ensureUserCompletedBasicInfo() || this.handRaiseToggling || (this.handRaiseToggling = !0,
this.livekit.lowerHand(this.livekit.room.roomName ?? "").subscribe({
next: () => {
this.livekit.room.localParticipant.isHandRaised = !1,
this.livekit.room.localParticipant.handRaiseTimestamp = null,
this.livekit.room.sortAndAssignDisplayedParticipants(),
this.handRaiseToggling = !1
}
,
error: e => this.handleErrors(e)
}))
}
removeNewUserMarker() {
this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Are you sure?",
description: "RemoveNewUserMarker",
confirmButtonLabel: "Remove"
}
}).afterClosed().subscribe(n => {
n && this.accountService.hideNewUserMarker().subscribe({
next: () => {
this.livekit.updateMetadata(this.livekit.room.name, this.livekit.room.settings.zoomToFit).subscribe()
}
,
error: i => this.handleErrors(i)
})
}
)
}
showOptionsModal() {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.livekit.showOptionsModal()
}
upgradeForSuperboost() {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.subscriptionNavigationService.openPlansAndPricing(F.AD.Superboost)
}
toggleEnableSpotifyNowPlaying(e) {
this.livekit.room.roomSettings && (this.livekit.room.roomSettings.enableSpotifyNowPlaying = e.checked,
this.savingEnableSpotifyPlaying = !0,
this.accountService.upsertRoomSettings(this.livekit.room.roomSettings, !1).subscribe({
next: () => {
this.savingEnableSpotifyPlaying = !1,
this.livekit.room.roomSettings?.enableSpotifyNowPlaying ? this.livekit.room.getLocalCurrentlyPlaying() : this.livekit.room.localParticipant.spotifyData = null
}
,
error: n => this.handleErrors(n)
}))
}
connectSpotify() {
this.spotifyService.getLoginRequest().subscribe({
next: e => window.open(e, "_blank"),
error: e => this.handleErrors(e)
})
}
disconnectSpotify() {
this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Are you sure?",
description: "DisconnectSpotify",
confirmButtonLabel: "Yes"
}
}).afterClosed().subscribe(n => {
n && this.spotifyService.disconnect().subscribe({
next: () => this.currentUser.hasSpotifyConnected = !1,
error: i => this.handleErrors(i)
})
}
)
}
showFocusRoomVideoSourceModal(e) {
this.livekit.room.storeLivekitSettings(),
this.dialog.open(lo, {
panelClass: "fullscreen-dialog",
width: "550px",
disableClose: !0
}).afterClosed().subscribe(i => {
i && (i.activeVideoDevice && (this.livekit.room.settings.activeVideoDevice = i.activeVideoDevice,
this.livekit.room.switchActiveDevice("videoinput", i.activeVideoDevice)),
e(),
this.livekit.room.storeLivekitSettings())
}
)
}
navigateToUserPage() {
null !== this.userPageNumber && this.livekit.room.paginator.currentPage !== this.userPageNumber && (this.livekit.room.paginator.goToPage(this.userPageNumber),
this.analyticsService.markActivity(u.kP.LivekitLocalVideoHighlightPageChanged))
}
showFocusRoomAudioSourceModal(e) {
this.livekit.room.storeLivekitSettings(),
this.dialog.open(ro, {
panelClass: "fullscreen-dialog",
width: "550px",
disableClose: !0
}).afterClosed().subscribe(i => {
i && (i.activeAudioDevice && (this.livekit.room.settings.activeAudioDevice = i.activeAudioDevice,
this.livekit.room.switchActiveDevice("audioinput", i.activeAudioDevice)),
e(),
this.livekit.room.storeLivekitSettings())
}
)
}
handleErrors(e) {
this.handRaiseToggling = !1,
this.savingEnableSpotifyPlaying = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(H.k),t.GI1(L.Y),t.GI1(t.GMv),t.GI1(y.uE),t.GI1(bt._),t.GI1(V.E),t.GI1(u.uc),t.GI1(I.UZ),t.GI1(uo.e),t.GI1(kt.f),t.GI1(k.s),t.GI1(p.qW))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-video-pill-button"]],
hostVars: 8,
hostBindings: function(n, i) {
2 & n && (t.m8U(i.getVideoPillButtonClass),
t.eAK("expanded", i.expanded)("camera-enabled", i.isCameraEnabled)("private-group-minimized", i.isPrivateGroupMinimized))
},
inputs: {
buttonLocation: "buttonLocation",
activeGroupName: "activeGroupName"
},
decls: 19,
vars: 38,
consts: [[1, "header"], [1, "left"], [3, "size", "avatarColor", "avatarThumbUrl", "showOnlineStatus", "userId", "initials"], ["class", "dot", 4, "ngIf"], [1, "text"], [1, "video-toggle-button", 3, "matTooltip", "iconName", "active", "iconSize", "iconOnly", "isLoading", "disabled", "buttonClick"], [1, "audio-toggle-button", 3, "matTooltip", "iconName", "iconSize", "iconOnly", "disabled", "buttonClick"], ["role", "button", 1, "boost", 3, "ssLadda", "click"], ["tooltip", ""], ["matTooltip", "Privacy settings", "iconName", "shield_keyhole", 1, "privacy-settings-button", 3, "iconSize", "iconOnly", "buttonClick"], ["matTooltip", "Settings", "iconName", "settings", 1, "settings", 3, "iconSize", "iconOnly", "buttonClick"], [3, "displayedParticipants"], ["role", "button", "iconName", "dismiss", "color", "contrast", 3, "size", "click", 4, "ngIf"], ["class", "open-drawer-icon", "iconName", "chevron_down", "role", "button", "color", "default", 3, "size", "click", 4, "ngIf"], ["class", "drawer", 4, "ngIf"], [1, "dot"], ["color", "blurple-20", 3, "autoSize", "buttonClick"], ["role", "button", "iconName", "dismiss", "color", "contrast", 3, "size", "click"], ["iconName", "chevron_down", "role", "button", "color", "default", 1, "open-drawer-icon", 3, "size", "click"], [1, "drawer"], [1, "jump-to-page-wrapper"], ["class", "page-number", 3, "current-page", "click", 4, "ngIf"], [1, "tile-header"], [1, "toggle-device-wrapper"], ["labelPosition", "before", 3, "matTooltip", "checked", "disabled", "change"], [1, "video-toggle-button", 3, "color", "iconName", "size"], [1, "notification"], [1, "right-group-buttons"], ["iconName", "video_background_effect", "matTooltip", "Virtual backgrounds", "role", "button", 1, "video-blur", 3, "size", "iconVariant", "color", "click"], ["matTooltip", "Remove new user marker", "role", "button", "iconName", "person", "color", "contrast", 3, "size", "click", 4, "ngIf"], [3, "activeVirtualBackgroundOptionId", "updateActiveVirtualBackgroundOptionId", 4, "ngIf"], [3, "isVideoPill", "participant"], [1, "desktop-status"], ["class", "spotify-wrapper", 4, "ngIf"], [1, "page-number", 3, "click"], ["iconName", "arrow_right", "color", "accent-blue-40", 3, "size"], ["matTooltip", "Remove new user marker", "role", "button", "iconName", "person", "color", "contrast", 3, "size", "click"], [3, "activeVirtualBackgroundOptionId", "updateActiveVirtualBackgroundOptionId"], [1, "spotify-wrapper"], [1, "toggle-wrapper"], ["labelPosition", "before", 3, "checked", "matTooltip", "disabled", "change"], [3, "short", "openedFromSource", 4, "ngIf"], [3, "short", "openedFromSource"], [3, "buttonClick"], [3, "matTooltip", "disabled", "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "div", 1),
t.wR5(2, "ss-user-avatar", 2),
t.yuY(3, bo, 1, 0, "div", 3),
t.I0R(4, "div", 4),
t.OEk(5),
t.C$Y(),
t.I0R(6, "ss-button", 5),
t.qCj("buttonClick", function() {
return i.toggleLocalVideo()
}),
t.C$Y(),
t.I0R(7, "ss-button", 6),
t.qCj("buttonClick", function() {
return i.toggleLocalAudio()
}),
t.C$Y(),
t.I0R(8, "ss-html-tooltip")(9, "div", 7),
t.qCj("click", function() {
return i.localParticipant.isHandRaised ? i.lowerHand() : i.raiseHand()
}),
t.C$Y(),
t.I0R(10, "div", 8),
t.yuY(11, ko, 2, 0, "div")(12, yo, 3, 1),
t.C$Y()(),
t.I0R(13, "ss-button", 9),
t.qCj("buttonClick", function() {
return i.editPrivacySettings()
}),
t.C$Y(),
t.I0R(14, "ss-button", 10),
t.qCj("buttonClick", function() {
return i.showOptionsModal()
}),
t.C$Y(),
t.yuY(15, Oo, 1, 1, "ss-document-picture-in-picture", 11),
t.C$Y(),
t.yuY(16, Mo, 1, 1, "ss-icon", 12),
t.C$Y(),
t.yuY(17, wo, 1, 1, "ss-icon", 13)(18, Uo, 18, 16, "div", 14)),
2 & n && (t.yG2(2),
t.E7m("size", i.isMobile ? 28 : 24)("avatarColor", i.currentUser.id ? i.currentUser.avatarColor : "C2C1E1")("avatarThumbUrl", i.currentUser.id ? i.currentUser.avatarThumbUrl : null)("showOnlineStatus", !1)("userId", i.currentUser.id || null)("initials", i.currentUser.id && i.currentUser.initials && " " !== i.currentUser.initials ? i.currentUser.initials : "YOU"),
t.yG2(),
t.E7m("ngIf", i.localParticipant.isCameraEnabled),
t.yG2(),
t.eAK("group-name", i.activeGroupName),
t.yG2(),
t.cNF(i.getHeaderTitle),
t.yG2(),
t.E7m("matTooltip", i.getToggleCameraTooltipText())("iconName", i.localParticipant.isCameraEnabled ? "video" : "video_off")("active", i.localParticipant.isCameraEnabled)("iconSize", i.isMobile ? 24 : 20)("iconOnly", !0)("isLoading", i.loadingVideo)("disabled", i.toggleCameraDisabled),
t.yG2(),
t.E7m("matTooltip", i.getToggleAudioTooltipText())("iconName", i.localParticipant.isMicrophoneEnabled ? "mic" : "mic_off")("iconSize", i.isMobile ? 24 : 20)("iconOnly", !0)("disabled", !i.audioEnabled),
t.yG2(2),
t.eAK("premium", i.subscriptionService.hasPremiumFeatures)("active", i.localParticipant.isHandRaised)("loading", i.handRaiseToggling),
t.E7m("ssLadda", i.handRaiseToggling),
t.yG2(2),
t.C0Y(11, i.localParticipant.isHandRaised ? 11 : 12),
t.yG2(2),
t.E7m("iconSize", i.isMobile ? 24 : 20)("iconOnly", !0),
t.yG2(),
t.E7m("iconSize", i.isMobile ? 24 : 20)("iconOnly", !0),
t.yG2(),
t.C0Y(15, i.expanded ? 15 : -1),
t.yG2(),
t.E7m("ngIf", i.expanded),
t.yG2(),
t.E7m("ngIf", !i.expanded),
t.yG2(),
t.E7m("ngIf", i.expanded))
},
dependencies: [h.u_, ct._, O.k, C.g, K.A, N.S, ee.e, po.w, R.a4, it.cP, lt, mo, ho, Co],
styles: ["[_nghost-%COMP%]{position:relative;display:flex;justify-content:center;flex-shrink:0;height:32px;border-radius:12px;background:var(--overlay)}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{height:46px;margin-right:0}}.expanded[_nghost-%COMP%]{position:relative;z-index:6;width:342px;height:32px;border-bottom-right-radius:0;border-bottom-left-radius:0}@media only screen and (max-width: 1024px){.expanded[_nghost-%COMP%]{position:fixed;top:30%;left:50%;margin-right:0;transform:translate(-50%)}}@media only screen and (max-width: 767px){.expanded[_nghost-%COMP%]{top:0;left:0;width:100%;height:40px;border-radius:0;transform:none}.expanded[_nghost-%COMP%] .header[_ngcontent-%COMP%]{border-radius:0}.expanded[_nghost-%COMP%] .header[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%]{margin-right:16px}.expanded[_nghost-%COMP%] .header[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%] ss-icon i{font-size:28px}.expanded[_nghost-%COMP%] .drawer[_ngcontent-%COMP%]{top:40px;width:100%;height:calc(100vh - 40px)}}.expanded[_nghost-%COMP%] .header[_ngcontent-%COMP%]{width:100%;border-bottom-right-radius:0;border-bottom-left-radius:0}.camera-enabled[_nghost-%COMP%]{background:var(--positive-60)}.camera-enabled[_nghost-%COMP%] .header[_ngcontent-%COMP%]{background:var(--positive-d2)}.private-pod[_nghost-%COMP%]{margin-right:10px;border:1px solid var(--container-2);background:none}.private-pod[_nghost-%COMP%] .header[_ngcontent-%COMP%]{background:none}.private-pod[_nghost-%COMP%] .open-drawer-icon i{color:var(--contrast)}.private-pod.expanded[_nghost-%COMP%]{border:0;background:var(--accent-gradient)}.private-pod.private-group-minimized[_nghost-%COMP%]{background:var(--overlay)}.private-pod.private-group-minimized[_nghost-%COMP%] .header[_ngcontent-%COMP%]{background:var(--accent-blue)}.private-pod.private-group-minimized.camera-enabled[_nghost-%COMP%]{background:var(--positive-60)}.private-pod.private-group-minimized.camera-enabled[_nghost-%COMP%] .header[_ngcontent-%COMP%]{background:var(--positive-d2)}.public-pod[_nghost-%COMP%]{border:1px solid var(--container-2);background:none}.public-pod[_nghost-%COMP%] .header[_ngcontent-%COMP%]{background:none}.public-pod[_nghost-%COMP%] .open-drawer-icon i{color:var(--contrast)}.public-pod.expanded[_nghost-%COMP%]{border:0;background:var(--blue-black)}ss-icon.open-drawer-icon[_ngcontent-%COMP%]{opacity:.4}ss-icon.open-drawer-icon[_ngcontent-%COMP%]:hover{opacity:1}.group-name[_ngcontent-%COMP%]{max-width:95px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;height:100%;border-radius:12px 8px 8px 12px;color:var(--contrast);background:var(--accent-blue)}.header[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;align-items:center}.header[_ngcontent-%COMP%] ss-user-avatar[_ngcontent-%COMP%]{margin:0 6px 0 4px}.header[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{width:12px;height:12px;margin-right:6px;border-radius:50%;background-color:var(--negative)}.header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{margin-right:10px;font-family:Poppins,sans-serif;font-size:12px;font-weight:600;line-height:20px;text-transform:uppercase}@media only screen and (max-width: 1024px){.header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{margin-right:22px}}.header[_ngcontent-%COMP%] .boost[_ngcontent-%COMP%]{width:20px;height:20px;padding:0;border:none;background:url(/assets/icons/boost-off.svg) center no-repeat}.header[_ngcontent-%COMP%] .boost.active[_ngcontent-%COMP%]{background:url(/assets/icons/boost-on.svg) center no-repeat}.header[_ngcontent-%COMP%] .boost.loading[_ngcontent-%COMP%]{background:none}.header[_ngcontent-%COMP%] .boost.premium[_ngcontent-%COMP%]{background:url(/assets/icons/premium-boost-off.svg) center no-repeat}.header[_ngcontent-%COMP%] .boost.premium.active[_ngcontent-%COMP%]{background:url(/assets/icons/premium-boost-on.svg) center no-repeat}.header[_ngcontent-%COMP%] .audio-toggle-button[_ngcontent-%COMP%], .header[_ngcontent-%COMP%] .boost[_ngcontent-%COMP%], .header[_ngcontent-%COMP%] .share-screen-button[_ngcontent-%COMP%], .header[_ngcontent-%COMP%] .video-toggle-button[_ngcontent-%COMP%], .header[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%], .header[_ngcontent-%COMP%] .privacy-settings-button[_ngcontent-%COMP%]{margin-right:10px}.header[_ngcontent-%COMP%] .audio-toggle-button[_ngcontent-%COMP%] button, .header[_ngcontent-%COMP%] .boost[_ngcontent-%COMP%] button, .header[_ngcontent-%COMP%] .share-screen-button[_ngcontent-%COMP%] button, .header[_ngcontent-%COMP%] .video-toggle-button[_ngcontent-%COMP%] button, .header[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%] button, .header[_ngcontent-%COMP%] .privacy-settings-button[_ngcontent-%COMP%] button{height:auto;padding:0;background:none}.header[_ngcontent-%COMP%] .audio-toggle-button[_ngcontent-%COMP%] button.active ss-icon i, .header[_ngcontent-%COMP%] .boost[_ngcontent-%COMP%] button.active ss-icon i, .header[_ngcontent-%COMP%] .share-screen-button[_ngcontent-%COMP%] button.active ss-icon i, .header[_ngcontent-%COMP%] .video-toggle-button[_ngcontent-%COMP%] button.active ss-icon i, .header[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%] button.active ss-icon i, .header[_ngcontent-%COMP%] .privacy-settings-button[_ngcontent-%COMP%] button.active ss-icon i{color:var(--contrast)}ss-icon[_ngcontent-%COMP%]{display:flex;height:100%;padding:0 5px}@media only screen and (max-width: 1024px){ss-icon[_ngcontent-%COMP%]{padding:0 10px}}.drawer[_ngcontent-%COMP%]{position:absolute;top:32px;left:0;z-index:5;display:flex;flex-direction:column;align-items:center;width:342px;padding:0 16px;border-bottom-right-radius:12px;border-bottom-left-radius:12px;box-shadow:var(--elevation-l1);background:var(--overlay)}@media only screen and (max-width: 767px){.drawer[_ngcontent-%COMP%]{width:80%}}.drawer[_ngcontent-%COMP%] ss-focus-room-tile[_ngcontent-%COMP%]{width:100%!important;height:auto!important;margin-bottom:16px;border-top-left-radius:0;border-top-right-radius:0;background-color:var(--alt-60);aspect-ratio:16/9}.drawer[_ngcontent-%COMP%] ss-focus-room-tile[_ngcontent-%COMP%] video{border-top-left-radius:0;border-top-right-radius:0}.drawer[_ngcontent-%COMP%] ss-focus-room-tile[_ngcontent-%COMP%] .fb-border, .drawer[_ngcontent-%COMP%] ss-focus-room-tile[_ngcontent-%COMP%] .hover-top-menu, .drawer[_ngcontent-%COMP%] ss-focus-room-tile[_ngcontent-%COMP%] .pin-for-pin{display:none}.drawer[_ngcontent-%COMP%] ss-focus-room-tile[_ngcontent-%COMP%] .new-user-border{border-top-left-radius:0;border-top-right-radius:0}.jump-to-page-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%;height:20px;margin:12px 0 8px;cursor:pointer}.jump-to-page-wrapper[_ngcontent-%COMP%] .page-number[_ngcontent-%COMP%]{display:flex}.jump-to-page-wrapper[_ngcontent-%COMP%] .page-number.current-page[_ngcontent-%COMP%]{cursor:initial}.jump-to-page-wrapper[_ngcontent-%COMP%] .page-number.current-page[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{display:none}.jump-to-page-wrapper[_ngcontent-%COMP%] .page-number[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--accent-blue)}.tile-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;height:36px;padding:0 2px 0 7px;border-top-left-radius:12px;border-top-right-radius:12px;color:var(--contrast);background:var(--blue-black)}.right-group-buttons[_ngcontent-%COMP%], .toggle-device-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.toggle-device-wrapper[_ngcontent-%COMP%] .mat-mdc-slide-toggle .mdc-form-field{display:grid}.toggle-device-wrapper[_ngcontent-%COMP%] .mat-mdc-slide-toggle.mat-mdc-slide-toggle-checked .mdc-switch .mdc-switch__track:after{background:var(--negative)!important}.toggle-device-wrapper[_ngcontent-%COMP%] .mat-mdc-slide-toggle .mdc-switch .mdc-switch__track:before{background:var(--overlay-dark)!important}.toggle-device-wrapper[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%], .toggle-device-wrapper[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{margin-right:8px}.toggle-device-wrapper[_ngcontent-%COMP%] .notification[_ngcontent-%COMP%]{position:relative;top:1px}ss-focus-room-status[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.spotify-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;height:28px;margin-bottom:12px}.spotify-wrapper[_ngcontent-%COMP%] .toggle-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.spotify-wrapper[_ngcontent-%COMP%] .toggle-wrapper[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{margin-right:8px}.spotify-wrapper[_ngcontent-%COMP%] .toggle-wrapper[_ngcontent-%COMP%] .mat-mdc-slide-toggle .mdc-form-field{display:flex;flex-direction:column-reverse}.spotify-wrapper[_ngcontent-%COMP%] ss-upgrade-cta[_ngcontent-%COMP%]{margin-left:2px}"]
})
}
return o
}
)();
function Fo(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-focus-room-filter", 2),
t.qCj("closeFilter", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.livekit.room.filter.visible = !1)
}),
t.C$Y()
}
}
function Ao(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 25),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.showPrivatePodsModal())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.eAK("active", e.activeGroup),
t.E7m("matTooltip", e.livekit.room.privateGroupMinimized && e.activeGroup ? "Back to space" : "Private spaces")("iconOnly", !0)("iconVariant", 20)
}
}
function Lo(o, r) {
if (1 & o && t.wR5(0, "ss-video-pill-button", 26),
2 & o) {
const e = t.GaO(3);
t.E7m("buttonLocation", e.activeGroup ? e.VideoPillButtonLocationRef.PrivatePod : e.VideoPillButtonLocationRef.FocusRoom)
}
}
function Yo(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 27),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.toggleStatsForNerds())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.E7m("matTooltip", e.statsForNerdsVisible ? "Hide stats for nerds" : "Show stats for nerds")("active", e.statsForNerdsVisible)("iconName", e.statsForNerdsVisible ? "bug" : "bug_prohibited")("iconSize", 28)("iconOnly", !0)
}
}
function Vo(o, r) {
if (1 & o && (t.I0R(0, "div"),
t.OEk(1),
t.C$Y()),
2 & o) {
const e = t.GaO(4);
t.yG2(),
t.cNF(e.livekit.room.displayName)
}
}
function No(o, r) {
if (1 & o && (t.I0R(0, "div", 28),
t.yuY(1, Vo, 2, 1, "div", 14),
t.wR5(2, "ss-paginator"),
t.C$Y()),
2 & o) {
const e = t.GaO(3);
t.yG2(),
t.E7m("ngIf", e.settingsService.isB2BApp())
}
}
function Bo(o, r) {
1 & o && (t.I0R(0, "div", 29),
t.OEk(1, " Showing only professionals "),
t.C$Y())
}
function Do(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 30),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.openFiltersPanel())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.E7m("active", e.livekit.room.anyFiltersSelectedOrSortChanged)("matTooltip", e.getFilterToggleTooltipText())("iconVariant", 20)("iconOnly", !0)
}
}
function $o(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 31),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.toggleGreetingMode())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(3);
t.E7m("active", e.livekit.room.greetingMode.active)("iconOnly", !0)("iconSize", 24)("matTooltip", e.greetingModeTooltipText)("disabled", !e.livekit.room.greetingMode.enabled())("isLoading", e.livekit.room.greetingMode.loading)
}
}
function zo(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 33),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(4);
return t.CGJ(i.showRoomChat())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(4);
t.E7m("iconSize", 24)("iconOnly", !0)("isLoading", e.roomChatLoading)
}
}
function jo(o, r) {
if (1 & o && t.yuY(0, zo, 1, 3, "ss-button", 32),
2 & o) {
const e = t.GaO(3);
t.E7m("ngIf", e.livekit.room.channelId && !e.hideChatButton)
}
}
function Ho(o, r) {
1 & o && t.wR5(0, "ss-switch-room-view-button")
}
function Ko(o, r) {
if (1 & o && (t.I0R(0, "span", 34),
t.OEk(1),
t.C$Y()),
2 & o) {
const e = r.$implicit;
t.yG2(),
t.oRS(" ", e, " ")
}
}
function Jo(o, r) {
if (1 & o && (t.I0R(0, "div", 35),
t.OEk(1),
t.C$Y()),
2 & o) {
const e = t.GaO(3);
t.yG2(),
t.CAO(" ", e.anonymousParticipantCount, " viewer", 1 !== e.anonymousParticipantCount ? "s" : "", " ")
}
}
function qo(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 3),
t.yuY(1, Ao, 1, 5, "ss-button", 4)(2, Lo, 1, 1, "ss-video-pill-button", 5)(3, Yo, 1, 5, "ss-button", 6),
t.C$Y(),
t.yuY(4, No, 3, 1, "div", 7),
t.I0R(5, "div", 8),
t.yuY(6, Bo, 2, 0, "div", 9)(7, Do, 1, 4, "ss-button", 10)(8, $o, 1, 6, "ss-button", 11)(9, jo, 1, 1, "ss-button", 12),
t.I0R(10, "ss-button", 13),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.restoreLostPins())
}),
t.C$Y(),
t.yuY(11, Ho, 1, 0, "ss-switch-room-view-button", 14),
t.I0R(12, "div", 15)(13, "ss-button", 16),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.livekit.room.participantListVisibility = !0)
}),
t.I0R(14, "div", 17),
t.wR5(15, "ss-icon", 18),
t.yuY(16, Ko, 2, 1, "span", 19),
t.C$Y()(),
t.I0R(17, "div", 20)(18, "em"),
t.OEk(19, "Participant Breakdown"),
t.C$Y(),
t.I0R(20, "div"),
t.wR5(21, "ss-icon", 21),
t.I0R(22, "div", 22),
t.OEk(23),
t.C$Y()(),
t.I0R(24, "div"),
t.wR5(25, "ss-icon", 23),
t.I0R(26, "div", 22),
t.OEk(27),
t.C$Y()(),
t.yuY(28, Jo, 2, 2, "div", 24),
t.C$Y()()()
}
if (2 & o) {
const e = t.GaO(2);
t.yG2(),
t.E7m("ngIf", e.allowOnlyGroupAudio && (!e.isMobile || e.livekit.room.privateGroupMinimized)),
t.yG2(),
t.E7m("ngIf", !e.activePredefinedGroup),
t.yG2(),
t.E7m("ngIf", e.isModerator),
t.yG2(),
t.E7m("ngIf", !e.isMobile),
t.yG2(2),
t.E7m("ngIf", e.isProfessionalFilterActive && !e.livekit.room.participantListVisibility),
t.yG2(),
t.E7m("ngIf", !e.isMobile),
t.yG2(),
t.E7m("ngIf", !e.isMobile && e.livekit.room.greetingMode.qualifies && !e.settingsService.isB2BApp()),
t.yG2(),
t.C0Y(9, e.isMobile ? -1 : 9),
t.yG2(),
t.E7m("iconSize", 22)("iconVariant", 24)("iconOnly", !0)("isLoading", e.restoringLostPins),
t.yG2(),
t.E7m("ngIf", !e.isMobile && e.anyPinnedUsers),
t.yG2(2),
t.E7m("active", e.participantListVisible),
t.yG2(2),
t.E7m("iconVariant", 20)("size", 20),
t.yG2(),
t.E7m("ngForOf", e.participantCountDigits),
t.yG2(5),
t.E7m("iconVariant", 24)("size", 24),
t.yG2(2),
t.oRS("", e.cameraOnParticipantCount, " video on"),
t.yG2(2),
t.E7m("iconVariant", 24)("size", 24),
t.yG2(2),
t.CAO("", e.cameraOffParticipantCount, " other", 1 !== e.cameraOffParticipantCount ? "s" : "", " online"),
t.yG2(),
t.E7m("ngIf", e.anonymousParticipantCount > 0)
}
}
function Wo(o, r) {
if (1 & o && (t.I0R(0, "div", 1),
t.yuY(1, Fo, 1, 0, "ss-focus-room-filter")(2, qo, 29, 25),
t.C$Y()),
2 & o) {
const e = t.GaO();
t.yG2(),
t.C0Y(1, e.livekit.room.filter.visible ? 1 : 2)
}
}
let Qo = ( () => {
class o {
get allowOnlyGroupAudio() {
return this.livekit.room.allowOnlyGroupAudio
}
get hasActivePredefinedGroups() {
return this.livekit.room.hasActivePredefinedGroups
}
get participantCountDigits() {
const e = this.livekit.room.allParticipants.filter(n => n.identity).length;
return String(e).split("").map(Number)
}
get localParticipant() {
return this.livekit.room.localParticipant
}
get displayedParticipants() {
return this.livekit.room.displayedParticipants
}
get anonymousParticipantCount() {
return this.livekit.room.allParticipants.filter(e => e.anonymous).length
}
get cameraOffParticipantCount() {
return this.livekit.room.allParticipants.filter(e => !e.isCameraEnabled && !e.anonymous).length
}
get cameraOnParticipantCount() {
return this.livekit.room.allParticipants.filter(e => e.identity && e.isCameraEnabled).length
}
get anyPinnedUsers() {
return this.livekit.room.pinnedParticipants.length > 0
}
get statsForNerdsVisible() {
return this.livekit.room.statsForNerdsVisible
}
get participantListVisible() {
return this.livekit.room.participantListVisibility
}
get isModerator() {
return !!this.livekit.room.localParticipant.userInfo?.isModerator
}
get newUsersOnly() {
return this.livekit.room.filter.participantsWithNewMarkerOnly
}
get privatePodButtonText() {
return this.livekit.room.groupMatch.waiting ? `Searching...${this.livekit.room.groupMatch.timerValue ?? ""}` : "Create a pod"
}
get podsButtonText() {
return this.livekit.room.groupMatch.waiting ? `Searching...${this.livekit.room.groupMatch.timerValue ?? ""}` : "Create your own"
}
get greetingModeTooltipText() {
return this.livekit.room.greetingMode.enabled() ? this.livekit.room.greetingMode.active ? "Deactivate greeting mode" : "Activate greeting mode" : "Your camera must be on to enter greeting mode"
}
get isProfessionalFilterActive() {
return this.livekit.room.filter.selectedUserTypes.some(e => e === x.sD.Professional)
}
constructor(e, n, i, s, a, d, m, v, P, U, A) {
this.livekit = e,
this.settingsService = n,
this.accountModalsService = i,
this.subscriptionService = s,
this.accountService = a,
this.analyticsService = d,
this.utilityService = m,
this.channelService = v,
this.toastService = P,
this.dialog = U,
this.router = A,
this.activeGroup = null,
this.activePredefinedGroup = null,
this.isMobile = !1,
this.isPhone = !1,
this.roomChatLoading = !1,
this.hideChatButton = !1,
this.predefinedGroupsLoading = !1,
this.podsMenuOpened = !1,
this.restoringLostPins = !1,
this.VideoPillButtonLocationRef = _.uY,
this.subscriptions = []
}
ngOnInit() {
var e = this;
return (0,
S.c)(function*() {
e.accountService.isFullyVerifiedUser() && e.subscriptions.push(e.livekit.room.activeGroup.subscribe(n => e.activeGroup = n), e.livekit.room.activePredefinedGroup.subscribe(n => e.activePredefinedGroup = n))
})()
}
ngAfterViewInit() {
setTimeout( () => {
this.subscriptions.push(this.utilityService.isMobile.subscribe(e => {
this.isMobile = e,
this.isMobile && (this.livekit.room.focusPlus.exit(),
this.livekit.room.roomChatVisibility = !1,
this.livekit.room.filter.visible = !1)
}
), this.utilityService.isPhone.subscribe(e => this.isPhone = e))
}
)
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe())
}
showRoomChat() {
this.livekit.room.channelId && this.accountModalsService.ensureUserCompletedBasicInfo() && (this.roomChatLoading = !0,
this.channelService.getChannelInfo(this.livekit.room.channelId).subscribe({
next: e => {
e.isMember ? (this.roomChatLoading = !1,
this.livekit.room.participantListVisibility = !1,
this.livekit.room.roomChatVisibility = !0) : this.joinChannel()
}
,
error: e => {
this.hideChatButton = !0,
this.handleErrors(e)
}
}))
}
toggleGreetingMode() {
if (this.livekit.room.greetingMode.active)
return this.livekit.room.greetingMode.deactivate(!1),
void this.analyticsService.markActivity(u.kP.LivekitGreetingModeDisabled);
this.analyticsService.markActivity(u.kP.LivekitGreetingModeButtonClick),
this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Turn on greeting mode",
description: "GreetingModePrompt",
confirmButtonLabel: "Enable greeting mode",
hideCancelButton: !0
}
}).afterClosed().subscribe(n => {
n && (this.livekit.room.greetingMode.activate(),
this.analyticsService.markActivity(u.kP.LivekitGreetingModeEnabled))
}
)
}
togglePredefinedGroups() {
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.activePredefinedGroup ? this.closePredefinedGroups() : this.activeGroup && !this.activeGroup.predefinedGroupId ? this.leaveActiveGroups("LeavePrivatePodToBrowsePublicOnes", "Leave", () => {
this.livekit.room.activeGroup.next(null),
this.togglePredefinedGroups()
}
) : this.showPredefinedGroups())
}
toggleStatsForNerds() {
this.livekit.room.statsForNerdsVisible = !this.livekit.room.statsForNerdsVisible
}
openFiltersPanel() {
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.anyPinnedUsers && !this.livekit.room.forceGridView && (this.livekit.room.forceGridView = !0,
this.livekit.room.sortAndAssignDisplayedParticipants(),
this.livekit.recalculateGrid.next()),
this.livekit.room.animateViewToggleButton = !1,
this.livekit.room.filter.visible = !0)
}
showPodsModal() {
if (this.accountModalsService.ensureUserCompletedBasicInfo()) {
if (this.utilityService.collapseEncouragements.next(),
null === this.activeGroup)
return void this.showCorrespondingGroupModal();
this.activeGroup.predefinedGroupId ? this.leaveActiveGroups("LeavePublicGroupToUsePrivatePods", "Leave", () => {
this.livekit.room.predefinedGroupMaximized = !1,
this.livekit.room.predefinedGroupInstances = [],
this.livekit.room.activeGroup.next(null),
this.livekit.room.activePredefinedGroup.next(null),
this.showPodsModal()
}
) : this.leaveActiveGroups("LeavePrivatePod", "Leave & Join", () => {
this.livekit.room.activeGroup.next(null),
this.showCorrespondingGroupModal()
}
)
}
}
showPrivatePodsModal() {
if (this.accountModalsService.ensureUserCompletedBasicInfo()) {
if (this.livekit.room.privateGroupMinimized && this.activeGroup)
return void (this.livekit.room.privateGroupMinimized = !1);
this.dialog.open(Jn, {
panelClass: "fullscreen-dialog",
width: "410px"
})
}
}
getFilterToggleTooltipText() {
return this.livekit.room.anyFiltersSelectedOrSortChanged ? "Filters active" : "No active filters"
}
toggleShowParticipantsWithNewMarkerOnly() {
this.livekit.room.filter.participantsWithNewMarkerOnly = !this.livekit.room.filter.participantsWithNewMarkerOnly,
this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next()
}
restoreLostPins() {
if (this.accountModalsService.ensureUserCompletedBasicInfo()) {
if (!this.subscriptionService.hasPremiumFeatures)
return void this.toastService.info({
message: "This is a premium-only feature",
paidFeatureText: "Get Premium to restore pins.",
triggeredUpgradeFromSource: F.AD.RestoreLostPins
});
this.restoringLostPins = !0,
this.livekit.restoreRecentPins(this.livekit.room.name).subscribe({
next: e => {
this.toastService.success({
message: "Pins successfully restored based on availability. It might take up to 2 minutes for you to see them."
}),
e.length > 0 && this.livekit.room.restorePinnedUsers(e),
this.restoringLostPins = !1
}
,
error: e => {
this.restoringLostPins = !1;
const n = e[0].errorCode;
"ParticipantNotYetDetected" === n || "RateLimitOnRestoringPinsHit" === n ? this.toastService.info({
exceptionDetail: e[0]
}) : this.handleErrors(e)
}
})
}
}
showPredefinedGroups() {
this.predefinedGroupsLoading = !0,
this.livekit.getPredefinedGroupsInstancesForSession(this.livekit.room.name).subscribe({
next: e => {
this.livekit.room.predefinedGroupInstances = e,
0 !== e.length ? this.setActivePredefinedGroup(e[0]) : this.toastService.info({
message: "No public pods defined for this room."
})
}
,
error: e => this.handleErrors(e)
})
}
setActivePredefinedGroup(e) {
this.livekit.getSessionGroup(this.livekit.room.name, e.id, null).subscribe({
next: n => {
this.predefinedGroupsLoading = !1,
this.livekit.room.activePredefinedGroup.next(n)
}
,
error: n => this.handleErrors(n)
})
}
closePredefinedGroups() {
this.activeGroup ? this.leaveActiveGroups("LeavePublicGroup", "Leave", () => {
this.livekit.room.predefinedGroupMaximized = !1,
this.livekit.room.predefinedGroupInstances = [],
this.livekit.room.activeGroup.next(null),
this.livekit.room.activePredefinedGroup.next(null)
}
) : (this.livekit.room.predefinedGroupMaximized = !1,
this.livekit.room.predefinedGroupInstances = [],
this.activePredefinedGroup && this.livekit.unsubscribeFromSignalRPredefinedGroupUpdates(this.livekit.room.name, this.activePredefinedGroup.id).subscribe(),
this.livekit.room.activePredefinedGroup.next(null))
}
leaveActiveGroups(e, n, i) {
this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Are you sure?",
description: e,
confirmButtonLabel: n
}
}).afterClosed().subscribe(a => {
a && this.livekit.leaveActiveGroups(this.livekit.room.name, !0).subscribe({
next: () => i(),
error: d => this.handleErrors(d)
})
}
)
}
joinChannel() {
this.livekit.room.channelId && this.channelService.joinChannel(this.livekit.room.channelId).subscribe({
next: () => {
this.roomChatLoading = !1,
this.livekit.room.participantListVisibility = !1,
this.livekit.room.roomChatVisibility = !0
}
,
error: e => this.handleErrors(e)
})
}
showCorrespondingGroupModal() {
this.dialog.open(this.livekit.room.groupMatch.waiting ? Xt : to, {
panelClass: "fullscreen-dialog",
width: "480px"
})
}
handleErrors(e) {
this.roomChatLoading = !1,
this.predefinedGroupsLoading = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(L.Y),t.GI1(V.E),t.GI1(H.k),t.GI1(y.uE),t.GI1(u.uc),t.GI1(I.UZ),t.GI1(eo.m),t.GI1(k.s),t.GI1(p.qW),t.GI1(W.E5))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-actions"]],
decls: 1,
vars: 1,
consts: [["class", "buttons-wrapper", 4, "ngIf"], [1, "buttons-wrapper"], [3, "closeFilter"], [1, "left-group"], ["color", "focus-room", "class", "pods-button", "iconName", "inprivate_account", 3, "matTooltip", "iconOnly", "active", "iconVariant", "buttonClick", 4, "ngIf"], [3, "buttonLocation", 4, "ngIf"], ["class", "stats-for-nerds", "color", "focus-room", 3, "matTooltip", "active", "iconName", "iconSize", "iconOnly", "buttonClick", 4, "ngIf"], ["class", "paginator-wrapper", 4, "ngIf"], [1, "right-group"], ["class", "filter-text", 4, "ngIf"], ["class", "filter-button", "color", "focus-room", "iconName", "filter", 3, "active", "matTooltip", "iconVariant", "iconOnly", "buttonClick", 4, "ngIf"], ["class", "greeting-mode", "color", "focus-room", "iconName", "handshake", 3, "active", "iconOnly", "iconSize", "matTooltip", "disabled", "isLoading", "buttonClick", 4, "ngIf"], ["class", "room-chat-button", "matTooltip", "Room chat", "color", "focus-room", "iconName", "chat_multiple", 3, "iconSize", "iconOnly", "isLoading"], ["color", "focus-room", "matTooltip", "Acquire recently lost pins", "iconName", "arrow_undo", 1, "restore-pins", 3, "iconSize", "iconVariant", "iconOnly", "isLoading", "buttonClick"], [4, "ngIf"], [1, "button-wrapper"], ["matTooltip", "Show participant list (and manage multi-pin)", "matTooltipPosition", "above", "color", "focus-room", 1, "participant-list-button", 3, "active", "buttonClick"], [1, "participant-list-button-content"], ["color", "accent-blue-40", "iconName", "people", 3, "iconVariant", "size"], ["class", "digit", 4, "ngFor", "ngForOf"], [1, "participant-breakdown"], ["color", "accent-blue-20", "iconName", "video", 3, "iconVariant", "size"], [1, "interactable"], ["color", "accent-blue-20", "iconName", "video_off", 3, "iconVariant", "size"], ["class", "interactable viewers", 4, "ngIf"], ["color", "focus-room", "iconName", "inprivate_account", 1, "pods-button", 3, "matTooltip", "iconOnly", "iconVariant", "buttonClick"], [3, "buttonLocation"], ["color", "focus-room", 1, "stats-for-nerds", 3, "matTooltip", "active", "iconName", "iconSize", "iconOnly", "buttonClick"], [1, "paginator-wrapper"], [1, "filter-text"], ["color", "focus-room", "iconName", "filter", 1, "filter-button", 3, "active", "matTooltip", "iconVariant", "iconOnly", "buttonClick"], ["color", "focus-room", "iconName", "handshake", 1, "greeting-mode", 3, "active", "iconOnly", "iconSize", "matTooltip", "disabled", "isLoading", "buttonClick"], ["class", "room-chat-button", "matTooltip", "Room chat", "color", "focus-room", "iconName", "chat_multiple", 3, "iconSize", "iconOnly", "isLoading", "buttonClick", 4, "ngIf"], ["matTooltip", "Room chat", "color", "focus-room", "iconName", "chat_multiple", 1, "room-chat-button", 3, "iconSize", "iconOnly", "isLoading", "buttonClick"], [1, "digit"], [1, "interactable", "viewers"]],
template: function(n, i) {
1 & n && t.yuY(0, Wo, 3, 1, "div", 0),
2 & n && t.E7m("ngIf", i.localParticipant)
},
dependencies: [h.ay, h.u_, O.k, C.g, R.a4, At, Lt, Zt, Et],
styles: ["[_nghost-%COMP%]{position:relative;display:block;height:52px}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{height:auto}}@media only screen and (max-height: 480px){[_nghost-%COMP%]{position:absolute;top:-55px;left:146px}}@media only screen and (max-height: 480px){[_nghost-%COMP%] .safari[_nghost-%COMP%], .safari [_nghost-%COMP%]{position:absolute;top:-48px;left:158px}}.paginator-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.paginator-wrapper[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin-bottom:2px;font-size:13px;color:var(--default-40)}.buttons-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin:8px 0}@media only screen and (max-width: 1024px){.buttons-wrapper[_ngcontent-%COMP%]{margin:0}}@media only screen and (max-width: 767px){.buttons-wrapper[_ngcontent-%COMP%]{justify-content:space-around}}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%], .buttons-wrapper[_ngcontent-%COMP%] .right-group[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1}@media only screen and (max-width: 1024px){.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%]{flex:initial;padding:6px 0;margin-bottom:0}}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%]{margin-right:8px}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] ss-button.highlighted[_ngcontent-%COMP%]{z-index:1002!important}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] ss-button.icon-only[_ngcontent-%COMP%]{width:44px}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .pods-button[_ngcontent-%COMP%]{flex-shrink:0}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .pods-button[_ngcontent-%COMP%] button{background:var(--accent-gradient-80)}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .pods-button[_ngcontent-%COMP%] button .ladda-label{flex-direction:row-reverse}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .pods-button[_ngcontent-%COMP%] button ss-icon i{color:var(--default)}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .pods-button.active[_ngcontent-%COMP%]{animation:shakeX;animation-duration:1s;animation-delay:.5s}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .pods-button.active[_ngcontent-%COMP%] button{color:var(--contrast);background:var(--positive-d2)}@media only screen and (max-width: 1024px){.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .pods-button[_ngcontent-%COMP%]{min-width:auto}}@media only screen and (max-width: 400px){.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .pods-button[_ngcontent-%COMP%]{display:none}}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .filter-button[_ngcontent-%COMP%], .buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .stats-for-nerds[_ngcontent-%COMP%]{width:44px}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .stats-for-nerds[_ngcontent-%COMP%]{margin-left:8px}@media only screen and (max-width: 600px){.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .stats-for-nerds[_ngcontent-%COMP%]{display:none}}.buttons-wrapper[_ngcontent-%COMP%] .left-group[_ngcontent-%COMP%] .focus-plus[_ngcontent-%COMP%]{min-width:116px}.buttons-wrapper[_ngcontent-%COMP%] .button-wrapper[_ngcontent-%COMP%]{position:relative}.buttons-wrapper[_ngcontent-%COMP%] .button-wrapper[_ngcontent-%COMP%]:hover .participant-breakdown[_ngcontent-%COMP%]{display:block}@media only screen and (max-width: 1024px){.buttons-wrapper[_ngcontent-%COMP%] .button-wrapper[_ngcontent-%COMP%]:hover .participant-breakdown[_ngcontent-%COMP%]{display:none}}.buttons-wrapper[_ngcontent-%COMP%] .participant-list-button[_ngcontent-%COMP%]{flex-shrink:0}@media only screen and (max-width: 767px){.buttons-wrapper[_ngcontent-%COMP%] .participant-list-button[_ngcontent-%COMP%]{margin-left:0}.buttons-wrapper[_ngcontent-%COMP%] .participant-list-button[_ngcontent-%COMP%] .button-text{font-size:14px}}.buttons-wrapper[_ngcontent-%COMP%] .participant-list-button[_ngcontent-%COMP%] .participant-list-button-content[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.buttons-wrapper[_ngcontent-%COMP%] .participant-list-button[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{position:relative;margin-right:6px}.buttons-wrapper[_ngcontent-%COMP%] .participant-list-button[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%] i{color:var(--accent-blue-40)}.buttons-wrapper[_ngcontent-%COMP%] .participant-list-button[_ngcontent-%COMP%] button:hover ss-icon i{color:var(--accent-blue)}.buttons-wrapper[_ngcontent-%COMP%] .participant-list-button[_ngcontent-%COMP%] button.active ss-icon i{color:var(--contrast)}.buttons-wrapper[_ngcontent-%COMP%] .pinned-you-button[_ngcontent-%COMP%], .buttons-wrapper[_ngcontent-%COMP%] .greeting-mode[_ngcontent-%COMP%], .buttons-wrapper[_ngcontent-%COMP%] .participant-list-button[_ngcontent-%COMP%], .buttons-wrapper[_ngcontent-%COMP%] .restore-pins[_ngcontent-%COMP%], .buttons-wrapper[_ngcontent-%COMP%] .room-chat-button[_ngcontent-%COMP%]{margin-left:6px}.buttons-wrapper[_ngcontent-%COMP%] .digit[_ngcontent-%COMP%]{display:inline-block;width:10px;text-align:center}.buttons-wrapper[_ngcontent-%COMP%] .right-group[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center}.buttons-wrapper[_ngcontent-%COMP%] .right-group[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%] button{padding:0 8px}@media only screen and (max-width: 1024px){.buttons-wrapper[_ngcontent-%COMP%] .right-group[_ngcontent-%COMP%]{justify-content:flex-start;flex:initial}}.buttons-wrapper[_ngcontent-%COMP%] .right-group[_ngcontent-%COMP%] .filter-text[_ngcontent-%COMP%]{width:90px;margin-right:4px;font-size:12px;text-align:right;line-height:18px}.buttons-wrapper[_ngcontent-%COMP%] .participant-breakdown[_ngcontent-%COMP%]{position:absolute;top:44px;right:0;z-index:10;display:none;width:180px;padding:12px 14px;border:1px solid var(--alt-20);border-radius:12px;background:var(--contrast);background:var(--overlay)}.buttons-wrapper[_ngcontent-%COMP%] .participant-breakdown[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{display:inline-block;margin-bottom:12px}.buttons-wrapper[_ngcontent-%COMP%] .participant-breakdown[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:4px;font-size:14px}.buttons-wrapper[_ngcontent-%COMP%] .participant-breakdown[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{margin-right:8px}.buttons-wrapper[_ngcontent-%COMP%] .participant-breakdown[_ngcontent-%COMP%] .viewers[_ngcontent-%COMP%]{margin:10px 0 0;color:var(--default-40)}"]
})
}
return o
}
)();
var Xo = c(2076)
, Zo = c(8680)
, ie = c(5704)
, Pt = c(1904)
, ts = c(164);
function es(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 4),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.showParticipantHighlight())
}),
t.wR5(1, "ss-icon", 5),
t.C$Y()
}
2 & o && (t.yG2(),
t.E7m("size", 18))
}
function is(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-user-avatar", 13),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.popupOpened = !0)
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.E7m("size", 36)("title", e.participant.userInfo.displayName)("initials", e.participant.userInfo.initials)("avatarColor", e.participant.userInfo.avatarColor)("avatarThumbUrl", e.participant.userInfo.avatarThumbUrl)("userId", e.participant.identity)("matTooltip", e.isPinningMe ? "Pinning you" : "")
}
}
function ns(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-user-popup", 14),
t.qCj("focusRoomUnauthenticatedActionAttempt", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.handleUnauthenticatedActionAttempt())
})("closePopup", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.popupOpened = !1)
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.E7m("userId", e.participant.identity)("openedFromSource", e.OpenedFromSourceRef.FocusRoom)
}
}
function os(o, r) {
1 & o && t.wR5(0, "ss-premium-tick")
}
function ss(o, r) {
if (1 & o && t.wR5(0, "ss-badge", 15),
2 & o) {
const e = t.GaO(2);
t.E7m("badge", e.participant.userInfo.userBadge)("size", 20)
}
}
function rs(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 6, 7),
t.yuY(2, is, 1, 7, "ss-user-avatar", 8)(3, ns, 1, 2, "ng-template", 9),
t.qCj("backdropClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.popupOpened = !1)
}),
t.yuY(4, os, 1, 0, "ss-premium-tick", 10),
t.I0R(5, "p", 11),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.popupOpened = !0)
}),
t.OEk(6),
t.C$Y(),
t.yuY(7, ss, 1, 2, "ss-badge", 12),
t.C$Y()
}
if (2 & o) {
const e = t.Gew(1)
, n = t.GaO();
t.eAK("margin-left", n.pinnedParticipant),
t.yG2(2),
t.E7m("ngIf", n.participant.identity),
t.yG2(),
t.E7m("cdkConnectedOverlayOrigin", e)("cdkConnectedOverlayOpen", n.popupOpened)("cdkConnectedOverlayHasBackdrop", !0)("cdkConnectedOverlayDisableClose", !0),
t.yG2(),
t.E7m("ngIf", !n.settingsService.isB2BApp() && n.participant.userInfo.showPremiumTick),
t.yG2(2),
t.cNF(n.participant.userInfo.displayName),
t.yG2(),
t.E7m("ngIf", n.participant.userInfo.userBadge)
}
}
function as(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 16),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.followUser())
}),
t.wR5(1, "ss-icon", 17),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("disabled", e.followLoading),
t.yG2(),
t.E7m("size", 20)
}
}
function cs(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 18),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.participant.favorited ? i.removeFavorite() : i.favoriteUser())
}),
t.C$Y(),
t.I0R(1, "ss-button", 19),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.isPinned ? i.unpin() : i.pin())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("color", e.participant.favorited ? "gold" : "default-80")("iconColor", e.participant.favorited ? "gold" : "default-80")("iconOnly", !0)("iconSize", 20)("isLoading", e.favoriteLoading)("disabled", e.favoriteLoading),
t.yG2(),
t.eAK("move-from-right", e.isCurrentUser),
t.E7m("color", e.isPinned ? "gradient" : "default-80")("iconColor", e.isPinned ? "gradient" : "default-80")("iconOnly", !0)("iconSize", 20)("isLoading", null !== e.livekit.room.pinningUserIds && e.livekit.room.pinningUserIds.includes(e.participant.identity))("disabled", null !== e.livekit.room.pinningUserIds && !e.livekit.room.pinningUserIds.includes(e.participant.identity))
}
}
function ls(o, r) {
if (1 & o && t.wR5(0, "ss-participant-menu", 20),
2 & o) {
const e = t.GaO();
t.E7m("participant", e.participant)("showHideUserOptions", e.showHideUserOptions)("isHiddenParticipant", e.isHiddenParticipant)
}
}
let yt = ( () => {
class o {
get isPinningMe() {
return this.livekit.room.pinnedByUserIds.some(e => e === this.participant.identity)
}
get ishHighlighted() {
return this.participantHighlighted
}
get isPinned() {
return this.livekit.room.isPinned(this.participant.identity)
}
get isCurrentUser() {
return this.accountService.currentUser.id === this.participant.identity
}
constructor(e, n, i, s, a, d, m, v, P) {
this.livekit = e,
this.settingsService = n,
this.accountModalsService = i,
this.accountService = s,
this.toastService = a,
this.utilityService = d,
this.userFollowService = m,
this.userFavoriteService = v,
this.elementRef = P,
this.isHiddenParticipant = !1,
this.showFollowUserOption = !1,
this.pinnedParticipant = !1,
this.showHideUserOptions = !1,
this.popupOpened = !1,
this.followLoading = !1,
this.favoriteLoading = !1,
this.subscriptions = [],
this.participantHighlighted = !1,
this.OpenedFromSourceRef = x.Qf
}
ngOnInit() {
const e = this.participant.getTrackPublication(l.oh.Source.Camera);
e && e.track && (this.track = e.track)
}
ngAfterViewInit() {
this.subscriptions.push(this.utilityService.isMobile.subscribe(e => this.isMobile = e), this.livekit.participantHighlight.hide.subscribe( () => this.participantHighlighted = !1))
}
showParticipantHighlight() {
if (this.isMobile)
return;
this.livekit.participantHighlight.hideOverlay.next(!0),
this.participantHighlighted = !0;
const e = this.elementRef.nativeElement.getBoundingClientRect()
, n = document.querySelector(".dashboard-wrapper").clientHeight;
this.livekit.participantHighlight.show.next({
id: this.participant.identity,
left: e.left - 234,
bottom: n - e.top - 94,
source: _.W4.ParticipantListItem
})
}
pin() {
this.livekit.room.pin({
participant: this.participant,
forcePinView: !0
})
}
unpin() {
this.livekit.room.unpin({
pinnedUserId: this.participant.identity
})
}
favoriteUser() {
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.favoriteLoading = !0,
this.userFavoriteService.addUserToFavorites(this.participant.identity).subscribe({
next: () => this.favoriteLoading = !1,
error: e => {
this.favoriteLoading = !1,
e.length && "MaxFavoriteUsersCountReached" === e[0].errorCode ? this.toastService.info({
title: "Maximum favorites reached",
exceptionDetail: e[0],
paidFeatureText: "Upgrade to add more",
triggeredUpgradeFromSource: F.AD.MaxFavoriteUsersReached,
autoClose: !1
}) : this.handleErrors(e)
}
}))
}
removeFavorite() {
this.favoriteLoading = !0,
this.userFavoriteService.removeUserFromFavorites(this.participant.identity).subscribe({
next: () => this.favoriteLoading = !1,
error: e => this.handleErrors(e)
})
}
handleUnauthenticatedActionAttempt() {
this.accountModalsService.ensureUserCompletedBasicInfo()
}
followUser() {
this.followLoading || (this.followLoading = !0,
this.userFollowService.followUser(this.participant.identity).subscribe({
next: () => {
this.showFollowUserOption = !1,
this.participant.following = !0,
this.followLoading = !1
}
,
error: e => this.handleErrors(e)
}))
}
handleErrors(e) {
this.followLoading = !1,
this.favoriteLoading = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(L.Y),t.GI1(V.E),t.GI1(y.uE),t.GI1(k.s),t.GI1(I.UZ),t.GI1(ts.m),t.GI1(xt.C),t.GI1(t.GMv))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-participant-list-item"]],
hostVars: 4,
hostBindings: function(n, i) {
2 & n && t.eAK("pinning-me", i.isPinningMe)("highlighted", i.ishHighlighted)
},
inputs: {
participant: "participant",
isHiddenParticipant: "isHiddenParticipant",
showFollowUserOption: "showFollowUserOption",
pinnedParticipant: "pinnedParticipant",
showHideUserOptions: "showHideUserOptions"
},
decls: 5,
vars: 5,
consts: [["class", "hover-highlight", 3, "click", 4, "ngIf"], ["class", "user-info", "cdkOverlayOrigin", "", 3, "margin-left", 4, "ngIf"], ["matTooltip", "Follow user", 3, "disabled", "click", 4, "ngIf"], [3, "participant", "showHideUserOptions", "isHiddenParticipant", 4, "ngIf"], [1, "hover-highlight", 3, "click"], ["iconName", "eye", 3, "size"], ["cdkOverlayOrigin", "", 1, "user-info"], ["trigger", "cdkOverlayOrigin"], ["role", "button", 3, "size", "title", "initials", "avatarColor", "avatarThumbUrl", "userId", "matTooltip", "click", 4, "ngIf"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "transparent", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayDisableClose", "backdropClick"], [4, "ngIf"], ["role", "button", 1, "name", 3, "click"], ["class", "user-marker", 3, "badge", "size", 4, "ngIf"], ["role", "button", 3, "size", "title", "initials", "avatarColor", "avatarThumbUrl", "userId", "matTooltip", "click"], ["cssClass", "margin-horizontal", 3, "userId", "openedFromSource", "focusRoomUnauthenticatedActionAttempt", "closePopup"], [1, "user-marker", 3, "badge", "size"], ["matTooltip", "Follow user", 3, "disabled", "click"], ["iconName", "person_add", 3, "size"], ["iconName", "star", 1, "favorite-user", 3, "color", "iconColor", "iconOnly", "iconSize", "isLoading", "disabled", "buttonClick"], ["iconName", "pin", 3, "color", "iconColor", "iconOnly", "iconSize", "isLoading", "disabled", "buttonClick"], [3, "participant", "showHideUserOptions", "isHiddenParticipant"]],
template: function(n, i) {
1 & n && t.yuY(0, es, 2, 1, "div", 0)(1, rs, 8, 10, "div", 1)(2, as, 2, 2, "button", 2)(3, cs, 2, 14)(4, ls, 1, 3, "ss-participant-menu", 3),
2 & n && (t.E7m("ngIf", !i.pinnedParticipant),
t.yG2(),
t.E7m("ngIf", i.participant.userInfo),
t.yG2(),
t.E7m("ngIf", i.showFollowUserOption),
t.yG2(),
t.C0Y(3, i.isHiddenParticipant ? -1 : 3),
t.yG2(),
t.E7m("ngIf", !i.isCurrentUser))
},
dependencies: [h.u_, O.k, C.g, K.A, rt.w, at.I, jt.k, G.eC, G.wW, R.a4, $t],
styles: ["[_nghost-%COMP%]{position:relative;display:flex;align-items:center;width:100%}.highlighted[_nghost-%COMP%]{background:var(--alt-40)}.pinning-me[_nghost-%COMP%] ss-user-avatar[_ngcontent-%COMP%]{border:1px solid var(--grayscale);border-radius:50%;outline:3px solid var(--accent-blue)}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{margin:6px 0}}.hover-highlight[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:20px;height:52px;margin-right:5px;cursor:pointer}.hover-highlight[_ngcontent-%COMP%]:hover ss-icon[_ngcontent-%COMP%] i{background:var(--accent-gradient);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}@media only screen and (max-width: 1024px){.hover-highlight[_ngcontent-%COMP%]{display:none}}.user-info[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:auto}.user-info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{max-width:158px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ss-user-avatar[_ngcontent-%COMP%]{margin-right:8px}ss-badge[_ngcontent-%COMP%]{flex-shrink:0;margin-left:6px}ss-button[_ngcontent-%COMP%]{margin:0 4px}ss-button.move-from-right[_ngcontent-%COMP%]{margin-right:22px}ss-button.favorite-user[_ngcontent-%COMP%]{position:relative;margin-top:-1px}button[_ngcontent-%COMP%]{border:none;background:none;cursor:pointer}"]
})
}
return o
}
)();
function ds(o, r) {
1 & o && (t.I0R(0, "div", 4),
t.OEk(1, " No results.\n"),
t.C$Y())
}
function us(o, r) {
1 & o && t.wR5(0, "mat-spinner", 5)
}
function ps(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 8),
t.wR5(1, "ss-user-avatar-and-info", 9),
t.I0R(2, "ss-button-small", 10),
t.qCj("buttonClick", function() {
const s = t.usT(e).$implicit
, a = t.GaO(3);
return t.CGJ(a.unhide(s.id))
}),
t.OEk(3, " Unhide "),
t.C$Y()()
}
if (2 & o) {
const e = r.$implicit
, n = t.GaO(3);
t.yG2(),
t.E7m("user", e)("avatarSize", 36)("descriptionField", n.UserDescriptionFieldRef.Bio)("source", n.ActivitySourceRef.HiddenUserItemMiniBioOpened),
t.yG2(),
t.E7m("color", n.ButtonColorRef.Secondary)
}
}
function ms(o, r) {
if (1 & o && (t.I0R(0, "div", 6),
t.yuY(1, ps, 4, 5, "div", 7),
t.C$Y()),
2 & o) {
const e = t.GaO(2);
t.eAK("no-results", 0 === e.hiddenUsers.length),
t.yG2(),
t.E7m("ngForOf", e.hiddenUsers)
}
}
function hs(o, r) {
if (1 & o && t.yuY(0, us, 1, 0, "mat-spinner", 5)(1, ms, 2, 3),
2 & o) {
const e = t.GaO();
t.C0Y(0, e.hiddenUsersLoading ? 0 : 1)
}
}
function gs(o, r) {
if (1 & o && t.wR5(0, "ss-participant-list-item", 13),
2 & o) {
const e = r.$implicit
, n = t.GaO(2);
t.E7m("isHiddenParticipant", n.showHiddenUsers)("showHideUserOptions", !0)("participant", e)
}
}
function fs(o, r) {
if (1 & o && (t.I0R(0, "cdk-virtual-scroll-viewport", 11),
t.yuY(1, gs, 1, 3, "ss-participant-list-item", 12),
t.C$Y()),
2 & o) {
const e = t.GaO();
t.eAK("no-results", 0 === e.filteredParticipants.length),
t.yG2(),
t.E7m("cdkVirtualForOf", e.filteredParticipants)
}
}
let _s = ( () => {
class o {
get anyPinnedUsers() {
return this.livekit.room.pinnedParticipants.length > 0 && !this.searchTerm && !this.showHiddenUsers
}
get filteredParticipants() {
const e = this.livekit.room.allParticipants.filter(n => !n.anonymous && n.identity && !this.livekit.room.hiddenUsersInfo.myHiddenUsers.some(i => i.hiddenUserId === n.identity) && !this.livekit.room.hiddenUsersInfo.twoWayHiddenMeUserIds.some(i => i === n.identity));
return this.searchTerm ? e.filter(n => {
const i = (this.searchTerm ?? "").trim().toLowerCase();
return n?.userInfo?.displayName && n.userInfo.displayName.toLowerCase().includes(i)
}
) : e
}
constructor(e, n, i, s, a) {
this.livekit = e,
this.accountService = n,
this.focusRoomService = i,
this.accountModalsService = s,
this.toastService = a,
this.hiddenUsers = [],
this.searchTerm = null,
this.showHiddenUsers = !1,
this.hiddenUsersLoading = !1,
this.UserDescriptionFieldRef = ie.M,
this.ActivitySourceRef = u.kP,
this.ButtonColorRef = N.k,
this.subscriptions = []
}
ngOnInit() {
this.subscriptions.push(this.focusRoomService.hiddenParticipant.subscribe(e => this.addHiddenParticipant(e)), this.focusRoomService.unhiddenParticipant.subscribe(e => this.removeHiddenParticipant(e)))
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe())
}
toggleHiddenParticipants() {
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.showHiddenUsers = !this.showHiddenUsers,
this.showHiddenUsers && this.fetchHiddenUsers())
}
unhide(e) {
const n = this.hiddenUsers.find(i => i.id === e);
n && this.hiddenUsers.splice(this.hiddenUsers.indexOf(n), 1),
this.livekit.room.unhide(e),
this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next()
}
fetchHiddenUsers() {
this.hiddenUsersLoading = !0,
this.focusRoomService.getHiddenUsers().subscribe({
next: e => {
this.hiddenUsers = e,
this.hiddenUsersLoading = !1
}
,
error: e => this.handleErrors(e)
})
}
addHiddenParticipant(e) {
this.hiddenUsers.some(i => i.id === e.identity) || this.hiddenUsers.push({
id: e.identity,
firstName: e.userInfo.firstName,
fullName: e.userInfo.fullName,
avatarColor: e.userInfo.avatarColor,
avatarUrl: e.userInfo.avatarUrl,
avatarThumbUrl: e.userInfo.avatarThumbUrl,
initials: e.userInfo.initials,
displayName: e.userInfo.displayName,
showPremiumTick: e.userInfo.showPremiumTick,
includePremiumFeatures: e.userInfo.includePremiumFeatures,
userBadge: e.userInfo.userBadge,
showNewUserMarker: e.userInfo.showNewUserMarker
})
}
removeHiddenParticipant(e) {
const n = this.hiddenUsers.find(i => i.id === e);
n && this.hiddenUsers.splice(this.hiddenUsers.indexOf(n), 1)
}
handleErrors(e) {
this.hiddenUsersLoading = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(y.uE),t.GI1(Jt.k),t.GI1(V.E),t.GI1(k.s))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-all-users"]],
hostVars: 2,
hostBindings: function(n, i) {
2 & n && t.eAK("collapsed-filters", i.collapsedFilters)
},
inputs: {
collapsedFilters: "collapsedFilters"
},
decls: 6,
vars: 6,
consts: [[1, "search-wrapper"], ["id", "participant-search", "name", "participantSearch", "placeholder", "Search...", 3, "ngModel", "ngModelChange"], ["color", "focus-room", 3, "matTooltip", "iconName", "iconOnly", "buttonClick"], ["class", "no-results-message", 4, "ngIf"], [1, "no-results-message"], ["diameter", "30", "strokeWidth", "3"], [1, "users-list"], ["class", "hidden-user-wrapper", 4, "ngFor", "ngForOf"], [1, "hidden-user-wrapper"], [3, "user", "avatarSize", "descriptionField", "source"], [3, "color", "buttonClick"], ["itemSize", "60", 1, "users-list"], [3, "isHiddenParticipant", "showHideUserOptions", "participant", 4, "cdkVirtualFor", "cdkVirtualForOf"], [3, "isHiddenParticipant", "showHideUserOptions", "participant"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "ss-input", 1),
t.iHE("ngModelChange", function(a) {
return t.kNx(i.searchTerm, a) || (i.searchTerm = a),
a
}),
t.C$Y(),
t.I0R(2, "ss-button", 2),
t.qCj("buttonClick", function() {
return i.toggleHiddenParticipants()
}),
t.C$Y()(),
t.yuY(3, ds, 2, 0, "div", 3)(4, hs, 2, 1)(5, fs, 2, 3)),
2 & n && (t.yG2(),
t.OKB("ngModel", i.searchTerm),
t.yG2(),
t.E7m("matTooltip", i.showHiddenUsers ? "Close hidden users" : "Show hidden users")("iconName", i.showHiddenUsers ? "eye" : "eye_off")("iconOnly", !0),
t.yG2(),
t.E7m("ngIf", i.showHiddenUsers ? 0 === i.hiddenUsers.length && !i.hiddenUsersLoading : 0 === i.filteredParticipants.length),
t.yG2(),
t.C0Y(4, i.showHiddenUsers ? 4 : 5))
},
dependencies: [h.ay, h.u_, O.k, q.g, N.S, ie.C, b.ue, b._G, Pt.UF, Pt.SR, Pt.G3, R.a4, z.cm, yt],
styles: [".collapsed-filters[_nghost-%COMP%] .users-list[_ngcontent-%COMP%]{height:calc(var(--vh) - 200px)}.search-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:12px}.search-wrapper[_ngcontent-%COMP%] ss-input[_ngcontent-%COMP%]{width:100%;margin:0 5px 0 0}.search-wrapper[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%] button{height:42px}.no-results-message[_ngcontent-%COMP%]{text-align:center}mat-spinner[_ngcontent-%COMP%]{margin:0 auto}.users-list[_ngcontent-%COMP%]{height:calc(var(--vh) - 273px);overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){.users-list[_ngcontent-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}.users-list[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}.users-list[_ngcontent-%COMP%]::-webkit-scrollbar, .users-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}.users-list[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.users-list.no-results[_ngcontent-%COMP%]{height:0}.hidden-user-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:6px 0}"]
})
}
return o
}
)();
var ne = c(1896);
function vs(o, r) {
1 & o && (t.I0R(0, "div", 11),
t.OEk(1, " You are not pinning anyone currently. "),
t.C$Y())
}
function Cs(o, r) {
1 & o && (t.I0R(0, "div", 12),
t.OEk(1, "Refreshing pins list..."),
t.C$Y())
}
const oe = (o, r) => r.sid;
function bs(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-icon", 20),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO().$implicit
, s = t.GaO(2);
return t.CGJ(s.livekit.room.movePinnedParticipant(i))
}),
t.C$Y()
}
2 & o && t.E7m("size", 14)
}
function ks(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-icon", 21),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO().$implicit
, s = t.GaO(2);
return t.CGJ(s.livekit.room.movePinnedParticipant(i, !1))
}),
t.C$Y()
}
2 & o && t.E7m("size", 14)
}
function Ps(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 14),
t.qCj("cdkDragStarted", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.onDragStarted())
})("cdkDragEnded", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.onDragEnded())
}),
t.I0R(1, "div", 15),
t.yuY(2, bs, 1, 1, "ss-icon", 16)(3, ks, 1, 1, "ss-icon", 17),
t.C$Y(),
t.wR5(4, "ss-icon", 18)(5, "ss-participant-list-item", 19),
t.C$Y()
}
if (2 & o) {
const e = r.$implicit
, n = r.$index
, i = t.GaO(2);
t.E7m("cdkDragDisabled", !i.subscriptionService.hasPremiumFeatures),
t.yG2(),
t.eAK("disabled", !i.subscriptionService.hasPremiumFeatures),
t.yG2(),
t.E7m("ngIf", n > 0),
t.yG2(),
t.E7m("ngIf", n < i.filteredParticipants.length - 1),
t.yG2(),
t.eAK("disabled", !i.subscriptionService.hasPremiumFeatures),
t.E7m("matTooltip", i.subscriptionService.hasPremiumFeatures ? "" : "Re-ordering pinned tiles is a premium feature.")("size", 20),
t.yG2(),
t.E7m("pinnedParticipant", !0)("participant", e)
}
}
function ys(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 13),
t.qCj("cdkDropListDropped", function(i) {
t.usT(e);
const s = t.GaO();
return t.CGJ(s.drop(i))
}),
t.c53(1, Ps, 6, 11, "div", 22, oe),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("cdkDropListData", e.filteredParticipants),
t.yG2(),
t.oho(e.filteredParticipants)
}
}
function Os(o, r) {
if (1 & o && t.wR5(0, "ss-participant-list-item", 25),
2 & o) {
const e = t.GaO().$implicit;
t.E7m("showFollowUserOption", !e.following)("participant", e)
}
}
function Ms(o, r) {
if (1 & o && t.yuY(0, Os, 1, 2, "ss-participant-list-item", 24),
2 & o) {
const e = r.$implicit
, n = t.GaO(2);
t.E7m("ngIf", n.isParticipantInRoom(e.identity))
}
}
function ws(o, r) {
if (1 & o && (t.I0R(0, "div", 23),
t.OEk(1, "Here are some people you've pinned recently."),
t.C$Y(),
t.c53(2, Ms, 1, 1, "ss-participant-list-item", 25, oe)),
2 & o) {
const e = t.GaO();
t.yG2(2),
t.oho(e.previouslyPinnedParticipants)
}
}
function Ss(o, r) {
1 & o && t.wR5(0, "div")
}
function xs(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 26),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.livekit.room.unpinAll())
}),
t.OEk(1, " Unpin all "),
t.C$Y()
}
}
let Is = ( () => {
class o {
get filteredParticipants() {
return this.searchTerm ? this.livekit.room.pinnedParticipants.filter(e => {
const n = (this.searchTerm ?? "").trim().toLowerCase();
return e?.userInfo?.displayName && e.userInfo.displayName.toLowerCase().includes(n)
}
) : this.livekit.room.pinnedParticipants
}
constructor(e, n, i, s) {
this.livekit = e,
this.toastService = n,
this.subscriptionNavigationService = i,
this.subscriptionService = s,
this.openFavoritesModal = new t._w7,
this.openPinSettingsModal = new t._w7,
this.previouslyPinnedParticipants = [],
this.previouslyPinnedParticipantsLoading = !0,
this.searchTerm = null,
this.hidePinsList = !1,
this.ButtonColorRef = N.k
}
ngOnInit() {
this.fetchPinnedParticipants()
}
isParticipantInRoom(e) {
return this.livekit.room.remoteParticipants.get(e)
}
drop(e) {
(0,
X.qv)(this.livekit.room.pinnedParticipants, e.previousIndex, e.currentIndex),
this.livekit.room.assignDisplayedParticipants()
}
sortFavoriteParticipants() {
this.subscriptionService.hasPremiumFeatures ? this.livekit.room.sortFavoriteParticipants() : this.subscriptionNavigationService.openPlansAndPricing(F.AD.SortFavoriteParticipants)
}
onDragStarted() {
this.numberOfPinsOnDragStart = this.filteredParticipants.length
}
onDragEnded() {
this.numberOfPinsOnDragEnd = this.filteredParticipants.length,
this.numberOfPinsOnDragStart !== this.numberOfPinsOnDragEnd && (this.hidePinsList = !0,
setTimeout( () => this.hidePinsList = !1, 1e3))
}
fetchPinnedParticipants() {
this.livekit.getRecentlyPinnedUsers(this.livekit.room.name).subscribe({
next: e => {
for (const n of e) {
const i = this.livekit.room.remoteParticipants.get(n.id);
if (i && !this.livekit.room.hiddenUsersInfo.myHiddenUsers.some(s => s.hiddenUserId === i.identity) && !this.livekit.room.hiddenUsersInfo.twoWayHiddenMeUserIds.some(s => s === i.identity)) {
const s = i;
s.following = n.following,
this.previouslyPinnedParticipants.push(s)
}
}
this.previouslyPinnedParticipantsLoading = !1
}
,
error: e => this.handleErrors(e)
})
}
handleErrors(e) {
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(k.s),t.GI1(bt._),t.GI1(H.k))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-pinned-users"]],
hostVars: 2,
hostBindings: function(n, i) {
2 & n && t.eAK("collapsed-filters", i.collapsedFilters)
},
inputs: {
collapsedFilters: "collapsedFilters"
},
outputs: {
openFavoritesModal: "openFavoritesModal",
openPinSettingsModal: "openPinSettingsModal"
},
decls: 16,
vars: 12,
consts: [["id", "participant-search", "name", "participantSearch", "placeholder", "Search pinned users...", 3, "disabled", "ngModel", "ngModelChange"], [1, "favorites-options-wrapper"], ["iconName", "star", 3, "buttonClick"], [1, "sort-by-favorites", 3, "color", "buttonClick"], ["matTooltip", "Manage Auto Pin Settings", "iconName", "settings", "color", "tertiary", 3, "iconSize", "iconOnly", "buttonClick"], ["cdkScrollable", "", 1, "pinned-users-wrapper"], ["class", "no-pins", 4, "ngIf"], ["class", "refreshing-pins-list"], [4, "ssSkeletonLoader", "ssSkeletonLoaderHeight", "ssSkeletonLoaderWidth"], [1, "button-wrapper"], ["matTooltip", "Unpin all", "color", "secondary", "iconName", "pin_off", 3, "buttonClick", 4, "ngIf"], [1, "no-pins"], [1, "refreshing-pins-list"], ["cdkDropList", "", 3, "cdkDropListData", "cdkDropListDropped"], ["cdkDrag", "", 1, "draggable-item-wrapper", 3, "cdkDragDisabled", "cdkDragStarted", "cdkDragEnded"], [1, "move-item-wrapper"], ["matTooltip", "move to top", "matTooltipShowDelay", "1000", "role", "button", "iconName", "arrow_up", 3, "size", "click", 4, "ngIf"], ["matTooltip", "move to bottom", "matTooltipShowDelay", "1000", "role", "button", "iconName", "arrow_down", 3, "size", "click", 4, "ngIf"], ["cdkDragHandle", "", "iconName", "re_order_dots_vertical", "color", "default-80", 1, "draggable", 3, "matTooltip", "size"], [3, "pinnedParticipant", "participant"], ["matTooltip", "move to top", "matTooltipShowDelay", "1000", "role", "button", "iconName", "arrow_up", 3, "size", "click"], ["matTooltip", "move to bottom", "matTooltipShowDelay", "1000", "role", "button", "iconName", "arrow_down", 3, "size", "click"], ["class", "draggable-item-wrapper", "cdkDrag", "", 3, "cdkDragDisabled"], [1, "users-block-text"], [3, "showFollowUserOption", "participant", 4, "ngIf"], [3, "showFollowUserOption", "participant"], ["matTooltip", "Unpin all", "color", "secondary", "iconName", "pin_off", 3, "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "ss-input", 0),
t.iHE("ngModelChange", function(a) {
return t.kNx(i.searchTerm, a) || (i.searchTerm = a),
a
}),
t.C$Y(),
t.I0R(1, "div", 1)(2, "ss-button-small", 2),
t.qCj("buttonClick", function() {
return i.openFavoritesModal.next()
}),
t.OEk(3, " Manage favorites "),
t.C$Y(),
t.I0R(4, "ss-button-small", 3),
t.qCj("buttonClick", function() {
return i.sortFavoriteParticipants()
}),
t.OEk(5, " Sort by favorites "),
t.C$Y(),
t.I0R(6, "ss-button", 4),
t.qCj("buttonClick", function() {
return i.openPinSettingsModal.next()
}),
t.C$Y()(),
t.I0R(7, "div", 5)(8, "div"),
t.yuY(9, vs, 2, 0, "div", 6)(10, Cs, 2, 0, "div", 7)(11, ys, 3, 1)(12, ws, 4, 0)(13, Ss, 1, 0, "div", 8),
t.C$Y(),
t.I0R(14, "div", 9),
t.yuY(15, xs, 2, 0, "ss-button", 10),
t.C$Y()()),
2 & n && (t.E7m("disabled", 0 === i.filteredParticipants.length),
t.OKB("ngModel", i.searchTerm),
t.yG2(4),
t.E7m("color", i.ButtonColorRef.Secondary),
t.yG2(2),
t.E7m("iconSize", 20)("iconOnly", !0),
t.yG2(3),
t.E7m("ngIf", 0 === i.filteredParticipants.length),
t.yG2(),
t.C0Y(10, i.hidePinsList ? 10 : 11),
t.yG2(2),
t.C0Y(12, i.previouslyPinnedParticipants.length > 0 ? 12 : -1),
t.yG2(),
t.E7m("ssSkeletonLoader", i.previouslyPinnedParticipantsLoading)("ssSkeletonLoaderHeight", "200px")("ssSkeletonLoaderWidth", "100%"),
t.yG2(2),
t.E7m("ngIf", i.livekit.room.pinnedParticipants.length))
},
dependencies: [h.u_, O.k, C.g, q.g, N.S, ne._, b.ue, b._G, Pt.Ci, R.a4, X.Cm, X.w5, X.A3, yt],
styles: [".collapsed-filters[_nghost-%COMP%] .pinned-users-wrapper[_ngcontent-%COMP%]{height:calc(var(--vh) - 258px)}.favorites-options-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:12px}.favorites-options-wrapper[_ngcontent-%COMP%] ss-button-small.sort-by-favorites[_ngcontent-%COMP%]{margin:0 6px}.favorites-options-wrapper[_ngcontent-%COMP%] ss-button-small[_ngcontent-%COMP%] i{color:var(--contrast)}.pinned-users-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:calc(var(--vh) - 331px);overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){.pinned-users-wrapper[_ngcontent-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}.pinned-users-wrapper[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}.pinned-users-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar, .pinned-users-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}.pinned-users-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.pinned-users-wrapper[_ngcontent-%COMP%] .toggle-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:21px}.pinned-users-wrapper[_ngcontent-%COMP%] .toggle-wrapper[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{margin-right:8px}.pinned-users-wrapper[_ngcontent-%COMP%] ss-info-tooltip[_ngcontent-%COMP%]{margin-left:4px}.no-pins[_ngcontent-%COMP%]{margin-left:4px}.refreshing-pins-list[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:104px}.draggable-item-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:flex-end;align-items:center;height:46px}.draggable-item-wrapper[_ngcontent-%COMP%] ss-participant-list-item[_ngcontent-%COMP%]{width:calc(100% - 39px)}.draggable-item-wrapper[_ngcontent-%COMP%] .draggable[_ngcontent-%COMP%]{cursor:grab}.draggable-item-wrapper[_ngcontent-%COMP%] .draggable.disabled[_ngcontent-%COMP%]{cursor:initial;opacity:.3}.users-block-text[_ngcontent-%COMP%]{padding:16px 4px 4px}.button-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;padding-right:12px}.button-wrapper[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%]{width:132px}.move-item-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-evenly}.move-item-wrapper.disabled[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{pointer-events:none;opacity:.6}"]
})
}
return o
}
)();
const se = (o, r) => r.identity;
function Ts(o, r) {
1 & o && (t.I0R(0, "div", 4),
t.OEk(1, " None of the people you follow are in the room at the moment.\n"),
t.C$Y())
}
function Gs(o, r) {
1 & o && t.wR5(0, "div")
}
function Rs(o, r) {
if (1 & o && t.wR5(0, "ss-participant-list-item", 6),
2 & o) {
const e = t.GaO().$implicit;
t.E7m("participant", e)
}
}
function Es(o, r) {
if (1 & o && t.yuY(0, Rs, 1, 1, "ss-participant-list-item", 5),
2 & o) {
const e = r.$implicit
, n = t.GaO();
t.E7m("ngIf", n.isParticipantInRoom(e.identity))
}
}
function Us(o, r) {
if (1 & o && t.wR5(0, "ss-participant-list-item", 6),
2 & o) {
const e = t.GaO().$implicit;
t.E7m("participant", e)
}
}
function Fs(o, r) {
if (1 & o && t.yuY(0, Us, 1, 1, "ss-participant-list-item", 5),
2 & o) {
const e = r.$implicit
, n = t.GaO(2);
t.E7m("ngIf", n.isParticipantInRoom(e.identity))
}
}
function As(o, r) {
if (1 & o && (t.I0R(0, "div", 7),
t.OEk(1),
t.C$Y(),
t.c53(2, Fs, 1, 1, "ss-participant-list-item", 6, se)),
2 & o) {
const e = t.GaO();
t.yG2(),
t.cNF(e.suggestedParticipantInfoText),
t.yG2(),
t.oho(e.suggestedParticipants)
}
}
let Ls = ( () => {
class o {
get filteredParticipants() {
return this.searchTerm ? this.followedParticipants.filter(e => {
const n = (this.searchTerm ?? "").trim().toLowerCase();
return e?.userInfo?.displayName && e.userInfo.displayName.toLowerCase().includes(n)
}
) : this.followedParticipants
}
constructor(e, n, i) {
this.livekit = e,
this.accountService = n,
this.toastService = i,
this.followedParticipantsLoading = !0,
this.suggestedParticipantInfoText = "",
this.followedParticipants = [],
this.suggestedParticipants = [],
this.searchTerm = null
}
ngOnInit() {
this.fetchFollowedParticipants()
}
isParticipantInRoom(e) {
return this.livekit.room.remoteParticipants.get(e)
}
fetchFollowedParticipants() {
this.livekit.getFollowedUsers(this.livekit.room.name).subscribe({
next: e => {
for (const n of e) {
const i = this.livekit.room.remoteParticipants.get(n);
i && this.followedParticipants.push(i)
}
this.followedParticipantsLoading = !1,
this.populateSuggestedParticipants()
}
,
error: e => this.handleErrors(e)
})
}
populateSuggestedParticipants() {
this.followedParticipantsLoading || this.followedParticipants.length >= 10 || (this.suggestedParticipants = this.livekit.room.allParticipants.filter(n => !n.isLocal && n.userInfo && !this.followedParticipants.some(i => i.identity === n.identity) && (this.accountService.currentUser.areaOfStudyId && n.userInfo.areaOfStudyId == this.accountService.currentUser.areaOfStudyId || this.accountService.currentUser.countryId && n.userInfo.countryId == this.accountService.currentUser.countryId)).sort((0,
dt.firstBy)(n => n.userInfo.areaOfStudyId === this.accountService.currentUser.areaOfStudyId, {
direction: "desc"
})).slice(0, 10),
this.setSuggestedParticipantInfoText())
}
setSuggestedParticipantInfoText() {
const e = this.suggestedParticipants.some(i => this.accountService.currentUser.areaOfStudyId && i.userInfo.areaOfStudyId == this.accountService.currentUser.areaOfStudyId)
, n = this.suggestedParticipants.some(i => this.accountService.currentUser.countryId && i.userInfo.countryId == this.accountService.currentUser.countryId);
e && n ? this.suggestedParticipantInfoText = `Here are some other people studying ${this.accountService.currentUser.areaOfStudyName} and some other people from ${this.accountService.currentUser.countryName}, try reaching out to them to connect!` : e ? this.suggestedParticipantInfoText = `Here are some other ${this.accountService.currentUser.areaOfStudyName} students, try reaching out to them to connect!` : n && (this.suggestedParticipantInfoText = `Here are some other people from ${this.accountService.currentUser.countryName}, try reaching out to them to connect!`)
}
handleErrors(e) {
this.followedParticipantsLoading = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(y.uE),t.GI1(k.s))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-following-users"]],
hostVars: 2,
hostBindings: function(n, i) {
2 & n && t.eAK("collapsed-filters", i.collapsedFilters)
},
inputs: {
collapsedFilters: "collapsedFilters"
},
decls: 7,
vars: 7,
consts: [["id", "participant-search", "name", "participantSearch", "placeholder", "Search...", 3, "disabled", "ngModel", "ngModelChange"], ["class", "empty-message", 4, "ngIf"], [1, "follower-list"], [4, "ssSkeletonLoader", "ssSkeletonLoaderHeight", "ssSkeletonLoaderWidth"], [1, "empty-message"], [3, "participant", 4, "ngIf"], [3, "participant"], [1, "users-block-text"]],
template: function(n, i) {
1 & n && (t.I0R(0, "ss-input", 0),
t.iHE("ngModelChange", function(a) {
return t.kNx(i.searchTerm, a) || (i.searchTerm = a),
a
}),
t.C$Y(),
t.yuY(1, Ts, 2, 0, "div", 1),
t.I0R(2, "div", 2),
t.yuY(3, Gs, 1, 0, "div", 3),
t.c53(4, Es, 1, 1, "ss-participant-list-item", 6, se),
t.yuY(6, As, 4, 1),
t.C$Y()),
2 & n && (t.E7m("disabled", 0 === i.followedParticipants.length),
t.OKB("ngModel", i.searchTerm),
t.yG2(),
t.E7m("ngIf", !i.followedParticipantsLoading && 0 === i.followedParticipants.length),
t.yG2(2),
t.E7m("ssSkeletonLoader", i.followedParticipantsLoading)("ssSkeletonLoaderHeight", "200px")("ssSkeletonLoaderWidth", "100%"),
t.yG2(),
t.oho(i.filteredParticipants),
t.yG2(2),
t.C0Y(6, i.suggestedParticipants.length > 0 ? 6 : -1))
},
dependencies: [h.u_, q.g, ne._, b.ue, b._G, yt],
styles: [".collapsed-filters[_nghost-%COMP%] .follower-list[_ngcontent-%COMP%]{height:calc(var(--vh) - 244px)}.follower-list[_ngcontent-%COMP%]{height:calc(var(--vh) - 317px);overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){.follower-list[_ngcontent-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}.follower-list[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}.follower-list[_ngcontent-%COMP%]::-webkit-scrollbar, .follower-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}.follower-list[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.empty-message[_ngcontent-%COMP%]{display:flex}strong[_ngcontent-%COMP%], .users-block-text[_ngcontent-%COMP%]{padding:16px 4px 4px}"]
})
}
return o
}
)();
function Ys(o, r) {
1 & o && t.wR5(0, "mat-spinner", 6)
}
const Vs = (o, r) => r.identity;
function Ns(o, r) {
1 & o && t.wR5(0, "ss-participant-list-item", 8),
2 & o && t.E7m("participant", r.$implicit)
}
function Bs(o, r) {
1 & o && t.OEk(0, " Favorite users list is empty. ")
}
function Ds(o, r) {
1 & o && t.OEk(0, " None of your favorites are online. ")
}
function $s(o, r) {
if (1 & o && (t.I0R(0, "div", 9),
t.yuY(1, Bs, 1, 0)(2, Ds, 1, 0),
t.C$Y()),
2 & o) {
const e = t.GaO(2);
t.yG2(),
t.C0Y(1, 0 === e.favorites.length ? 1 : 2)
}
}
function zs(o, r) {
if (1 & o && (t.c53(0, Ns, 1, 1, "ss-participant-list-item", 8, Vs),
t.yuY(2, $s, 3, 1, "div", 7)),
2 & o) {
const e = t.GaO();
t.oho(e.filteredParticipants),
t.yG2(2),
t.C0Y(2, 0 === e.filteredParticipants.length ? 2 : -1)
}
}
let js = ( () => {
class o {
get favorites() {
return this.livekit.room.allParticipants.filter(e => e.favorited).sort((0,
dt.firstBy)(e => this.livekit.room.getFavoriteParticipantOrder(e), {
direction: "asc"
}))
}
get filteredParticipants() {
return this.searchTerm ? this.favorites.filter(e => {
const n = (this.searchTerm ?? "").trim().toLowerCase();
return e?.userInfo?.displayName && e.userInfo.displayName.toLowerCase().includes(n)
}
) : this.favorites
}
constructor(e, n, i, s, a) {
this.userFavoriteService = e,
this.livekit = n,
this.subscriptionService = i,
this.subscriptionNavigationService = s,
this.toastService = a,
this.openFavoritesModal = new t._w7,
this.openPinSettingsModal = new t._w7,
this.favoritesLoading = !1,
this.searchTerm = null,
this.ButtonColorRef = N.k
}
ngOnInit() {
this.getFavorites()
}
getFavorites() {
this.favoritesLoading = !0,
this.userFavoriteService.getFavorites().subscribe({
next: () => this.favoritesLoading = !1,
error: e => this.handleErrors(e)
})
}
sortFavoriteParticipants() {
this.subscriptionService.hasPremiumFeatures ? this.livekit.room.sortFavoriteParticipants() : this.subscriptionNavigationService.openPlansAndPricing(F.AD.SortFavoriteParticipants)
}
handleErrors(e) {
this.favoritesLoading = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(xt.C),t.GI1(g.A),t.GI1(H.k),t.GI1(bt._),t.GI1(k.s))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-favorite-users"]],
hostVars: 2,
hostBindings: function(n, i) {
2 & n && t.eAK("collapsed-filters", i.collapsedFilters)
},
inputs: {
collapsedFilters: "collapsedFilters"
},
outputs: {
openFavoritesModal: "openFavoritesModal",
openPinSettingsModal: "openPinSettingsModal"
},
decls: 10,
vars: 6,
consts: [["id", "participant-search", "name", "participantSearch", "placeholder", "Search favorites...", 3, "disabled", "ngModel", "ngModelChange"], [1, "favorites-options-wrapper"], ["iconName", "star", 3, "buttonClick"], [1, "sort-by-favorites", 3, "color", "buttonClick"], ["matTooltip", "Manage Auto Pin Settings", "iconName", "settings", "color", "tertiary", 3, "iconSize", "iconOnly", "buttonClick"], [1, "favorite-users-wrapper"], ["diameter", "20", "strokeWidth", "2"], ["class", "list-empty"], [3, "participant"], [1, "list-empty"]],
template: function(n, i) {
1 & n && (t.I0R(0, "ss-input", 0),
t.iHE("ngModelChange", function(a) {
return t.kNx(i.searchTerm, a) || (i.searchTerm = a),
a
}),
t.C$Y(),
t.I0R(1, "div", 1)(2, "ss-button-small", 2),
t.qCj("buttonClick", function() {
return i.openFavoritesModal.next()
}),
t.OEk(3, " Manage favorites "),
t.C$Y(),
t.I0R(4, "ss-button-small", 3),
t.qCj("buttonClick", function() {
return i.sortFavoriteParticipants()
}),
t.OEk(5, " Sort by favorites "),
t.C$Y(),
t.I0R(6, "ss-button", 4),
t.qCj("buttonClick", function() {
return i.openPinSettingsModal.next()
}),
t.C$Y()(),
t.I0R(7, "div", 5),
t.yuY(8, Ys, 1, 0, "mat-spinner", 6)(9, zs, 3, 1),
t.C$Y()),
2 & n && (t.E7m("disabled", 0 === i.favorites.length),
t.OKB("ngModel", i.searchTerm),
t.yG2(4),
t.E7m("color", i.ButtonColorRef.Secondary),
t.yG2(2),
t.E7m("iconSize", 20)("iconOnly", !0),
t.yG2(2),
t.C0Y(8, i.favoritesLoading ? 8 : 9))
},
dependencies: [O.k, q.g, N.S, b.ue, b._G, R.a4, z.cm, yt],
styles: [".collapsed-filters[_nghost-%COMP%] .favorite-users-wrapper[_ngcontent-%COMP%]{height:calc(var(--vh) - 258px)}.favorites-options-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:12px}.favorites-options-wrapper[_ngcontent-%COMP%] ss-button-small.sort-by-favorites[_ngcontent-%COMP%]{margin:0 6px}.favorites-options-wrapper[_ngcontent-%COMP%] ss-button-small[_ngcontent-%COMP%] i{color:var(--contrast)}.favorite-users-wrapper[_ngcontent-%COMP%]{height:calc(var(--vh) - 331px);overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){.favorite-users-wrapper[_ngcontent-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}.favorite-users-wrapper[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}.favorite-users-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar, .favorite-users-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}.favorite-users-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}mat-spinner[_ngcontent-%COMP%]{margin:20px auto}"]
})
}
return o
}
)();
const re = (o, r) => r.type;
function Hs(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 11),
t.qCj("click", function() {
const s = t.usT(e).$implicit
, a = t.GaO();
return t.CGJ(a.setActiveFilter(s.type))
}),
t.wR5(1, "ss-icon", 12),
t.OEk(2),
t.C$Y()
}
if (2 & o) {
const e = r.$implicit
, n = t.GaO();
t.eAK("active", n.activeFilter === e.type),
t.yG2(),
t.E7m("iconName", e.iconName)("size", 16),
t.yG2(),
t.oRS(" ", e.type, " ")
}
}
function Ks(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 11),
t.qCj("click", function() {
const s = t.usT(e).$implicit
, a = t.GaO();
return t.CGJ(a.setActiveFilter(s.type))
}),
t.wR5(1, "ss-icon", 12),
t.OEk(2),
t.C$Y()
}
if (2 & o) {
const e = r.$implicit
, n = t.GaO();
t.eAK("active", n.activeFilter === e.type),
t.yG2(),
t.eAK("rotate-icon", e.type === n.FilterTypeRef.PinningMe),
t.E7m("iconName", e.iconName)("size", 16),
t.yG2(),
t.oRS(" ", e.type, " ")
}
}
function Js(o, r) {
if (1 & o && t.wR5(0, "ss-all-users", 13),
2 & o) {
const e = t.GaO();
t.E7m("collapsedFilters", !e.panelOpenState)
}
}
function qs(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-pinned-users", 14),
t.qCj("openFavoritesModal", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.openFavoritesModal())
})("openPinSettingsModal", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.openPinSettingsModal())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("collapsedFilters", !e.panelOpenState)
}
}
function Ws(o, r) {
if (1 & o && t.wR5(0, "ss-following-users", 13),
2 & o) {
const e = t.GaO();
t.E7m("collapsedFilters", !e.panelOpenState)
}
}
function Qs(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-favorite-users", 14),
t.qCj("openFavoritesModal", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.openFavoritesModal())
})("openPinSettingsModal", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.openPinSettingsModal())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("collapsedFilters", !e.panelOpenState)
}
}
function Xs(o, r) {
1 & o && t.wR5(0, "ss-pinned-you")
}
let Zs = ( () => {
class o {
get participantCount() {
return this.livekit.room.allParticipants.filter(e => !e.anonymous && e.identity).length
}
constructor(e, n, i, s, a, d) {
this.livekit = e,
this.subscriptionService = n,
this.analyticsService = i,
this.dialog = s,
this.accountService = a,
this.accountModalsService = d,
this.filtersFirstLine = [{
type: J.All,
iconName: "people"
}, {
type: J.Pinning,
iconName: "pin"
}, {
type: J.Following,
iconName: "person"
}],
this.filtersSecondLine = [{
type: J.Favorites,
iconName: "star"
}, {
type: J.PinningMe,
iconName: "pin"
}],
this.activeFilter = J.All,
this.panelOpenState = !0,
this.backgroundBlurLoading = !1,
this.FilterTypeRef = J,
this.ButtonColorRef = N.k
}
handleKeyboardEvent(e) {
"Escape" === e.key && this.close()
}
ngOnInit() {
this.panelOpenState = !localStorage.getItem(f.YZ)
}
close() {
this.livekit.room.participantListVisibility = !1
}
openFavoritesModal() {
this.analyticsService.markActivity(u.kP.UserFavoritesModalOpened),
this.dialog.open(Xo._, {
panelClass: "fullscreen-dialog",
width: "600px",
minHeight: "650px"
}).afterClosed().subscribe( () => {
this.livekit.room.sortPinnedParticipants(),
this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next()
}
)
}
openPinSettingsModal() {
this.accountModalsService.ensureUserCompletedBasicInfo() && this.livekit.showOptionsModal(g.Y.PinSettings)
}
expansionPanelOpened() {
this.panelOpenState = !0,
localStorage.removeItem(f.YZ)
}
expansionPanelClosed() {
this.panelOpenState = !1,
localStorage.setItem(f.YZ, "true")
}
setActiveFilter(e) {
this.activeFilter === e || e !== J.All && !this.accountModalsService.ensureUserCompletedBasicInfo() || (this.activeFilter = e)
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(H.k),t.GI1(u.uc),t.GI1(p.qW),t.GI1(y.uE),t.GI1(V.E))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-participant-list"]],
hostBindings: function(n, i) {
1 & n && t.qCj("keydown", function(a) {
return i.handleKeyboardEvent(a)
}, !1, t.wLc)
},
decls: 23,
vars: 9,
consts: [[1, "list-header"], [3, "click"], ["role", "button", "iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant"], [1, "filters-wrapper"], [3, "expanded", "opened", "closed"], [1, "first-line"], [1, "second-line"], [1, "main-wrapper"], [3, "collapsedFilters", 4, "ngIf"], [3, "collapsedFilters", "openFavoritesModal", "openPinSettingsModal", 4, "ngIf"], [4, "ngIf"], [1, "filter-button", 3, "click"], ["color", "default", 3, "iconName", "size"], [3, "collapsedFilters"], [3, "collapsedFilters", "openFavoritesModal", "openPinSettingsModal"], ["class", "filter-button", 3, "active"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "h4"),
t.OEk(2),
t.C$Y(),
t.I0R(3, "button", 1),
t.qCj("click", function() {
return i.close()
}),
t.wR5(4, "ss-icon", 2),
t.C$Y()(),
t.I0R(5, "div", 3)(6, "mat-accordion")(7, "mat-expansion-panel", 4),
t.qCj("opened", function() {
return i.expansionPanelOpened()
})("closed", function() {
return i.expansionPanelClosed()
}),
t.I0R(8, "mat-expansion-panel-header")(9, "mat-panel-title"),
t.OEk(10, "Filters"),
t.C$Y()(),
t.I0R(11, "div", 5),
t.c53(12, Hs, 3, 5, "div", 15, re),
t.C$Y(),
t.I0R(14, "div", 6),
t.c53(15, Ks, 3, 7, "div", 15, re),
t.C$Y()()()(),
t.I0R(17, "div", 7),
t.yuY(18, Js, 1, 1, "ss-all-users", 8)(19, qs, 1, 1, "ss-pinned-users", 9)(20, Ws, 1, 1, "ss-following-users", 8)(21, Qs, 1, 1, "ss-favorite-users", 9)(22, Xs, 1, 0, "ss-pinned-you", 10),
t.C$Y()),
2 & n && (t.yG2(2),
t.oRS("Participant list (", i.participantCount, ")"),
t.yG2(2),
t.E7m("size", 20)("iconVariant", 20),
t.yG2(3),
t.E7m("expanded", i.panelOpenState),
t.yG2(5),
t.oho(i.filtersFirstLine),
t.yG2(3),
t.oho(i.filtersSecondLine),
t.yG2(3),
t.E7m("ngIf", i.activeFilter === i.FilterTypeRef.All),
t.yG2(),
t.E7m("ngIf", i.activeFilter === i.FilterTypeRef.Pinning),
t.yG2(),
t.E7m("ngIf", i.activeFilter === i.FilterTypeRef.Following),
t.yG2(),
t.E7m("ngIf", i.activeFilter === i.FilterTypeRef.Favorites),
t.yG2(),
t.E7m("ngIf", i.activeFilter === i.FilterTypeRef.PinningMe))
},
dependencies: [h.u_, Zo.o, C.g, tt._2, tt._s, tt.nm, tt.CM, _s, Is, Ls, js],
styles: ["[_nghost-%COMP%]{position:absolute;top:0;right:0;z-index:5;flex-shrink:0;width:380px;height:calc(100vh - 56px);margin:0;border-left:1px solid var(--alt-40);background:var(--alt-80);overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){[_nghost-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}[_nghost-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}[_nghost-%COMP%]::-webkit-scrollbar, [_nghost-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}[_nghost-%COMP%]::-webkit-scrollbar{width:8px;height:8px}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{z-index:3;height:100%}}.list-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}h4[_ngcontent-%COMP%]{text-align:center;margin:4px 0 4px 4px}ss-tabs[_ngcontent-%COMP%]{margin-bottom:15px}button[_ngcontent-%COMP%]{border:none;background:none}.filters-wrapper[_ngcontent-%COMP%]{padding:0 10px;margin-bottom:8px;border-radius:4px;background-color:var(--alt-40)}.filters-wrapper[_ngcontent-%COMP%] mat-accordion[_ngcontent-%COMP%] mat-expansion-panel-header{height:40px}.filters-wrapper[_ngcontent-%COMP%] mat-accordion[_ngcontent-%COMP%] mat-expansion-panel-header:hover{background:var(--alt-60)!important}.filters-wrapper[_ngcontent-%COMP%] mat-accordion[_ngcontent-%COMP%] mat-expansion-panel-header mat-panel-title{color:var(--default)}.filters-wrapper[_ngcontent-%COMP%] mat-accordion[_ngcontent-%COMP%] .mat-expansion-panel{background:none}.filters-wrapper[_ngcontent-%COMP%] .first-line[_ngcontent-%COMP%], .filters-wrapper[_ngcontent-%COMP%] .second-line[_ngcontent-%COMP%]{display:flex}.filters-wrapper[_ngcontent-%COMP%] .first-line[_ngcontent-%COMP%]{margin-bottom:6px}.filters-wrapper[_ngcontent-%COMP%] .filter-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:28px;padding:0 8px;margin-right:8px;border-radius:4px;color:var(--default);background-color:var(--button-1);font-size:13px;line-height:20px;cursor:pointer}.filters-wrapper[_ngcontent-%COMP%] .filter-button[_ngcontent-%COMP%]:not(.disabled, .active)[_ngcontent-%COMP%]:hover{background:var(--accent-gradient-80)}.filters-wrapper[_ngcontent-%COMP%] .filter-button.active[_ngcontent-%COMP%]{color:var(--contrast);background:var(--accent-gradient-20);cursor:default}.filters-wrapper[_ngcontent-%COMP%] .filter-button.active[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%] i{color:var(--contrast)}.filters-wrapper[_ngcontent-%COMP%] .filter-button.disabled[_ngcontent-%COMP%]{cursor:default;opacity:.5}.filters-wrapper[_ngcontent-%COMP%] .filter-button[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{position:relative;bottom:1px;margin-right:4px}.filters-wrapper[_ngcontent-%COMP%] .filter-button[_ngcontent-%COMP%] ss-icon.rotate-icon[_ngcontent-%COMP%]{transform:rotate(270deg)}.main-wrapper[_ngcontent-%COMP%]{padding:0 10px 10px}"]
})
}
return o
}
)();
var J = function(o) {
return o.All = "All",
o.Following = "Following",
o.Pinning = "Pinning",
o.Favorites = "Favorites",
o.PinningMe = "Pinning Me",
o
}(J || {});
const tr = ["videoElement"];
function er(o, r) {}
function ir(o, r) {
1 & o && t.wR5(0, "mat-spinner", 12)
}
function nr(o, r) {
if (1 & o && t.wR5(0, "ss-user-avatar", 13),
2 & o) {
const e = t.GaO();
t.E7m("size", 48)("avatarColor", e.highlightedParticipant.participant.userInfo.avatarColor)("avatarThumbUrl", e.highlightedParticipant.participant.userInfo.avatarThumbUrl)("showOnlineStatus", !1)("userId", e.highlightedParticipant.participant.identity)("initials", e.highlightedParticipant.participant.userInfo.initials)
}
}
function or(o, r) {
1 & o && t.wR5(0, "img", 16)
}
function sr(o, r) {
if (1 & o && (t.I0R(0, "div", 14),
t.OEk(1),
t.yuY(2, or, 1, 0, "img", 15),
t.C$Y()),
2 & o) {
const e = t.GaO();
t.yG2(),
t.oRS(" ", e.goToPageTitle, " "),
t.yG2(),
t.E7m("ngIf", e.userPageNumber !== e.livekit.room.paginator.currentPage)
}
}
function rr(o, r) {
1 & o && (t.I0R(0, "div", 17),
t.OEk(1, "This user has left the room"),
t.C$Y())
}
function ar(o, r) {
if (1 & o && (t.I0R(0, "div", 22),
t.wR5(1, "ss-icon", 23),
t.I0R(2, "small"),
t.OEk(3),
t.C$Y()()),
2 & o) {
const e = t.GaO(2);
t.yG2(),
t.E7m("size", 12),
t.yG2(2),
t.cNF(e.highlightedParticipant.participant.pinnedCount)
}
}
function cr(o, r) {
1 & o && (t.I0R(0, "div", 24),
t.OEk(1, " P4P "),
t.C$Y())
}
function lr(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 18),
t.yuY(1, ar, 4, 2, "div", 19)(2, cr, 2, 0, "div", 20),
t.C$Y(),
t.I0R(3, "ss-button", 21),
t.qCj("buttonClick", function(i) {
t.usT(e);
const s = t.GaO();
return t.CGJ(s.isPinned ? s.unpin(i) : s.pin(i))
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.yG2(),
t.E7m("ngIf", e.highlightedParticipant.participant.pinnedCount > 0 && !e.focusPlusActive),
t.yG2(),
t.E7m("ngIf", e.highlightedParticipant.participant.userInfo.pinForPinEnabled),
t.yG2(),
t.E7m("iconName", e.isPinned ? "pin_off" : "pin")("iconOnly", !0)("iconSize", 24)("isLoading", null !== e.livekit.room.pinningUserIds && e.livekit.room.pinningUserIds.includes(e.highlightedParticipant.participant.identity))("disabled", null !== e.livekit.room.pinningUserIds && !e.livekit.room.pinningUserIds.includes(e.highlightedParticipant.participant.identity))
}
}
let dr = ( () => {
class o {
get userPageNumber() {
if (!this.highlightedParticipant.participant)
return null;
const e = this.livekit.room.filteredParticipants.indexOf(this.highlightedParticipant.participant);
return e < 0 ? null : Math.ceil((e + 1) / Math.min(this.livekit.room.paginator.tilesPerPage, this.livekit.room.paginator.maxTilesAllowed))
}
get isCameraOn() {
return !!this.highlightedParticipant.participant?.isCameraEnabled
}
get participantIsInTheRoom() {
return !!this.highlightedParticipant.participant?.identity && this.livekit.room.allParticipants.some(e => e.identity === this.highlightedParticipant.participant?.identity)
}
get anyPinnedUsers() {
return this.livekit.room.pinnedParticipants.length > 0
}
get isLocalParticipant() {
return !!this.highlightedParticipant?.participant?.isLocal
}
get transformValue() {
if (!this.isCameraOn)
return "";
let e = null;
this.highlightedParticipant.participant?.zoomToFit && this.videoElement?.nativeElement?.videoHeight && (e = 16 / 9 / (this.videoElement.nativeElement.videoWidth / this.videoElement.nativeElement.videoHeight));
let i = null === e || 1 === e ? "" : `scale(${e})`;
return i += this.highlightedParticipant.participant?.isLocal && this.livekit.room.settings.mirrorMode ? " scaleX(-1)" : "",
i = i.trim(),
i
}
get goToPageTitle() {
return this.userPageNumber !== this.livekit.room.paginator.currentPage || !this.livekit.room.forceGridView && this.anyPinnedUsers ? `Page ${this.userPageNumber}` : "On this page"
}
get isPinned() {
const e = this.highlightedParticipant?.participant?.identity;
return !!e && this.livekit.room.isPinned(e)
}
get isDisplayedParticipant() {
if (!this.highlightedParticipant.participant)
return !1;
const e = void 0 !== this.livekit.room.displayedParticipants.find(s => s.identity === this.highlightedParticipant.participant?.identity)
, n = this.highlightedParticipant.participant.identity
, i = !!this.activeGroup?.members.some(s => s.id === n);
return e || i
}
get focusPlusActive() {
return this.livekit.room.focusPlus.active
}
constructor(e, n, i) {
this.livekit = e,
this.toastService = n,
this.analyticsService = i,
this.activeGroup = null,
this.loading = !1,
this.showParticipantPreview = !1,
this.hideOverlay = !1,
this.subscriptions = [],
this.onRemoteTrackSubscribed = this.onRemoteTrackSubscribed.bind(this),
this.onTrackPublished = this.onTrackPublished.bind(this),
this.onLocalTrackPublished = this.onLocalTrackPublished.bind(this)
}
ngOnInit() {
this.subscriptions.push(this.livekit.participantHighlight.show.subscribe(e => this.onHighlightShown(e)), this.livekit.participantHighlight.hideOverlay.subscribe(e => this.hideOverlay = e), this.livekit.room.activeGroup.subscribe(e => this.activeGroup = e))
}
ngAfterViewInit() {
if (this.highlightedParticipant.participant) {
if (this.highlightedParticipant.participant.on(l.Cu.TrackSubscribed, this.onRemoteTrackSubscribed).on(l.Cu.TrackPublished, this.onTrackPublished).on(l.Cu.LocalTrackPublished, this.onLocalTrackPublished),
this.isDisplayedParticipant && !this.hideOverlay)
return this.highlightedParticipant.participant.highlighted = !0,
void (this.livekit.room.roomChatVisibility && this.setRoomChannelStyle(!0));
setTimeout( () => {
if (this.showParticipantPreview = !0,
this.loading = !0,
this.highlightedParticipant.participant?.isLocal) {
const e = this.highlightedParticipant.participant.getTrackPublications().find(n => n.kind === l.oh.Kind.Video && n.isSubscribed);
e ? this.processPublishedTrack(e) : this.loading = !1
} else
this.setRemoteTrackSubscribedState(!0)
}
)
}
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe()),
this.livekit.room.roomChatVisibility && this.setRoomChannelStyle(),
this.highlightedParticipant.participant && (this.highlightedParticipant.participant.highlighted = !1,
this.showParticipantPreview && (this.isDisplayedParticipant || this.setRemoteTrackSubscribedState(!1),
this.highlightedParticipant.participant.off(l.Cu.TrackSubscribed, this.onRemoteTrackSubscribed).off(l.Cu.TrackPublished, this.onTrackPublished).off(l.Cu.LocalTrackPublished, this.onLocalTrackPublished)))
}
hideParticipantHighlight() {
this.livekit.participantHighlight.hide.next()
}
goToPage() {
this.anyPinnedUsers && !this.livekit.room.forceGridView && (this.livekit.room.forceGridView = !0,
this.livekit.room.sortAndAssignDisplayedParticipants(),
this.livekit.recalculateGrid.next()),
this.highlightedParticipant.participant?.isCameraEnabled && (this.userPageNumber && this.livekit.room.paginator.currentPage !== this.userPageNumber && (this.livekit.room.paginator.goToPage(this.userPageNumber),
this.markPageChangedActivity()),
this.livekit.participantHighlight.hide.next())
}
pin(e) {
e.stopPropagation(),
this.highlightedParticipant?.participant?.identity && this.livekit.room.pin({
participant: this.highlightedParticipant.participant
})
}
unpin(e) {
e.stopPropagation();
const n = this.highlightedParticipant?.participant?.identity;
n && this.livekit.room.unpin({
pinnedUserId: n
})
}
setRoomChannelStyle(e=!1) {
const n = document.querySelector("ss-focus-room ss-channel");
n && (n.style.zIndex = e ? "1002" : "")
}
markPageChangedActivity() {
let e;
switch (this.highlightedParticipant.source) {
case _.W4.LocalVideo:
e = u.kP.LivekitLocalVideoHighlightPageChanged;
break;
case _.W4.EncouragementToast:
e = u.kP.LivekitEncouragementPageChanged;
break;
case _.W4.ParticipantListItem:
e = u.kP.LivekitParticipantListItemHighlightPageChanged;
break;
case _.W4.MutualPinModal:
e = u.kP.LivekitParticipantMutualPinHighlight
}
this.analyticsService.markActivity(e)
}
markVideoLoadedActivity() {
let e;
switch (this.highlightedParticipant.source) {
case _.W4.LocalVideo:
e = u.kP.LivekitLocalVideoHighlightLoaded;
break;
case _.W4.EncouragementToast:
e = u.kP.LivekitEncouragementVideoLoaded;
break;
case _.W4.ParticipantListItem:
e = u.kP.LivekitParticipantListItemHighlightVideoLoaded;
break;
case _.W4.MutualPinModal:
e = u.kP.LivekitParticipantMutualPinHighlight
}
this.analyticsService.markActivity(e)
}
onHighlightShown(e) {}
setRemoteTrackSubscribedState(e) {
this.highlightedParticipant.participant && (0 === this.highlightedParticipant.participant.videoTrackPublications.size && (this.loading = !1),
this.highlightedParticipant.participant.videoTrackPublications.forEach(n => {
this.hideOverlay && this.isDisplayedParticipant ? this.processPublishedTrack(n) : n instanceof l.Sw && n.setSubscribed(e)
}
))
}
onTrackPublished(e) {
this.loading = !1,
e.kind === l.oh.Kind.Video && !e.isSubscribed && this.setRemoteTrackSubscribedState(!0)
}
onRemoteTrackSubscribed(e, n) {
this.processPublishedTrack(n)
}
onLocalTrackPublished(e) {
this.processPublishedTrack(e)
}
processPublishedTrack(e) {
if (this.loading = !1,
this.markVideoLoadedActivity(),
!e.track || e.track.kind !== l.oh.Kind.Video)
return;
const n = this.videoElement.nativeElement;
e.track.attachedElements.includes(n) || e.track.attach(n)
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(k.s),t.GI1(u.uc))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-participant-highlight"]],
viewQuery: function(n, i) {
if (1 & n && t.CC$(tr, 5),
2 & n) {
let s;
t.wto(s = t.Gqi()) && (i.videoElement = s.first)
}
},
inputs: {
highlightedParticipant: "highlightedParticipant"
},
decls: 13,
vars: 21,
consts: [["cdkOverlayOrigin", ""], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "encourage-overlay-backdrop", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "backdropClick"], [1, "video-wrapper", 3, "hidden"], [1, "video-preview", 3, "click"], [3, "hidden"], ["diameter", "32", "strokeWidth", "2", 4, "ngIf"], ["autoplay", "", "playsInline", "", 3, "hidden"], ["videoElement", ""], ["status", "online", 3, "size", "avatarColor", "avatarThumbUrl", "showOnlineStatus", "userId", "initials", 4, "ngIf"], ["class", "go-to-page", 4, "ngIf"], ["class", "left-the-room-message", 4, "ngIf"], ["diameter", "32", "strokeWidth", "2"], ["status", "online", 3, "size", "avatarColor", "avatarThumbUrl", "showOnlineStatus", "userId", "initials"], [1, "go-to-page"], ["src", "/assets/icons/finger-icon.svg", "alt", "go to page icon", 4, "ngIf"], ["src", "/assets/icons/finger-icon.svg", "alt", "go to page icon"], [1, "left-the-room-message"], [1, "info-wrapper"], ["class", "pined-count", "title", "The number of others that have pinned this user", 4, "ngIf"], ["title", "User has pin-for-pin enabled", "class", "pin-for-pin", 4, "ngIf"], ["color", "gradient-40", "iconColor", "gradient-40", 1, "pin-icon", 3, "iconName", "iconOnly", "iconSize", "isLoading", "disabled", "buttonClick"], ["title", "The number of others that have pinned this user", 1, "pined-count"], ["iconName", "pin", "color", "light-widget-active", 3, "size"], ["title", "User has pin-for-pin enabled", 1, "pin-for-pin"]],
template: function(n, i) {
if (1 & n && (t.I0R(0, "div", 0, 1),
t.yuY(2, er, 0, 0, "ng-template", 2),
t.qCj("backdropClick", function() {
return i.hideParticipantHighlight()
}),
t.I0R(3, "div", 3)(4, "div", 4),
t.qCj("click", function() {
return i.goToPage()
}),
t.I0R(5, "div", 5),
t.yuY(6, ir, 1, 0, "mat-spinner", 6),
t.wR5(7, "video", 7, 8),
t.yuY(9, nr, 1, 6, "ss-user-avatar", 9)(10, sr, 3, 2, "div", 10),
t.C$Y(),
t.yuY(11, rr, 2, 0, "div", 11),
t.C$Y(),
t.yuY(12, lr, 4, 7),
t.C$Y()()),
2 & n) {
const s = t.Gew(1);
t.yG2(2),
t.E7m("cdkConnectedOverlayOrigin", s)("cdkConnectedOverlayOpen", !0)("cdkConnectedOverlayHasBackdrop", i.hideOverlay),
t.yG2(),
t.m4B("bottom", i.highlightedParticipant.bottom, "px")("left", i.highlightedParticipant.left, "px"),
t.eAK("modal-highlight-position", i.highlightedParticipant.isEncouragementModal),
t.E7m("hidden", !i.showParticipantPreview),
t.yG2(),
t.eAK("no-video", !(null != i.highlightedParticipant.participant && i.highlightedParticipant.participant.isCameraEnabled)),
t.yG2(),
t.E7m("hidden", !i.participantIsInTheRoom),
t.yG2(),
t.E7m("ngIf", i.loading),
t.yG2(),
t.m4B("transform", i.transformValue),
t.E7m("hidden", i.loading || !i.isCameraOn),
t.yG2(2),
t.E7m("ngIf", i.highlightedParticipant.participant && i.highlightedParticipant.participant.userInfo && !i.loading && !i.isCameraOn),
t.yG2(),
t.E7m("ngIf", (null == i.highlightedParticipant.participant ? null : i.highlightedParticipant.participant.isCameraEnabled) && i.userPageNumber),
t.yG2(),
t.E7m("ngIf", !i.participantIsInTheRoom),
t.yG2(),
t.C0Y(12, i.highlightedParticipant.participant ? 12 : -1)
}
},
dependencies: [h.u_, O.k, C.g, K.A, G.eC, G.wW, z.cm],
styles: ["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] mat-spinner[_ngcontent-%COMP%] svg{stroke:var(--contrast)}.video-wrapper[_ngcontent-%COMP%]{position:fixed;z-index:1002}.video-wrapper.modal-highlight-position[_ngcontent-%COMP%]{left:calc(50% + 175px)!important}.video-preview[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:224px;height:126px;overflow:hidden;margin-left:8px;border:1px solid var(--contrast);border-radius:16px;background:var(--blue-black);cursor:pointer}.video-preview.no-video[_ngcontent-%COMP%]{cursor:initial}.video-preview[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:224px;height:126px}.video-preview[_ngcontent-%COMP%] .mat-spinner[_ngcontent-%COMP%]{position:absolute}.go-to-page[_ngcontent-%COMP%]{position:absolute;right:1px;bottom:0;display:flex;justify-content:flex-end;align-items:initial;padding:2px 12px 2px 10px;border-top-left-radius:8px;color:var(--contrast);background:var(--tiles-info);cursor:pointer}.go-to-page[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:15px;margin-left:4px}.left-the-room-message[_ngcontent-%COMP%]{color:var(--contrast)}.info-wrapper[_ngcontent-%COMP%]{position:absolute;top:10px;left:16px;display:flex;align-items:center}.pin-icon[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px}.pined-count[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;max-width:100px;height:16px;padding:0 6px 0 4px;border-radius:8px;background:var(--video-overlay)}.pined-count[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{margin-right:4px}.pined-count[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--contrast)}.pin-for-pin[_ngcontent-%COMP%]{margin-left:8px;font-size:12px;color:var(--contrast)}"]
})
}
return o
}
)();
var ur = c(2236);
function pr(o, r) {}
function mr(o, r) {
if (1 & o && t.wR5(0, "ss-user-avatar", 9),
2 & o) {
const e = t.GaO();
t.E7m("roomMobileMenuFrame", !0)("showOnlineStatus", !1)("avatarColor", e.participant.userInfo.avatarColor)("avatarThumbUrl", e.participant.userInfo.avatarThumbUrl)("userId", e.participant.identity)("initials", e.participant.userInfo.initials)
}
}
function hr(o, r) {
if (1 & o && (t.SAx(0),
t.wR5(1, "div", 16),
t.I0R(2, "small", 17),
t.OEk(3),
t.C$Y(),
t.k70()),
2 & o) {
const e = t.GaO(2);
t.yG2(3),
t.oRS(" ", e.participant.userInfo.areaOfStudyName, "")
}
}
function gr(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 10),
t.wR5(1, "ss-user-avatar", 11),
t.I0R(2, "div", 12)(3, "div", 13)(4, "em"),
t.OEk(5),
t.C$Y(),
t.yuY(6, hr, 4, 1, "ng-container", 14),
t.C$Y(),
t.I0R(7, "div", 15),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.goToProfile())
}),
t.OEk(8, "View profile"),
t.C$Y()()()
}
if (2 & o) {
const e = t.GaO();
t.eAK("no-border", e.isCurrentUser),
t.yG2(),
t.E7m("size", 48)("showOnlineStatus", !1)("avatarColor", e.participant.userInfo.avatarColor)("avatarThumbUrl", e.participant.userInfo.avatarThumbUrl)("userId", e.participant.identity)("initials", e.participant.userInfo.initials),
t.yG2(4),
t.cNF(e.participant.userInfo.displayName),
t.yG2(),
t.E7m("ngIf", e.participant.userInfo.areaOfStudyName)
}
}
function fr(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 18),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.encourageUser(i.encouragements[0]))
}),
t.wR5(1, "ss-icon", 19),
t.I0R(2, "span", 20),
t.OEk(3, "Send encouragement"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
function _r(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 18),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.hideUser())
}),
t.wR5(1, "ss-icon", 21),
t.I0R(2, "span", 20),
t.OEk(3, "Hide user"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("size", 24))
}
function vr(o, r) {
if (1 & o && t.wR5(0, "ss-upgrade-cta", 25),
2 & o) {
const e = t.GaO(2);
t.E7m("short", !0)("openedFromSource", e.TriggeredUpgradeFromSourceRef.TwoWayHide)
}
}
function Cr(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 22)(1, "button", 23),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.hideUser(!0))
}),
t.wR5(2, "ss-icon", 21),
t.I0R(3, "span"),
t.OEk(4, "Two-way hide"),
t.C$Y()(),
t.yuY(5, vr, 1, 2, "ss-upgrade-cta", 24),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.yG2(),
t.E7m("disabled", !e.subscriptionService.hasPremiumFeatures),
t.yG2(),
t.E7m("size", 24),
t.yG2(3),
t.E7m("ngIf", !e.subscriptionService.hasPremiumFeatures)
}
}
function br(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 26),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.reportUser())
}),
t.wR5(1, "ss-icon", 27),
t.I0R(2, "span", 20),
t.OEk(3, "Report user"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
function kr(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "button", 18),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.saveAsTestimonial())
}),
t.wR5(1, "ss-icon", 28),
t.I0R(2, "span"),
t.OEk(3, "Save status as testimonial"),
t.C$Y()()
}
2 & o && (t.yG2(),
t.E7m("iconVariant", 20)("size", 24))
}
let Pr = ( () => {
class o {
get isModerator() {
return !!this.livekit.room.localParticipant.userInfo?.isModerator
}
get isAdministrator() {
return this.accountService.isInRole(Y.Q5.Administrator)
}
get encouragements() {
return this.livekit.encouragements
}
get isCurrentUser() {
return this.accountService.currentUser.id === this.participant.identity
}
constructor(e, n, i, s, a, d, m, v, P, U, A, $) {
this.subscriptionService = e,
this.livekit = n,
this.dialog = i,
this.accountService = s,
this.userService = a,
this.testimonialService = d,
this.encouragementService = m,
this.onlineStatusService = v,
this.toastService = P,
this.badgeService = U,
this.accountModalsService = A,
this.notificationService = $,
this.userLoaded = !1,
this.mainLoading = !1,
this.TriggeredUpgradeFromSourceRef = F.AD,
this.subscriptions = []
}
ngOnInit() {
this.mainLoading = !0,
this.fetchUserInfo()
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe())
}
encourageUser(e) {
var s, n = this;
this.accountModalsService.ensureUserCompletedBasicInfo() && !this.livekit.room.checkEncouragementsDisabled(this.participant) && this.encouragementService.postEncouragement(this.participant.identity, {
encouragementTypeId: e.id
}).subscribe({
next: (s = (0,
S.c)(function*(a) {
n.livekit.room.milestones.encouragedSomeone || n.subscriptions.push((0,
w.k)(2e3).subscribe( () => n.badgeService.checkForNewBadges.next())),
n.livekit.room.milestones.encouragedSomeone = !0,
a.receiverWasInFocusMode ? yield n.notificationService.info({
message: "This user is currently in Focus+ or Lite mode. They'll see your encouragement later on."
}) : null !== a.encouragementsPerDayLeft ? yield n.notificationService.info({
message: `Encouragement sent. You have ${a.encouragementsPerDayLeft} encouragements left for today.`
}) : yield n.notificationService.info({
message: "Encouragement sent."
})
}),
function(d) {
return s.apply(this, arguments)
}
),
error: s => {
"EncouragementTimeLimit" === s[0].errorCode ? this.toastService.info({
title: "Please wait",
exceptionDetail: s[0]
}) : "MaxEncouragementsPerDayReached" === s[0].errorCode ? this.toastService.info({
title: "Maximum encouragements reached",
exceptionDetail: s[0],
paidFeatureText: "Upgrade to encourage more",
triggeredUpgradeFromSource: F.AD.MaxEncouragementsReached,
autoClose: !1
}) : "MaxEncouragementsPerDayReachedPremium" === s[0].errorCode ? this.toastService.info({
title: "Maximum encouragements reached",
exceptionDetail: s[0]
}) : this.handleErrors(s)
}
})
}
reportUser() {
this.accountModalsService.ensureUserCompletedBasicInfo() ? (this.dialog.open(Vt.O, {
panelClass: "fullscreen-dialog",
width: "480px",
disableClose: !0,
data: {
reportedUser: this.participant.userInfo,
roomName: this.livekit.room.roomName,
reportSource: Nt.w.FocusRoom,
elementToScreenshotSelector: "ss-dashboard"
}
}),
this.close()) : this.close()
}
goToProfile() {
this.accountModalsService.ensureUserCompletedBasicInfo() ? window.open(`${T.O.appUrl}/profile/${this.userInfo.id}`, "_blank") : this.close()
}
hideUser(e=!1) {
this.accountModalsService.ensureUserCompletedBasicInfo() ? (this.livekit.room.hide(this.participant, e),
this.close()) : this.close()
}
close() {
this.livekit.participantInfoMobile.next(null)
}
saveAsTestimonial() {
var n, e = this;
this.participant.status && this.testimonialService.saveTestimonial(Bt.G.LivekitUserStatus, this.participant.status.id).subscribe({
next: (n = (0,
S.c)(function*() {
return yield e.notificationService.info({
message: "Saved as testimonial."
})
}),
function() {
return n.apply(this, arguments)
}
),
error: n => this.handleErrors(n)
})
}
fetchUserInfo() {
this.mainLoading = !0;
const e = this.onlineStatusService.getProfileInfo(this.participant.identity);
e ? (this.setUserInfo(e),
this.mainLoading = !1) : this.accountService.isFullyVerifiedUser() ? this.userService.getUserProfileShort(this.participant.identity).subscribe({
next: n => this.handleUserInfo(n),
error: n => this.handleErrors(n)
}) : this.userService.getUserProfileShortPublic(this.participant.identity).subscribe({
next: n => this.handleUserInfo(n),
error: n => this.handleErrors(n)
})
}
handleUserInfo(e) {
this.setUserInfo(e),
this.onlineStatusService.upsertGottenInfo(this.userInfo),
this.mainLoading = !1
}
setUserInfo(e) {
this.userInfo = e,
this.userLoaded = !0
}
handleErrors(e) {
"UserProfileShortModelNotFound" === e[0].errorCode ? (this.mainLoading = !1,
this.userLoaded = !0) : this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(H.k),t.GI1(g.A),t.GI1(p.qW),t.GI1(y.uE),t.GI1(Mt.o),t.GI1(Dt.y),t.GI1(vt.a),t.GI1(ur.U),t.GI1(k.s),t.GI1(Z.A),t.GI1(V.E),t.GI1(It.g))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-participant-mobile-menu"]],
inputs: {
participant: "participant"
},
decls: 11,
vars: 11,
consts: [["cdkOverlayOrigin", ""], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "encourage-overlay-backdrop", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "backdropClick"], ["role", "button", "iconName", "dismiss", "color", "default-20", 1, "close-button", 3, "size", "click"], ["class", "frame", 3, "roomMobileMenuFrame", "showOnlineStatus", "avatarColor", "avatarThumbUrl", "userId", "initials", 4, "ngIf"], ["class", "user-info", 3, "no-border", 4, "ngIf"], ["mat-menu-item", "", 3, "click", 4, "ngIf"], ["class", "two-way-hide", 4, "ngIf"], ["mat-menu-item", "", "class", "report-button", 3, "click", 4, "ngIf"], [1, "frame", 3, "roomMobileMenuFrame", "showOnlineStatus", "avatarColor", "avatarThumbUrl", "userId", "initials"], [1, "user-info"], [3, "size", "showOnlineStatus", "avatarColor", "avatarThumbUrl", "userId", "initials"], [1, "profile-wrapper"], [1, "name"], [4, "ngIf"], [1, "interactable-bold", 3, "click"], [1, "dot"], [1, "area-of-study"], ["mat-menu-item", "", 3, "click"], ["iconName", "thumb_like", "color", "accent-blue-40", 3, "iconVariant", "size"], [1, "interactable"], ["iconName", "eye_off", "color", "accent-blue-40", 3, "size"], [1, "two-way-hide"], ["mat-menu-item", "", 3, "disabled", "click"], [3, "short", "openedFromSource", 4, "ngIf"], [3, "short", "openedFromSource"], ["mat-menu-item", "", 1, "report-button", 3, "click"], ["iconName", "warning", "color", "negative-20", 3, "iconVariant", "size"], ["iconName", "mail_inbox", 3, "iconVariant", "size"]],
template: function(n, i) {
if (1 & n && (t.I0R(0, "div", 0, 1),
t.yuY(2, pr, 0, 0, "ng-template", 2),
t.qCj("backdropClick", function() {
return i.close()
}),
t.I0R(3, "ss-icon", 3),
t.qCj("click", function() {
return i.close()
}),
t.C$Y(),
t.yuY(4, mr, 1, 6, "ss-user-avatar", 4)(5, gr, 9, 10, "div", 5)(6, fr, 4, 2, "button", 6)(7, _r, 4, 1, "button", 6)(8, Cr, 6, 3, "div", 7)(9, br, 4, 2, "button", 8)(10, kr, 4, 2, "button", 6),
t.C$Y()),
2 & n) {
const s = t.Gew(1);
t.yG2(2),
t.E7m("cdkConnectedOverlayOrigin", s)("cdkConnectedOverlayOpen", !0)("cdkConnectedOverlayHasBackdrop", !0),
t.yG2(),
t.E7m("size", 20),
t.yG2(),
t.E7m("ngIf", i.participant.userInfo),
t.yG2(),
t.E7m("ngIf", i.participant.userInfo),
t.yG2(),
t.E7m("ngIf", i.encouragements.length > 0 && !i.isCurrentUser),
t.yG2(),
t.E7m("ngIf", !i.isCurrentUser),
t.yG2(),
t.E7m("ngIf", !i.isCurrentUser && !i.participant.userInfo.isModerator),
t.yG2(),
t.E7m("ngIf", !i.isCurrentUser),
t.yG2(),
t.E7m("ngIf", i.isAdministrator && i.participant.status)
}
},
dependencies: [h.u_, ct._, C.g, K.A, et.OQ, G.eC, G.wW],
styles: ["[_nghost-%COMP%]{position:fixed;top:50%;left:50%;z-index:1001;max-width:400px;width:calc(100% - 32px);border-radius:32px;background:var(--grayscale);transform:translate(-50%,-50%)}[_nghost-%COMP%] button.mat-mdc-menu-item>span{display:flex;align-items:center}.close-button[_ngcontent-%COMP%]{position:absolute;top:20px;right:20px;z-index:1;display:flex;justify-content:center;width:40px;height:40px;padding:0;border-radius:12px;outline:none;background-color:var(--widget-subtle)}.frame[_ngcontent-%COMP%]{padding:8px 8px 0}@media only screen and (max-height: 480px){.frame[_ngcontent-%COMP%]{display:none}}.user-info[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 8px 12px 20px;margin:16px 0 12px;border-bottom:1px solid var(--grayscale-g1)}.user-info.no-border[_ngcontent-%COMP%]{border-bottom:none}.user-info[_ngcontent-%COMP%] ss-user-avatar[_ngcontent-%COMP%]{display:none;margin-right:8px}@media only screen and (max-height: 480px){.user-info[_ngcontent-%COMP%] ss-user-avatar[_ngcontent-%COMP%]{display:block}}.profile-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column}.profile-wrapper[_ngcontent-%COMP%] .interactable-bold[_ngcontent-%COMP%]{color:var(--accent-blue);cursor:pointer}.profile-wrapper[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}.profile-wrapper[_ngcontent-%COMP%] .area-of-study[_ngcontent-%COMP%]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}.profile-wrapper[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{width:4px;height:4px;margin:0 8px;border-radius:50%;background:var(--default)}button[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{margin-right:8px}button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--default-20)}button[mat-menu-item].mat-mdc-menu-item[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:flex-start;align-items:center;width:100%;min-height:48px;box-sizing:border-box;overflow:hidden;padding:0 16px;margin:0;border:none;outline:none;font-size:inherit;color:inherit;text-decoration:none;background:none;cursor:pointer;-webkit-user-select:none;user-select:none;text-align:left}button[mat-menu-item].mat-mdc-menu-item.mat-mdc-menu-item[_ngcontent-%COMP%]:hover:not([disabled]), button[mat-menu-item].mat-mdc-menu-item.mat-mdc-menu-item.cdk-program-focused[_ngcontent-%COMP%]:not([disabled]), button[mat-menu-item].mat-mdc-menu-item.mat-mdc-menu-item.cdk-keyboard-focused[_ngcontent-%COMP%]:not([disabled]), button[mat-menu-item].mat-mdc-menu-item.mat-mdc-menu-item-highlighted[_ngcontent-%COMP%]:not([disabled]){background:#0000000a}.two-way-hide[_ngcontent-%COMP%]{display:flex;font-size:14px}.two-way-hide[_ngcontent-%COMP%] ss-upgrade-cta[_ngcontent-%COMP%]{margin-right:8px}.report-button[_ngcontent-%COMP%]{margin-bottom:8px;border-top:1px solid var(--grayscale-g1)}"]
})
}
return o
}
)();
var yr = c(9620)
, Or = c(3317);
function Mr(o, r) {
if (1 & o && t.wR5(0, "div", 10),
2 & o) {
const e = t.GaO().index
, n = t.GaO(2);
t.eAK("completed", n.isProgressBarCompleted(e))
}
}
const wr = (o, r, e, n, i) => ({
id: o,
name: r,
iconUrl: e,
earned: n,
type: i
});
function Sr(o, r) {
if (1 & o && (t.I0R(0, "div", 5),
t.yuY(1, Mr, 1, 2, "div", 6),
t.I0R(2, "ss-html-tooltip"),
t.wR5(3, "ss-user-badge", 7),
t.I0R(4, "div", 8),
t.OEk(5),
t.C$Y(),
t.wR5(6, "div", 9),
t.wVc(7, "trustHtmlFull"),
t.C$Y()()),
2 & o) {
const e = r.$implicit
, n = r.index
, i = t.GaO(2);
t.eAK("completed", 0 === n || i.isStepCompleted(e.step)),
t.yG2(),
t.E7m("ngIf", n > 0),
t.yG2(2),
t.E7m("badge", t.SY1(9, wr, i.activationSteps[n].badge.id, i.activationSteps[n].badge.name, i.activationSteps[n].badge.iconUrl, i.isStepCompleted(e.step), i.activationSteps[n].badge.type))("size", 40),
t.yG2(2),
t.cNF(e.label),
t.yG2(),
t.E7m("innerHTML", t.kDX(7, 7, e.tooltipText), t.E3n)
}
}
function xr(o, r) {
if (1 & o && (t.SAx(0),
t.yuY(1, Sr, 8, 15, "div", 4),
t.k70()),
2 & o) {
const e = t.GaO();
t.yG2(),
t.E7m("ngForOf", e.activationSteps)
}
}
function Ir(o, r) {
1 & o && (t.I0R(0, "div", 11)(1, "div", 12),
t.wR5(2, "ss-icon", 13),
t.C$Y(),
t.I0R(3, "div", 8),
t.OEk(4, "You did it! You've motivated others while working towards your own goals!"),
t.C$Y()()),
2 & o && (t.yG2(2),
t.E7m("size", 14)("iconVariant", 16))
}
let Tr = ( () => {
class o {
get milestones() {
return this.livekit.room.milestones
}
get allStepsFinished() {
return this.milestones.pinnedSomeone && this.milestones.encouragedSomeone && this.milestones.hadVideoOn && this.milestones.completedProfileSetup && this.milestones.createdTileStatus && this.milestones.had30MinSession
}
onListItemClick(e) {
e.target instanceof HTMLAnchorElement && "complete-profile-setup" === e.target.getAttribute("data-id") && this.editAdditionalProfileSettings()
}
constructor(e, n, i, s, a) {
this.livekit = e,
this.dialog = n,
this.accountService = i,
this.badgeService = s,
this.settingsService = a,
this.hide = new t._w7,
this.activationSteps = [{
step: null,
label: "Join",
tooltipText: this.settingsService.isB2BApp() || this.settingsService.isCoWork() ? "You've begun a co-working session inside this focus room. Check out the next steps and complete the whole activation flow to gain status within the room! \u{1f680}" : "You've already completed the most important step by joining this focus room. Check out the next steps and complete the whole activation flow to gain status within the room! \u{1f680}",
badge: {
id: f.Kq.id,
name: f.Kq.name,
iconUrl: f.Kq.iconUrl,
earned: this.isStepCompleted(null),
type: f.Kq.type
}
}, {
step: "pinnedSomeone",
label: "Pin someone",
tooltipText: this.settingsService.isB2BApp() || this.settingsService.isCoWork() ? "Want to zoom in on a particular co-worker and get the sense that you're working together? Pick out a group of up to 20 people to focus with by pinning their video tiles to your screen using the \u{1f4cc} icon on their video tile." : 'Want to zoom in on a particular participant and study with them, or pick out a group of 4 people to work with? Pin their video tiles to your screen using the \u{1f4cc} icon on their video tile. <a href="https://www.studystream.live/blog/why-you-need-an-online-study-buddy/" target="_blank">Here\'s why you should</a>.',
badge: {
id: f.Uh.id,
name: f.Uh.name,
iconUrl: f.Uh.iconUrl,
earned: this.isStepCompleted("pinnedSomeone"),
type: f.Uh.type
}
}, {
step: "encouragedSomeone",
label: "Encourage someone",
tooltipText: "Sending encouragements can boost collaboration and rapport. If you see someone working hard, make their day by clicking the \u{1f44d} icon on their video tile.",
badge: {
id: f.eW.id,
name: f.eW.name,
iconUrl: f.eW.iconUrl,
earned: this.isStepCompleted("encouragedSomeone"),
type: f.eW.type
}
}, {
step: "hadVideoOn",
label: "Video on",
tooltipText: this.settingsService.isB2BApp() || this.settingsService.isCoWork() ? "Need some motivation to turn your camera on? There is science that shows working on camera with others increases accountability and reduces the likelihood of distractions. \u{1f3a5}" : 'Need some help turning your camera on? There is science behind putting your camera on and it won\'t be as hard as you think. <a href="https://www.studystream.live/blog/study-with-me-phenomenon/" target="_blank">Read our article here</a>. \u{1f3a5}',
badge: {
id: f.s1.id,
name: f.s1.name,
iconUrl: f.s1.iconUrl,
earned: this.isStepCompleted("hadVideoOn"),
type: f.s1.type
}
}, {
step: "createdTileStatus",
label: "Write a tile message",
tooltipText: this.settingsService.isB2BApp() || this.settingsService.isCoWork() ? "Tell everyone else what's on your mind at the moment!" : "Tell everyone else what you're up to at the moment!",
badge: {
id: f.Kg.id,
name: f.Kg.name,
iconUrl: f.Kg.iconUrl,
earned: this.isStepCompleted("createdTileStatus"),
type: f.Kg.type
}
}, {
step: "completedProfileSetup",
label: "Complete profile",
tooltipText: 'It will be much easier to connect with others if your profile is filled out. <a data-id="complete-profile-setup">Click here to edit.</a>',
badge: {
id: f.Qx.id,
name: f.Qx.name,
iconUrl: f.Qx.iconUrl,
earned: this.isStepCompleted("completedProfileSetup"),
type: f.Qx.type
}
}, {
step: "had30MinSession",
label: "Stay 30 minutes",
tooltipText: this.settingsService.isB2BApp() || this.settingsService.isCoWork() ? "Good things take time! Staying in the focus room for at least 30 minutes can improve your productivity and will also gain you a streak. Try to avoid task-switching and work on one task for at least half an hour at a time." : 'Good things take time! Staying in the focus room for at least 30 minutes can improve your productivity and will also gain you a streak. Explore the science behind this strategy in <a href="https://www.studystream.live/blog/why-pomodoro-technique-works/" target="_blank">this article</a>.',
badge: {
id: f.uY.id,
name: f.uY.name,
iconUrl: f.uY.iconUrl,
earned: this.isStepCompleted("had30MinSession"),
type: f.uY.type
}
}],
this.subscriptions = []
}
ngOnInit() {
this.milestones.had30MinSession || (this.timerSubscription = (0,
w.k)(0, 6e4).subscribe(e => {
e < 30 || (this.milestones.had30MinSession || this.subscriptions.push((0,
w.k)(2e3).subscribe( () => this.badgeService.checkForNewBadges.next())),
this.milestones.had30MinSession = !0,
this.timerSubscription.unsubscribe())
}
))
}
ngOnDestroy() {
this.timerSubscription?.unsubscribe(),
this.subscriptions.forEach(e => e.unsubscribe())
}
close() {
this.hide.emit()
}
isStepCompleted(e) {
return null === e || !0 === this.milestones[e]
}
isProgressBarCompleted(e) {
switch (e) {
case 1:
return this.milestones.pinnedSomeone;
case 2:
return this.milestones.pinnedSomeone && this.milestones.encouragedSomeone;
case 3:
return this.milestones.pinnedSomeone && this.milestones.encouragedSomeone && this.milestones.hadVideoOn;
case 4:
return this.milestones.pinnedSomeone && this.milestones.encouragedSomeone && this.milestones.hadVideoOn && this.milestones.createdTileStatus;
case 5:
return this.milestones.pinnedSomeone && this.milestones.encouragedSomeone && this.milestones.hadVideoOn && this.milestones.createdTileStatus && this.milestones.completedProfileSetup;
case 6:
return this.milestones.pinnedSomeone && this.milestones.encouragedSomeone && this.milestones.hadVideoOn && this.milestones.createdTileStatus && this.milestones.completedProfileSetup && this.milestones.had30MinSession;
default:
return !1
}
}
editAdditionalProfileSettings() {
this.dialog.open(Gt.C, {
panelClass: "fullscreen-dialog",
width: "600px",
disableClose: !0
}).afterClosed().subscribe( () => {
if (!this.livekit.room.milestones)
return;
const n = this.accountService.currentUser
, i = !!n.countryId && !!n.bio && !!n.areaOfStudyId && n.hasUserInterests;
!this.livekit.room.milestones.completedProfileSetup && i && this.subscriptions.push((0,
w.k)(2e3).subscribe( () => this.badgeService.checkForNewBadges.next())),
this.livekit.room.milestones.completedProfileSetup = i
}
)
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(p.qW),t.GI1(y.uE),t.GI1(Z.A),t.GI1(L.Y))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-milestones-bar"]],
hostBindings: function(n, i) {
1 & n && t.qCj("click", function(a) {
return i.onListItemClick(a)
}, !1, t.wLc)
},
outputs: {
hide: "hide"
},
decls: 4,
vars: 4,
consts: [[4, "ngIf"], ["class", "steps-finished", 4, "ngIf"], [1, "close-modal", 3, "click"], ["iconName", "dismiss", "color", "default-60", 3, "size", "iconVariant"], ["class", "activation-step", 3, "completed", 4, "ngFor", "ngForOf"], [1, "activation-step"], ["class", "progress-bar", 3, "completed", 4, "ngIf"], [3, "badge", "size"], [1, "label", "notification"], ["tooltip", "", 3, "innerHTML"], [1, "progress-bar"], [1, "steps-finished"], [1, "icon"], ["iconName", "checkmark", "color", "contrast", 3, "size", "iconVariant"]],
template: function(n, i) {
1 & n && (t.yuY(0, xr, 2, 1, "ng-container", 0)(1, Ir, 5, 2, "div", 1),
t.I0R(2, "button", 2),
t.qCj("click", function() {
return i.close()
}),
t.wR5(3, "ss-icon", 3),
t.C$Y()),
2 & n && (t.E7m("ngIf", !i.allStepsFinished),
t.yG2(),
t.E7m("ngIf", i.allStepsFinished),
t.yG2(2),
t.E7m("size", 16)("iconVariant", 16))
},
dependencies: [h.ay, h.u_, yr.s, C.g, ee.e, Or.G],
styles: ["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;height:32px;padding:8px 16px;margin-bottom:8px;border-radius:12px;background-color:var(--accent-blue-90)}ss-html-tooltip[_ngcontent-%COMP%] .tooltip-wrapper{display:flex;align-items:center}.activation-step[_ngcontent-%COMP%]{display:flex;align-items:center;flex-grow:1}@media only screen and (max-width: 1024px){.activation-step[_ngcontent-%COMP%]{flex-grow:initial}}.activation-step[_ngcontent-%COMP%]:first-of-type{flex-grow:0}.activation-step[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{white-space:nowrap}.activation-step[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%]{width:100%;height:4px;margin:0 8px;border-radius:8px;background-color:var(--accent-blue-80)}.activation-step[_ngcontent-%COMP%] .progress-bar.completed[_ngcontent-%COMP%]{background-color:var(--accent-blue-20)}@media only screen and (max-width: 1024px){.activation-step[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%]{display:none}}.activation-step.completed[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{background-color:var(--accent-blue-20)}.icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;min-width:24px;width:24px;height:24px;margin-right:8px;border-radius:50%;background-color:var(--accent-blue-80)}.steps-finished[_ngcontent-%COMP%]{display:flex;align-items:center}.steps-finished[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{background-color:var(--accent-blue-20)}ss-achievement-badge[_ngcontent-%COMP%]{position:relative;top:1px}.close-modal[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:0;margin-left:12px;border:none;outline:none;background-color:transparent;cursor:pointer}.notification[_ngcontent-%COMP%]{font-size:11px}@media only screen and (max-width: 1024px){.notification[_ngcontent-%COMP%]{font-size:11px}}ss-html-tooltip[_ngcontent-%COMP%] ss-user-badge[_ngcontent-%COMP%]{margin-right:6px}@media only screen and (max-width: 1279px){ss-html-tooltip[_ngcontent-%COMP%] ss-user-badge[_ngcontent-%COMP%]{margin-right:0}}"]
})
}
return o
}
)()
, Gr = ( () => {
class o {
constructor(e, n) {
this.livekit = e,
this.elementRef = n,
this.onRemoteParticipantConnected = this.onRemoteParticipantConnected.bind(this),
this.onRemoteParticipantDisconnected = this.onRemoteParticipantDisconnected.bind(this),
this.onTrackSubscribed = this.onTrackSubscribed.bind(this),
this.onTrackUnsubscribed = this.onTrackUnsubscribed.bind(this),
this.onTrackPublished = this.onTrackPublished.bind(this),
this.onTrackUnpublished = this.onTrackUnpublished.bind(this)
}
ngAfterViewInit() {
this.livekit.room.on(l.OO.ParticipantConnected, this.onRemoteParticipantConnected).on(l.OO.ParticipantDisconnected, this.onRemoteParticipantDisconnected);
const e = Array.from(this.livekit.room.remoteParticipants.values());
for (const n of e)
this.onRemoteParticipantConnected(n)
}
ngOnDestroy() {
this.livekit.room.off(l.OO.ParticipantConnected, this.onRemoteParticipantConnected).off(l.OO.ParticipantDisconnected, this.onRemoteParticipantDisconnected)
}
onRemoteParticipantConnected(e) {
e.on(l.Cu.TrackSubscribed, this.onTrackSubscribed).on(l.Cu.TrackUnsubscribed, this.onTrackUnsubscribed).on(l.Cu.TrackPublished, this.onTrackPublished).on(l.Cu.TrackUnpublished, this.onTrackUnpublished),
setTimeout( () => this.setTrackSubscribedState(e, !0))
}
onRemoteParticipantDisconnected(e) {
setTimeout( () => this.setTrackSubscribedState(e, !1)),
e.off(l.Cu.TrackSubscribed, this.onTrackSubscribed).off(l.Cu.TrackUnsubscribed, this.onTrackUnsubscribed).off(l.Cu.TrackPublished, this.onTrackPublished).off(l.Cu.TrackUnpublished, this.onTrackUnpublished),
this.removeAllParticipantAudioElements(e.identity)
}
onTrackSubscribed(e, n) {
e.kind === l.oh.Kind.Audio && this.tryToAttachAudioElement(n)
}
onTrackUnsubscribed(e, n) {
e.kind === l.oh.Kind.Audio && this.removeAudioElement(n.trackSid)
}
onTrackPublished(e) {
e.isSubscribed || e.kind !== l.oh.Kind.Audio || e.setSubscribed(!0)
}
onTrackUnpublished(e) {
!e.isSubscribed || e.kind !== l.oh.Kind.Audio || e.setSubscribed(!1)
}
setTrackSubscribedState(e, n) {
e.audioTrackPublications.forEach(i => {
i.setSubscribed(n)
}
)
}
tryToAttachAudioElement(e) {
const n = e.track;
if (!n)
return;
const i = this.elementRef.nativeElement
, s = `audio-${e.trackSid}`;
let a = i.querySelector(`#${s}`);
if (null === a) {
a = document.createElement("audio"),
a.id = s,
a.hidden = !0;
const m = Array.from(this.livekit.room.remoteParticipants.values()).find(v => Array.from(v.trackPublications.values()).some(P => P.trackSid === e.trackSid));
m && (a.className = `audio-${m.identity}`),
i.appendChild(a)
} else if (n.attachedElements.includes(a))
return;
n.attach(a)
}
removeAllParticipantAudioElements(e) {
const n = this.elementRef.nativeElement;
Array.from(n.querySelectorAll(`audio.audio-${e}`)).forEach(s => {
n.removeChild(s)
}
)
}
removeAudioElement(e) {
const n = this.elementRef.nativeElement
, i = n.querySelector(`#audio-${e}`);
i && n.removeChild(i)
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(t.GMv))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-audio"]],
decls: 0,
vars: 0,
template: function(n, i) {},
encapsulation: 2
})
}
return o
}
)();
var Rr = c(9248)
, Er = c(6208);
function Ur(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "mat-slide-toggle", 14),
t.qCj("change", function(i) {
t.usT(e);
const s = t.GaO(2);
return t.CGJ(s.showConfirmationModal(i))
}),
t.I0R(1, "span", 15),
t.OEk(2, "Show space on video tile and allow others to join"),
t.C$Y(),
t.I0R(3, "span", 16),
t.OEk(4, "Show on my video tile"),
t.C$Y(),
t.wR5(5, "ss-icon", 17),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.eAK("disabled", e.activeGroup.shownOnVideoTile),
t.E7m("matTooltip", e.activeGroup.shownOnVideoTile ? "To remove this space from your video tile, close it and re-open it again." : "")("disabled", e.activeGroup.shownOnVideoTile)("checked", e.activeGroup.shownOnVideoTile),
t.yG2(5),
t.E7m("size", 28)
}
}
function Fr(o, r) {
if (1 & o) {
const e = t.KQA();
t.yuY(0, Ur, 6, 6, "mat-slide-toggle", 12),
t.I0R(1, "ss-button", 13),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.copyInviteLinkToClipboard())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("ngIf", e.isActiveGroupOwner && e.activeGroup),
t.yG2(),
t.E7m("iconSize", 28)("iconOnly", !0)
}
}
function Ar(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 18),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.minimizePrivateGroup())
}),
t.C$Y()
}
2 & o && t.E7m("iconSize", 28)("iconOnly", !0)
}
function Lr(o, r) {
if (1 & o && t.wR5(0, "ss-focus-room-tile", 19),
2 & o) {
const e = r.$implicit
, n = t.GaO();
t.E7m("participant", e)("isMobile", n.isMobile)("theme", n.theme)("isGroupTile", !0)
}
}
function Yr(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 20)(1, "small"),
t.OEk(2),
t.I0R(3, "a", 10),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.inviteOriginalInviterBack(i.activeGroup.invitedByUser))
}),
t.OEk(4, "Invite back"),
t.C$Y()(),
t.I0R(5, "ss-icon", 21),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.shouldShowReinviteMessage = !1)
}),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO();
t.yG2(2),
t.oRS("", e.activeGroup.invitedByUser.displayName, " invited you to this space but they left. "),
t.yG2(3),
t.E7m("size", 16)("iconVariant", 16)
}
}
let Vr = ( () => {
class o {
get isFocusSession() {
return this.activeGroup && this.activeGroup.focusSessionId
}
get localParticipant() {
return this.livekit.room.localParticipant
}
get isActiveGroupOwner() {
return this.activeGroup?.createdByUserId === this.accountService.currentUser.id
}
constructor(e, n, i, s, a, d, m) {
this.livekit = e,
this.dialog = n,
this.clipboard = i,
this.analyticsService = s,
this.accountService = a,
this.subscriptionService = d,
this.toastService = m,
this.VideoPillButtonLocationRef = _.uY,
this.isMobile = !1,
this.shouldShowReinviteMessage = !1,
this.activeGroup = null,
this.stopTimer = new wt.E,
this.subscriptions = []
}
ngAfterViewInit() {
this.subscriptions.push(this.livekit.room.activeGroup.subscribe(e => {
setTimeout( () => {
const n = null === this.activeGroup;
if (this.activeGroup = e,
n && e && e.invitedByUser) {
const i = e.members.some(s => s.id === e.invitedByUser?.id);
setTimeout( () => this.shouldShowReinviteMessage = !i)
}
this.setSessionEndTimer()
}
)
}
))
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe()),
this.stopTimer.next(),
!this.livekit.room.privateGroupMinimized && this.localParticipant.setMicrophoneEnabled(!1)
}
showGroupInviteModal() {
this.dialog.open(Rt, {
panelClass: "fullscreen-dialog",
width: "640px"
})
}
minimizePrivateGroup() {
this.livekit.room.animateViewToggleButton = !1,
this.livekit.room.privateGroupMinimized = !0
}
close() {
this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Are you sure?",
description: this.livekit.room.localParticipant.focusRoomGroup && this.activeGroup?.createdByUserId === this.accountService.currentUser.id ? "CloseMySessionGroup" : "CloseSessionGroup",
confirmButtonLabel: "Yes"
}
}).afterClosed().subscribe(i => {
i && this.activeGroup && this.livekit.leaveActiveGroups(this.livekit.room.name).subscribe({
next: () => {
this.livekit.room.animateViewToggleButton = !1,
this.livekit.room.activeGroup.next(null)
}
,
error: s => this.handleErrors(s)
})
}
)
}
inviteOriginalInviterBack(e) {
null !== this.activeGroup && (this.shouldShowReinviteMessage = !1,
this.analyticsService.markActivity(u.kP.LivekitPrivatePodInviteUsersButtonClick),
this.livekit.inviteUserToFocusRoomSessionGroup(this.livekit.room.name, this.activeGroup.id, [e.id]).subscribe({
next: () => {
this.toastService.info({
message: `You have sent ${e.displayName} an invitation to join this space again. They will recieve it if they're still in the room.`
})
}
,
error: n => {
"LivekitRoomMaxSamePeerSessionsReached" !== n[0].errorCode ? this.handleErrors(n) : this.toastService.info({
exceptionDetail: n[0]
})
}
}))
}
copyInviteLinkToClipboard() {
if (null === this.activeGroup)
return;
const e = new URL(location.href)
, n = `${location.href}${e.search ? "&" : "?"}roomName=${this.livekit.room.name}&privateSpaceId=${this.activeGroup.id}`;
this.clipboard.copy(n),
this.toastService.info({
message: "Private space invite link copied. Share it with someone to invite them to join this space."
})
}
showConfirmationModal(e) {
if (this.activeGroup)
return this.subscriptionService.hasPremiumFeatures ? void this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Are you sure?",
description: "MakeYourPrivateSpaceVisibleToOthers",
confirmButtonLabel: "Yes"
}
}).afterClosed().subscribe(i => {
i ? this.toggleShownOnVideoTile(e) : e.source.checked = !1
}
) : (this.toastService.info({
title: "Premium feature",
message: "Make your private space visible to others!",
paidFeatureText: "Upgrade to premium to unlock this feature",
triggeredUpgradeFromSource: F.AD.ShowPodOnTileToast,
autoClose: !1
}),
void (e.source.checked = !1))
}
setSessionEndTimer() {
if (!this.activeGroup || !this.activeGroup.focusSessionEnd)
return;
const e = M.CS.fromISO(this.activeGroup.focusSessionEnd);
this.subscriptions.push((0,
w.k)(0, 5e3).pipe((0,
St.a)(this.stopTimer)).subscribe( () => {
M.CS.now() < e || (this.stopTimer.next(),
this.livekit.leaveActiveGroups(this.livekit.room.name).subscribe({
next: () => {
this.showSessionSummary(),
this.livekit.room.activeGroup.next(null)
}
,
error: n => this.handleErrors(n)
}))
}
))
}
showSessionSummary() {
this.activeGroup && this.dialog.open(Rr.c, {
panelClass: "fullscreen-dialog",
width: "600px",
data: {
sessionId: this.activeGroup.focusSessionId
}
})
}
toggleShownOnVideoTile(e) {
null !== this.activeGroup && (this.activeGroup.shownOnVideoTile = e.checked,
this.livekit.updateFocusRoomSessionGroup(this.livekit.room.name, this.activeGroup.id, e.checked).subscribe({
next: () => {
this.activeGroup && this.livekit.room.activeGroup.next(this.activeGroup)
}
,
error: n => {
this.handleErrors(n),
null !== this.activeGroup && (this.activeGroup.shownOnVideoTile = !e.checked)
}
}))
}
handleErrors(e) {
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(p.qW),t.GI1(Er._D),t.GI1(u.uc),t.GI1(y.uE),t.GI1(H.k),t.GI1(k.s))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-session-group"]],
hostVars: 2,
hostBindings: function(n, i) {
2 & n && t.eAK("focus-session", i.isFocusSession)
},
inputs: {
theme: "theme"
},
decls: 17,
vars: 13,
consts: [[1, "menu"], [1, "left"], [3, "activeGroupName", "buttonLocation"], ["color", "website-transparent", "matTooltip", "Invite users", "iconName", "add", 3, "iconSize", "iconOnly", "buttonClick"], [1, "right"], ["class", "minimize-button", "color", "website-transparent", "matTooltip", "Minimize", "iconName", "contract_down_left", 3, "iconSize", "iconOnly", "buttonClick", 4, "ngIf"], ["color", "website-transparent", "iconName", "dismiss", 3, "iconSize", "iconOnly", "buttonClick"], [1, "group-tiles-wrapper"], [3, "participant", "isMobile", "theme", "isGroupTile", 4, "ngFor", "ngForOf"], [1, "bottom-message", "invite"], [3, "click"], ["class", "bottom-message", 4, "ngIf"], [3, "matTooltip", "disabled", "checked", "change", 4, "ngIf"], ["color", "website-transparent", "matTooltip", "Copy invite link", "iconName", "link", 1, "invite-link-button", 3, "iconSize", "iconOnly", "buttonClick"], [3, "matTooltip", "disabled", "checked", "change"], [1, "slide-toggle-text-big"], [1, "slide-toggle-text-small"], ["color", "white", "iconName", "eye", "matTooltip", "Show space on video tile and allow others to join", 1, "slide-toggle-icon", 3, "size"], ["color", "website-transparent", "matTooltip", "Minimize", "iconName", "contract_down_left", 1, "minimize-button", 3, "iconSize", "iconOnly", "buttonClick"], [3, "participant", "isMobile", "theme", "isGroupTile"], [1, "bottom-message"], ["role", "button", "iconName", "dismiss", "color", "contrast", 1, "close-bottom-message", 3, "size", "iconVariant", "click"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "div", 1),
t.wR5(2, "ss-video-pill-button", 2),
t.I0R(3, "ss-button", 3),
t.qCj("buttonClick", function() {
return i.showGroupInviteModal()
}),
t.C$Y()(),
t.I0R(4, "h4"),
t.OEk(5),
t.C$Y(),
t.I0R(6, "div", 4),
t.yuY(7, Fr, 2, 3)(8, Ar, 1, 2, "ss-button", 5),
t.I0R(9, "ss-button", 6),
t.qCj("buttonClick", function() {
return i.close()
}),
t.C$Y()()(),
t.I0R(10, "div", 7),
t.yuY(11, Lr, 1, 4, "ss-focus-room-tile", 8),
t.C$Y(),
t.I0R(12, "div", 9)(13, "small")(14, "a", 10),
t.qCj("click", function() {
return i.copyInviteLinkToClipboard()
}),
t.OEk(15, "Copy invite link"),
t.C$Y()()(),
t.yuY(16, Yr, 6, 3, "div", 11)),
2 & n && (t.yG2(2),
t.E7m("activeGroupName", (null == i.activeGroup ? null : i.activeGroup.name) || null)("buttonLocation", i.VideoPillButtonLocationRef.PrivatePod),
t.yG2(),
t.E7m("iconSize", 28)("iconOnly", !0),
t.yG2(2),
t.cNF(null == i.activeGroup ? null : i.activeGroup.name),
t.yG2(2),
t.C0Y(7, i.activeGroup && !i.activeGroup.focusSessionId ? 7 : -1),
t.yG2(),
t.E7m("ngIf", !i.isMobile),
t.yG2(),
t.E7m("iconSize", 28)("iconOnly", !0),
t.yG2(2),
t.E7m("ngForOf", i.livekit.room.activeGroupParticipants),
t.yG2(),
t.eAK("move-up", i.shouldShowReinviteMessage && i.activeGroup && i.activeGroup.invitedByUser),
t.yG2(4),
t.E7m("ngIf", i.shouldShowReinviteMessage && i.activeGroup && i.activeGroup.invitedByUser))
},
dependencies: [h.ay, h.u_, O.k, C.g, R.a4, it.cP, lt, Et],
styles: ["[_nghost-%COMP%]{position:relative;display:block;min-width:440px;width:calc(100vw - 79px);height:calc(var(--vh) - 56px);overflow:hidden;padding:3px;margin-right:5px;border-top-left-radius:12px;border-top-right-radius:12px;background:var(--accent-gradient);overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){[_nghost-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}[_nghost-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}[_nghost-%COMP%]::-webkit-scrollbar, [_nghost-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}[_nghost-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.focus-session[_nghost-%COMP%]{background:var(--accent-gradient-60-dark)}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{height:calc(var(--vh) - 70px)}}[_nghost-%COMP%] ss-focus-room-tile[_ngcontent-%COMP%] {width:100%!important;height:auto!important;aspect-ratio:16/9;margin-bottom:4px}.group-tiles-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:5px;height:auto}@media only screen and (max-width: 767px){.group-tiles-wrapper[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr}}@media only screen and (max-width: 479px){.group-tiles-wrapper[_ngcontent-%COMP%]{grid-template-columns:1fr}}.menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin:3px 8px}.menu[_ngcontent-%COMP%] .left[_ngcontent-%COMP%], .menu[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{display:flex;align-items:center}.menu[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{max-width:50vw;overflow:hidden;margin:0 8px;color:var(--contrast);text-overflow:ellipsis;white-space:nowrap}.menu[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%] button{width:28px;height:28px}.menu[_ngcontent-%COMP%] .minimize-button[_ngcontent-%COMP%], .menu[_ngcontent-%COMP%] .invite-link-button[_ngcontent-%COMP%]{margin-right:8px}@media only screen and (max-width: 479px){.menu[_ngcontent-%COMP%] .invite-link-button[_ngcontent-%COMP%]{display:none}}mat-slide-toggle.disabled[_ngcontent-%COMP%]{opacity:.5}mat-slide-toggle[_ngcontent-%COMP%] .mdc-form-field{display:flex;flex-direction:row-reverse;margin-right:16px}mat-slide-toggle[_ngcontent-%COMP%] .mdc-form-field label{padding:0 6px 0 0;font-weight:600;color:var(--contrast)}.slide-toggle-text-big[_ngcontent-%COMP%]{display:block}@media only screen and (max-width: 1024px){.slide-toggle-text-big[_ngcontent-%COMP%]{display:none}}.slide-toggle-text-small[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 1024px){.slide-toggle-text-small[_ngcontent-%COMP%]{display:block}}@media only screen and (max-width: 767px){.slide-toggle-text-small[_ngcontent-%COMP%]{display:none}}.slide-toggle-icon[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 767px){.slide-toggle-icon[_ngcontent-%COMP%]{display:block}}.bottom-message[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;z-index:3;display:flex;justify-content:center;align-items:center;width:100%;padding:4px 20px 4px 4px;background-color:var(--grayscale-dark);opacity:.7}.bottom-message.move-up[_ngcontent-%COMP%]{bottom:24px}.bottom-message.invite[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 479px){.bottom-message.invite[_ngcontent-%COMP%]{display:initial}}.bottom-message[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--contrast)}.bottom-message[_ngcontent-%COMP%] .close-bottom-message[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px}"]
})
}
return o
}
)()
, ae = ( () => {
class o {
constructor(e, n) {
this.livekit = e,
this.elementRef = n,
this.subscriptions = [],
this.activeGroup = null,
this.onTrackSubscribed = this.onTrackSubscribed.bind(this),
this.onTrackUnsubscribed = this.onTrackUnsubscribed.bind(this),
this.onTrackPublished = this.onTrackPublished.bind(this),
this.onTrackUnpublished = this.onTrackUnpublished.bind(this)
}
ngAfterViewInit() {
this.subscriptions.push(this.livekit.room.activeGroup.subscribe(e => {
this.activeGroup = e,
this.handleAudioSubscriptions()
}
), this.livekit.room.unhiddenParticipant.subscribe(e => this.subscribeToAudioTrackEvents(e)), this.livekit.room.audioUnsubscribe.subscribe(e => this.unsubscribeFromAudioTrackEvents(e)))
}
ngOnDestroy() {
const e = Array.from(this.livekit.room.remoteParticipants.values());
for (const n of e)
this.unsubscribeFromAudioTrackEvents(n)
}
handleAudioSubscriptions() {
const e = null !== this.activeGroup ? this.activeGroup.members.map(i => i.id) : []
, n = Array.from(this.livekit.room.remoteParticipants.values());
for (const i of n)
e.includes(i.identity) ? this.subscribeToAudioTrackEvents(i) : this.unsubscribeFromAudioTrackEvents(i)
}
subscribeToAudioTrackEvents(e) {
e.on(l.Cu.TrackSubscribed, this.onTrackSubscribed).on(l.Cu.TrackUnsubscribed, this.onTrackUnsubscribed).on(l.Cu.TrackPublished, this.onTrackPublished).on(l.Cu.TrackUnpublished, this.onTrackUnpublished),
setTimeout( () => this.setAudioTrackSubscribedState(e, !0), 1e3)
}
unsubscribeFromAudioTrackEvents(e) {
setTimeout( () => this.setAudioTrackSubscribedState(e, !1)),
e.off(l.Cu.TrackSubscribed, this.onTrackSubscribed).off(l.Cu.TrackUnsubscribed, this.onTrackUnsubscribed).off(l.Cu.TrackPublished, this.onTrackPublished).off(l.Cu.TrackUnpublished, this.onTrackUnpublished),
this.removeAllParticipantAudioElements(e.identity)
}
onTrackSubscribed(e, n) {
e.kind === l.oh.Kind.Audio && this.tryToAttachAudioElement(n)
}
onTrackUnsubscribed(e, n) {
e.kind === l.oh.Kind.Audio && this.removeAudioElement(n.trackSid)
}
onTrackPublished(e) {
e.isSubscribed || e.kind !== l.oh.Kind.Audio || e.setSubscribed(!0)
}
onTrackUnpublished(e) {
!e.isSubscribed || e.kind !== l.oh.Kind.Audio || e.setSubscribed(!1)
}
setAudioTrackSubscribedState(e, n) {
e.audioTrackPublications.forEach(i => {
i.setSubscribed(n)
}
)
}
tryToAttachAudioElement(e) {
const n = e.track;
if (!n)
return;
const i = this.elementRef.nativeElement
, s = `audio-${e.trackSid}`;
let a = i.querySelector(`#${s}`);
if (null === a) {
a = document.createElement("audio"),
a.id = s,
a.hidden = !0;
const m = Array.from(this.livekit.room.remoteParticipants.values()).find(v => Array.from(v.trackPublications.values()).some(P => P.trackSid === e.trackSid));
m && (a.className = `audio-${m.identity}`),
i.appendChild(a)
} else if (n.attachedElements.includes(a))
return;
n.attach(a)
}
removeAllParticipantAudioElements(e) {
const n = this.elementRef.nativeElement;
Array.from(n.querySelectorAll(`audio.audio-${e}`)).forEach(s => {
n.removeChild(s)
}
)
}
removeAudioElement(e) {
const n = this.elementRef.nativeElement
, i = n.querySelector(`#audio-${e}`);
i && n.removeChild(i)
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(t.GMv))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-group-session-audio"]],
decls: 0,
vars: 0,
template: function(n, i) {},
encapsulation: 2
})
}
return o
}
)()
, Nr = ( () => {
class o {
get participants() {
return this.livekit.room.focusPlus.participants
}
handleKeyboardEvent() {
this.close()
}
constructor(e, n, i) {
this.settingsService = e,
this.livekit = n,
this.themeService = i,
this.UserThemeRef = x.ru,
this.subscriptions = []
}
ngOnInit() {
this.subscriptions.push(this.themeService.themeChange.subscribe(e => this.theme = e)),
this.themeService.setTheme(x.ru.Dark, !0),
document.body.classList.contains("focus-plus") || document.body.classList.add("focus-plus")
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe()),
this.themeService.setTheme(this.theme, !0),
document.body.classList.contains("focus-plus") && document.body.classList.remove("focus-plus")
}
close() {
this.livekit.room.focusPlus.exit()
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(L.Y),t.GI1(g.A),t.GI1(st.a))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-plus"]],
hostBindings: function(n, i) {
1 & n && t.qCj("keydown.escape", function() {
return i.handleKeyboardEvent()
}, !1, t.wLc)
},
decls: 8,
vars: 6,
consts: [[1, "focus-plus-header"], [1, "logo"], [1, "close-button", 3, "click"], ["iconName", "dismiss", "color", "contrast", 3, "size", "iconVariant"], [3, "participants", "theme"], [1, "focus-plus-footer"]],
template: function(n, i) {
1 & n && (t.I0R(0, "section", 0),
t.wR5(1, "div", 1),
t.I0R(2, "button", 2),
t.qCj("click", function() {
return i.close()
}),
t.wR5(3, "ss-icon", 3),
t.C$Y()(),
t.wR5(4, "ss-focus-room-tile-grid", 4),
t.I0R(5, "section", 5)(6, "small"),
t.OEk(7, "When in Focus+ mode you won't receive encouragements, private space invitations, or message notifications."),
t.C$Y()()),
2 & n && (t.yG2(),
t.m4B("background-image", "url(/assets/images/logo-text-white" + (i.settingsService.isB2BApp() || i.settingsService.isCoWork() ? "-cw" : "") + ".svg)"),
t.yG2(2),
t.E7m("size", 20)("iconVariant", 20),
t.yG2(),
t.E7m("participants", i.participants)("theme", i.UserThemeRef.Dark))
},
dependencies: [C.g, Wt],
styles: ["[_nghost-%COMP%]{position:fixed;top:0;left:0;z-index:1003;display:block;width:100vw;height:100vh;background-color:var(--focus-plus-background)}.focus-plus-header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:60px}.focus-plus-header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{width:100px;height:15px;background-position:center;background-repeat:no-repeat}.focus-plus-header[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{position:absolute;top:12px;right:12px;display:flex;justify-content:center;align-items:center;min-width:36px;width:36px;height:36px;padding:0;border:none;border-radius:15px;outline:none;background-color:transparent;cursor:pointer;transition:all .3s}@media only screen and (max-width: 767px){.focus-plus-header[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{order:3}}.focus-plus-header[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]:hover{opacity:.8}ss-focus-room-tile-grid[_ngcontent-%COMP%]{width:100vw!important;height:calc(100vh - 120px)!important}.focus-plus-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:60px}.focus-plus-footer[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--default-40)}"]
})
}
return o
}
)();
const Br = ["videoElement"]
, Dr = ["userInfoElement"];
function $r(o, r) {
if (1 & o && t.wR5(0, "ss-user-avatar", 6),
2 & o) {
const e = t.GaO();
t.E7m("size", 48)("avatarColor", e.participant.userInfo.avatarColor)("avatarThumbUrl", e.participant.userInfo.avatarThumbUrl)("showOnlineStatus", !1)("userId", e.participant.identity)("initials", e.participant.userInfo.initials)
}
}
function zr(o, r) {
if (1 & o && t.wR5(0, "ss-badge", 11),
2 & o) {
const e = t.GaO(2);
t.E7m("badge", e.participant.userInfo.userBadge)
}
}
function jr(o, r) {
if (1 & o && (t.I0R(0, "div", 7)(1, "div", 8),
t.yuY(2, zr, 1, 1, "ss-badge", 9),
t.I0R(3, "div", 10),
t.OEk(4),
t.C$Y()(),
t.I0R(5, "small"),
t.OEk(6),
t.C$Y()()),
2 & o) {
const e = t.GaO();
t.yG2(2),
t.E7m("ngIf", e.participant.userInfo.userBadge),
t.yG2(2),
t.oRS(" ", e.participant.userInfo.displayName, " "),
t.yG2(2),
t.cNF(e.participant.userInfo.areaOfStudyName)
}
}
let Hr = ( () => {
class o {
get selected() {
return this.participant.selected
}
get isCameraOn() {
return this.participant.isCameraEnabled
}
get isDarkTheme() {
return this.theme === x.ru.Dark
}
constructor(e) {
this.livekit = e,
this.retryModel = {
delay: 500,
interval: 1e3,
maxAttempts: 10,
timesRetried: 1,
stopRetries: new wt.E
},
this.onTrackSubscribed = this.onTrackSubscribed.bind(this),
this.onTrackPublished = this.onTrackPublished.bind(this),
this.onLocalTrackPublished = this.onLocalTrackPublished.bind(this)
}
ngOnInit() {
this.participant.on(l.Cu.TrackSubscribed, this.onTrackSubscribed).on(l.Cu.TrackPublished, this.onTrackPublished).on(l.Cu.LocalTrackPublished, this.onLocalTrackPublished)
}
ngAfterViewInit() {
this.participant.isLocal ? this.tryBindingActivePublication() : (this.setVideoTracksSubscribedState(!0),
(0,
w.k)(this.retryModel.delay, this.retryModel.interval).pipe((0,
St.a)(this.retryModel.stopRetries)).subscribe( () => this.retrySubscribingAndBinding()))
}
ngOnDestroy() {
this.retryModel.stopRetries.next(),
this.participant.off(l.Cu.TrackSubscribed, this.onTrackSubscribed).off(l.Cu.TrackPublished, this.onTrackPublished).off(l.Cu.LocalTrackPublished, this.onLocalTrackPublished)
}
retrySubscribingAndBinding() {
(!this.participant.isCameraEnabled || this.retryModel.timesRetried === this.retryModel.maxAttempts) && this.retryModel.stopRetries.next(),
this.setVideoTracksSubscribedState(!0),
this.tryBindingActivePublication(),
this.retryModel.timesRetried++
}
setVideoTracksSubscribedState(e) {
this.participant.videoTrackPublications.forEach(n => {
n instanceof l.Sw && n.setSubscribed(e)
}
)
}
onTrackSubscribed(e, n) {
e.kind === l.oh.Kind.Video && this.tryToAttachVideoElement(n)
}
onTrackPublished(e) {
e.isSubscribed || this.setVideoTracksSubscribedState(!0)
}
onLocalTrackPublished(e) {
!e.track || e.track.kind !== l.oh.Kind.Video || this.tryToAttachVideoElement(e)
}
tryBindingActivePublication() {
const e = this.participant.getTrackPublications().find(n => n.kind === l.oh.Kind.Video && n.isSubscribed);
e && this.tryToAttachVideoElement(e)
}
tryToAttachVideoElement(e) {
const n = e.track;
if (!n)
return;
const i = this.videoElement.nativeElement;
n.attachedElements.includes(i) || (n.attach(i),
this.retryModel.stopRetries.next(),
this.livekit.room.sortAndAssignDisplayedParticipants())
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-selectable-tile"]],
viewQuery: function(n, i) {
if (1 & n && (t.CC$(Br, 5),
t.CC$(Dr, 5)),
2 & n) {
let s;
t.wto(s = t.Gqi()) && (i.videoElement = s.first),
t.wto(s = t.Gqi()) && (i.userInfoElement = s.first)
}
},
hostVars: 2,
hostBindings: function(n, i) {
2 & n && t.eAK("selected", i.selected)
},
inputs: {
participant: "participant",
theme: "theme",
isMobile: "isMobile"
},
decls: 6,
vars: 4,
consts: [["class", "avatar-placeholder", "status", "online", 3, "size", "avatarColor", "avatarThumbUrl", "showOnlineStatus", "userId", "initials", 4, "ngIf"], ["autoplay", "", "playsInline", "", 3, "poster"], ["videoElement", ""], [1, "selected-overlay"], ["iconName", "checkmark", "color", "contrast", 3, "size"], ["class", "user-info", 4, "ngIf"], ["status", "online", 1, "avatar-placeholder", 3, "size", "avatarColor", "avatarThumbUrl", "showOnlineStatus", "userId", "initials"], [1, "user-info"], [1, "name-wrapper"], [3, "badge", 4, "ngIf"], [1, "notification"], [3, "badge"]],
template: function(n, i) {
1 & n && (t.yuY(0, $r, 1, 6, "ss-user-avatar", 0),
t.wR5(1, "video", 1, 2),
t.I0R(3, "div", 3),
t.wR5(4, "ss-icon", 4),
t.C$Y(),
t.yuY(5, jr, 7, 3, "div", 5)),
2 & n && (t.E7m("ngIf", i.participant.userInfo && !i.isCameraOn),
t.yG2(),
t.E7m("poster", i.isDarkTheme ? "/assets/images/poster-dark.jpg" : "/assets/images/poster-light.png", t.K6U),
t.yG2(3),
t.E7m("size", 32),
t.yG2(),
t.E7m("ngIf", i.participant.userInfo))
},
dependencies: [h.u_, C.g, K.A, at.I],
styles: ["[_nghost-%COMP%]{position:relative;display:block;max-width:176px;min-width:176px;background:var(--grayscale);cursor:pointer}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{box-shadow:none}[_nghost-%COMP%]:hover video[_ngcontent-%COMP%]{box-shadow:none}}[_nghost-%COMP%]:hover video[_ngcontent-%COMP%]{box-shadow:var(--effect-deep)}.selected[_nghost-%COMP%] .selected-overlay[_ngcontent-%COMP%]{z-index:2;display:flex}.selected[_nghost-%COMP%] video[_ngcontent-%COMP%]{position:relative}video[_ngcontent-%COMP%]{width:176px;aspect-ratio:16/9;border-radius:12px}.selected-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;display:none;justify-content:center;align-items:center;width:176px;border-radius:12px;background-color:var(--selected-tile-overlay);aspect-ratio:16/9}.avatar-placeholder[_ngcontent-%COMP%]{position:absolute;top:52px;left:50%;z-index:1;transform:translate(-50%,-50%)}.user-info[_ngcontent-%COMP%]{margin-top:8px}.user-info[_ngcontent-%COMP%] .name-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:4px}.user-info[_ngcontent-%COMP%] ss-badge[_ngcontent-%COMP%]{flex-shrink:0;margin-right:5px}.user-info[_ngcontent-%COMP%] .notification[_ngcontent-%COMP%], .user-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:-webkit-box;overflow:hidden;word-break:break-all;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}"]
})
}
return o
}
)();
function Kr(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 8),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.autoSelect())
}),
t.OEk(1, " Autoselect "),
t.C$Y()
}
}
function Jr(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 8),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.start())
}),
t.OEk(1),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.yG2(),
t.oRS(" Start (", e.selectedParticipants.length, ") ")
}
}
function qr(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-selectable-tile", 9),
t.qCj("click", function() {
const s = t.usT(e).$implicit
, a = t.GaO();
return t.CGJ(a.toggleTileSelection(s))
}),
t.C$Y()
}
if (2 & o) {
const e = r.$implicit
, n = t.GaO();
t.E7m("participant", e)("isMobile", n.isMobile)("theme", n.theme)
}
}
function Wr(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-selectable-tile", 9),
t.qCj("click", function() {
const s = t.usT(e).$implicit
, a = t.GaO();
return t.CGJ(a.toggleTileSelection(s))
}),
t.C$Y()
}
if (2 & o) {
const e = r.$implicit
, n = t.GaO();
t.E7m("participant", e)("isMobile", n.isMobile)("theme", n.theme)
}
}
let Qr = ( () => {
class o {
get remoteParticipants() {
return this.livekit.room.allParticipants.filter(e => !e.isLocal && e.identity)
}
get selectedParticipants() {
return this.mostViewedParticipants.filter(e => e.selected).concat(this.similarParticipants.filter(e => e.selected))
}
constructor(e, n, i, s, a) {
this.livekit = e,
this.accountService = n,
this.themeService = i,
this.utilityService = s,
this.analyticsService = a,
this.mostViewedParticipants = [],
this.similarParticipants = [],
this.isMobile = !1,
this.subscriptions = []
}
ngOnInit() {
this.subscriptions.push(this.themeService.themeChange.subscribe(e => this.theme = e), this.utilityService.isMobile.subscribe(e => this.isMobile = e))
}
ngAfterViewInit() {
setTimeout( () => {
this.mostViewedParticipants = this.getMostViewedParticipants(),
this.similarParticipants = this.getSimilarFromRemainingParticipants()
}
)
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe())
}
start() {
this.analyticsService.markActivity(u.kP.LivekitFocusRoomOnboardingStart, {
participantsSelected: this.selectedParticipants.length
});
for (const e of this.selectedParticipants)
this.livekit.room.pin({
participant: e
});
this.close()
}
autoSelect() {
this.analyticsService.markActivity(u.kP.LivekitFocusRoomOnboardingAutoselect);
const e = this.mostViewedParticipants.splice(0, 4);
for (const n of e)
this.livekit.room.pin({
participant: n
});
this.close()
}
close() {
this.analyticsService.markActivity(u.kP.LivekitFocusRoomOnboardingSkip),
this.livekit.room.focusRoomOnboardingShown = !1
}
toggleTileSelection(e) {
const n = !e.selected;
n && 4 === this.selectedParticipants.length || (e.selected = n)
}
getMostViewedParticipants() {
return this.remoteParticipants.filter(e => !e.isLocal).sort((0,
dt.firstBy)(e => e.isCameraEnabled, {
direction: "desc"
}).thenBy(e => e.pinnedCount, {
direction: "desc"
})).slice(0, 10)
}
getSimilarFromRemainingParticipants() {
const e = this.accountService.currentUser
, n = this.remoteParticipants.filter(s => !s.isLocal && !this.mostViewedParticipants.includes(s)).sort((0,
dt.firstBy)(s => s.isCameraEnabled, {
direction: "desc"
}).thenBy(s => s.pinnedCount, {
direction: "desc"
}));
if (e.areaOfStudyId) {
const s = n.filter(a => a.userInfo.areaOfStudyId === e.areaOfStudyId);
if (s.length >= 10)
return this.similarParticipantsTitle = `Other ${e.type === x.sD.Professional ? "people working in" : "students studying"} ${e.areaOfStudyName}`,
s.slice(0, 10)
}
if (e.countryId) {
const s = n.filter(a => a.userInfo.countryId === e.countryId);
if (s.length >= 10)
return this.similarParticipantsTitle = `Other people from ${e.countryName}`,
s.slice(0, 10)
}
if (!e.type)
return [];
const i = n.filter(s => s.userInfo.type === e.type);
return this.similarParticipantsTitle = "Other " + (e.type === x.sD.PreUniStudent ? "Pre-Uni Students" : e.type === x.sD.UniStudent ? "Uni Students" : "Professionals"),
i.slice(0, 10)
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(y.uE),t.GI1(st.a),t.GI1(I.UZ),t.GI1(u.uc))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-onboarding"]],
decls: 21,
vars: 5,
consts: [[1, "header"], [1, "title"], [1, "actions-wrapper"], ["color", "tertiary", 3, "buttonClick"], [3, "buttonClick", 4, "ngIf"], [1, "suggested-users"], [1, "horizontal-grid"], [3, "participant", "isMobile", "theme", "click", 4, "ngFor", "ngForOf"], [3, "buttonClick"], [3, "participant", "isMobile", "theme", "click"]],
template: function(n, i) {
1 & n && (t.I0R(0, "section", 0)(1, "div", 1)(2, "h2"),
t.OEk(3, "Who would you like to see while you study? Up to 4!"),
t.C$Y(),
t.I0R(4, "small"),
t.OEk(5, "Click on up to 4 others below to watch them while you get your work done!"),
t.C$Y()(),
t.I0R(6, "div", 2)(7, "ss-button", 3),
t.qCj("buttonClick", function() {
return i.close()
}),
t.OEk(8, " Skip "),
t.C$Y(),
t.yuY(9, Kr, 2, 0, "ss-button", 4)(10, Jr, 2, 1, "ss-button", 4),
t.C$Y()(),
t.I0R(11, "section", 5)(12, "h3"),
t.OEk(13, "Most viewed users"),
t.C$Y(),
t.I0R(14, "div", 6),
t.yuY(15, qr, 1, 3, "ss-selectable-tile", 7),
t.C$Y()(),
t.I0R(16, "section", 5)(17, "h3"),
t.OEk(18),
t.C$Y(),
t.I0R(19, "div", 6),
t.yuY(20, Wr, 1, 3, "ss-selectable-tile", 7),
t.C$Y()()),
2 & n && (t.yG2(9),
t.E7m("ngIf", 0 === i.selectedParticipants.length),
t.yG2(),
t.E7m("ngIf", i.selectedParticipants.length > 0),
t.yG2(5),
t.E7m("ngForOf", i.mostViewedParticipants),
t.yG2(3),
t.cNF(i.similarParticipantsTitle),
t.yG2(2),
t.E7m("ngForOf", i.similarParticipants))
},
dependencies: [h.ay, h.u_, O.k, Hr],
styles: ["[_nghost-%COMP%]{display:block;width:100%;height:100%;overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin;padding-bottom:36px;background-color:var(--grayscale)}@supports (-moz-appearance: none){[_nghost-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}[_nghost-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}[_nghost-%COMP%]::-webkit-scrollbar, [_nghost-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}[_nghost-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:40px 48px 28px}@media only screen and (max-width: 767px){.header[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;padding:20px 28px}.header[_ngcontent-%COMP%] .actions-wrapper[_ngcontent-%COMP%]{margin-top:12px}}.actions-wrapper[_ngcontent-%COMP%]{display:flex;flex-shrink:0}.actions-wrapper[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%]{margin-right:4px}.actions-wrapper[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%]:last-of-type{margin-right:0}.suggested-users[_ngcontent-%COMP%]{margin-bottom:24px}.suggested-users[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{padding:0 48px;margin-bottom:18px}@media only screen and (max-width: 767px){.suggested-users[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{padding:0 28px}}.horizontal-grid[_ngcontent-%COMP%]{display:flex;width:100%;padding-bottom:8px;overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){.horizontal-grid[_ngcontent-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}.horizontal-grid[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}.horizontal-grid[_ngcontent-%COMP%]::-webkit-scrollbar, .horizontal-grid[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}.horizontal-grid[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.horizontal-grid[_ngcontent-%COMP%] ss-selectable-tile[_ngcontent-%COMP%]{margin-right:8px}.horizontal-grid[_ngcontent-%COMP%] ss-selectable-tile[_ngcontent-%COMP%]:first-of-type{margin-left:48px}@media only screen and (max-width: 767px){.horizontal-grid[_ngcontent-%COMP%] ss-selectable-tile[_ngcontent-%COMP%]:first-of-type{margin-left:28px}}.horizontal-grid[_ngcontent-%COMP%] ss-selectable-tile[_ngcontent-%COMP%]:last-of-type{margin-right:48px}@media only screen and (max-width: 767px){.horizontal-grid[_ngcontent-%COMP%] ss-selectable-tile[_ngcontent-%COMP%]:last-of-type{margin-right:28px}}"]
})
}
return o
}
)();
function Xr(o, r) {
1 & o && (t.SAx(0),
t.wR5(1, "ss-icon", 2),
t.I0R(2, "em"),
t.OEk(3, "Sit here"),
t.C$Y(),
t.k70()),
2 & o && (t.yG2(),
t.E7m("size", 28)("iconVariant", 28))
}
function Zr(o, r) {
1 & o && t.wR5(0, "mat-spinner", 3)
}
let ta = ( () => {
class o {
constructor() {
this.loading = !1
}
static #t = this.\u0275fac = function(n) {
return new (n || o)
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-empty-seat"]],
inputs: {
loading: "loading"
},
decls: 2,
vars: 2,
consts: [[4, "ngIf"], ["diameter", "30", "strokeWidth", "3", 4, "ngIf"], ["iconName", "add", "color", "contrast", 3, "size", "iconVariant"], ["diameter", "30", "strokeWidth", "3"]],
template: function(n, i) {
1 & n && t.yuY(0, Xr, 4, 2, "ng-container", 0)(1, Zr, 1, 0, "mat-spinner", 1),
2 & n && (t.E7m("ngIf", !i.loading),
t.yG2(),
t.E7m("ngIf", i.loading))
},
dependencies: [h.u_, C.g, z.cm],
styles: ["[_nghost-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:auto;margin-bottom:4px;border-radius:8px;background:var(--grayscale-dark);aspect-ratio:16/9;cursor:pointer;opacity:.8}[_nghost-%COMP%]:hover{opacity:1}ss-icon[_ngcontent-%COMP%]{margin-bottom:3px}em[_ngcontent-%COMP%]{color:var(--contrast)}"]
})
}
return o
}
)();
function ea(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-icon", 10),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.closePredefinedGroups())
}),
t.C$Y()
}
2 & o && t.E7m("size", 20)("iconVariant", 20)
}
function ia(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button-small", 11),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.leave())
}),
t.OEk(1, " Leave "),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("isLoading", e.leaveLoading)("color", e.ButtonColorRef.Negative)
}
}
function na(o, r) {
if (1 & o) {
const e = t.KQA();
t.SAx(0),
t.I0R(1, "div", 12),
t.OEk(2, " Viewing "),
t.I0R(3, "em"),
t.OEk(4),
t.C$Y()(),
t.I0R(5, "div", 13)(6, "ss-button", 14),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.goToPreviousGroup())
}),
t.C$Y(),
t.I0R(7, "ss-button", 15),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.goToNextGroup())
}),
t.C$Y()(),
t.k70()
}
if (2 & o) {
const e = t.GaO();
t.yG2(),
t.E7m("matTooltip", e.activePredefinedGroup.predefinedGroupName || ""),
t.yG2(3),
t.CAO("", e.activePredefinedGroup.predefinedGroupName, " ", e.participantCounts, ""),
t.yG2(2),
t.E7m("iconOnly", !0)("isLoading", e.previousGroupLoading)("disabled", !e.previousGroupExists || e.joinLoading)("iconSize", 24),
t.yG2(),
t.E7m("iconOnly", !0)("isLoading", e.nextGroupLoading)("disabled", !e.nextGroupExists || e.joinLoading)("iconSize", 24)
}
}
function oa(o, r) {
if (1 & o) {
const e = t.KQA();
t.SAx(0),
t.I0R(1, "div", 12),
t.OEk(2),
t.C$Y(),
t.I0R(3, "ss-button", 16),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.togglePredefinedGroupsMaximizedView())
}),
t.C$Y(),
t.k70()
}
if (2 & o) {
const e = t.GaO();
t.yG2(),
t.E7m("matTooltip", e.activePredefinedGroup.predefinedGroupName || ""),
t.yG2(),
t.oRS(" You are in ", e.activePredefinedGroup.predefinedGroupName, " "),
t.yG2(),
t.E7m("matTooltip", e.livekit.room.predefinedGroupMaximized ? "Minimize" : "Maximize")("iconName", e.livekit.room.predefinedGroupMaximized ? "contract_down_left" : "resize_large")("iconSize", 24)("iconOnly", !0)
}
}
function sa(o, r) {
if (1 & o && t.wR5(0, "ss-focus-room-tile", 19),
2 & o) {
const e = t.GaO().$implicit
, n = t.GaO();
t.E7m("participant", e.participant)("isMobile", n.isMobile)("theme", n.theme)("isGroupTile", !0)
}
}
function ra(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-empty-seat", 20),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO().$implicit
, s = t.GaO();
return t.CGJ(s.join(i))
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO().$implicit;
t.E7m("loading", e.loading)
}
}
function aa(o, r) {
if (1 & o && (t.SAx(0),
t.yuY(1, sa, 1, 4, "ss-focus-room-tile", 17)(2, ra, 1, 1, "ss-empty-seat", 18),
t.k70()),
2 & o) {
const e = r.$implicit;
t.yG2(),
t.E7m("ngIf", e.participant),
t.yG2(),
t.E7m("ngIf", !e.participant)
}
}
function ca(o, r) {
if (1 & o && (t.SAx(0),
t.I0R(1, "div", 21)(2, "p"),
t.OEk(3, "activePredefinedGroup:"),
t.C$Y(),
t.I0R(4, "pre"),
t.OEk(5),
t.wVc(6, "json"),
t.C$Y()(),
t.I0R(7, "div", 21)(8, "p"),
t.OEk(9, "activeGroup:"),
t.C$Y(),
t.I0R(10, "pre"),
t.OEk(11),
t.wVc(12, "json"),
t.C$Y()(),
t.I0R(13, "div", 21)(14, "p"),
t.OEk(15, "currentUserJoined:"),
t.C$Y(),
t.I0R(16, "pre"),
t.OEk(17),
t.C$Y()(),
t.k70()),
2 & o) {
const e = t.GaO();
t.yG2(5),
t.cNF(t.kDX(6, 3, e.activePredefinedGroup)),
t.yG2(6),
t.cNF(t.kDX(12, 5, e.activeGroup)),
t.yG2(6),
t.cNF(e.currentUserJoined)
}
}
function la(o, r) {
1 & o && t.wR5(0, "ss-focus-room-group-session-audio")
}
let da = ( () => {
class o {
get maximized() {
return this.livekit.room.predefinedGroupMaximized
}
get localParticipant() {
return this.livekit.room.localParticipant
}
get currentUserJoined() {
return null !== this.activeGroup && this.livekit.room.activePredefinedGroupParticipants.some(e => e.participant?.identity === this.livekit.room.localParticipant.identity)
}
get currentGroupIndex() {
return this.livekit.room.predefinedGroupInstances.findIndex(e => e.predefinedGroupId === this.activePredefinedGroup.predefinedGroupId)
}
get previousGroupExists() {
return this.currentGroupIndex > 0
}
get nextGroupExists() {
return this.currentGroupIndex < this.livekit.room.predefinedGroupInstances.length - 1
}
get participantCounts() {
const e = this.livekit.room.activePredefinedGroupParticipants.filter(n => null !== n.participant);
return `(${e ? e.length : 0}/${this.activePredefinedGroup.predefinedGroupMaxSeats})`
}
constructor(e, n, i, s, a) {
this.livekit = e,
this.dialog = n,
this.toastService = i,
this.translateService = s,
this.utilityService = a,
this.VideoPillButtonLocationRef = _.uY,
this.ButtonColorRef = N.k,
this.isMobile = !1,
this.leaveLoading = !1,
this.joinLoading = !1,
this.nextGroupLoading = !1,
this.previousGroupLoading = !1,
this.subscriptions = []
}
ngOnInit() {
this.subscriptions.push(this.livekit.room.activeGroup.subscribe(e => this.activeGroup = e), this.livekit.room.activePredefinedGroup.subscribe(e => {
e && (this.activePredefinedGroup = e)
}
))
}
ngAfterViewInit() {
this.subscriptions.push(this.utilityService.isMobile.subscribe(e => {
this.isMobile = e,
this.isMobile && (this.livekit.room.predefinedGroupMaximized = !1)
}
))
}
ngOnDestroy() {
this.subscriptions.forEach(e => e.unsubscribe()),
this.localParticipant.setMicrophoneEnabled(!1)
}
join(e) {
var s, n = this;
e.loading = !0,
this.joinLoading = !0,
this.livekit.joinPublicGroup(this.livekit.room.name, this.activePredefinedGroup.id, {
seatNumber: e.seatNumber
}).subscribe({
next: () => {
e.loading = !1,
this.joinLoading = !1,
this.livekit.room.predefinedGroupMaximized = !1
}
,
error: (s = (0,
S.c)(function*(a) {
if (e.loading = !1,
"LivekitRoomPredefinedGroupSeatIsTakenOrAlreadyJoined" !== a[0].errorCode)
n.handleErrors(a);
else {
const d = "LivekitRoomPredefinedGroup" + (n.currentUserJoined ? "AlreadyJoined" : "SeatIsTaken")
, m = yield(0,
Qt.o)(n.translateService.get(`errors.${d}`));
n.toastService.info({
message: m
})
}
}),
function(d) {
return s.apply(this, arguments)
}
)
})
}
leave() {
this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Are you sure?",
description: "LeavePublicGroup",
confirmButtonLabel: "Yes"
}
}).afterClosed().subscribe(n => {
n && (this.leaveLoading = !0,
this.livekit.leaveActiveGroups(this.livekit.room.name).subscribe({
next: () => {
this.localParticipant.setMicrophoneEnabled(!1),
this.livekit.room.predefinedGroupMaximized = !1,
this.leaveLoading = !1
}
,
error: i => this.handleErrors(i)
}))
}
)
}
goToPreviousGroup() {
this.nextGroupLoading || this.joinLoading || 0 === this.currentGroupIndex || (this.previousGroupLoading = !0,
this.setActivePredefinedGroup(this.livekit.room.predefinedGroupInstances[this.currentGroupIndex - 1]))
}
goToNextGroup() {
this.previousGroupLoading || this.joinLoading || this.currentGroupIndex === this.livekit.room.predefinedGroupInstances.length - 1 || (this.nextGroupLoading = !0,
this.setActivePredefinedGroup(this.livekit.room.predefinedGroupInstances[this.currentGroupIndex + 1]))
}
togglePredefinedGroupsMaximizedView() {
this.livekit.room.predefinedGroupMaximized = !this.livekit.room.predefinedGroupMaximized
}
closePredefinedGroups() {
this.livekit.room.predefinedGroupMaximized = !1,
this.livekit.room.predefinedGroupInstances = [],
this.livekit.room.activePredefinedGroup.next(null)
}
setActivePredefinedGroup(e) {
this.livekit.getSessionGroup(this.livekit.room.name, e.id, this.activePredefinedGroup.id).subscribe({
next: i => {
this.nextGroupLoading = !1,
this.previousGroupLoading = !1,
this.livekit.room.activePredefinedGroup.next(i)
}
,
error: i => this.handleErrors(i)
})
}
handleErrors(e) {
this.joinLoading = !1,
this.leaveLoading = !1,
this.nextGroupLoading = !1,
this.previousGroupLoading = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(p.qW),t.GI1(k.s),t.GI1(nt.qS),t.GI1(I.UZ))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room-predefined-groups"]],
hostVars: 2,
hostBindings: function(n, i) {
2 & n && t.eAK("maximized", i.maximized)
},
inputs: {
theme: "theme"
},
decls: 13,
vars: 10,
consts: [[1, "menu"], [1, "top-row"], [3, "buttonLocation"], ["iconName", "dismiss", "role", "button", "color", "contrast", 3, "size", "iconVariant", "click", 4, "ngIf"], [3, "isLoading", "color", "buttonClick", 4, "ngIf"], [1, "bottom-row"], [4, "ngIf"], [1, "group-tiles-wrapper"], [1, "group-tiles-inner-wrapper"], [4, "ngFor", "ngForOf"], ["iconName", "dismiss", "role", "button", "color", "contrast", 3, "size", "iconVariant", "click"], [3, "isLoading", "color", "buttonClick"], [1, "room-name", 3, "matTooltip"], [1, "paginator"], ["iconName", "arrow_left", "color", "website-transparent", "matTooltip", "Previous", 3, "iconOnly", "isLoading", "disabled", "iconSize", "buttonClick"], ["iconName", "arrow_right", "matTooltip", "Next", "color", "website-transparent", 3, "iconOnly", "isLoading", "disabled", "iconSize", "buttonClick"], ["color", "website-transparent", 1, "maximize-button", 3, "matTooltip", "iconName", "iconSize", "iconOnly", "buttonClick"], [3, "participant", "isMobile", "theme", "isGroupTile", 4, "ngIf"], [3, "loading", "click", 4, "ngIf"], [3, "participant", "isMobile", "theme", "isGroupTile"], [3, "loading", "click"], [1, "printout"]],
template: function(n, i) {
1 & n && (t.I0R(0, "div", 0)(1, "div", 1),
t.wR5(2, "ss-video-pill-button", 2),
t.yuY(3, ea, 1, 2, "ss-icon", 3)(4, ia, 2, 2, "ss-button-small", 4),
t.C$Y(),
t.I0R(5, "div", 5),
t.yuY(6, na, 8, 11, "ng-container", 6)(7, oa, 4, 6, "ng-container", 6),
t.C$Y()(),
t.I0R(8, "div", 7)(9, "div", 8),
t.yuY(10, aa, 3, 2, "ng-container", 9)(11, ca, 18, 7, "ng-container", 6),
t.C$Y()(),
t.yuY(12, la, 1, 0, "ss-focus-room-group-session-audio", 6)),
2 & n && (t.yG2(),
t.eAK("no-padding", i.currentUserJoined),
t.yG2(),
t.E7m("buttonLocation", i.currentUserJoined ? i.VideoPillButtonLocationRef.PublicPod : i.VideoPillButtonLocationRef.FocusRoom),
t.yG2(),
t.E7m("ngIf", !i.currentUserJoined),
t.yG2(),
t.E7m("ngIf", i.currentUserJoined),
t.yG2(2),
t.E7m("ngIf", !i.currentUserJoined),
t.yG2(),
t.E7m("ngIf", i.currentUserJoined),
t.yG2(3),
t.E7m("ngForOf", i.livekit.room.activePredefinedGroupParticipants),
t.yG2(),
t.E7m("ngIf", i.livekit.room.statsForNerdsVisible),
t.yG2(),
t.E7m("ngIf", i.currentUserJoined))
},
dependencies: [h.ay, h.u_, O.k, C.g, N.S, R.a4, lt, ae, ta, Et, h.ED],
styles: ["[_nghost-%COMP%]{display:block;min-width:356px;width:25vw;height:calc(100vh - 56px);overflow:hidden;padding:3px;margin-right:5px;border-top-left-radius:12px;border-top-right-radius:12px;background:var(--overlay-dark)}.maximized[_nghost-%COMP%]{width:calc(100vw - 79px)}.maximized[_nghost-%COMP%] .group-tiles-inner-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:5px}@media only screen and (max-width: 767px){.maximized[_nghost-%COMP%] .group-tiles-inner-wrapper[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr}}@media only screen and (max-width: 479px){.maximized[_nghost-%COMP%] .group-tiles-inner-wrapper[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{width:100%;margin:0 0 5px}}[_nghost-%COMP%] ss-focus-room-tile[_ngcontent-%COMP%] {width:100%!important;height:auto!important;aspect-ratio:16/9;margin-bottom:4px}.group-tiles-wrapper[_ngcontent-%COMP%]{height:calc(100% - 80px);overflow:auto;overflow:overlay;scrollbar-color:var(--default-80) transparent;scrollbar-width:thin}@supports (-moz-appearance: none){.group-tiles-wrapper[_ngcontent-%COMP%]{scrollbar-color:var(--accent-blue-40) var(--accent-blue-40)}}.group-tiles-wrapper[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb{background:var(--accent-gradient-60)}.group-tiles-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar, .group-tiles-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:50px;background:transparent}.group-tiles-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.room-name[_ngcontent-%COMP%]{display:-webkit-box;align-items:center;overflow:hidden;line-height:28px;color:var(--contrast);word-break:break-all;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}.room-name[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--contrast)}.menu[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;align-items:center;margin:3px 8px;color:var(--contrast)}.menu[_ngcontent-%COMP%] .top-row[_ngcontent-%COMP%], .menu[_ngcontent-%COMP%] .bottom-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.menu[_ngcontent-%COMP%] .top-row[_ngcontent-%COMP%]{height:42px}.menu[_ngcontent-%COMP%] .top-row.no-padding[_ngcontent-%COMP%]{padding:0}.menu[_ngcontent-%COMP%] .bottom-row[_ngcontent-%COMP%]{height:32px}@media only screen and (max-width: 1024px){.menu[_ngcontent-%COMP%] .maximize-button[_ngcontent-%COMP%]{display:none}}.menu[_ngcontent-%COMP%] .paginator[_ngcontent-%COMP%]{display:flex;flex-shrink:0}.menu[_ngcontent-%COMP%] ss-button[_ngcontent-%COMP%] button{width:28px;height:28px}.printout[_ngcontent-%COMP%]{padding:4px;margin-top:12px;margin-bottom:12px;border:1px solid var(--negative);font-size:10px;color:var(--contrast);background:var(--grayscale-dark)}.printout[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:600}.light-theme[_nghost-%COMP%] ss-video-pill-button.focus-room[_ngcontent-%COMP%], .light-theme [_nghost-%COMP%] ss-video-pill-button.focus-room[_ngcontent-%COMP%]{background:var(--alt-dark)}.light-theme[_nghost-%COMP%] ss-video-pill-button.focus-room.camera-enabled[_ngcontent-%COMP%] , .light-theme [_nghost-%COMP%] ss-video-pill-button.focus-room.camera-enabled[_ngcontent-%COMP%] {background:var(--positive-60-dark)}.light-theme[_nghost-%COMP%] ss-video-pill-button.focus-room.camera-enabled[_ngcontent-%COMP%] .header, .light-theme [_nghost-%COMP%] ss-video-pill-button.focus-room.camera-enabled[_ngcontent-%COMP%] .header{background:var(--positive-d2)}.light-theme[_nghost-%COMP%] ss-video-pill-button.focus-room[_ngcontent-%COMP%] .header, .light-theme [_nghost-%COMP%] ss-video-pill-button.focus-room[_ngcontent-%COMP%] .header{background:var(--accent-blue-dark)}.light-theme[_nghost-%COMP%] ss-video-pill-button.focus-room[_ngcontent-%COMP%] .open-drawer-icon i, .light-theme [_nghost-%COMP%] ss-video-pill-button.focus-room[_ngcontent-%COMP%] .open-drawer-icon i{color:var(--default-dark)}"]
})
}
return o
}
)();
const ua = ["videoElement"];
let pa = ( () => {
class o {
get localParticipant() {
return this.livekit.room.localParticipant
}
get transformValue() {
if (!this.localParticipant.isCameraEnabled)
return "";
let e = null;
this.localParticipant.zoomToFit && this.videoElement?.nativeElement?.videoHeight && (e = 16 / 9 / (this.videoElement.nativeElement.videoWidth / this.videoElement.nativeElement.videoHeight));
let i = null === e || this.isMobile || 1 === e ? "" : `scale(${e})`;
return i += this.localParticipant.isLocal && this.livekit.room.settings.mirrorMode ? " scaleX(-1)" : "",
i = i.trim(),
i
}
constructor(e, n, i) {
this.livekit = e,
this.analyticsService = n,
this.utilityService = i,
this.draggingSelfViewVideo = !1,
this.isMobile = !1
}
shouldShowOptionsModal() {
this.draggingSelfViewVideo || this.showOptionsModal()
}
ngOnInit() {
var e = this;
return (0,
S.c)(function*() {
e.isMobileSubscription = e.utilityService.isMobile.subscribe(n => e.isMobile = n)
})()
}
ngAfterViewInit() {
this.attachVideo()
}
ngOnDestroy() {
this.isMobileSubscription.unsubscribe()
}
showOptionsModal() {
this.livekit.showOptionsModal()
}
close() {
this.livekit.room.selfViewVideoVisibility = !1,
this.analyticsService.markActivity(u.kP.LivekitSelfViewVideoOff)
}
attachVideo() {
const e = this.localParticipant.getTrackPublications().find(i => i.kind === l.oh.Kind.Video && i.isSubscribed);
if (!e || !e.track)
return;
const n = this.videoElement.nativeElement;
e.track.attachedElements.includes(n) || e.track.attach(n)
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(u.uc),t.GI1(I.UZ))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-self-view-video"]],
viewQuery: function(n, i) {
if (1 & n && t.CC$(ua, 5),
2 & n) {
let s;
t.wto(s = t.Gqi()) && (i.videoElement = s.first)
}
},
hostBindings: function(n, i) {
1 & n && t.qCj("click", function() {
return i.shouldShowOptionsModal()
})
},
inputs: {
draggingSelfViewVideo: "draggingSelfViewVideo"
},
decls: 4,
vars: 4,
consts: [["autoplay", "", "playsInline", ""], ["videoElement", ""], [1, "close-button", 3, "click"], ["iconName", "dismiss", "color", "default-20", 3, "size", "iconVariant"]],
template: function(n, i) {
1 & n && (t.wR5(0, "video", 0, 1),
t.I0R(2, "button", 2),
t.qCj("click", function() {
return i.close()
}),
t.wR5(3, "ss-icon", 3),
t.C$Y()),
2 & n && (t.m4B("transform", i.transformValue),
t.yG2(3),
t.E7m("size", 20)("iconVariant", 20))
},
dependencies: [C.g],
styles: ["[_nghost-%COMP%]{position:absolute;z-index:1000;display:flex;width:342px;border-radius:12px;box-shadow:0 4px 12px 0 var(--default-40);cursor:grab;aspect-ratio:16/9}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{max-width:150px;aspect-ratio:initial}}[_nghost-%COMP%]:hover .close-button[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:12px}.close-button[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;display:none;justify-content:center;align-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;outline:none;background-color:var(--grayscale-g1);cursor:pointer}@media only screen and (max-width: 1024px){.close-button[_ngcontent-%COMP%]{display:flex}}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{box-shadow:0 4px 12px 0 var(--grayscale)}"]
})
}
return o
}
)();
function ma(o, r) {
1 & o && t.wR5(0, "ss-focus-room-predefined-groups")
}
function ha(o, r) {
if (1 & o && t.wR5(0, "ss-focus-room-session-group", 15),
2 & o) {
const e = t.GaO(2);
t.E7m("theme", e.theme)
}
}
function ga(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-focus-room-milestones-bar", 19),
t.qCj("hide", function() {
t.usT(e);
const i = t.GaO(3);
return t.CGJ(i.milestonesDismissed = !0)
}),
t.C$Y()
}
}
function fa(o, r) {
1 & o && t.wR5(0, "ss-focus-room-predefined-groups")
}
function _a(o, r) {
1 & o && t.wR5(0, "ss-paginator")
}
function va(o, r) {
if (1 & o && (t.I0R(0, "div", 20)(1, "div", 21),
t.yuY(2, fa, 1, 0, "ss-focus-room-predefined-groups", 1),
t.wR5(3, "ss-focus-room-tile-grid", 22),
t.C$Y(),
t.yuY(4, _a, 1, 0, "ss-paginator", 1),
t.C$Y()),
2 & o) {
const e = t.GaO(3);
t.yG2(2),
t.E7m("ngIf", e.isMobile && e.activePredefinedGroup),
t.yG2(),
t.E7m("participants", e.livekit.room.displayedParticipants)("theme", e.theme),
t.yG2(),
t.E7m("ngIf", e.isMobile)
}
}
function Ca(o, r) {
if (1 & o && (t.I0R(0, "div", 16),
t.wR5(1, "ss-focus-room-actions"),
t.yuY(2, ga, 1, 0, "ss-focus-room-milestones-bar", 17)(3, va, 5, 4, "div", 18),
t.C$Y()),
2 & o) {
const e = t.GaO(2);
t.yG2(2),
t.E7m("ngIf", e.showMilestones && !e.milestonesDismissed && !e.activeGroup && !e.activePredefinedGroup),
t.yG2(),
t.E7m("ngIf", !e.focusPlusActive)
}
}
function ba(o, r) {
if (1 & o && (t.I0R(0, "div", 11)(1, "div", 12),
t.yuY(2, ma, 1, 0, "ss-focus-room-predefined-groups", 1)(3, ha, 1, 1, "ss-focus-room-session-group", 13),
t.C$Y(),
t.yuY(4, Ca, 4, 2, "div", 14),
t.C$Y()),
2 & o) {
const e = t.GaO();
t.yG2(2),
t.E7m("ngIf", !e.isMobile && e.activePredefinedGroup),
t.yG2(),
t.E7m("ngIf", e.activeGroup && !e.activePredefinedGroup && !e.livekit.room.privateGroupMinimized),
t.yG2(),
t.E7m("ngIf", !e.livekit.room.predefinedGroupMaximized && (!e.activeGroup || e.livekit.room.privateGroupMinimized))
}
}
function ka(o, r) {
1 & o && t.wR5(0, "ss-participant-list")
}
function Pa(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-channel", 23),
t.qCj("closeRoomChatClicked", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.closeRoomChat())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("roomChannelId", e.livekit.room.channelId)
}
}
function ya(o, r) {
if (1 & o && t.wR5(0, "ss-participant-highlight", 24),
2 & o) {
const e = t.GaO();
t.E7m("highlightedParticipant", e.highlightedParticipant)
}
}
function Oa(o, r) {
if (1 & o && t.wR5(0, "ss-participant-mobile-menu", 25),
2 & o) {
const e = t.GaO();
t.E7m("participant", e.participantInfoMobile)
}
}
function Ma(o, r) {
1 & o && t.wR5(0, "ss-focus-room-audio")
}
function wa(o, r) {
1 & o && t.wR5(0, "ss-focus-room-group-session-audio")
}
function Sa(o, r) {
1 & o && t.wR5(0, "ss-focus-plus")
}
function xa(o, r) {
1 & o && t.wR5(0, "ss-focus-room-onboarding")
}
function Ia(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 26),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.livekit.room.videoPillButtonExpanded.next(!1))
}),
t.C$Y()
}
}
const Ta = (o, r) => ({
x: o,
y: r
});
function Ga(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-self-view-video", 27),
t.qCj("cdkDragStarted", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.selfViewVideo.draggingInProgress = !0)
})("cdkDragEnded", function(i) {
t.usT(e);
const s = t.GaO();
return t.CGJ(s.setDraggingSelfViewVideoOff(i))
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("cdkDragFreeDragPosition", t.IBC(3, Ta, e.selfViewVideo.coordinates.x, e.selfViewVideo.coordinates.y))("cdkDragBoundary", e.selfViewVideo.boundaryElement)("draggingSelfViewVideo", e.selfViewVideo.draggingInProgress)
}
}
function Ra(o, r) {
if (1 & o && t.wR5(0, "ss-focus-room-time-limit", 28),
2 & o) {
const e = t.GaO();
t.E7m("secondsLeft", e.secondsLeftBeforeRoomEnd)
}
}
function Ea(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 29)(1, "div"),
t.wR5(2, "ss-icon", 30),
t.OEk(3),
t.C$Y(),
t.I0R(4, "ss-icon", 31),
t.qCj("click", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.livekit.room.showParticipantBreakdownOnLastPage = !1)
}),
t.C$Y()()
}
if (2 & o) {
const e = t.GaO();
t.yG2(2),
t.E7m("iconVariant", 24)("size", 24),
t.yG2(),
t.oRS(" ", e.getParticipantBreakdownPopupText(), " "),
t.yG2(),
t.E7m("iconVariant", 24)("size", 24)
}
}
let Ua = ( () => {
class o {
get localParticipant() {
return this.livekit.room.localParticipant
}
get performedFirstConnect() {
return this.livekit.room.performedFirstConnect
}
get showMilestones() {
return !this.localParticipant.anonymous && this.livekit.room.milestonesFetched && !this.livekit.room.milestonesCompletedInitially
}
get canPublishAudio() {
return this.livekit.room.canPublishAudio
}
get allowOnlyGroupAudio() {
return this.livekit.room.allowOnlyGroupAudio
}
get isModerator() {
return !!this.livekit.room.localParticipant.userInfo?.isModerator
}
get focusPlusActive() {
return !!this.livekit.room?.focusPlus.active
}
get participantListVisible() {
return this.livekit.room.participantListVisibility
}
get roomChatVisibility() {
return this.livekit.room.roomChatVisibility
}
get focusRoomOnboardingShown() {
return !!this.livekit.room?.focusRoomOnboardingShown
}
get allOtherParticipantsCount() {
return this.livekit.room.allParticipants.filter(e => e.identity && (e.anonymous || !e.isCameraEnabled)).length
}
get anonymousParticipantCount() {
return this.livekit.room.allParticipants.filter(e => e.anonymous).length
}
get showFocusRoomTimeLimit() {
return this.secondsLeftBeforeRoomEnd > 0 && this.secondsLeftBeforeRoomEnd <= 60 * f.tA
}
onWindowFocus() {
if (this.livekit.room.state === l.Ej.Disconnected)
return void this.disconnectFromRoom(_.YQ.Disconnected);
const e = Array.from(this.livekit.room.remoteParticipants.values());
for (const n of e)
this.livekit.room.allParticipants.some(s => s.identity === n.identity) || this.onRemoteParticipantConnected(n)
}
handleTouchStart(e) {
const n = e.touches[0] || e.changedTouches[0];
this.defaultTouch.x = n.pageX,
this.defaultTouch.y = n.pageY,
this.defaultTouch.time = e.timeStamp
}
handleTouch(e) {
const i = (e.touches[0] || e.changedTouches[0]).pageX - this.defaultTouch.x;
e.timeStamp - this.defaultTouch.time < 500 && Math.abs(i) > 60 && (i > 0 ? this.livekit.room.paginator.previous() : this.livekit.room.paginator.next())
}
constructor(e, n, i, s, a, d, m, v, P, U, A, $, j, Q, ht, gt, ft, _t, oc) {
this.livekit = e,
this.utilityService = n,
this.focusRoomService = i,
this.sidebarService = s,
this.accountService = a,
this.signalRService = d,
this.themeService = m,
this.analyticsService = v,
this.router = P,
this.activatedRoute = U,
this.dialog = A,
this.toastService = $,
this.keyboardService = j,
this.chatService = Q,
this.encouragementService = ht,
this.accountModalsService = gt,
this.badgeService = ft,
this.subscriptionService = _t,
this.settingsService = oc,
this.disconnected = new t._w7,
this.timeLimitReached = new t._w7,
this.activeGroup = null,
this.activePredefinedGroup = null,
this.milestonesDismissed = !1,
this.highlightedParticipant = null,
this.participantInfoMobile = null,
this.privateSpaceIdToAttemptJoining = null,
this.identityToAttemptToHighlight = null,
this.defaultTouch = {
x: 0,
y: 0,
time: 0
},
this.roomChatVisible = !1,
this.videoPillButtonExpanded = !1,
this.selfViewVideo = {
coordinates: {},
savedCoordinates: null,
draggingInProgress: !1,
boundaryElement: document.querySelector("ss-dashboard")
},
this.currentUser = this.accountService.currentUser,
this.lastConnectionState = null,
this.joiningPrivatePod = !1,
this.checkedForBadgesOneMoreTime = !1,
this.subscriptions = [],
this.onConnectionStateChanged = this.onConnectionStateChanged.bind(this),
this.onRemoteParticipantConnected = this.onRemoteParticipantConnected.bind(this),
this.onRemoteParticipantDisconnected = this.onRemoteParticipantDisconnected.bind(this),
this.onActiveSpeakersChanged = this.onActiveSpeakersChanged.bind(this),
this.onMetadataChanged = this.onMetadataChanged.bind(this),
this.onDisconnected = this.onDisconnected.bind(this),
this.onLocalTrackPublished = this.onLocalTrackPublished.bind(this),
this.onRemoteTrackPublished = this.onRemoteTrackPublished.bind(this),
this.onTrackMuted = this.onTrackMuted.bind(this),
this.onTrackUnmuted = this.onTrackUnmuted.bind(this)
}
ngOnInit() {
var e = this;
this.activatedRoute.queryParams.subscribe(n => {
n.privateSpaceId ? (this.privateSpaceIdToAttemptJoining = n.privateSpaceId,
this.router.navigate([], {
queryParams: {
privateSpaceId: null,
roomName: null
},
queryParamsHandling: "merge"
})) : n.highlight && (this.identityToAttemptToHighlight = n.highlight,
this.router.navigate([], {
queryParams: {
highlight: null
},
queryParamsHandling: "merge"
}))
}
),
this.livekit.room.settings.tilesPerPage = this.livekit.room.settings.tilesPerPage > 12 ? 12 : this.livekit.room.settings.tilesPerPage,
this.livekit.room.paginator.tilesPerPage = this.livekit.room.settings.tilesPerPage,
this.livekit.room.on(l.OO.ConnectionStateChanged, this.onConnectionStateChanged).on(l.OO.ParticipantConnected, this.onRemoteParticipantConnected).on(l.OO.ParticipantDisconnected, this.onRemoteParticipantDisconnected).on(l.OO.ActiveSpeakersChanged, this.onActiveSpeakersChanged).on(l.OO.Disconnected, this.onDisconnected).on(l.OO.ParticipantMetadataChanged, this.onMetadataChanged).on(l.OO.LocalTrackPublished, this.onLocalTrackPublished).on(l.OO.TrackPublished, this.onRemoteTrackPublished).on(l.Cu.TrackMuted, this.onTrackMuted).on(l.Cu.TrackUnmuted, this.onTrackUnmuted),
this.livekit.room.connect(this.livekit.room.webSocketBaseUrl, this.token, {
autoSubscribe: !1
}).then((0,
S.c)(function*() {
return yield e.onRoomConnected()
}))
}
ngOnDestroy() {
this.livekit.room.off(l.OO.ConnectionStateChanged, this.onConnectionStateChanged).off(l.OO.ParticipantConnected, this.onRemoteParticipantConnected).off(l.OO.ParticipantDisconnected, this.onRemoteParticipantDisconnected).off(l.OO.ActiveSpeakersChanged, this.onActiveSpeakersChanged).off(l.OO.Disconnected, this.onDisconnected).off(l.OO.ParticipantMetadataChanged, this.onMetadataChanged).off(l.OO.LocalTrackPublished, this.onLocalTrackPublished).off(l.OO.TrackPublished, this.onRemoteTrackPublished).off(l.Cu.TrackMuted, this.onTrackMuted).off(l.Cu.TrackUnmuted, this.onTrackUnmuted),
this.livekit.room.disconnect(),
this.subscriptions.forEach(e => e.unsubscribe()),
this.checkStreakTimerSubscription?.unsubscribe(),
this.checkTimeLimitTimerSubscription?.unsubscribe(),
this.metadataSentCheckSubscription?.unsubscribe(),
window.clearTimeout(this.hideHighlightTimeoutRef),
this.toastService.hideFocusRoomSessionGroupInvites()
}
getSubscribedParticipantsCount() {
return Array.from(this.livekit.room.remoteParticipants.values()).flatMap(e => e.getTrackPublications().map(n => n.subscriptionStatus)).filter(e => e === l.qk.SubscriptionStatus.Subscribed).length
}
closeRoomChat() {
this.livekit.room.roomChatVisibility = !1
}
onChannelLeft(e) {
e.channelId === this.livekit.room.channelId && (this.roomChatVisible = !1)
}
setDraggingSelfViewVideoOff(e) {
this.selfViewVideo.savedCoordinates = e.source.getFreeDragPosition(),
setTimeout( () => this.selfViewVideo.draggingInProgress = !1)
}
getParticipantBreakdownPopupText() {
return `There ${1 !== this.allOtherParticipantsCount ? "are" : "is"} ${this.allOtherParticipantsCount}\n other${1 !== this.allOtherParticipantsCount ? "s" : ""} ${1 === this.allOtherParticipantsCount ? "user" : ""} online (${this.allOtherParticipantsCount - this.anonymousParticipantCount} with video off${this.anonymousParticipantCount > 0 ? ` and ${this.anonymousParticipantCount} viewer${1 !== this.anonymousParticipantCount ? "s" : ""})` : ")"}`
}
setCheckStreakTimer() {
if (!this.accountService.authenticated())
return;
const n = 1830 - this.accountService.currentUser.timeInfo.totalFocusRoomSecondsToday;
if (n <= 0)
return;
const i = M.CS.utc().plus({
minutes: this.currentUser.timezoneUtcOffset
});
this.timeOfStreakAchievement = i.plus({
seconds: n
}),
this.timeOfStreakAchievement.startOf("day") > i.startOf("day") && (this.timeOfStreakAchievement = i.startOf("day").plus({
days: 1
}).plus({
seconds: 1830
})),
this.checkStreakTimerSubscription = (0,
w.k)(0, 1e4).subscribe( () => this.checkForNewBadges())
}
setCheckTimeLimitTimer() {
this.checkTimeLimitTimerSubscription?.unsubscribe(),
60 * this.subscriptionService.getFocusRoomTimeLimitInMinutes() != 0 && (this.checkTimeLimitTimerSubscription = (0,
w.k)(0, 1e4).subscribe( () => this.checkTimeLimit()))
}
checkTimeLimit() {
const e = M.CS.utc().plus({
minutes: this.currentUser.timezoneUtcOffset
});
let n = 0
, i = !1;
this.livekit.lastTimeLimitTimerRunDate && (n = e.diff(this.livekit.lastTimeLimitTimerRunDate, "second").seconds,
i = e.startOf("day") > this.livekit.lastTimeLimitTimerRunDate.startOf("day")),
this.livekit.lastTimeLimitTimerRunDate = e,
this.secondsLeftBeforeRoomEnd = this.accountService.authenticated() ? this.checkTimeLimitForAuthenticatedUser(e, n, i) : this.checkTimeLimitForUnauthenticatedUser(e, n, i),
e >= e.plus({
seconds: this.secondsLeftBeforeRoomEnd
}) && this.disconnectUserDueToTimeLimitReached()
}
checkTimeLimitForAuthenticatedUser(e, n, i) {
const s = this.accountService.currentUser;
let a = 0
, d = this.subscriptionService.dailyFocusRoomSecondsLeft;
if (i ? (s.timeInfo.purchasedSecondsSpentToday = 0,
d = this.subscriptionService.dailyFocusRoomSecondsLeft,
s.timeInfo.totalFocusRoomSecondsToday = e.startOf("day").diff(e, "second").seconds) : s.timeInfo.totalFocusRoomSecondsToday += n,
a = this.subscriptionService.dailyFocusRoomSecondsLeft + (s.timeInfo.purchasedFocusRoomSecondsLeft ?? 0),
null != s.timeInfo.purchasedFocusRoomSecondsLeft && a <= s.timeInfo.purchasedFocusRoomSecondsLeft) {
const m = d > 0 && d < n ? n - d : n;
s.timeInfo.purchasedFocusRoomSecondsLeft -= m,
s.timeInfo.purchasedSecondsSpentToday += m
}
return a = this.subscriptionService.dailyFocusRoomSecondsLeft + (s.timeInfo.purchasedFocusRoomSecondsLeft ?? 0),
a
}
checkTimeLimitForUnauthenticatedUser(e, n, i) {
i ? this.livekit.room.totalFocusRoomSecondsTodayAnonymous = e.startOf("day").diff(e, "second").seconds : this.livekit.room.totalFocusRoomSecondsTodayAnonymous += n;
const d = +(60 * this.subscriptionService.getFocusRoomTimeLimitInMinutes() - this.livekit.room.totalFocusRoomSecondsTodayAnonymous).toFixed(1);
return Math.max(d, 0)
}
disconnectUserDueToTimeLimitReached() {
const e = this.accountService.isFullyVerifiedUser() ? "FocusRoomTimeLimitReached" : "FocusRoomTimeLimitReachedAnonymous";
this.toastService.info({
exceptionDetail: {
errorCode: e
}
}),
this.secondsLeftBeforeRoomEnd = 0,
this.timeLimitReached.emit(),
this.checkTimeLimitTimerSubscription?.unsubscribe()
}
restoreLostPin(e) {
if (this.livekit.room.pinnedParticipants.some(d => d.identity === e))
return;
const i = this.livekit.room.allParticipants.find(d => d.identity === e);
i && this.livekit.room.pin({
participant: i,
reinstating: !0,
onSuccess: () => {
i.reinstatedPin = !0
}
,
onErrorOverride: d => {}
})
}
pinForPin(e) {
if (this.livekit.room.pinnedParticipants.some(s => s.identity === e))
return;
const i = this.livekit.room.allParticipants.find(s => s.identity === e);
i && this.livekit.room.pin({
participant: i,
pinForPin: !0
})
}
pinForPinUnpin(e) {
this.livekit.room.pinnedParticipants.some(i => i.identity === e) && this.livekit.room.unpin({
pinnedUserId: e,
systemAction: !0
})
}
onRoomConnected() {
var e = this;
return (0,
S.c)(function*() {
e.subscribeToEventsAndTimers(),
(yield e.livekit.room.getSid()) || e.analyticsService.markActivity(u.kP.LivekitEmptySidOnRoomConnected),
e.accountService.currentUser.type === x.sD.Professional && !e.settingsService.isB2BApp() && e.accountService.currentUser.dateCreated > f.k9 && e.livekit.room.filter.selectedUserTypes.push(x.sD.Professional);
const i = Array.from(e.livekit.room.remoteParticipants.values());
for (const m of i)
e.onRemoteParticipantConnected(m);
const a = JSON.parse(e.livekit.room.localParticipant.metadata || "{}");
a.anonymous ? e.processAnonymousLocalParticipantJoining() : e.processLocalParticipantJoining(a.isPredefinedModerator),
e.livekit.room.performedFirstConnect = !0,
e.livekit.participantsLoaded.next(),
e.livekit.room.sortAndAssignDisplayedParticipants(),
e.livekit.recalculateGrid.next(),
setTimeout( () => {
e.privateSpaceIdToAttemptJoining ? e.attemptJoiningPrivatePod(e.privateSpaceIdToAttemptJoining) : e.identityToAttemptToHighlight && e.livekit.room.attemptHighlightingParticipant(e.identityToAttemptToHighlight),
e.livekit.recalculateGrid.next(),
e.livekit.room.setupSpotifyPolling()
}
, 2e3);
const d = () => e.livekit.room.finishedInitialBulkPinOperations = !0;
e.accountService.isFullyVerifiedUser() ? e.livekit.room.roomSettings?.autoPinFavoritesOnJoin && e.subscriptionService.hasPremiumFeatures ? e.livekit.room.pinFavoriteUsers( () => {
d(),
e.livekit.room.pinUponJoin()
}
, !0) : e.utilityService.userIdsToPin.length > 0 ? e.livekit.room.pinUponJoin(d) : d() : d()
})()
}
processLocalParticipantJoining(e) {
var n = this;
return (0,
S.c)(function*() {
const i = n.livekit.room.localParticipant;
i.isHandRaised = !1,
i.handRaiseTimestamp = null,
i.anonymous = !1,
i.focusRoomGroup = null,
i.showSpotifyNowPlaying = n.currentUser.includePremiumFeatures && n.settingsService.settings.spotifyEnabled && !!n.livekit.room.roomSettings?.enableSpotifyNowPlaying,
i.hd = n.currentUser.hd,
i.isPredefinedModerator = e,
i.favorited = n.livekit.room.favoriteUsers.some(d => d.favoriteUserId === n.currentUser.id),
i.userInfo = {
id: n.currentUser.id,
firstName: n.currentUser.firstName,
fullName: n.currentUser.fullName,
avatarColor: n.currentUser.avatarColor,
avatarUrl: n.currentUser.avatarUrl,
avatarThumbUrl: n.currentUser.avatarThumbUrl,
initials: n.currentUser.initials,
displayName: n.currentUser.displayName,
userBadge: n.currentUser.userBadge,
areaOfStudyName: n.currentUser.areaOfStudyName,
lastActive: n.currentUser.lastActive,
pinForPinEnabled: n.livekit.room.roomSettings?.pinForPinEnabled,
isModerator: n.utilityService.parseJwt(n.token).video.roomAdmin
};
const s = n.livekit.room.usersInfo.find(d => d.userId == i.identity);
i.pinnedCount = s?.pinCount ?? 0,
i.reportCount = s?.unresolvedRecentReportsCount ?? 0;
const a = n.livekit.room.userActiveStatus;
a && (i.status = a),
void 0 === n.livekit.room.settings.selfViewVideoEnabled && (n.livekit.room.settings.selfViewVideoEnabled = !0),
n.livekit.room.localParticipant.setCameraEnabled(!1),
n.handleFocusRoomEntranceFlow(),
n.livekit.room.localParticipant = i,
n.livekit.room.allParticipants.push(n.livekit.room.localParticipant),
n.livekit.updateMetadata(n.livekit.room.name, n.livekit.room.settings.zoomToFit).subscribe(),
n.scheduleMetadataSentCheck(),
n.livekit.room.localParticipant.setMicrophoneEnabled(!1),
n.livekit.room.sortAndAssignDisplayedParticipants(),
n.livekit.recalculateGrid.next(),
n.sidebarService.setSidebarState(!1)
})()
}
processAnonymousLocalParticipantJoining() {
const e = this.livekit.room.localParticipant;
e.isHandRaised = !1,
e.handRaiseTimestamp = null,
e.anonymous = !0,
e.isPredefinedModerator = !1,
e.showSpotifyNowPlaying = !1,
e.hd = !1,
e.userInfo = {
id: this.accountService.authenticated() ? this.currentUser.id : this.accountService.getAnonymousUserIdAndEnsureCreated(),
isModerator: !1
},
e.pinnedCount = 0,
e.reportCount = 0,
this.livekit.room.localParticipant = e,
this.livekit.room.allParticipants.push(this.livekit.room.localParticipant),
this.sidebarService.setSidebarState(!1)
}
onRemoteParticipantConnected(e) {
const n = e;
e.metadata ? this.mapParticipantMetadata(n, e.metadata) : n.userInfo = {},
n.anonymous ? this.processAnonymousRemoteParticipantJoining(n) : this.processRemoteParticipantJoining(n)
}
processRemoteParticipantJoining(e) {
if (e.audioTrackPublications.forEach(i => {
i.setSubscribed(!1)
}
),
this.livekit.room.blockedUserIds.includes(e.identity))
return void (this.livekit.room.blockedParticipants.some(i => i.identity === e.identity) || this.livekit.room.blockedParticipants.push(e));
if (this.livekit.room.allParticipants.some(i => i.identity === e.identity))
return;
const n = this.livekit.room.usersInfo.find(i => i.userId == e.identity);
e.pinnedCount = n?.pinCount ?? 0,
e.reportCount = n?.unresolvedRecentReportsCount ?? 0,
e.handRaiseTimestamp = n?.handRaiseTimestamp ?? null,
e.isHandRaised = !!e.handRaiseTimestamp,
e.status = n?.status || null,
e.selectedTask = n?.selectedTask || null,
e.focusRoomGroup = n?.focusRoomGroup || null,
e.favorited = this.livekit.room.favoriteUsers.some(i => i.favoriteUserId === e.identity),
e.showSpotifyNowPlaying = !!n?.showSpotifyNowPlaying,
e.hd = !!n?.hd,
this.livekit.room.allParticipants.push(e),
!e.isCameraEnabled && this.livekit.room.anyFiltersSelected && this.livekit.room.displayedParticipants.some(i => i.identity === e.identity) && this.livekit.recalculateGrid.next(),
this.livekit.room.roomSettings?.autoPinFavoritesOnJoin && this.subscriptionService.hasPremiumFeatures && e.favorited && (!this.livekit.room.pinningUserIds || !this.livekit.room.pinningUserIds.includes(e.identity)) && this.livekit.room.finishedInitialBulkPinOperations && (this.livekit.room.pinnedParticipants.length < this.livekit.room.pinValidationInfo.pinLimit ? this.livekit.room.pin({
participant: e,
autoPinFavorite: !0
}) : this.shouldUnpinAndPinNew(e))
}
shouldUnpinAndPinNew(e) {
let n = -1;
for (let i = this.livekit.room.pinnedParticipants.length - 1; i >= 0; i--)
if (!this.livekit.room.pinnedParticipants[i].favorited && this.livekit.room.pinnedParticipants[i].autoPin) {
n = i;
break
}
-1 !== n && this.livekit.room.unpin({
pinnedUserId: this.livekit.room.pinnedParticipants[n].identity,
systemAction: !0,
shouldCallApi: !0,
pinParticipantAfterUnpin: e
})
}
processAnonymousRemoteParticipantJoining(e) {
this.livekit.room.allParticipants.some(n => n.identity === e.identity) || (e.pinnedCount = 0,
e.reportCount = 0,
e.handRaiseTimestamp = null,
e.isHandRaised = !1,
e.status = null,
e.favorited = !1,
this.livekit.room.allParticipants.push(e))
}
onRemoteParticipantDisconnected(e) {
e.audioTrackPublications.forEach(i => {
i.setSubscribed(!1)
}
);
const n = this.livekit.room.allParticipants.find(i => i.identity === e.identity);
n && (this.livekit.room.allParticipants.splice(this.livekit.room.allParticipants.indexOf(n), 1),
this.livekit.room.localParticipant.anonymous || this.livekit.room.unpin({
pinnedUserId: n.identity,
logLocation: "[Disconnect] unpin() called from onRemoteParticipantDisconnected",
systemAction: !0
}),
this.activePredefinedGroup?.members.some(i => i.id === n.identity) && this.livekit.room.resetActivePredefinedGroupParticipants()),
this.livekit.room.displayedParticipants.some(i => i.identity === e.identity) && (this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next()),
this.livekit.room.updateFocusPlusParticipants()
}
onMetadataChanged(e, n) {
if (!n.metadata)
return;
const i = this.livekit.room.allParticipants.find(s => s.identity === n.identity);
i && this.mapParticipantMetadata(i, n.metadata)
}
onActiveSpeakersChanged(e) {
this.livekit.room.speakingParticipants = e
}
onDisconnected() {
this.disconnectFromRoom(_.YQ.RoomEnded)
}
disconnectFromRoom(e, n=!0) {
this.disconnected.emit({
reason: e,
shouldUnpinAll: n
})
}
mapParticipantMetadata(e, n) {
const i = {
identity: e.identity,
previousUserInfo: e.userInfo
}
, s = JSON.parse(n);
e.userInfo = {
...s.userInfo
},
e.metadataUpdatedOnce = !0,
e.anonymous = !!s.anonymous,
e.zoomToFit = !!s.zoomToFit,
i.currentUserInfo = e.userInfo,
this.livekit.participantMetadataUpdated.next(i)
}
handleFocusRoomEntranceFlow() {
this.currentUser.activeExperiments.some(n => n === y.Eb.NewFocusRoomEntryFlow) && this.livekit.room.milestones.dateFirstJoined && this.livekit.room.milestones.dateFirstJoined > M.CS.utc().minus({
minutes: 5
}).toISO() && this.livekit.room.allParticipants.length >= T.O.minParticipantsNeededForFocusRoomOnboarding ? this.livekit.room.focusRoomOnboardingShown = !0 : this.livekit.room.storeLivekitSettings()
}
forceTurnOffCamera(e) {
this.livekit.room.roomName === e && (this.livekit.room.localParticipant.setCameraEnabled(!1),
this.livekit.room.greetingMode.deactivate(!0),
this.analyticsService.markActivity(u.kP.LivekitGreetingModeDisabledDueToCameraOff),
this.livekit.endVideoSession(e).subscribe())
}
forceTurnOffAudio(e) {
this.livekit.room.roomName === e && this.livekit.room.localParticipant.setMicrophoneEnabled(!1)
}
onRoomSessionGroupMatched(e) {
this.livekit.room.activeGroup.next({
id: e.groupId,
members: e.members
}),
this.livekit.room.groupMatch.stopTimer(),
this.livekit.room.groupMatch.waiting = !1
}
onHighlightShown(e) {
window.clearTimeout(this.hideHighlightTimeoutRef);
const n = this.livekit.room.allParticipants.find(i => i.identity === e.id);
n ? (e.participant = n,
this.highlightedParticipant = e) : this.highlightedParticipant = null
}
onHighlightHidden() {
this.hideHighlightTimeoutRef = window.setTimeout( () => {
this.highlightedParticipant = null
}
, 100)
}
onRoomSessionGroupUserInvited(e) {
const n = localStorage.getItem(f.io);
if (!(n && M.CS.utc() < M.CS.fromISO(n))) {
if (e.inviteMessage) {
const i = this.livekit.room.allParticipants.find(s => s.identity === e.userInvitingInfo.id);
if (!i)
return;
return this.utilityService.groupInviteParticipantActive ? void this.toastService.groupInvitesQueue.push(e) : void this.toastService.showFocusRoomSingleInvite(e, i, () => {
this.attemptJoiningPrivatePod(e.groupId),
this.toastService.checkForOtherSingleInvitesInQueue(),
this.analyticsService.markActivity(u.kP.LivekitPrivatePodSingleInvitationAccepted)
}
, () => {
this.analyticsService.markActivity(u.kP.LivekitPrivatePodSingleInvitationDecline),
this.toastService.checkForOtherSingleInvitesInQueue()
}
, () => {
this.muteInviteToastsFor24h(),
this.toastService.info({
message: "You have muted all invites for 24h"
}),
this.analyticsService.markActivity(u.kP.LivekitPrivatePodSingleInvitationMuted)
}
)
}
this.toastService.showFocusRoomSessionGroupInvite(e, () => this.attemptJoiningPrivatePod(e.groupId), () => this.analyticsService.markActivity(u.kP.LivekitPrivatePodInvitationDecline))
}
}
muteInviteToastsFor24h() {
const e = M.CS.utc().plus({
days: 1
});
localStorage.setItem(f.io, e.toString())
}
attemptJoiningPrivatePod(e, n=null) {
this.joiningPrivatePod || (this.joiningPrivatePod = !0,
this.handleLeavingActiveGroups( () => {
this.joinRoomSessionGroup(e, n),
this.privateSpaceIdToAttemptJoining = null
}
))
}
onPartialPinMatch(e) {
const n = e.filter(i => i !== this.currentUser.id);
for (const i of n) {
const s = this.livekit.room.allParticipants.find(a => a.identity === i);
if (!s || this.livekit.room.roomSettings?.disableMutualPinNotification)
return;
this.toastService.showMutualPinNotification(s, () => this.livekit.showOptionsModal(g.Y.PinSettings), () => this.messageUser(s.identity))
}
}
handleLeavingActiveGroups(e) {
null !== this.activeGroup || null !== this.activePredefinedGroup ? this.activeGroup ? this.leaveActiveGroups(this.activeGroup.predefinedGroupId ? () => {
this.livekit.room.predefinedGroupMaximized = !1,
this.livekit.room.predefinedGroupInstances = [],
this.livekit.room.activeGroup.next(null),
this.livekit.room.activePredefinedGroup.next(null),
e()
}
: () => {
this.livekit.room.activeGroup.next(null),
e()
}
) : this.activePredefinedGroup && (this.livekit.room.predefinedGroupMaximized = !1,
this.livekit.room.predefinedGroupInstances = [],
this.livekit.unsubscribeFromSignalRPredefinedGroupUpdates(this.livekit.room.name, this.activePredefinedGroup.id).subscribe(),
this.livekit.room.activePredefinedGroup.next(null),
e()) : e()
}
joinRoomSessionGroup(e, n) {
this.analyticsService.markActivity(u.kP.LivekitPrivateInvitationJoinClick),
this.livekit.joinPrivateGroup(this.livekit.room.name, e).subscribe({
next: () => {
n?.onCloseButtonClick(),
this.livekit.room.privateGroupMinimized = !1,
this.joiningPrivatePod = !1
}
,
error: i => {
"LivekitRoomMaxSamePeerSessionsReached" !== i[0].errorCode ? this.handleErrors(i) : this.toastService.info({
exceptionDetail: i[0]
})
}
})
}
leaveActiveGroups(e) {
this.activeGroup && this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Are you sure?",
description: this.activeGroup.predefinedGroupId ? "LeavePublicGroupToJoinPrivatePod" : "LeavePrivatePod",
confirmButtonLabel: "Leave & Join"
}
}).afterClosed().subscribe(i => {
i && this.livekit.leaveActiveGroups(this.livekit.room.name, !0).subscribe({
next: () => e(),
error: s => this.handleErrors(s)
})
}
)
}
onRoomSessionGroupUserJoined(e) {
const n = !!e.predefinedGroupId;
e.members.some(s => s.id === this.currentUser.id) && this.livekit.room.activeGroup.next(e),
n && this.activePredefinedGroup?.id === e.id && this.livekit.room.activePredefinedGroup.next(e)
}
onRoomSessionGroupUserLeft(e) {
const n = !!e.predefinedGroupId
, i = null !== this.activeGroup && e.members.some(s => s.id === this.currentUser.id);
this.livekit.room.activeGroup.next(i ? e : null),
n && this.activePredefinedGroup?.id === e.id && this.livekit.room.activePredefinedGroup.next(e)
}
onRoomSessionGroupUserBanned(e) {
this.activeGroup?.id === e.groupId && (this.toastService.info({
message: "You have been removed from this space."
}),
this.livekit.room.activeGroup.next(null))
}
onRoomSessionGroupEnded(e) {
this.activeGroup && this.activeGroup?.id === e.groupId && (this.activeGroup.createdByUserId === this.accountService.currentUser.id || this.toastService.info({
autoClose: !1,
exceptionDetail: {
errorCode: "LivekitRoomSessionGroupEnded"
}
}),
this.livekit.room.activeGroup.next(null))
}
onConnectionStateChanged(e) {
this.lastConnectionState === l.Ej.Connected && e === l.Ej.Reconnecting ? this.analyticsService.markActivity(u.kP.LivekitReconnecting, this.getUserInfoForAnalytics()) : this.lastConnectionState === l.Ej.Reconnecting && e === l.Ej.Connected && (this.analyticsService.markActivity(u.kP.LivekitReconnected, this.getUserInfoForAnalytics()),
this.ensureActiveGroupReconnects(),
this.livekit.room.roomName && this.livekit.getFocusRoomUserInfo(this.livekit.room.roomName).subscribe({
next: n => this.livekit.room.handleUserInfoUpdate(n)
})),
this.lastConnectionState = e
}
ensureActiveGroupReconnects() {
!this.activeGroup || this.activeGroup.createdByUserId !== this.accountService.currentUser.id || null === this.activeGroup.name || this.livekit.createFocusRoomSessionGroup(this.livekit.room.name, [], void 0, this.activeGroup.name, !0).subscribe({
next: e => {
this.livekit.room.activeGroup.next(e),
this.livekit.room.privateGroupMinimized = !1
}
,
error: e => this.handleErrors(e)
})
}
scheduleMetadataSentCheck() {
this.metadataSentCheckSubscription = (0,
w.k)(1e4, 2e4).pipe((0,
_n.U)(5)).subscribe( () => {
if (this.localParticipant.metadataUpdatedOnce)
return this.metadataSentCheckSubscription.unsubscribe(),
void console.log("[scheduleMetadataSentCheck] - not checking anymore, metadata set");
this.livekit.updateMetadata(this.livekit.room.name, this.livekit.room.settings.zoomToFit).subscribe(),
console.log("[scheduleMetadataSentCheck] - just set the metadata from the fallback")
}
)
}
getUserInfoForAnalytics() {
return {
roomName: this.livekit.room.name,
numberOfTilesPerPage: this.livekit.room.settings.tilesPerPage,
encouragementsCount: this.encouragementService.encouragementsReceived.length,
pinnedUsersCount: this.livekit.room.pinnedParticipants.length,
pinnedByOthersCount: this.livekit.room.localParticipant.pinnedCount
}
}
messageUser(e) {
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.analyticsService.markActivity(u.kP.LivekitPrivateInvitationMessageClick),
this.chatService.checkIfChatExists(e).subscribe({
next: () => {
this.chatService.startChat({
otherUserIds: [e]
}).subscribe({
next: i => this.navigateToChat(i.id),
error: i => {
i.length && "ChatAlreadyExists" === i[0].errorCode ? this.navigateToChat(i[0].params.chatId) : this.handleErrors(i)
}
})
}
,
error: n => {
n.length && "ChatDoesNotExist" === n[0].errorCode ? this.isMobile ? window.open(`${T.O.appUrl}/conversations/chats/create?userId=${e}`, "_blank") : this.utilityService.requestChatNavigation.next(e) : this.handleErrors(n)
}
}))
}
navigateToChat(e) {
this.isMobile ? window.open(`${T.O.appUrl}/conversations/chats/${e}`, "_blank") : this.utilityService.openDmTrayChat.next(e)
}
handleShortcutHit(e) {
this.isModerator && e.shortcut === Kt.y.ToggleLivekitRoomSortFreeze && (this.livekit.room.freezeSort = !this.livekit.room.freezeSort,
this.livekit.room.freezeSort || this.livekit.room.sortAndAssignDisplayedParticipants())
}
onLocalTrackPublished(e, n) {
e.kind === l.oh.Kind.Video && this.showSelfViewAndAssignParticipants()
}
showSelfViewAndAssignParticipants() {
this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next(),
this.selfViewVideo.savedCoordinates && this.selfViewVideo.savedCoordinates.x <= window.innerWidth / 2 - 200 && this.selfViewVideo.savedCoordinates.y <= window.innerHeight - 249 ? this.selfViewVideo.coordinates = this.selfViewVideo.savedCoordinates : (this.selfViewVideo.coordinates.x = window.innerWidth / 2 - 216,
this.selfViewVideo.coordinates.y = window.innerHeight - 265)
}
onRemoteTrackPublished(e, n) {
e.kind === l.oh.Kind.Video ? (this.livekit.room.isPinned(n.identity) && this.livekit.room.sortPinnedParticipants(),
this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next()) : e.kind === l.oh.Kind.Audio && this.unsubscribeFromAudioIfNeeded(n)
}
onTrackMuted(e, n) {
e.kind === l.oh.Kind.Video && (this.livekit.room.isPinned(n.identity) && this.livekit.room.sortPinnedParticipants(),
this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next())
}
onTrackUnmuted(e, n) {
e.kind === l.oh.Kind.Video ? (this.livekit.room.isPinned(n.identity) && this.livekit.room.sortPinnedParticipants(),
n.isLocal ? this.showSelfViewAndAssignParticipants() : (this.livekit.room.assignDisplayedParticipants(),
this.livekit.recalculateGrid.next())) : e.kind === l.oh.Kind.Audio && this.unsubscribeFromAudioIfNeeded(n)
}
unsubscribeFromAudioIfNeeded(e) {
(null === this.activeGroup || !this.activeGroup.members.some(i => i.id === e.identity)) && this.livekit.room.audioUnsubscribe.next(e)
}
sendGridResizeAnalyticsEvent() {
const e = window.innerWidth
, n = window.innerHeight;
this.analyticsService.markActivity(u.kP.LivekitTilesPerPageNumberAndWindowDimensions, {
windowWidth: e,
windowHeight: n,
numberOfTilesPerPage: this.livekit.room.settings.tilesPerPage
})
}
checkForNewBadges() {
M.CS.utc().plus({
minutes: this.currentUser.timezoneUtcOffset
}) <= this.timeOfStreakAchievement || (this.checkStreakTimerSubscription.unsubscribe(),
this.badgeService.checkForNewBadges.next(),
this.checkedForBadgesOneMoreTime || this.subscriptions.push((0,
w.k)(3e4).subscribe( () => {
this.checkedForBadgesOneMoreTime = !0,
this.checkForNewBadges()
}
)))
}
subscribeToEventsAndTimers() {
this.subscriptions.push(this.livekit.participantHighlight.show.subscribe(e => this.onHighlightShown(e)), this.livekit.participantHighlight.hide.subscribe( () => this.onHighlightHidden()), this.livekit.participantInfoMobile.subscribe(e => this.participantInfoMobile = e), this.livekit.room.activeGroup.subscribe(e => this.activeGroup = e), this.livekit.room.activePredefinedGroup.subscribe(e => this.activePredefinedGroup = e), this.livekit.room.videoPillButtonExpanded.subscribe(e => this.videoPillButtonExpanded = e), this.signalRService.userBlocked.subscribe(e => this.livekit.room.onUserBlocked(e)), this.signalRService.userUnblocked.subscribe(e => this.livekit.room.onUserUnblocked(e)), this.signalRService.forceTurnOffCamera.subscribe(e => this.forceTurnOffCamera(e.roomName)), this.signalRService.forceTurnOffAudio.subscribe(e => this.forceTurnOffAudio(e.roomName)), this.signalRService.roomSessionGroupMatched.subscribe(e => this.onRoomSessionGroupMatched(e)), this.signalRService.channelLeft.subscribe(e => this.onChannelLeft(e)), this.signalRService.activeSubscriptionTierUpdated.subscribe( () => this.setCheckTimeLimitTimer()), this.signalRService.purchasedTimeIncreased.subscribe( () => this.setCheckTimeLimitTimer()), this.signalRService.restoreLostPin.subscribe(e => this.restoreLostPin(e)), this.signalRService.pinForPin.subscribe(e => this.pinForPin(e)), this.signalRService.pinForPinUnpin.subscribe(e => this.pinForPinUnpin(e)), this.signalRService.focusRoomTwoWayHide.subscribe(e => this.livekit.room.twoWayHide(e)), this.signalRService.focusRoomTwoWayUnhide.subscribe(e => this.livekit.room.twoWayUnhide(e)), this.signalRService.subscriptionUpdated.subscribe( () => this.setCheckTimeLimitTimer()), this.signalRService.userFavoriteAdded.subscribe(e => this.livekit.room.onUserFavoriteAdded(e)), this.signalRService.userFavoriteUpdated.subscribe(e => this.livekit.room.onUserFavoriteUpdated(e.favoriteUserId, e.newOrder)), this.signalRService.userFavoriteRemoved.subscribe(e => this.livekit.room.onUserFavoriteRemoved(e)), this.themeService.themeChange.subscribe(e => this.theme = e), this.utilityService.isMobile.subscribe(e => this.isMobile = e), this.utilityService.groupInvitesQueuePushed.subscribe(e => this.onRoomSessionGroupUserInvited(e)), this.settingsService.newUsersTimeLimitFromDateUpdated.subscribe( () => this.setCheckTimeLimitTimer()), this.settingsService.activeLivekitServerChanged.subscribe( () => this.disconnectFromRoom(_.YQ.RoomEnded)), this.keyboardService.shortcutHit.subscribe(e => this.handleShortcutHit(e))),
this.sendGridResizeAnalyticsEvent(),
this.setCheckStreakTimer(),
this.setCheckTimeLimitTimer(),
this.livekit.room.allowOnlyGroupAudio && this.subscriptions.push(this.signalRService.roomSessionGroupUserInvited.subscribe(e => this.onRoomSessionGroupUserInvited(e)), this.signalRService.roomSessionGroupUserJoined.subscribe(e => this.onRoomSessionGroupUserJoined(e)), this.signalRService.roomSessionGroupUserLeft.subscribe(e => this.onRoomSessionGroupUserLeft(e)), this.signalRService.roomSessionGroupUserBanned.subscribe(e => this.onRoomSessionGroupUserBanned(e)), this.signalRService.roomSessionGroupEnded.subscribe(e => this.onRoomSessionGroupEnded(e)), this.signalRService.partialPinMatch.subscribe(e => this.onPartialPinMatch(e)))
}
handleErrors(e) {
this.joiningPrivatePod = !1,
"ErrorChattingAgeRestriction" !== e[0].errorCode ? this.toastService.error({
exceptionDetail: e[0]
}) : this.toastService.info({
exceptionDetail: e[0]
})
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(I.UZ),t.GI1(Jt.k),t.GI1(qt.Q),t.GI1(y.uE),t.GI1(kt.f),t.GI1(st.a),t.GI1(u.uc),t.GI1(W.E5),t.GI1(W.gV),t.GI1(p.qW),t.GI1(k.s),t.GI1(Kt.U),t.GI1(Ct.e),t.GI1(vt.a),t.GI1(V.E),t.GI1(Z.A),t.GI1(H.k),t.GI1(L.Y))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-focus-room"]],
hostBindings: function(n, i) {
1 & n && t.qCj("focus", function() {
return i.onWindowFocus()
}, !1, t.MbM)("touchstart", function(a) {
return i.handleTouchStart(a)
})("touchend", function(a) {
return i.handleTouch(a)
})
},
inputs: {
token: "token"
},
outputs: {
disconnected: "disconnected",
timeLimitReached: "timeLimitReached"
},
decls: 15,
vars: 13,
consts: [["class", "room-wrapper", 4, "ngIf"], [4, "ngIf"], ["class", "room-channel", 3, "roomChannelId", "closeRoomChatClicked", 4, "ngIf"], [3, "highlightedParticipant", 4, "ngIf"], [3, "participant", 4, "ngIf"], ["class", "video-pill-overlay", 3, "click", 4, "ngIf"], ["cdkDrag", "", 3, "cdkDragFreeDragPosition", "cdkDragBoundary", "draggingSelfViewVideo", "cdkDragStarted", "cdkDragEnded", 4, "ngIf"], [3, "secondsLeft", 4, "ngIf"], ["class", "notification participants-breakdown-popup", 4, "ngIf"], ["id", "video-source", "autoplay", ""], ["id", "stream-source-canvas"], [1, "room-wrapper"], [1, "left"], [3, "theme", 4, "ngIf"], ["class", "right", 4, "ngIf"], [3, "theme"], [1, "right"], [3, "hide", 4, "ngIf"], ["class", "main-content-wrapper", 4, "ngIf"], [3, "hide"], [1, "main-content-wrapper"], [1, "group-grid-wrapper"], [3, "participants", "theme"], [1, "room-channel", 3, "roomChannelId", "closeRoomChatClicked"], [3, "highlightedParticipant"], [3, "participant"], [1, "video-pill-overlay", 3, "click"], ["cdkDrag", "", 3, "cdkDragFreeDragPosition", "cdkDragBoundary", "draggingSelfViewVideo", "cdkDragStarted", "cdkDragEnded"], [3, "secondsLeft"], [1, "notification", "participants-breakdown-popup"], ["color", "default", "iconName", "info", 3, "iconVariant", "size"], ["iconName", "dismiss", "color", "default", 1, "dismiss-icon", 3, "iconVariant", "size", "click"]],
template: function(n, i) {
1 & n && (t.yuY(0, ba, 5, 3, "div", 0)(1, ka, 1, 0, "ss-participant-list", 1)(2, Pa, 1, 1, "ss-channel", 2)(3, ya, 1, 1, "ss-participant-highlight", 3)(4, Oa, 1, 1, "ss-participant-mobile-menu", 4)(5, Ma, 1, 0, "ss-focus-room-audio", 1)(6, wa, 1, 0, "ss-focus-room-group-session-audio", 1)(7, Sa, 1, 0, "ss-focus-plus", 1)(8, xa, 1, 0, "ss-focus-room-onboarding", 1)(9, Ia, 1, 0, "div", 5)(10, Ga, 1, 6, "ss-self-view-video", 6)(11, Ra, 1, 1, "ss-focus-room-time-limit", 7)(12, Ea, 5, 5, "div", 8),
t.wR5(13, "video", 9)(14, "canvas", 10)),
2 & n && (t.E7m("ngIf", !i.focusRoomOnboardingShown),
t.yG2(),
t.E7m("ngIf", i.localParticipant.identity && i.participantListVisible),
t.yG2(),
t.E7m("ngIf", i.roomChatVisibility),
t.yG2(),
t.E7m("ngIf", i.highlightedParticipant),
t.yG2(),
t.E7m("ngIf", i.participantInfoMobile),
t.yG2(),
t.E7m("ngIf", !i.localParticipant.anonymous && i.performedFirstConnect && i.canPublishAudio && !i.allowOnlyGroupAudio),
t.yG2(),
t.E7m("ngIf", i.activeGroup),
t.yG2(),
t.E7m("ngIf", i.focusPlusActive),
t.yG2(),
t.E7m("ngIf", i.focusRoomOnboardingShown),
t.yG2(),
t.E7m("ngIf", i.videoPillButtonExpanded),
t.yG2(),
t.E7m("ngIf", i.localParticipant.isCameraEnabled && i.livekit.room.settings.selfViewVideoEnabled && i.livekit.room.selfViewVideoVisibility && i.selfViewVideo.boundaryElement && !i.livekit.room.focusPlus.active),
t.yG2(),
t.E7m("ngIf", i.showFocusRoomTimeLimit),
t.yG2(),
t.E7m("ngIf", i.livekit.room.showParticipantBreakdownOnLastPage && i.allOtherParticipantsCount > 0 && !i.livekit.room.anyFiltersSelectedOrSortChanged && !i.livekit.room.focusPlus.active && !i.livekit.room.participantListVisibility && 0 === i.livekit.room.pinnedParticipants.length && (0 === i.livekit.room.paginator.totalPages || i.livekit.room.paginator.currentPage === i.livekit.room.paginator.totalPages)))
},
dependencies: [h.u_, vn.y, C.g, X.w5, Cn._, Wt, Qo, Zs, dr, Zt, Pr, Tr, Gr, Vr, ae, Nr, Qr, da, pa],
styles: ["[_nghost-%COMP%]{display:block;width:100%;height:100vh}.page-content-wrapper[_ngcontent-%COMP%]{height:calc(100vh - 56px)}@media only screen and (max-width: 1024px){.page-content-wrapper[_ngcontent-%COMP%]{height:100%}}.page-content[_ngcontent-%COMP%]{max-width:1340px;width:100%;padding:50px 70px;margin:0 auto}@media only screen and (max-width: 1024px){.page-content[_ngcontent-%COMP%]{padding:0}}[_nghost-%COMP%]{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:flex-start;width:100%;height:100%;background:var(--coloured)}[_nghost-%COMP%] .encouragements-mobile-menu ss-button button{height:auto;padding:0}[_nghost-%COMP%] .button-text[_ngcontent-%COMP%]{text-transform:none}.safari[_nghost-%COMP%], .safari [_nghost-%COMP%]{height:calc(var(--vh) - 56px)}.room-wrapper[_ngcontent-%COMP%]{display:flex}@media only screen and (max-width: 1024px){.room-wrapper[_ngcontent-%COMP%]{flex-direction:column}}@media only screen and (max-width: 1024px){.room-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{display:flex;flex-direction:column-reverse}}@media only screen and (max-height: 480px){.room-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{flex-direction:column}}@media only screen and (max-width: 1024px){.main-content-wrapper[_ngcontent-%COMP%]{height:calc(var(--vh) - 130px);overflow:auto}.main-content-wrapper[_ngcontent-%COMP%] ss-paginator[_ngcontent-%COMP%]{margin:15px auto}}@media only screen and (max-width: 1024px) and (max-height: 480px){.main-content-wrapper[_ngcontent-%COMP%]{height:calc(var(--vh) - 50px)}}.group-grid-wrapper[_ngcontent-%COMP%]{display:flex}@media only screen and (max-width: 1024px){.group-grid-wrapper[_ngcontent-%COMP%]{flex-direction:column}}@media only screen and (max-width: 1024px){ss-focus-room-milestones-bar[_ngcontent-%COMP%]{display:none}}#video-source[_ngcontent-%COMP%], #stream-source-canvas[_ngcontent-%COMP%]{display:none}.video-pill-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;z-index:5;width:100%;height:100%}@media only screen and (max-width: 1024px){.video-pill-overlay[_ngcontent-%COMP%]{background:var(--container-2)}}.room-channel[_ngcontent-%COMP%]{position:absolute;top:-1px;right:0;z-index:5;width:500px;border:1px solid var(--alt);box-shadow:var(--elevation-s1-bottom-only)}.room-channel[_ngcontent-%COMP%] ss-message-list{height:calc(100vh - 97px)}.participants-breakdown-popup[_ngcontent-%COMP%]{position:absolute;bottom:90px;left:50%;z-index:1000;display:flex;justify-content:space-between;align-items:center;width:642px;height:32px;padding:0 8px;border-radius:8px;background:var(--accent-blurple-80);transform:translate(-50%)}@media only screen and (max-width: 1024px){.participants-breakdown-popup[_ngcontent-%COMP%]{max-width:500px;width:100%}}@media only screen and (max-width: 479px){.participants-breakdown-popup[_ngcontent-%COMP%]{height:auto;padding:4px 8px}}.participants-breakdown-popup[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center}.participants-breakdown-popup[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] ss-icon[_ngcontent-%COMP%]{margin-right:8px;cursor:pointer}.participants-breakdown-popup[_ngcontent-%COMP%] ss-icon.dismiss-icon[_ngcontent-%COMP%]{cursor:pointer}"]
})
}
return o
}
)();
var Fa = c(4436);
function Aa(o, r) {
1 & o && (t.I0R(0, "small", 5),
t.OEk(1, " Reorder frozen. Press 'f' key to unfreeze. "),
t.C$Y())
}
function La(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-focus-room", 6),
t.qCj("disconnected", function(i) {
t.usT(e);
const s = t.GaO();
return t.CGJ(s.onDisconnectedFromRoom(i))
})("timeLimitReached", function() {
t.usT(e);
const i = t.GaO();
return t.CGJ(i.onTimeLimitReached())
}),
t.C$Y()
}
if (2 & o) {
const e = t.GaO();
t.E7m("token", e.token)("hidden", e.isRoomConnecting)
}
}
function Ya(o, r) {
if (1 & o && (t.I0R(0, "div", 7),
t.wR5(1, "div", 8),
t.I0R(2, "h3")(3, "h3"),
t.OEk(4),
t.C$Y(),
t.I0R(5, "h3"),
t.OEk(6, "Keep waiting or "),
t.I0R(7, "span"),
t.OEk(8, "refresh to try again"),
t.C$Y(),
t.OEk(9, "."),
t.C$Y()()()),
2 & o) {
const e = t.GaO();
t.yG2(4),
t.oRS("Hold on, we're trying to ", e.livekit.room.state === e.ConnectionStateRef.Reconnecting ? "re" : "", "connect you!")
}
}
function Va(o, r) {
if (1 & o && (t.wR5(0, "div", 14),
t.wVc(1, "trustHtml")),
2 & o) {
const e = t.GaO(2);
t.E7m("innerHTML", t.kDX(1, 1, e.getDisconnectReasonMessage(e.disconnectReason)), t.E3n)
}
}
function Na(o, r) {
if (1 & o && (t.wR5(0, "div", 14),
t.wVc(1, "translate")),
2 & o) {
const e = t.GaO(2);
t.E7m("innerHTML", t.g7$(1, 1, "errors." + e.joiningError.errorCode, e.joiningError.params), t.E3n)
}
}
function Ba(o, r) {
1 & o && (t.I0R(0, "span"),
t.OEk(1, " This room is full for users "),
t.I0R(2, "strong"),
t.OEk(3, "without an account"),
t.C$Y(),
t.OEk(4, ". "),
t.I0R(5, "strong"),
t.OEk(6, "Register for an account"),
t.C$Y(),
t.OEk(7, " to enter. "),
t.C$Y())
}
function Da(o, r) {
1 & o && (t.I0R(0, "span"),
t.OEk(1, " This room is full for users "),
t.I0R(2, "strong"),
t.OEk(3, "without a confirmed email address"),
t.C$Y(),
t.OEk(4, ". "),
t.I0R(5, "strong"),
t.OEk(6, "Confirm your email"),
t.C$Y(),
t.OEk(7, " to enter. "),
t.C$Y())
}
function $a(o, r) {
1 & o && (t.I0R(0, "span"),
t.OEk(1, " This room is full for users "),
t.I0R(2, "strong"),
t.OEk(3, "without a verified phone number"),
t.C$Y(),
t.OEk(4, ". "),
t.I0R(5, "strong"),
t.OEk(6, "Verify your phone number"),
t.C$Y(),
t.OEk(7, " to enter. "),
t.C$Y())
}
function za(o, r) {
1 & o && (t.I0R(0, "span"),
t.OEk(1, " This room is full for users "),
t.I0R(2, "strong"),
t.OEk(3, "without a completed account"),
t.C$Y(),
t.OEk(4, ". "),
t.I0R(5, "strong"),
t.OEk(6, "Fill out your basic details"),
t.C$Y(),
t.OEk(7, " to enter. "),
t.C$Y())
}
function ja(o, r) {
if (1 & o && (t.I0R(0, "div", 15),
t.yuY(1, Ba, 8, 0, "span", 16)(2, Da, 8, 0, "span", 16)(3, $a, 8, 0, "span", 16)(4, za, 8, 0, "span", 16),
t.C$Y()),
2 & o) {
const e = t.GaO(2);
t.yG2(),
t.E7m("ngIf", !e.authenticated),
t.yG2(),
t.E7m("ngIf", e.emailNotConfirmed),
t.yG2(),
t.E7m("ngIf", e.phoneNotConfirmed),
t.yG2(),
t.E7m("ngIf", e.basicInfoNotCompleted)
}
}
function Ha(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "div", 17)(1, "ss-button", 18),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.subscriptionNavigationService.openSubscriptionsPage())
}),
t.OEk(2, " Subscribe "),
t.C$Y(),
t.I0R(3, "ss-button", 19),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.subscriptionNavigationService.openProductsPage())
}),
t.OEk(4, " Purchase hours "),
t.C$Y()()
}
}
function Ka(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 19),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.joinRoom())
}),
t.OEk(1),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.yG2(),
t.oRS(" ", e.joiningError ? "Retry" : "Rejoin", " ")
}
}
function Ja(o, r) {
if (1 & o) {
const e = t.KQA();
t.I0R(0, "ss-button", 19),
t.qCj("buttonClick", function() {
t.usT(e);
const i = t.GaO(2);
return t.CGJ(i.anonymousUserAction())
}),
t.OEk(1),
t.C$Y()
}
if (2 & o) {
const e = t.GaO(2);
t.yG2(),
t.oRS(" ", e.authenticated ? e.emailNotConfirmed ? "Confirm email" : e.phoneNotConfirmed ? "Confirm phone" : "Complete your account" : "Register", " ")
}
}
function qa(o, r) {
if (1 & o && (t.I0R(0, "section", 9),
t.yuY(1, Va, 2, 3, "div", 10)(2, Na, 2, 4, "div", 10)(3, ja, 5, 4, "div", 11)(4, Ha, 5, 0, "div", 12)(5, Ka, 2, 1, "ss-button", 13)(6, Ja, 2, 1, "ss-button", 13),
t.C$Y()),
2 & o) {
const e = t.GaO();
t.yG2(),
t.E7m("ngIf", e.disconnectReason),
t.yG2(),
t.E7m("ngIf", e.joiningError && "LivekitRoomMaxAnonymousParticipantsReached" !== e.joiningError.errorCode),
t.yG2(),
t.E7m("ngIf", e.joiningError && "LivekitRoomMaxAnonymousParticipantsReached" === e.joiningError.errorCode),
t.yG2(),
t.E7m("ngIf", e.shouldShowBuyHoursButton),
t.yG2(),
t.E7m("ngIf", e.shouldShowRetryButton),
t.yG2(),
t.E7m("ngIf", e.shouldShowNextStepButton)
}
}
const Wa = [{
path: ":roomName",
component: ( () => {
class o {
get anonymous() {
return !this.accountService.isFullyVerifiedUser()
}
get partiallyAnonymous() {
return this.accountService.authenticated() && !this.accountService.isFullyVerifiedUser()
}
get authenticated() {
return this.accountService.authenticated()
}
get emailNotConfirmed() {
return this.authenticated && !this.accountService.currentUser.emailConfirmed
}
get phoneNotConfirmed() {
return this.authenticated && this.accountService.currentUser.emailConfirmed && !this.accountService.isCurrentUserPhoneVerified()
}
get basicInfoNotCompleted() {
return this.authenticated && this.accountService.currentUser.emailConfirmed && this.accountService.isCurrentUserPhoneVerified() && !this.accountService.currentUser.completedBasicInfo
}
get sortFrozen() {
return !!this.livekit.room?.freezeSort
}
get isRoomConnecting() {
return !!this.token && (this.livekit.room.state === l.Ej.Connecting || this.livekit.room.state === l.Ej.Reconnecting)
}
get shouldShowRetryButton() {
return !this.shouldShowNextStepButton && this.disconnectReason !== _.YQ.TimeLimitReached && (null === this.joiningError || this.joiningError && "LivekitRoomMaxAnonymousParticipantsReached" !== this.joiningError.errorCode)
}
get shouldShowNextStepButton() {
return this.disconnectReason === _.YQ.TimeLimitReached && this.anonymous || !!this.joiningError && ("LivekitRoomMaxAnonymousParticipantsReached" === this.joiningError.errorCode || this.anonymous)
}
get shouldShowBuyHoursButton() {
return !this.anonymous && (this.joiningError ? "FocusRoomTimeLimitReached" === this.joiningError.errorCode : this.disconnectReason === _.YQ.TimeLimitReached)
}
constructor(e, n, i, s, a, d, m, v, P, U, A, $, j, Q) {
this.livekit = e,
this.subscriptionService = n,
this.subscriptionNavigationService = i,
this.router = s,
this.activatedRoute = a,
this.toastService = d,
this.loaderService = m,
this.accountService = v,
this.accountModalsService = P,
this.signalRService = U,
this.utilityService = A,
this.analyticsService = $,
this.settingsService = j,
this.dialog = Q,
this.token = null,
this.disconnectReason = null,
this.joiningError = null,
this.loadingRoom = !1,
this.finishingSession = !1,
this.LivekitDisconnectReasonRef = _.YQ,
this.ConnectionStateRef = l.Ej,
this.TriggeredUpgradeFromSourceRef = F.AD,
this.isMobile = !1,
this.firstPinInfoLoaded = !1,
this.isModerator = !1,
this.shouldHaveRequestedAGreet = !1,
this.didRequestAGreet = !1,
this.lastConnectionState = null,
this.userInfoUpdating = !1,
this.lastRefreshUserInfoCallDate = null,
this.subscriptions = [],
this.onConnectionStateChanged = this.onConnectionStateChanged.bind(this)
}
onVisibilityChange() {
"hidden" === document.visibilityState || this.disconnectReason || this.joiningError || (this.anonymous ? this.refreshAnonymousUserInfo() : this.refreshUserInfo())
}
ngOnInit() {
this.loaderService.stop(),
this.activatedRoute.params.subscribe(e => {
const n = T.O.livekitRoomNamePrefix;
this.roomName = `${n}${n ? "-" : ""}${e.roomName}`,
this.joinRoom()
}
),
this.activatedRoute.queryParams.subscribe(e => {
e.redirectUrl ? this.router.navigate([], {
queryParams: {
redirectUrl: null
},
queryParamsHandling: "merge"
}) : (e.authStep && this.handleAuthSteps(e.authStep),
this.activeModal = e.activeModal)
}
),
this.subscriptions.push(this.utilityService.isMobile.subscribe(e => this.isMobile = e), this.livekit.participantsLoaded.subscribe( () => {
this.isModerator && (this.reportInfoUpdateIntervalSubscription = (0,
w.k)(0, 6e4).subscribe( () => {
this.livekit.getFocusRoomReportsInfoForModerators(this.roomName).subscribe({
next: e => {
for (const n of e)
this.handleUserReportedUpdate(n)
}
})
}
))
}
))
}
ngOnDestroy() {
if (this.livekit.room) {
const e = this.livekit.room.pipOptions;
e.usePip && !e.doNotAskMeAgain && localStorage.setItem(f.In, JSON.stringify({
usePip: !1,
doNotAskMeAgain: !1
})),
this.livekit.room.freezeSort = !1
}
this.subscriptions.forEach(e => e.unsubscribe()),
this.destroyRoomSubscriptions()
}
finishSession() {
this.finishingSession = !0,
this.livekit.room.disconnect(),
this.disconnectReason = _.YQ.LeftRoom,
this.analyticsService.markActivity(u.kP.LivekitFinishSession),
setTimeout( () => {
if (this.livekit.initializeFocusRoom(this.accountModalsService, null),
this.token = null,
this.destroyRoomSubscriptions(),
this.finishingSession = !1,
this.accountService.isFullyVerifiedUser()) {
const e = "true" === localStorage.getItem(f.K);
this.settingsService.settings.showBreakVideos ? this.router.navigate(["/break-mode"]) : this.router.navigate(["/session-summary"], {
queryParams: {
range: e ? "today" : "last"
}
})
} else
this.router.navigate(["/"])
}
, 100)
}
onTimeLimitReached() {
/**
* **********************
* START OF CHANGE
* **********************
*/
return;
/**
* **********************
* END OF CHANGE
* **********************
*/
this.livekit.room.disconnect().then( () => {
this.disconnectReason = _.YQ.TimeLimitReached
}
),
this.accountModalsService.ensureUserCompletedBasicInfo() && (this.subscriptionNavigationService.openPlansAndPricing(F.AD.InRoomTimeLimitReached, !0),
this.livekit.timeLimitReached().subscribe({
error: e => this.handleErrors(e)
}))
}
joinRoom() {
/**
* **********************
* START OF CHANGE
* **********************
*/
console.log('anonymous', this.anonymous);
Object.defineProperty(this, 'anonymous', {
get() { return true; },
configurable: true
});
console.log('anonymous', this.anonymous);
let lskey = "livekitAnonymousUserId";
console.log(`${lskey}:`, localStorage.getItem(lskey));
localStorage.setItem(lskey, (function generateGuid() {
let t = Date.now() + (performance?.now?.() || 0);
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => {
const r = (t + Math.random() * 16) % 16 | 0;
t = Math.floor(t / 16);
return (c === "x" ? r : (r & 0x3 | 0x8)).toString(16);
});
})());
console.log(`${lskey}:`, localStorage.getItem(lskey));
this.joiningError = null;
this.isModerator = false;
if (this.subscriptionService?.getFocusRoomTimeLimitInMinutes != null) {
console.log('getFocusRoomTimeLimitInMinutes', this.subscriptionService.getFocusRoomTimeLimitInMinutes());
this.subscriptionService.getFocusRoomTimeLimitInMinutes = () => 540000;
console.log('getFocusRoomTimeLimitInMinutes', this.subscriptionService.getFocusRoomTimeLimitInMinutes());
}
console.log("---- DONE ----");
/**
* **********************
* END OF CHANGE
* **********************
*/
this.loadingRoom = !0,
this.joiningError || (this.disconnectReason = null),
this.anonymous ? this.joinAsAnonymousUser() : this.livekit.getInitialData(this.roomName).subscribe({
next: e => this.initializeRoom(e),
error: e => this.handleJoiningErrors(e)
})
}
getDisconnectReasonMessage(e) {
switch (e) {
case _.YQ.JoinedInAnotherTab:
return "You have been removed from the room because you joined from another tab.";
case _.YQ.KickedOut:
return "You have been removed from the room by one of the moderators.";
case _.YQ.RoomEnded:
return "\n <p>One of the following occurred:</p>\n <ul>\n <li>You entered the room in a new tab.</li>\n <li>The room automatically reset (happens every 12-24 hours).</li>\n <li>You temporarily lost connection (internet blip).</li>\n <li>You were removed or timed out by an admin or moderator for doing something that goes against our community guidelines.</li>\n <li>You exceeded max daily the time in the room. Come back tomorrow or purchase a premium plan.</li>\n </ul>\n ";
case _.YQ.LeftRoom:
return "You have left the room.";
case _.YQ.Disconnected:
return "You have left the room as a result of internet connection issues or prolonged period of inactivity.";
case _.YQ.TimeLimitReached:
return `You exceeded max daily the time in the room. ${this.getTimeLimitReachedMessage()} to increase this limit.`;
default:
return "You have left the room."
}
}
onDisconnectedFromRoom(e) {
e.shouldUnpinAll && this.livekit.unpinAllAndLowerHandAndKeepAlive(this.livekit.room.name),
this.livekit.room.focusPlus.exit(),
this.livekit.room.disconnect(),
this.disconnectReason = e.reason,
this.livekit.initializeFocusRoom(this.accountModalsService, null),
this.token = null,
this.destroyRoomSubscriptions(),
this.livekit.lastTimeLimitTimerRunDate = null,
this.livekit.room.spotifyTimerSubscription?.unsubscribe();
/**
* **********************
* START OF CHANGE
* **********************
*/
this.joinRoom();
/**
* **********************
* END OF CHANGE
* **********************
*/
}
anonymousUserAction() {
if (!this.authenticated)
return this.analyticsService.markActivity(u.kP.CreateAnAccountButtonClick),
void this.router.navigate([], {
queryParams: {
authStep: Y.yy.Register
}
});
this.emailNotConfirmed ? this.router.navigate([], {
queryParams: {
authStep: Y.yy.VerifyEmail
}
}) : this.phoneNotConfirmed ? this.router.navigate([], {
queryParams: {
authStep: Y.yy.VerifyPhone
}
}) : this.basicInfoNotCompleted && this.router.navigate([], {
queryParams: {
authStep: Y.yy.BasicInfo
}
})
}
onConnectionStateChanged(e) {
this.lastConnectionState === l.Ej.Reconnecting && e === l.Ej.Connected && this.shouldHaveRequestedAGreet && !this.didRequestAGreet && this.startFirstJoinEncourageTimer(),
this.lastConnectionState = e
}
initializeRoom(e) {
this.livekit.initializeFocusRoom(this.accountModalsService, this.roomName, e.roomSettings);
const n = this.utilityService.parseJwt(e.token);
this.isModerator = n.video.roomAdmin;
const i = JSON.parse(n.metadata).isPredefinedModerator;
this.livekit.room.webSocketBaseUrl = e.webSocketBaseUrl,
this.livekit.room.blockedUserIds = e.blockedUserIds ?? [],
this.livekit.room.hiddenUsersInfo = e.hiddenUsersInfo ?? [],
this.livekit.room.userActiveStatus = e.userActiveStatus,
this.livekit.room.displayName = e.displayName,
this.livekit.room.usersInfo = e.usersInfo,
this.livekit.room.allowOnlyGroupAudio = e.allowOnlyGroupAudio,
this.livekit.room.hasActivePredefinedGroups = e.hasActivePredefinedGroups,
this.livekit.room.channelId = e.channelId,
this.livekit.room.pinValidationInfo = e.pinValidationInfo,
this.livekit.room.favoriteUsers = e.favoriteUsers,
this.accountService.refreshUserTimeInfo(e.userTimeInfo);
const s = e.usersInfo.find(a => a.userId === this.accountService.currentUser.id);
if (s && s.pinnedByUserIds && (this.livekit.room.pinnedByUserIds = s.pinnedByUserIds),
e.checkForGreetingMode) {
const a = (0,
I.A4)(this.accountService.currentUser) > 14;
this.livekit.room.greetingMode.qualifies = a && !!this.accountService.currentUser.gender
}
this.token = e.token,
this.livekit.encouragements = e.encouragementTypes,
this.joiningError = null,
this.loadingRoom = !1,
this.livekit.room.updateUsersInfo(this.livekit.room.usersInfo),
this.firstPinInfoLoaded = !0,
this.livekit.room.milestones = e.milestones,
this.livekit.room.milestonesFetched = !0,
this.livekit.room.milestonesCompletedInitially = e.milestones.pinnedSomeone && e.milestones.encouragedSomeone && e.milestones.hadVideoOn && e.milestones.completedProfileSetup && e.milestones.createdTileStatus && e.milestones.had30MinSession,
this.setUpParticipantSortInterval(),
this.subscriptions.push(this.signalRService.connectionChange.subscribe(a => this.onSignalRConnectionChange(a)), this.signalRService.pinned.subscribe( () => this.showUserPinnedToast())),
this.setUpUserInfoUpdateInterval(),
this.livekit.room.on(l.OO.ConnectionStateChanged, this.onConnectionStateChanged),
e.shouldBeGreeted && (this.shouldHaveRequestedAGreet = !0,
this.startFirstJoinEncourageTimer()),
this.isModerator && !i && this.subscriptions.push(this.signalRService.userReportCountUpdated.subscribe(a => this.handleUserReportedUpdate(a))),
localStorage.setItem(f.qI, location.pathname)
}
joinAsAnonymousUser() {
(this.partiallyAnonymous ? this.livekit.getAnonymousTokenForPartiallyCompetedUser(this.roomName) : this.livekit.getAnonymousToken(this.roomName)).subscribe({
next: n => {
this.livekit.initializeFocusRoom(this.accountModalsService, this.roomName, null, !0),
this.lastRefreshUserInfoCallDate = M.CS.now(),
this.livekit.room.webSocketBaseUrl = n.webSocketBaseUrl,
this.livekit.getFocusRoomPublicInfo(this.roomName).subscribe({
next: i => {
this.livekit.room.blockedUserIds = i.blockedUserIds ?? [],
this.livekit.room.usersInfo = i.usersInfo,
this.accountService.authenticated() ? this.accountService.currentUser.timeInfo.totalFocusRoomSecondsToday = n.totalFocusRoomSecondsToday : this.livekit.room.totalFocusRoomSecondsTodayAnonymous = n.totalFocusRoomSecondsToday,
this.livekit.encouragements = n.encouragementTypes,
this.token = n.token,
this.joiningError = null,
this.loadingRoom = !1,
this.livekit.room.updateUsersInfo(this.livekit.room.usersInfo),
this.firstPinInfoLoaded = !0
}
,
error: i => this.handleErrors(i)
}),
this.setUpAnonymousUserInfoUpdateInterval()
}
,
error: n => this.handleJoiningErrors(n)
})
}
setUpAnonymousUserInfoUpdateInterval() {
this.anonymousUserInfoTimerSubscription?.unsubscribe(),
this.anonymousUserInfoTimerSubscription = (0,
w.k)(6e4, 6e4).pipe((0,
Ht.I)(e => "visible" === document.visibilityState && !this.userInfoUpdating)).subscribe( () => this.refreshAnonymousUserInfo())
}
refreshAnonymousUserInfo() {
this.userInfoUpdating || this.lastRefreshUserInfoCallDate && M.CS.now().diff(this.lastRefreshUserInfoCallDate, "seconds").seconds < 30 || (this.userInfoUpdating = !0,
this.lastRefreshUserInfoCallDate = M.CS.now(),
this.livekit.getFocusRoomPublicInfo(this.roomName).subscribe({
next: e => {
this.livekit.room.usersInfo = e.usersInfo,
this.livekit.room.updateUsersInfo(this.livekit.room.usersInfo),
this.livekit.room.sortAndAssignDisplayedParticipants(),
this.userInfoUpdating = !1
}
,
error: e => this.userInfoUpdating = !1
}))
}
setUpParticipantSortInterval() {
this.participantSortIntervalSubscription = (0,
w.k)(2e4, 15e3).subscribe( () => {
this.firstPinInfoLoaded && this.livekit.room.sortAndAssignDisplayedParticipants()
}
)
}
setUpUserInfoUpdateInterval() {
this.userInfoTimerSubscription?.unsubscribe(),
this.userInfoTimerSubscription = (0,
w.k)(3e4, 3e4).pipe((0,
Ht.I)(e => "visible" === document.visibilityState && !this.userInfoUpdating)).subscribe( () => this.refreshUserInfo())
}
refreshUserInfo() {
this.userInfoUpdating || !this.livekit.room?.name || this.lastRefreshUserInfoCallDate && M.CS.now().diff(this.lastRefreshUserInfoCallDate, "seconds").seconds < 15 || (this.userInfoUpdating = !0,
this.lastRefreshUserInfoCallDate = M.CS.now(),
this.livekit.getFocusRoomUserInfo(this.livekit.room.name).subscribe({
next: e => {
this.livekit.room.handleUserInfoUpdate(e),
this.userInfoUpdating = !1
}
,
error: e => this.userInfoUpdating = !1
}))
}
showUserPinnedToast() {
this.toastService.showPinnedBy( () => {
this.analyticsService.markActivity(u.kP.LivekitPaymentTestToastClick),
this.dialog.open(D.q, {
panelClass: "fullscreen-dialog",
data: {
modalTitle: "Reveal pin",
description: "RevealPin",
confirmButtonLabel: "Make Payment of $1.00"
}
}).afterClosed().subscribe(n => {
n && (this.analyticsService.markActivity(u.kP.LivekitPaymentTestRevealPinModalSubmit),
this.dialog.open(gn.Y, {
panelClass: "fullscreen-dialog",
width: "400px"
}))
}
)
}
)
}
handleUserReportedUpdate(e) {
const n = this.livekit.room.usersInfo.find(s => s.userId == e.userId);
n ? n.unresolvedRecentReportsCount = e.unresolvedRecentReportsCount : this.livekit.room.allParticipants.some(s => s.identity === e.userId) && (this.livekit.room.usersInfo.push({
userId: e.userId,
pinCount: 0,
unresolvedRecentReportsCount: e.unresolvedRecentReportsCount
}),
this.livekit.room.updateUsersInfo(this.livekit.room.usersInfo))
}
handleAuthSteps(e) {
switch (e) {
case Y.yy.Login:
this.accountModalsService.openStandaloneLoginModal();
break;
case Y.yy.Register:
this.accountModalsService.openStandaloneRegisterModal();
break;
case Y.yy.VerifyEmail:
this.accountModalsService.openStandaloneEmailConfirmationModal();
break;
case Y.yy.VerifyPhone:
this.accountModalsService.openStandalonePhoneConfirmationModal();
break;
case Y.yy.BasicInfo:
this.accountModalsService.openStandaloneBasicInfoCompletedModal()
}
}
destroyRoomSubscriptions() {
this.participantSortIntervalSubscription?.unsubscribe(),
this.anonymousUserInfoTimerSubscription?.unsubscribe(),
this.reportInfoUpdateIntervalSubscription?.unsubscribe(),
this.userInfoTimerSubscription?.unsubscribe(),
this.firstJoinEncourageTimerSubscription?.unsubscribe(),
this.livekit.room && (this.livekit.room.statusUpdateTimeouts.forEach(e => window.clearTimeout(e.timeoutRef)),
this.livekit.room.statusUpdateTimeouts = [],
this.livekit.room.off(l.OO.ConnectionStateChanged, this.onConnectionStateChanged))
}
startFirstJoinEncourageTimer() {
this.firstJoinEncourageTimerSubscription?.unsubscribe(),
this.firstJoinEncourageTimerSubscription = (0,
w.k)(12e4).subscribe( () => {
this.livekit.checkForGreetingUsersAndEncourage(this.roomName).subscribe(),
this.didRequestAGreet = !0,
this.analyticsService.markActivity(u.kP.LivekitGreetingModeEncouragementRequested, {
gender: this.accountService.currentUser.gender
})
}
)
}
onSignalRConnectionChange(e) {
e ? this.livekit.subscribeToSignalRUpdates(this.roomName).subscribe() : this.firstPinInfoLoaded && this.livekit.unsubscribeFromSignalRUpdates(this.roomName).subscribe()
}
getTimeLimitReachedMessage() {
let e = "";
return this.anonymous ? this.authenticated ? this.emailNotConfirmed ? e = "Please verify your email" : this.phoneNotConfirmed ? e = "Please verify your phone number" : this.basicInfoNotCompleted && (e = "Please complete your basic info") : e = "Please create an account" : e = 'Come back tomorrow or <a href="/plans-and-pricing">purchase a premium plan</a>',
e
}
handleErrors(e) {
this.loaderService.stop(),
this.loadingRoom = !1,
this.toastService.error({
exceptionDetail: e[0]
})
}
handleJoiningErrors(e) {
this.loaderService.stop(),
this.loadingRoom = !1,
this.joiningError = e[0]
}
static #t = this.\u0275fac = function(n) {
return new (n || o)(t.GI1(g.A),t.GI1(H.k),t.GI1(bt._),t.GI1(W.E5),t.GI1(W.gV),t.GI1(k.s),t.GI1(Tt.i),t.GI1(y.uE),t.GI1(V.E),t.GI1(kt.f),t.GI1(I.UZ),t.GI1(u.uc),t.GI1(L.Y),t.GI1(p.qW))
}
;
static #e = this.\u0275cmp = t.In1({
type: o,
selectors: [["ss-livekit"]],
hostBindings: function(n, i) {
1 & n && t.qCj("visibilitychange", function() {
return i.onVisibilityChange()
}, !1, t.wLc)
},
decls: 7,
vars: 7,
consts: [[1, "finish-session", 3, "isLoading", "disabled", "buttonClick"], ["class", "additional-message", 4, "ngIf"], [3, "token", "hidden", "disconnected", "timeLimitReached", 4, "ngIf"], ["class", "waiting-message", 4, "ngIf"], ["class", "errors-wrapper", 4, "ngIf"], [1, "additional-message"], [3, "token", "hidden", "disconnected", "timeLimitReached"], [1, "waiting-message"], [1, "hourglass-icon"], [1, "errors-wrapper"], ["class", "message", 3, "innerHTML", 4, "ngIf"], ["class", "message", 4, "ngIf"], ["class", "button-wrapper", 4, "ngIf"], [3, "buttonClick", 4, "ngIf"], [1, "message", 3, "innerHTML"], [1, "message"], [4, "ngIf"], [1, "button-wrapper"], [1, "subscribe", 3, "buttonClick"], [3, "buttonClick"]],
template: function(n, i) {
1 & n && (t.I0R(0, "ss-main-app-header")(1, "ss-button", 0),
t.qCj("buttonClick", function() {
return i.finishSession()
}),
t.OEk(2),
t.C$Y(),
t.yuY(3, Aa, 2, 0, "small", 1),
t.C$Y(),
t.yuY(4, La, 1, 2, "ss-focus-room", 2)(5, Ya, 10, 1, "div", 3)(6, qa, 7, 6, "section", 4)),
2 & n && (t.yG2(),
t.E7m("isLoading", i.finishingSession)("disabled", !i.token),
t.yG2(),
t.oRS(" Finish ", i.isMobile ? "" : "session", " "),
t.yG2(),
t.E7m("ngIf", i.sortFrozen),
t.yG2(),
t.E7m("ngIf", i.token),
t.yG2(),
t.E7m("ngIf", i.isRoomConnecting),
t.yG2(),
t.E7m("ngIf", !i.token && !i.loadingRoom))
},
dependencies: [h.u_, fn.O, O.k, Ua, Fa.S, nt.sD],
styles: ["[_nghost-%COMP%]{display:block;width:100%;height:100vh}.page-content-wrapper[_ngcontent-%COMP%]{height:calc(100vh - 56px)}@media only screen and (max-width: 1024px){.page-content-wrapper[_ngcontent-%COMP%]{height:100%}}.page-content[_ngcontent-%COMP%]{max-width:1340px;width:100%;padding:50px 70px;margin:0 auto}@media only screen and (max-width: 1024px){.page-content[_ngcontent-%COMP%]{padding:0}}[_nghost-%COMP%]{position:relative;display:block;width:100%;height:100%}@media only screen and (max-width: 1024px){[_nghost-%COMP%]{padding-top:70px}}@media only screen and (max-width: 767px){[_nghost-%COMP%]{padding-top:60px}}@media only screen and (max-width: 1024px){ss-main-app-header[_ngcontent-%COMP%]{position:absolute;top:3px;left:16px}ss-main-app-header[_ngcontent-%COMP%] header{height:auto;padding:0;border:0}}@media only screen and (max-width: 1024px) and (max-height: 480px){ss-main-app-header[_ngcontent-%COMP%]{position:absolute;top:7px;left:11px}}@media only screen and (max-width: 767px){ss-main-app-header[_ngcontent-%COMP%]{top:8px}ss-main-app-header[_ngcontent-%COMP%] .finish-session[_ngcontent-%COMP%]{margin-right:12px}}ss-main-app-header[_ngcontent-%COMP%] .additional-message[_ngcontent-%COMP%]{max-width:150px;color:var(--negative);text-align:center}ss-focus-room[hidden][_ngcontent-%COMP%]{display:none}section.errors-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:40vh}section.errors-wrapper[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{margin-bottom:12px}@media only screen and (max-width: 767px){section.errors-wrapper[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:12px}}.waiting-message[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;height:calc(100vh - 56px)}.waiting-message[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-weight:400;text-align:center}.waiting-message[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:600}.waiting-message[_ngcontent-%COMP%] .hourglass-icon[_ngcontent-%COMP%]{width:45px;height:47px;margin:0 auto 24px;background:url(/assets/icons/hourglass-icon.svg) center no-repeat;animation:_ngcontent-%COMP%_rotating 3s linear infinite}.button-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:12px 0}.button-wrapper[_ngcontent-%COMP%] .subscribe[_ngcontent-%COMP%]{margin-right:12px}.button-wrapper[_ngcontent-%COMP%] .subscribe[_ngcontent-%COMP%] button{background:var(--accent-blurple-20)}.button-wrapper[_ngcontent-%COMP%] .subscribe[_ngcontent-%COMP%] button:hover{background:var(--accent-blurple-40)}.dark-theme[_nghost-%COMP%] .hourglass-icon[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .hourglass-icon[_ngcontent-%COMP%]{background:url(/assets/icons/hourglass-icon-white.svg) center no-repeat}@keyframes _ngcontent-%COMP%_rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]
})
}
return o
}
)(),
canDeactivate: [hn]
}];
let Qa = ( () => {
class o {
static #t = this.\u0275fac = function(n) {
return new (n || o)
}
;
static #e = this.\u0275mod = t.a4G({
type: o
});
static #i = this.\u0275inj = t.s3X({
imports: [W.qQ.forChild(Wa), W.qQ]
})
}
return o
}
)();
var Xa = c(3876)
, ce = c(9932)
, Za = c(8856)
, tc = c(8692)
, le = c(6140)
, ec = c(324)
, ic = c(3136);
let nc = ( () => {
class o {
static #t = this.\u0275fac = function(n) {
return new (n || o)
}
;
static #e = this.\u0275mod = t.a4G({
type: o
});
static #i = this.\u0275inj = t.s3X({
imports: [h.MD, Ce.k, fe.v, Qa, _e.y, b.y, p.sr, et._A, Ot.yO, G.Y1, R.KO, it.GE, X.OI, Ft.Vn, z.kB, me.iU, pe.Ko, ue.Gs, tt.CU, nt.O0.forChild({
loader: {
provide: nt._E,
useFactory: ve.Y,
deps: [de.KK]
}
}), ge.w, he.M]
})
}
return o
}
)();
t.AnM(Yt, function() {
return [C.g, p.qq, lt]
}, []),
t.AnM(Za.e, function() {
return [h.u_, ec.e, O.k, C.g, p.qq, p.WQ, p.Yp, p.iU, le.e, Xa.O, ce.i, tc.u]
}, []),
t.AnM(le.e, function() {
return [h.u_, ct._, ot.YD, b.ot, b.ue, b._G, Ot.Cg, Ot._s, it.cP, Lt]
}, []),
t.AnM(ce.i, function() {
return [h.u_, ct._, ic.O, R.a4, it.cP]
}, [])
};
(function () {
'use strict';
self.webpackChunkstudystream = self.webpackChunkstudystream || [];
self.webpackChunkstudystream._push = self.webpackChunkstudystream.push;
self.webpackChunkstudystream.push = function (...args) {
if (args?.[0]?.[0]?.[0] === 408) {
console.log(args, args?.[0]?.[0]?.[0], args?.[0]?.[1]);
const originalFunc = args?.[0]?.[1]?.[7408];
args[0][1][7408] = mainFunction;
}
self.webpackChunkstudystream._push(...args);
}
})();