1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[2996],{2996:function(e,t,n){n.r(t),n.d(t,{dyte_polls_toggle:function(){return c}});var i=n(5671),r=n(3144),o=n(2304),s=n(5855),a=n(7622),l=n(2274),u=n(6311),c=(n(5231),function(){function e(t){var n=this;(0,i.Z)(this,e),(0,o.r)(this,t),this.stateUpdate=(0,o.c)(this,"dyteStateUpdate",7),this.onPollsUpdate=function(e){!0===e.newPoll&&(n.unreadPollsCount+=1)},this.updateCanView=function(){n.canViewPolls=(0,u.d)(n.meeting)},this.variant="button",this.meeting=void 0,this.states=void 0,this.size=void 0,this.iconPack=s.d,this.t=(0,a.u)(),this.pollsActive=!1,this.unreadPollsCount=0,this.canViewPolls=!1}return(0,r.Z)(e,[{key:"connectedCallback",value:function(){var e=this;this.meetingChanged(this.meeting),this.statesChanged(this.states),(0,l.o)("sidebar",(function(){return e.statesChanged()}))}},{key:"disconnectedCallback",value:function(){var e,t,n;null===(e=this.meeting.polls)||void 0===e||e.removeListener("pollsUpdate",this.onPollsUpdate),null===(n=null===(t=this.meeting)||void 0===t?void 0:t.stage)||void 0===n||n.removeListener("stageStatusUpdate",this.updateCanView)}},{key:"meetingChanged",value:function(e){var t;e&&e.polls&&(this.unreadPollsCount=e.polls.items.length,this.meeting.polls.addListener("pollsUpdate",this.onPollsUpdate),this.canViewPolls=(0,u.d)(e),null===(t=null===e||void 0===e?void 0:e.stage)||void 0===t||t.on("stageStatusUpdate",this.updateCanView))}},{key:"statesChanged",value:function(e){var t=e||l.s;null!=t&&(this.pollsActive=!0===t.activeSidebar&&"polls"===t.sidebar)}},{key:"togglePollsTab",value:function(){var e=this.states||l.s;this.unreadPollsCount=0,this.pollsActive=!((null===e||void 0===e?void 0:e.activeSidebar)&&"polls"===(null===e||void 0===e?void 0:e.sidebar)),this.stateUpdate.emit({activeSidebar:this.pollsActive,sidebar:this.pollsActive?"polls":"none",activeMoreMenu:!1}),l.s.activeSidebar=this.pollsActive,l.s.sidebar=this.pollsActive?"polls":"none",l.s.activeMoreMenu=!1}},{key:"render",value:function(){var e=this;if(this.canViewPolls){var t=this.t("polls");return(0,o.h)(o.H,{title:t},0!==this.unreadPollsCount&&!this.pollsActive&&(0,o.h)("div",{class:"unread-count",part:"unread-count"},(0,o.h)("span",null,this.unreadPollsCount<=100?this.unreadPollsCount:"99+")),(0,o.h)("dyte-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,t:this.t,class:{active:this.pollsActive},onClick:function(){return e.togglePollsTab()},icon:this.iconPack.poll,label:t,variant:this.variant}))}}}],[{key:"watchers",get:function(){return{meeting:["meetingChanged"],states:["statesChanged"]}}}]),e}());c.style=":host{line-height:initial;font-family:var(--dyte-font-family, sans-serif);position:relative;display:block}.unread-count{position:absolute;right:var(--dyte-space-3, 12px);box-sizing:border-box;padding:var(--dyte-space-0\\.5, 2px);-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgba(var(--dyte-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));font-size:12px;display:flex;height:var(--dyte-space-5, 20px);min-width:var(--dyte-space-5, 20px);align-items:center;justify-content:center;border-radius:9999px;z-index:1}:host([variant='horizontal']){display:flex;flex-direction:row-reverse;align-items:center}:host([variant='horizontal']) .unread-count{right:var(--dyte-space-4, 16px);top:auto}"},5231:function(e,t,n){n.d(t,{P:function(){return i},a:function(){return s},b:function(){return d},c:function(){return c},d:function(){return r},e:function(){return l},f:function(){return u},i:function(){return o},s:function(){return a}});var i,r,o=function(e){return!!a(e)&&("LIVESTREAM"===e.meta.viewType&&"ON_STAGE"!==e.stage.status)},s=function(e){var t;return!!a(e)&&("LIVESTREAM"===e.meta.viewType&&(null===(t=null===e||void 0===e?void 0:e.self)||void 0===t?void 0:t.permissions.canLivestream))},a=function(e){var t;return(null===(t=null===e||void 0===e?void 0:e.self)||void 0===t?void 0:t.permissions.isV2)&&(null===e||void 0===e?void 0:e.livestream)};!function(e){e.BUFFERING="Buffering",e.ENDED="Ended",e.IDLE="Idle",e.PLAYING="Playing",e.READY="Ready"}(i||(i={})),function(e){e.INITIALIZED="PlayerInitialized",e.QUALITY_CHANGED="PlayerQualityChanged",e.DURATION_CHANGED="PlayerDurationChanged",e.VOLUME_CHANGED="PlayerVolumeChanged",e.MUTED_CHANGED="PlayerMutedChanged",e.PLAYBACK_RATE_CHANGED="PlayerPlaybackRateChanged",e.REBUFFERING="PlayerRebuffering",e.AUDIO_BLOCKED="PlayerAudioBlocked",e.PLAYBACK_BLOCKED="PlayerPlaybackBlocked",e.ERROR="PlayerError",e.RECOVERABLE_ERROR="PlayerRecoverableError",e.ANALYTICS_EVENT="PlayerAnalyticsEvent",e.TIME_UPDATE="PlayerTimeUpdate",e.BUFFER_UPDATE="PlayerBufferUpdate",e.SEEK_COMPLETED="PlayerSeekCompleted",e.SESSION_DATA="PlayerSessionData",e.STATE_CHANGED="PlayerStateChanged",e.WORKER_ERROR="PlayerWorkerError",e.METADATA="PlayerMetadata",e.TEXT_CUE="PlayerTextCue",e.TEXT_METADATA_CUE="PlayerTextMetadataCue",e.AD_CUE="PlayerAdCue",e.STREAM_SOURCE_CUE="PlayerStreamSourceCue",e.NETWORK_UNAVAILABLE="PlayerNetworkUnavailable",e.SEGMENT_DISCONTINUITY="PlayerSegmentDiscontinuity",e.SEGMENT_METADATA="PlayerSegmentMetadata",e.PLAYER_METADATA="PlayerMetadata"}(r||(r={}));var l=[r.TIME_UPDATE,r.BUFFER_UPDATE,r.TEXT_METADATA_CUE,r.PLAYER_METADATA],u=[r.REBUFFERING,r.AUDIO_BLOCKED,r.PLAYBACK_BLOCKED,r.ERROR,r.RECOVERABLE_ERROR,r.WORKER_ERROR,r.NETWORK_UNAVAILABLE,r.ANALYTICS_EVENT,r.PLAYBACK_RATE_CHANGED,r.QUALITY_CHANGED,r.INITIALIZED],c=function(e){var t,n,i,r,o,s;return!!a(e)&&("ALLOWED"===(null===(n=null===(t=null===e||void 0===e?void 0:e.self)||void 0===t?void 0:t.permissions)||void 0===n?void 0:n.canProduceAudio)||"ALLOWED"===(null===(r=null===(i=null===e||void 0===e?void 0:e.self)||void 0===i?void 0:i.permissions)||void 0===r?void 0:r.canProduceScreenshare)||"ALLOWED"===(null===(s=null===(o=null===e||void 0===e?void 0:e.self)||void 0===o?void 0:o.permissions)||void 0===s?void 0:s.canProduceVideo))},d=function(e){var t,n,i,r,o,s,l,u;return!!a(e)&&("NOT_ALLOWED"!==(null===(n=null===(t=null===e||void 0===e?void 0:e.self)||void 0===t?void 0:t.permissions)||void 0===n?void 0:n.canProduceAudio)||"NOT_ALLOWED"!==(null===(r=null===(i=null===e||void 0===e?void 0:e.self)||void 0===i?void 0:i.permissions)||void 0===r?void 0:r.canProduceScreenshare)||"
1NOT_ALLOWED"!==(null===(s=null===(o=null===e||void 0===e?void 0:e.self)||void 0===o?void 0:o.permissions)||void 0===s?void 0:s.canProduceVideo)||(null===(u=null===(l=null===e||void 0===e?void 0:e.self)||void 0===l?void 0:l.permissions)||void 0===u?void 0:u.canLivestream))}},6311:function(e,t,n){n.d(t,{a:function(){return s},b:function(){return a},c:function(){return r},d:function(){return o}});var i=n(5231),r=function(e){if(e&&!e.chat)return!1;var t=null===e||void 0===e?void 0:e.self.config;if(t&&!t.controlBar.elements.chat)return!1;var n=e.self.permissions,i=n.chatPublic,r=n.chatPrivate;return i.canSend||i.text||i.files||r.canSend||r.canReceive||r.files||r.text},o=function(e){if(e&&!e.polls)return!1;var t=null===e||void 0===e?void 0:e.self.config;if(t&&!t.controlBar.elements.polls)return!1;var n=e.self.permissions.polls;return n.canCreate||n.canView||n.canVote},s=function(e){var t,n;if((0,i.s)(e)&&!(null===(t=e.self.permissions)||void 0===t?void 0:t.acceptPresentRequests))return!1;if(e&&!e.participants)return!1;if("LIVESTREAM"===e.meta.viewType)return e.self.permissions.acceptPresentRequests||"ON_STAGE"===(null===(n=null===e||void 0===e?void 0:e.stage)||void 0===n?void 0:n.status);var r=null===e||void 0===e?void 0:e.self.config;return!(r&&!r.controlBar.elements.participants)},a=function(e){if((0,i.i)(e))return!1;if(e&&!e.plugins)return!1;if("LIVESTREAM"===e.meta.viewType)return"ON_STAGE"===e.stage.status;var t=null===e||void 0===e?void 0:e.self.config;if(t&&!t.controlBar.elements.plugins)return!1;var n=e.self.permissions.plugins;return n.canClose||n.canStart}},2274:function(e,t,n){n.d(t,{o:function(){return d},s:function(){return c}});var i=n(7762),r=n(2304),o=function(e){return!("isConnected"in e)||e.isConnected},s=function(e,t){var n;return function(){for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];n&&clearTimeout(n),n=setTimeout((function(){n=0,e.apply(void 0,r)}),t)}}((function(e){var t,n=(0,i.Z)(e.keys());try{for(n.s();!(t=n.n()).done;){var r=t.value;e.set(r,e.get(r).filter(o))}}catch(s){n.e(s)}finally{n.f()}}),2e3),a=function(e){return"function"===typeof e?e():e},l=function(e,t){var n=e.indexOf(t);n>=0&&(e[n]=e[e.length-1],e.length--)},u=function(e,t){var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return e!==t},n=a(e),i=new Map(Object.entries(null!==n&&void 0!==n?n:{})),r={dispose:[],get:[],set:[],reset:[]},o=function(){var t;i=new Map(Object.entries(null!==(t=a(e))&&void 0!==t?t:{})),r.reset.forEach((function(e){return e()}))},s=function(e){return r.get.forEach((function(t){return t(e)})),i.get(e)},u=function(e,n){var o=i.get(e);t(n,o,e)&&(i.set(e,n),r.set.forEach((function(t){return t(e,n,o)})))},c="undefined"===typeof Proxy?{}:new Proxy(n,{get:function(e,t){return s(t)},ownKeys:function(e){return Array.from(i.keys())},getOwnPropertyDescriptor:function(){return{enumerable:!0,configurable:!0}},has:function(e,t){return i.has(t)},set:function(e,t,n){return u(t,n),!0}}),d=function(e,t){return r[e].push(t),function(){l(r[e],t)}};return{state:c,get:s,set:u,on:d,onChange:function(t,n){var i=d("set",(function(e,i){e===t&&n(i)})),r=d("reset",(function(){return n(a(e)[t])}));return function(){i(),r()}},use:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return t.set&&e.push(d("set",t.set)),t.get&&e.push(d("get",t.get)),t.reset&&e.push(d("reset",t.reset)),t.dispose&&e.push(d("dispose",t.dispose)),e}),[]);return function(){return i.forEach((function(e){return e()}))}},dispose:function(){r.dispose.forEach((function(e){return e()})),o()},reset:o,forceUpdate:function(e){var t=i.get(e);r.set.forEach((function(n){return n(e,t,t)}))}}}(e,t);return n.use(function(){if("function"!==typeof r.a)return{};var e=new Map;return{dispose:function(){return e.clear()},get:function(t){var n=(0,r.a)();n&&function(e,t,n){var i=e.get(t);i?i.includes(n)||i.push(n):e.set(t,[n])}(e,t,n)},set:function(t){var n=e.get(t);n&&e.set(t,n.filter(r.f)),s(e)},reset:function(){e.forEach((function(e){return e.forEach(r.f)})),s(e)}}}()),n}({}
1),c=u.state,d=u.onChange}}]); 2//# sourceMappingURL=2996.cd6994a5.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.