2487 lines
2.3 MiB
2487 lines
2.3 MiB
(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([[18623,27051,11860,27860,10523],{688694:(e,t,n)=>{e.exports=n.p+"c60c2d02df983392206e39c00de395ca.png"},312915:(e,t,n)=>{e.exports=n.p+"4e93f2a1547c408ca7d45d92ea092bdb.svg"},960362:(e,t,n)=>{e.exports=n.p+"8d7de3921c1f76da6c999507e7a306c4.svg"},123451:(e,t,n)=>{e.exports=n.p+"9f65387c814dd4cb5aff4e4e1e7e0446.svg"},16697:(e,t,n)=>{e.exports=n.p+"ed2007aab2da31a5436e70a28b4d59f9.svg"},105045:(e,t,n)=>{e.exports=n.p+"7ad95b56788fc31c3e5eec667129ba68.svg"},128112:(e,t,n)=>{e.exports=n.p+"9ae90b4dd4d7e4ddd9c8935dae4e87c4.svg"},876406:(e,t,n)=>{e.exports=n.p+"a92681efceabc4ee91964a7cef2571cf.svg"},576884:(e,t,n)=>{e.exports=n.p+"bee123bfad40a3fb4bb42f8d318dd867.svg"},937849:(e,t,n)=>{e.exports=n.p+"96ad9c7f6f636a7fb2028e2a07847776.svg"},772144:(e,t,n)=>{e.exports=n.p+"ef3a1ed683cfcf029971b12a26462072.svg"},976693:(e,t,n)=>{e.exports=n.p+"0e33fc3f60b69ba9b0247df60d589439.svg"},40028:(e,t,n)=>{
|
||
e.exports=n.p+"60ea1d16163c13845ccf31e70fd6528b.svg"},470914:(e,t,n)=>{e.exports=n.p+"45372ebbfad1c491747d6f5b7117fd88.svg"},399298:(e,t,n)=>{e.exports=n.p+"8fb4edd1e9b3578340fcc70e2b5e42ca.svg"},20616:(e,t,n)=>{e.exports=n.p+"c332227601f0bacc9e5b60cdb1566b0a.svg"},556306:(e,t,n)=>{e.exports=n.p+"e1f780a67d11d805caf661d4a0f38efb.svg"},72801:(e,t,n)=>{e.exports=n.p+"b7f3703c0dfe7dbf2bee1d8dd98b6861.svg"},956634:(e,t,n)=>{e.exports=n.p+"054d478080ee1ae6fd48b34cf3425509.svg"},772766:(e,t,n)=>{e.exports=n.p+"2a6caeb4c8b092945c4e5295ef4ee01a.svg"},482773:(e,t,n)=>{e.exports=n.p+"56211d7a52c875d24eb87248b915991b.png"},32028:(e,t,n)=>{e.exports=n.p+"5a6c298c68b5963581a107d420352d07.svg"},712218:(e,t,n)=>{e.exports=n.p+"140061ea7dd78e612606683c15a4bcaf.svg"},978193:(e,t,n)=>{e.exports=n.p+"62ed968b7724ad7527920bd109b0ca93.png"},755645:(e,t,n)=>{e.exports=n.p+"6f35b2fc488e26dc1d56b253d01c7b75.svg"},928793:(e,t,n)=>{e.exports=n.p+"99c599a00313a16fa4babba64d461f34.svg"},324752:(e,t,n)=>{
|
||
e.exports=n.p+"c173765c2ab447a8ec7ba0e3e8aa3c09.svg"},655916:(e,t,n)=>{e.exports=n.p+"c998fecc59ff94fe8e8e7f3557586c07.svg"},315879:(e,t,n)=>{e.exports=n.p+"255b326a18a4f8a078c90e6c35f6013b.svg"},467314:(e,t,n)=>{e.exports=n.p+"aabf08a5612d80aee6444c21176ea11a.svg"},932568:(e,t,n)=>{e.exports=n.p+"112667acf24cbb3d067ccbc54e3638de.svg"},930519:(e,t,n)=>{e.exports=n.p+"be71475205180432aaa6a89bd8ee306c.svg"},157862:(e,t,n)=>{e.exports=n.p+"40aa3feae87e9745dd56756762029544.svg"},747048:(e,t,n)=>{e.exports=n.p+"364cec2cc5dfb64873e3a33626a56ba1.svg"},558504:(e,t,n)=>{e.exports=n.p+"fa167a933d3bee952bc4a587a08c94ee.png"},417454:(e,t,n)=>{e.exports=n.p+"19d207c2cb99790d16ec686a16e77222.svg"},32358:(e,t,n)=>{e.exports=n.p+"8109cbeeed8e4358aac09a05deddb625.svg"},232353:(e,t,n)=>{e.exports=n.p+"acb954ff414b98380056308d56efcbfd.svg"},529753:(e,t,n)=>{e.exports=n.p+"b2609efe7eaf6066ccf83c63b831b9f5.png"},166682:(e,t,n)=>{e.exports=n.p+"156b50b1934142012e13cddb292be82f.png"},532958:(e,t,n)=>{
|
||
e.exports=n.p+"37168b17cb52c41180fc7dc3464416e3.png"},94672:(e,t,n)=>{e.exports=n.p+"8f1371330b0fbaa2cd14397ea198a15a.png"},800193:(e,t,n)=>{e.exports=n.p+"2fa100868d36281cf16e9b488d6783e6.png"},537687:(e,t,n)=>{e.exports=n.p+"343d87c6185c5a798189dbe0454338d2.png"},138e3:(e,t,n)=>{e.exports=n.p+"d848be8a53ceaaf74385fa2240c277fe.png"},806956:(e,t,n)=>{e.exports=n.p+"5eab8ab3c3d86af84e525961596fc710.png"},492137:(e,t,n)=>{e.exports=n.p+"a088a8a4d03c76f5b198a8c38e820823.svg"},419552:(e,t,n)=>{e.exports=n.p+"5e8ddaef72797b0ddec742ea3ffe6b4c.svg"},185204:(e,t,n)=>{e.exports=n.p+"3093c4e6a3ee8ef9d6ee62ffea283603.svg"},73316:(e,t,n)=>{e.exports=n.p+"02e604928e685344a86abbd473841a3d.svg"},385488:(e,t,n)=>{e.exports=n.p+"dbdc2f57ed1a7f2f01a342ab2e6fb032.svg"},5064:(e,t,n)=>{e.exports=n.p+"a375de187c8d70afb21e426ffa95453d.svg"},949191:(e,t,n)=>{e.exports=n.p+"850d4b3febb2dd085c8821beb85cd46c.jpg"},305257:(e,t,n)=>{e.exports=n.p+"db81e4b4d2c579be53e7faafa720fa5b.jpg"},222917:(e,t,n)=>{
|
||
e.exports=n.p+"ec499e7dcc451566caeda997fa9265db.svg"},153996:(e,t,n)=>{e.exports=n.p+"e3da44ce48e0ff29426d0cfb99c2580c.svg"},77015:(e,t,n)=>{e.exports=n.p+"7c437e103eb9348c4688a03705d30d4b.mp4"},846334:(e,t,n)=>{"use strict";n.d(t,{h7:()=>o,rh:()=>i,GG:()=>a,R2:()=>l});var r=n(744564);function o(e,t){return new Promise((function(n){setTimeout((function(){r.Z.dispatch({type:"ACTIVITY_INVITE_MODAL_OPEN",activity:e,isPrivate:t,resolve:n})}),0)}))}function i(e){r.Z.dispatch({type:"ACTIVITY_INVITE_MODAL_QUERY",query:e})}function a(e){r.Z.dispatch({type:"ACTIVITY_INVITE_MODAL_SEND",channelId:e})}function l(e){r.Z.dispatch({type:"ACTIVITY_INVITE_MODAL_SEND",userId:e})}},106750:(e,t,n)=>{"use strict";n.d(t,{Ue:()=>x,bR:()=>P,G7:()=>N,K5:()=>A,$z:()=>Z,gk:()=>R,AQ:()=>D,uY:()=>k});var r=n(478465),o=n(224955),i=n.n(o),a=n(817673),l=n(281110),u=n(744564),c=n(784426),s=n(340974),f=n(575136),d=n(2590),p=n(594697);function h(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,l,"next",e)}function l(e){y(i,r,o,a,l,"throw",e)}a(void 0)}))}}function v(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){v(e,t,n[t])}))}return e}function g(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){
|
||
if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}var j=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),
|
||
0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},S=window.GLOBAL_ENV.ALGOLIA_KEY,I="production"===window.GLOBAL_ENV.PROJECT_ENV?"prod_discoverable_guilds":"staging"===window.GLOBAL_ENV.PROJECT_ENV?"stg_discoverable_guilds":"dev_discoverable_guilds",_={"auto_removed:":!1,approximate_presence_count:"> 0",approximate_member_count:"> 0"};function w(e){
|
||
var t=e.query,n=e.preferredLocale,r=e.offset,o=e.limit,i=e.categoryId,l=e.tag,u=(0,c.s1)(),s=a.stringify({query:t,offset:r,limit:o,preferredLocale:n,categoryId:i,tag:l}),f=u.location.search;if(!(null!=f&&f.length>0&&f.startsWith("?"))||f.startsWith("?")&&f.split("?")[1]!==s){var p={search:s};(0,c.uL)(d.Z5c.GUILD_DISCOVERY,p)}}function x(){if(null!=S){var e=i()("NKTZZ4AIZU",S,{responsesCache:(0,r.A)()}).initIndex(I);u.Z.wait((function(){return u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_INIT",index:e})}))}}function P(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.categoryId,o=void 0===r?p.Hk:r,i=t.preferredLocale,a=t.offset,c=t.length,f=t.tag,h=s.ZP.getSearchIndex();if(null!=h){n&&w({query:e,preferredLocale:i,offset:a,limit:c,categoryId:o,tag:f});u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_FETCH_START",section:d.Lcj.SEARCH,query:e,categoryId:o});var y=Object.assign({},_,t.filters),b=Object.keys(y),v=b.map((function(e){return"".concat(e).concat(y[e])}))
|
||
;o!==p.Hk&&v.push("(primary_category_id=".concat(o," OR categories.id=").concat(o,")"));var C=v.join(" AND "),j=["preferred_locale: ".concat(i)],S=["name","description","keywords","categories.name","categories.name_localizations.".concat(i),"primary_category.name","primary_category.name_localizations.".concat(i),"vanity_url_code"];try{var I=h.search(e,{filters:C,optionalFilters:j,length:c,offset:a,restrictSearchableAttributes:S}),x=l.Z.get({url:d.ANM.GUILD_DISCOVERY_VALID_TERM,query:{term:e},oldFormErrors:!0});Promise.all([I,x]).then((function(t){var n=O(t,2),r=n[0],i=r.hits,l=r.nbHits,s=n[1].body.valid;u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_FETCH_SUCCESS",section:d.Lcj.SEARCH,query:e,categoryId:o,guilds:s?E(i.map((function(e){return g(m({},e),{id:e.objectID})}))):[],offset:a,limit:c,total:s?Math.min(l,p.lA):0})})).catch((function(r){r.body.retry_after>0&&h===s.ZP.getSearchIndex()?setTimeout((function(){P(e,t,n)}),1e3*r.body.retry_after):u.Z.dispatch({
|
||
type:"GUILD_DISCOVERY_SEARCH_FETCH_FAILURE",section:d.Lcj.SEARCH,categoryId:o,query:e})}))}catch(t){u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_FETCH_FAILURE",section:d.Lcj.SEARCH,categoryId:o,query:e})}}}function N(e,t){var n=s.ZP.getSearchIndex();if(null!=n){var r=Object.assign({},_,t),o=Object.keys(r).map((function(e){return"".concat(e).concat(r[e])}));try{var i=n.search(e,{filters:o.join(" AND "),facets:["categories.id"]}),a=l.Z.get({url:d.ANM.GUILD_DISCOVERY_VALID_TERM,query:{term:e},oldFormErrors:!0});Promise.all([i,a]).then((function(t){var n=O(t,2),r=n[0],o=r.nbHits,i=r.facets,a=n[1].body.valid;u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_UPDATE_COUNTS",query:e,nbHits:a?o:0,facets:a?i:void 0})}))}catch(t){u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_COUNTS_FAIL",query:e})}}}function A(e){return T.apply(this,arguments)}function T(){return(T=b((function(e){var t,n;return j(this,(function(r){switch(r.label){case 0:u.Z.dispatch({type:"GUILD_DISCOVERY_POPULAR_FETCH_START",categoryId:e})
|
||
;r.label=1;case 1:r.trys.push([1,3,,4]);return[4,l.Z.get({url:d.ANM.GUILD_DISCOVERY,query:a.stringify({categories:[e]}),oldFormErrors:!0})];case 2:t=r.sent();n=t.body.guilds;u.Z.dispatch({type:"GUILD_DISCOVERY_POPULAR_FETCH_SUCCESS",categoryId:e,guilds:n});return[3,4];case 3:r.sent();u.Z.dispatch({type:"GUILD_DISCOVERY_POPULAR_FETCH_FAILURE",categoryId:e});return[3,4];case 4:return[2]}}))}))).apply(this,arguments)}function Z(e,t){return M.apply(this,arguments)}function M(){return(M=b((function(e,t){return j(this,(function(n){switch(n.label){case 0:u.Z.dispatch({type:"GUILD_DISCOVERY_FETCH_START",section:d.Lcj.FEATURED});n.label=1;case 1:n.trys.push([1,3,,4]);return[4,l.Z.get({url:d.ANM.GUILD_DISCOVERY,query:a.stringify({offset:e,limit:t}),oldFormErrors:!0})];case 2:U(n.sent().body,d.Lcj.FEATURED);return[3,4];case 3:n.sent();u.Z.dispatch({type:"GUILD_DISCOVERY_FETCH_FAILURE",section:d.Lcj.FEATURED});return[3,4];case 4:return[2]}}))}))).apply(this,arguments)}function R(){
|
||
return L.apply(this,arguments)}function L(){return(L=b((function(){var e,t;return j(this,(function(n){switch(n.label){case 0:e=f.Z.applicationStatistics;t=Object.keys(e);u.Z.dispatch({type:"GUILD_DISCOVERY_FETCH_START",section:d.Lcj.GAMES_YOU_PLAY});n.label=1;case 1:n.trys.push([1,3,,4]);return[4,l.Z.get({url:d.ANM.GUILD_DISCOVERY,query:a.stringify({application_ids:t}),oldFormErrors:!0})];case 2:U(n.sent().body,d.Lcj.GAMES_YOU_PLAY);return[3,4];case 3:n.sent();u.Z.dispatch({type:"GUILD_DISCOVERY_FETCH_FAILURE",section:d.Lcj.GAMES_YOU_PLAY});return[3,4];case 4:return[2]}}))}))).apply(this,arguments)}function D(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&(0,c.uL)(d.Z5c.GUILD_DISCOVERY);u.Z.dispatch({type:"GUILD_DISCOVERY_CLEAR_SEARCH"})}function k(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u.Z.dispatch({type:"GUILD_DISCOVERY_SELECT_CATEGORY",categoryId:e,isHomepage:t})}function U(e,t){var n=e.offset,r=e.limit,o=e.guilds,i=e.total
|
||
;u.Z.dispatch({type:"GUILD_DISCOVERY_FETCH_SUCCESS",section:t,guilds:o,offset:n,limit:r,total:i})}},832763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(281110),o=n(744564),i=n(2590);const a={fetchRegions:function(e){r.Z.get({url:i.ANM.REGIONS(e),retries:1,oldFormErrors:!0}).then((function(t){return o.Z.dispatch({type:"LOAD_REGIONS",regions:t.body,guildId:e})}),(function(){return o.Z.dispatch({type:"LOAD_REGIONS",regions:[],guildId:e})}))},changeCallRegion:function(e,t){r.Z.patch({url:i.ANM.CALL(e),body:{region:t},oldFormErrors:!0})}}},217458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(281110),o=n(744564),i=n(2590);const a={show:function(e,t){o.Z.wait((function(){return o.Z.dispatch({type:"TUTORIAL_INDICATOR_SHOW",tutorialId:e,renderData:t})}))},hide:function(e){o.Z.wait((function(){return o.Z.dispatch({type:"TUTORIAL_INDICATOR_HIDE",tutorialId:e})}))},dismiss:function(e){o.Z.wait((function(){return o.Z.dispatch({type:"TUTORIAL_INDICATOR_DISMISS",tutorialId:e})}));r.Z.put({
|
||
url:i.ANM.TUTORIAL_INDICATOR(e),oldFormErrors:!0})},suppressAll:function(){o.Z.dispatch({type:"TUTORIAL_INDICATOR_SUPPRESS_ALL"});r.Z.post({url:i.ANM.TUTORIAL_INDICATORS_SUPPRESS,oldFormErrors:!0})}}},268319:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(707961),o=n(744564),i=n(943469),a=n(665472),l=n(567867),u=n(444663),c=n(769915),s=n(598143),f=n(474717),d=n(460471),p=n(571690),h=n(201891),y=n(649536),b=n(358624),v=n(396043),m=n(2590);function g(e){var t,n,r,o=null!=e.fileItems?e.fileItems.map((function(e){return null!==(t=e.mimeType)&&void 0!==t?t:"unknown"})):[],i=null!==(n=e.errorMessage)&&void 0!==n?n:void 0,a=null!==(r=e.failureCode)&&void 0!==r?r:void 0;(0,v.yw)(m.rMx.SEND_MESSAGE_FAILURE,{failure_code:a,error_message:i,attachment_mimetypes:o})}var O=n(28862),E=n(798808),C=n(331055),j=n(284610),S=n(255592),I=n(661123),_=n(473708);function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t,n,r,o,i,a){try{
|
||
var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function P(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){P(e,t,n[t])}))}return e}function A(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}
|
||
function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Z=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),
|
||
throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function M(e){
|
||
var t,r,s=e.channelId,f=e.uploads,v=e.draftType,w=e.parsedMessage,P=e.options,R=void 0===P?{}:P,L=function(){""!==k.content&&""===j.Z.getDraft(s,v)&&i.Z.saveDraft(s,k.content,v);0===S.Z.getUploadCount(s,v)&&l.Z.setUploads({channelId:s,uploads:f,draftType:v})},D=new d.Z(m.ANM.MESSAGES(s)),k={content:"",nonce:"",channel_id:s,type:m.uaV.DEFAULT,sticker_ids:null==R?void 0:R.stickerIds,captcha_key:null==R||null===(t=R.captchaPayload)||void 0===t?void 0:t.captcha_key,captcha_rqtoken:null==R||null===(r=R.captchaPayload)||void 0===r?void 0:r.captcha_rqtoken};null!=w&&(k.content=null==w?void 0:w.content);if(null!=E.Z.getPendingReply(s)){k.type=m.uaV.REPLY;k.message_reference=R.messageReference;k.allowed_mentions=R.allowedMentions;(0,O.A6)(s)}var U,B=T((0,C.ZP)(k.content),2),F=B[0],G=B[1];if(F){k.content=G;var H;k.flags=(0,I.pj)(null!==(H=k.flags)&&void 0!==H?H:0,m.iLy.SUPPRESS_NOTIFICATIONS)}var V,W,z,Y,K=null!==(U=R.nonce)&&void 0!==U?U:(0,b.rv)(),q=(0,b.ZP)({channelId:s,content:k.content,
|
||
tts:null!==(V=null==w?void 0:w.tts)&&void 0!==V&&V,type:k.type,messageReference:k.message_reference,flags:k.flags,nonce:K});k.nonce=K;D.on("start",(function(e){W=(0,y.e5)(A(N({},q),{id:e.id}));o.Z.dispatch({type:"UPLOAD_START",channelId:s,file:e,message:W,uploader:D})}));D.on("progress",(function(e){o.Z.dispatch({type:"UPLOAD_PROGRESS",channelId:s,file:e})}));D.on("error",(Y=(z=function(e,t,r){var i,l;return Z(this,(function(d){switch(d.label){case 0:o.Z.dispatch({type:"UPLOAD_FAIL",channelId:s,file:e,messageRecord:W});g({fileItems:e.items,failureCode:t});if(t===m.evJ.EXPLICIT_CONTENT){a.Z.sendClydeError(s,t);return[2]}if(t===m.evJ.AUTOMOD_MESSAGE_BLOCKED){i={code:t,message:null==r?void 0:r.message};l=null==W?null:{type:c.$V.SEND,message:A(N({},W),{channelId:s})};(0,u.openUploadError)({title:_.Z.Messages.UPLOAD_AREA_UPLOAD_FAILED_TITLE,help:(0,h.uF)(l,i)});return[2]}return null==r||null==r.captcha_key||null!=R.captchaPayload?[3,2]:[4,n.e(72519).then(n.bind(n,972519))];case 1:
|
||
d.sent().default.showCaptchaAsync((0,p.z)(r)).then((function(e){M({channelId:s,uploads:f,draftType:v,parsedMessage:w,options:A(N({},R),{captchaPayload:e})})}),(function(){L()}));return[3,3];case 2:(0,u.openUploadError)({title:_.Z.Messages.UPLOAD_AREA_UPLOAD_FAILED_TITLE,help:_.Z.Messages.UPLOAD_AREA_UPLOAD_FAILED_RETRY_HELP});L();d.label=3;case 3:return[2]}}))},function(){var e=this,t=arguments;return new Promise((function(n,r){var o=z.apply(e,t);function i(e){x(o,n,r,i,a,"next",e)}function a(e){x(o,n,r,i,a,"throw",e)}i(void 0)}))}),function(e,t,n){return Y.apply(this,arguments)}));D.on("complete",(function(e){o.Z.dispatch({type:"UPLOAD_COMPLETE",channelId:s,file:e,aborted:D._aborted})}));D.uploadFiles(f,k)}const R={instantBatchUpload:function(e,t,n){var r=Array.from(t).map((function(t){return new s.n({file:t,platform:f.ow.WEB},e)}));M({channelId:e,uploads:r,draftType:n})},upload:function e(t){var n=t.channelId,l=t.file,c=t.draftType,s=t.message,f={content:"",tts:!1,
|
||
hasSpoiler:t.hasSpoiler,filename:t.filename};if(null!=s){f.content=s.content;f.tts=s.tts;f.channel_id=s.channel_id;var p=E.Z.getPendingReply(n);if(null!=p){var h=a.Z.getSendMessageOptionsForReply(p);f.type=m.uaV.REPLY;f.message_reference=h.messageReference;f.allowed_mentions=h.allowedMentions;(0,O.A6)(n)}}var y=new d.Z(m.ANM.MESSAGES(n));y.on("start",(function(e){o.Z.dispatch({type:"UPLOAD_START",channelId:n,file:e,uploader:y})}));y.on("progress",(function(e){o.Z.dispatch({type:"UPLOAD_PROGRESS",channelId:n,file:e})}));y.on("error",(function(t,d){o.Z.dispatch({type:"UPLOAD_FAIL",channelId:n,file:t});g({fileItems:t.items,failureCode:d});if(d!==m.evJ.EXPLICIT_CONTENT){(0,u.openUploadError)({title:_.Z.Messages.UPLOAD_AREA_UPLOAD_FAILED_TITLE,help:_.Z.Messages.UPLOAD_AREA_UPLOAD_FAILED_HELP.format({onClick:function(){(0,r.Mr3)(u.UPLOAD_ERROR_MODAL_KEY);e({channelId:n,file:l,draftType:c,message:s})}})});""!==f.content&&""===j.Z.getDraft(n,c)&&i.Z.saveDraft(n,f.content,c)
|
||
}else a.Z.sendClydeError(n,d)}));y.on("complete",(function(e){o.Z.dispatch({type:"UPLOAD_COMPLETE",channelId:n,file:e})}));y.upload(l,f)},uploadFiles:M,cancel:function(e){o.Z.dispatch({type:"UPLOAD_CANCEL_REQUEST",file:e});if(null!=e.draftContent&&null!=e.channelId){""===j.Z.getDraft(e.channelId,j.d.ChannelMessage)&&o.Z.dispatch({type:"DRAFT_SAVE",channelId:e.channelId,draft:e.draftContent,draftType:j.d.ChannelMessage})}}}},595689:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ku});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(496486),s=n.n(c),f=n(751615),d=n(202351),p=n(707961),h=n(971402),y=n(672380),b=n(679724),v=n(151650),m=n(609145),g=n(566706),O=n(922189),E=n(773011),C=n(281808),j=n(91174),S=n(792800),I=n(744564),_=n(496916),w=n(172028),x=n(717091),P=n(652591),N=n(937119),A=n(921603),T=n(878033),Z=n(876186),M=n(34183),R=n(672886),L=n(2590),D=n(473708),k=n(8429),U=n.n(k);function B(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}
|
||
l.done?t(u):Promise.resolve(u).then(r,o)}function F(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){B(i,r,o,a,l,"next",e)}function l(e){B(i,r,o,a,l,"throw",e)}a(void 0)}))}}function G(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function H(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var V=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},
|
||
"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};const W=function(e){var t=e.guild,i=e.onAddGuild,a=o.useCallback((function(){(0,
|
||
p.ZDy)(F((function(){var e,o;return V(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,H(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){G(e,t,n[t])}))}return e}({},e),{guild:t,source:L.t4x.HUB_DIRECTORY,analyticsLocation:{section:L.jXE.HUB_WELCOME_CTA}}))}]}}))})))}),[t]);return(0,r.jsxs)("div",{className:U().emptyWrapper,children:[(0,r.jsx)("img",{className:U().emptyImage,alt:"",src:n(655916)}),(0,r.jsx)(p.X6q,{className:U().emptyTitle,variant:"heading-xl/semibold",children:D.Z.Messages.HUB_DIRECTORY_CHANNEL_EMPTY_TITLE.format({guildName:t.name})}),(0,r.jsx)(p.xvT,{
|
||
variant:"text-md/normal",className:U().emptySubtitle,children:D.Z.Messages.HUB_DIRECTORY_CHANNEL_EMPTY_SUBTITLE}),null!=i?(0,r.jsx)(R.i,{className:U().emptyCTA,iconUrl:n(755645),header:D.Z.Messages.HUB_DIRECTORY_CHANNEL_EMPTY_ADD_SERVER,completed:!1,onClick:i}):null,(0,r.jsx)(R.i,{className:U().emptyCTA,iconUrl:n(930519),header:D.Z.Messages.HUB_DIRECTORY_CHANNEL_EMPTY_INVITE,completed:!1,onClick:a})]})};var z=n(282898),Y=n(327499),K=n(874049),q=n(934870),Q=n(848285),X=n(567403),J=n(206986),$=n(124251),ee=n(186440),te=n(472034),ne=n(211482),re=n(668159),oe=n(775173),ie=n(977085),ae=n(58939),le=n.n(ae),ue=n(928793),ce=n.n(ue);function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fe(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function de(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){
|
||
fe(i,r,o,a,l,"next",e)}function l(e){fe(i,r,o,a,l,"throw",e)}a(void 0)}))}}function pe(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){pe(e,t,n[t])}))}return e}function ye(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function be(e,t){
|
||
if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n)
|
||
;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var me=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,
|
||
o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},ge=function(e){var t=e.onClick;return(0,r.jsxs)(p.P3F,{onClick:t,className:le().addEntryCard,children:[(0,r.jsx)("img",{alt:"",src:ce()}),(0,r.jsx)(p.xvT,{variant:"text-sm/semibold",color:"header-primary",className:le().addServerText,children:D.Z.Messages.HUB_ADD_SERVER_CTA})]})};function Oe(e){var t=e.entry,i=ve(o.useState(!1),2),l=i[0],u=i[1],c=(0,M.Z)(t).canEdit;return(0,r.jsx)("div",{className:a()(le().actionButtonsContainer,pe({},le().forceButtonsShow,l)),children:(0,r.jsxs)(re.ZP,{children:[c?(0,r.jsx)(p.ua7,{text:D.Z.Messages.HUB_ENTRY_UPDATE,hideOnClick:!0,children:function(e){
|
||
var o=e.onClick,i=be(e,["onClick"]);return(0,r.jsx)(re.zx,ye(he({},i),{onClick:function(){null==o||o();(0,p.ZDy)(de((function(){var e,o;return me(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(62439)]).then(n.bind(n,162439))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,ye(he({},e),{entry:t}))}]}}))})))},"aria-label":D.Z.Messages.HUB_ENTRY_UPDATE,children:(0,r.jsx)(te.Z,{className:le().overflowIcon})}))}}):null,(0,r.jsx)(ie.Z,{onRequestOpen:function(){return u(!0)},onRequestClose:function(){return u(!1)},entry:t,hideEditButton:!0,children:function(e){var t=e.onClick,n=be(e,["onClick"]);return(0,r.jsx)(p.ua7,{text:D.Z.Messages.MORE,hideOnClick:!0,children:function(e){var o=e.onClick,i=be(e,["onClick"]);return(0,r.jsx)(re.zx,ye(he({},n,i),{onClick:function(e){null==o||o();t(e)},"aria-label":D.Z.Messages.MORE,children:(0,r.jsx)(ee.Z,{className:le().overflowIcon})}))}})}})]})})}const Ee=function(e){
|
||
var t,i,a=e.entry,l=ve(o.useState(!1),2),u=l[0],c=l[1],s=null!=(0,d.e7)([X.Z],(function(){return X.Z.getGuild(a.guildId)})),f=(t=de((function(){return me(this,(function(e){switch(e.label){case 0:c(!0);e.label=1;case 1:e.trys.push([1,,5,6]);return s?[3,3]:[4,Y.Z.joinGuild(a.guildId,{source:L.vtS.DIRECTORY_ENTRY})];case 2:e.sent();return[3,4];case 3:(0,q.X)(a.guildId);e.label=4;case 4:return[3,6];case 5:c(!1);return[7];case 6:return[2]}}))})),function(){return t.apply(this,arguments)}),y=oe.ZP.getGuildSplashURL({id:a.guildId,splash:a.splash,size:300*(0,K.x_)()}),b=null!==(i=oe.ZP.getGuildIconURL({id:a.guildId,icon:a.icon,size:40}))&&void 0!==i?i:void 0,v=D.Z.Messages.JOIN;s&&(v=D.Z.Messages.HUB_DIRECTORY_CARD_JOINED_GUILD_BUTTON);return(0,r.jsxs)("div",{className:le().card,onContextMenu:function(e){(0,h.jW)(e,de((function(){var e,t;return me(this,(function(o){switch(o.label){case 0:return[4,Promise.resolve().then(n.bind(n,156342))];case 1:e=o.sent(),t=e.default;return[2,function(e){
|
||
return(0,r.jsx)(t,ye(he({},e),{entry:a}))}]}}))})))},children:[(0,r.jsxs)("div",{className:le().cardHeader,children:[(0,r.jsx)("div",{className:le().splash,children:null!=y&&(0,r.jsx)("img",{src:y,alt:"",className:le().splashImage})}),(0,r.jsx)("div",{className:le().guildIcon,children:(0,r.jsx)(ne.ZP,{mask:ne.ZP.Masks.SQUIRCLE,width:48,height:48,children:(0,r.jsx)("div",{className:le().iconMask,children:(0,r.jsx)($.Z,{className:le().icon,iconSrc:b,guild:new Q.Z(a),size:$.Z.Sizes.MEDIUM,active:!0})})})})]}),(0,r.jsxs)("div",{className:le().guildInfo,children:[(0,r.jsxs)("div",{className:le().title,children:[(0,r.jsx)(J.Z,{className:le().guildBadge,guild:a,tooltipColor:p.ua7.Colors.PRIMARY}),(0,r.jsx)(p.xvT,{className:le().guildName,variant:"heading-md/semibold",color:"header-primary",children:a.name})]}),(0,r.jsx)(p.xvT,{className:le().description,variant:"text-sm/normal",color:"header-secondary",children:a.description}),(0,r.jsxs)("div",{className:le().memberInfo,
|
||
children:[null!=a.approximatePresenceCount&&(0,r.jsxs)("div",{className:le().memberCount,children:[(0,r.jsx)("div",{className:le().dotOnline}),(0,r.jsx)(p.xvT,{variant:"text-xs/normal",color:"header-secondary",children:D.Z.Messages.INSTANT_INVITE_GUILD_MEMBERS_ONLINE.format({membersOnline:a.approximatePresenceCount})})]}),null!=a.approximateMemberCount&&(0,r.jsxs)("div",{className:le().memberCount,children:[(0,r.jsx)("div",{className:le().dotOffline}),(0,r.jsx)(p.xvT,{variant:"text-xs/normal",color:"header-secondary",children:D.Z.Messages.INSTANT_INVITE_GUILD_MEMBERS_TOTAL.format({count:a.approximateMemberCount})})]})]}),(0,r.jsx)(p.zxk,{submitting:u,className:le().joinButton,color:s?p.zxk.Colors.PRIMARY:p.zxk.Colors.GREEN,onClick:f,children:v})]}),(0,r.jsx)(Oe,{entry:a})]})};var Ce=n(612831),je=n(42555),Se=n.n(je),Ie=n(84839),_e=n.n(Ie),we=n(324752),xe=n.n(we),Pe=n(315879),Ne=n.n(Pe);function Ae(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0
|
||
}):e[t]=n;return e}var Te=(0,y.Z)((function(e){var t=e.searchQuery,n=e.setSearchQuery,o=e.handleClearSearch,i=e.handleSearchKeyPress,l=e.width,u=null!=l&&l<=800;return(0,r.jsxs)("div",{className:_e().header,children:[(0,r.jsx)("img",{alt:"",className:_e().headerImage,src:u?Ne():xe()}),(0,r.jsx)("div",{className:_e().headerContentWrapper,children:(0,r.jsxs)("div",{className:a()(_e().headerContent,Ae({},_e().headerContentSmall,u)),children:[(0,r.jsx)(p.X6q,{variant:"heading-xl/semibold",className:_e().searchTitle,children:D.Z.Messages.HUB_DIRECTORY_SEARCH_TITLE}),(0,r.jsx)(p.xvT,{variant:"text-md/normal",className:_e().searchSubtitle,children:D.Z.Messages.HUB_DIRECTORY_SEARCH_SUBTITLE}),(0,r.jsx)(z.Z,{searchTerm:t,className:_e().searchBox,inputClassName:_e().searchBoxInput,closeIconClassName:_e().closeIcon,searchIconClassName:_e().searchIcon,label:D.Z.Messages.DIRECTORY_SEARCH_PLACEHOLDER,placeholder:D.Z.Messages.DIRECTORY_SEARCH_PLACEHOLDER,onChange:n,onClear:o,onKeyPress:i,
|
||
cta:null!=t&&t.length>0?D.Z.Messages.GUILD_DISCOVERY_SEARCH_ENTER_CTA:null})]})})]})}));const Ze=function(e){var t=e.channel,n=e.directoryEntries,o=e.handleCreateOrAddGuild,i=e.searchQuery,a=e.setSearchQuery,l=e.handleClearSearch,u=e.handleSearchKeyPress,c=e.currentCategoryId,s=e.handleSelectCategory,f=e.categoryCounts,d=e.allEntriesCount,h=e.isLoading;return(0,r.jsx)("div",{className:Se().pageContainer,children:(0,r.jsxs)(p.yWw,{className:Se().scroller,children:[(0,r.jsx)(Te,{searchQuery:i,setSearchQuery:a,handleClearSearch:l,handleSearchKeyPress:u}),(0,r.jsx)(p.h21,{orientation:"horizontal",children:(0,r.jsxs)(p.njP,{className:_e().tabBar,type:"top",look:"brand",selectedItem:c,onItemSelect:function(e){s(e)},children:[(0,r.jsx)(p.njP.Item,{className:_e().tabBarItem,id:Ce.AR.ALL,children:"".concat(D.Z.Messages.DIRECTORY_CATEGORY_ALL," (").concat(d,")")},Ce.AR.ALL),(0,Ce.b7)(t.id).map((function(e){var t=e.value,n=e.label;return(0,r.jsx)(p.njP.Item,{className:_e().tabBarItem,id:t,
|
||
children:"".concat(n," ").concat(null!=f[t]?"(".concat(f[t],")"):"")},t)}))]})}),h&&null==n?(0,r.jsx)(p.$jN,{className:Se().spinner}):null==n?void 0:n.map((function(e){return(0,r.jsxs)(r.Fragment,{children:[void 0!==e.header?(0,r.jsx)(p.xvT,{variant:"text-md/semibold",className:_e().sectionHeader,children:e.header}):null,(0,r.jsxs)("div",{className:Se().cardsContainer,children:[e.entries.map((function(e){return(0,r.jsx)(Ee,{entry:e},e.guildId)})),e.appendEndCard&&null!=o?(0,r.jsx)(ge,{onClick:o}):null]})]})}))]})})};var Me=n(549331);var Re=n(873308),Le=n(495910),De=n.n(Le),ke=n(123451),Ue=n.n(ke);const Be=function(e){var t,n=e.searchQuery,o=e.setSearchQuery,i=e.mostRecentQuery,a=e.handleClearSearch,l=e.handleSearchKeyPress,u=e.handleCreateOrAddGuild,c=e.searchResults;if(e.searchFetching)t=(0,r.jsx)("div",{className:Se().pageContainer,children:(0,r.jsx)(p.$jN,{className:Se().spinner})});else if(0===c.length){var s=null!=u?D.Z.Messages.DIRECTORY_SEARCH_NO_RESULTS_SUBTITLE.format({
|
||
addServerHook:function(e,t){return(0,r.jsx)(p.eee,{onClick:u,children:e},t)}}):D.Z.Messages.DIRECTORY_SEARCH_NO_RESULTS_NO_ADD;t=(0,r.jsxs)("div",{className:De().emptySearchWrapper,children:[(0,r.jsx)("img",{className:De().emptySearchImage,alt:"",src:Ue()}),(0,r.jsx)(p.X6q,{variant:"heading-xl/semibold",color:"header-primary",className:De().emptySearchTitle,children:D.Z.Messages.DIRECTORY_SEARCH_NO_RESULTS_TITLE}),(0,r.jsx)(p.xvT,{variant:"text-md/normal",color:"header-secondary",className:De().emptySearchSubtitle,children:s})]})}else t=(0,r.jsx)("div",{className:Se().cardsContainer,children:c.map((function(e){return(0,r.jsx)(Ee,{entry:e},e.guildId)}))});return(0,r.jsx)("div",{className:Se().pageContainer,children:(0,r.jsxs)(p.w0Z,{className:Se().scroller,children:[(0,r.jsxs)("div",{className:De().searchHeader,children:[(0,r.jsxs)("div",{className:De().headerTitleWrapper,children:[(0,r.jsx)(p.P3F,{onClick:a,className:De().arrow,children:(0,r.jsx)(Re.Z,{direction:Re.Z.Directions.LEFT})
|
||
}),(0,r.jsx)(p.X6q,{variant:"heading-xl/semibold",className:De().searchPageTitle,children:D.Z.Messages.DIRECTORY_SEARCH_RESULTS_HEADER.format({numResults:c.length,query:i})})]}),(0,r.jsx)(z.Z,{searchTerm:n,className:De().searchPageBox,inputClassName:De().searchPageInput,label:D.Z.Messages.DIRECTORY_SEARCH_PLACEHOLDER,placeholder:D.Z.Messages.DIRECTORY_SEARCH_PLACEHOLDER,onChange:o,onClear:a,onKeyPress:l,cta:null!=n&&n.length>0?D.Z.Messages.GUILD_DISCOVERY_SEARCH_ENTER_CTA:null})]}),t]})})};function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function He(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ge(i,r,o,a,l,"next",e)}function l(e){Ge(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ve(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,
|
||
configurable:!0,writable:!0}):e[t]=n;return e}function We(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Fe(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ye=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1}
|
||
;case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};const Ke=function(e){var t=e.channel,i=e.guild,a=(0,d.cj)([Z.Z],(function(){var e=Z.Z.getCurrentCategoryId(t.id);return{currentCategoryId:e,directoryEntries:Z.Z.getDirectoryEntries(t.id,e===Ce.AR.ALL?null:e),categoryCounts:Z.Z.getDirectoryCategoryCounts(t.id),allEntriesCount:Z.Z.getDirectoryAllEntriesCount(t.id),isLoading:Z.Z.isFetching()}})),l=a.currentCategoryId,u=a.directoryEntries,c=a.categoryCounts,s=a.allEntriesCount,f=a.isLoading;o.useEffect((function(){return function(){
|
||
var e=x.ZP.lastMessageId(t.id);null!=e&&I.Z.wait((function(){(0,_.In)(t.id,!0,!0,e)}))}}),[t.id]);var h,y=o.useMemo((function(){return null!=u?function(e,t){if(t!==Ce.AR.ALL)return[{entries:(0,Me.TR)(e),appendEndCard:!0}];var n=[],r=(0,Me.Lz)(e),o=new Set(r.map((function(e){return e.guildId})));r.length>0&&n.push({header:D.Z.Messages.SEARCH_NEWEST,entries:r,appendEndCard:!1});var i=e.filter((function(e){return!o.has(e.guildId)}));(i=(0,Me.Th)(i)).length>0&&n.push({header:D.Z.Messages.ALL_SERVERS,entries:i,appendEndCard:!0});return n}(Object.values(u),l):null}),[u,l]),b=(0,d.cj)([T.Z],(function(){var e=T.Z.getSearchState(t.id),n=e.mostRecentQuery;return{mostRecentQuery:n,searchFetching:e.fetching,searchResults:T.Z.getSearchResults(t.id,n)}})),v=b.mostRecentQuery,m=b.searchFetching,g=b.searchResults,O=ze(o.useState(v),2),E=O[0],C=O[1],j=""!==v,S=w.Z.useExperiment({guildId:null!==(h=i.id)&&void 0!==h?h:""}).showHubEventsList;o.useEffect((function(){A.c$(t.id);A.YZ(t.id);S&&N.c(t.id);C(v)
|
||
}),[t.id]);o.useEffect((function(){P.default.track(L.rMx.GUILD_DIRECTORY_CHANNEL_VIEWED,{directory_channel_id:t.id,directory_guild_id:i.id,primary_category_id:l})}),[t.id,i.id,l]);var R=(0,M.G)(t)?function(){(0,p.ZDy)(He((function(){var e,o;return Ye(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(95599),n.e(47035)]).then(n.bind(n,647035))];case 1:e=a.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,We(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ve(e,t,n[t])}))}return e}({},e),{directoryGuildName:i.name,directoryGuildId:i.id,directoryChannelId:t.id,currentCategoryId:l===Ce.AR.ALL?null:l}))}]}}))})))}:void 0,k=function(e){if(0!==E.trim().length&&e.charCode===L.yXg.ENTER){A.Rq(t.id,E)
|
||
;P.default.track(L.rMx.GUILD_DIRECTORY_SEARCH,{directory_channel_id:t.id,directory_guild_id:i.id})}},U=function(){C("");A.So(t.id)};return j?(0,r.jsx)(Be,{searchQuery:E,setSearchQuery:C,mostRecentQuery:v,handleSearchKeyPress:k,handleClearSearch:U,handleCreateOrAddGuild:R,searchResults:g,searchFetching:m}):null==y&&null==l?(0,r.jsx)("div",{className:Se().pageContainer,children:(0,r.jsx)(p.$jN,{className:Se().spinner})}):0===(null==y?void 0:y.length)&&null==l?(0,r.jsx)("div",{className:Se().pageContainer,children:(0,r.jsx)(W,{guild:i,onAddGuild:R})}):(0,r.jsx)(Ze,{channel:t,searchQuery:E,setSearchQuery:C,handleSearchKeyPress:k,handleClearSearch:U,handleCreateOrAddGuild:R,currentCategoryId:l,handleSelectCategory:function(e){A.Su(t.id,e)},directoryEntries:y,categoryCounts:c,allEntriesCount:s,isLoading:f})};var qe=n(764079),Qe=n(341305),Xe=n(684412),Je=n(784426),$e=n(54282),et=n(61209),tt=n(284610),nt=n(373438),rt=n(854602),ot=n(651455),it=n.n(ot);function at(e,t,n,r,o,i,a){try{
|
||
var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function lt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){at(i,r,o,a,l,"next",e)}function l(e){at(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ut(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ct(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var st=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),
|
||
throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function ft(e){var t=e.channelId,i=(0,
|
||
d.e7)([et.Z],(function(){return et.Z.getChannel(t)})),a=(0,d.e7)([et.Z],(function(){return et.Z.getChannel(null==i?void 0:i.parent_id)})),l=(0,d.e7)([X.Z],(function(){return X.Z.getGuild(null==i?void 0:i.getGuildId())})),u=(0,E.ZP)(i),c=o.useRef(!1);o.useEffect((function(){if(null!=i&&!c.current){c.current=!0;(0,rt.lN)(i)}}),[i]);if(null==i||null==l)return null;var s=(0,r.jsx)($e.Z,{channel:i});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Qe.Z,{channel:i,draftType:tt.d.ChannelMessage}),(0,r.jsx)(nt.ZP,{toolbar:s,"aria-label":D.Z.Messages.THREAD_HEADER_BAR_A11Y_LABEL,children:(0,Xe.ud)({channel:i,parentChannel:a,channelName:u,guild:l,inSidebar:!0,handleContextMenu:function(e){(0,h.jW)(e,lt((function(){var e,t;return st(this,(function(o){switch(o.label){case 0:return[4,n.e(81580).then(n.bind(n,881580))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,ct(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ut(e,t,n[t])}))}return e}({},e),{channel:i}))}]}}))})))},handleClick:function(){null!=i&&(0,Je.XU)(i.guild_id,i.id)}})}),(0,r.jsx)("div",{className:it().chat,children:(0,r.jsx)(qe.Z,{channel:i,guild:l,chatInputType:C.I.SIDEBAR},t)})]})}var dt=n(544475);const pt={viewPrompt:function(e,t){I.Z.wait((function(){I.Z.dispatch({type:"GUILD_PROMPT_VIEWED",prompt:e,guildId:t})}))}};var ht=n(414306),yt=n(547721),bt=n(940060),vt=n(861426),mt=n(523347);function gt(e){var t=e.guildId,n=e.channelId,r=(0,yt.qi)(t);return(0,d.Wu)([et.Z,X.Z,vt.Z],(function(){var e=et.Z.getChannel(n),o=X.Z.getGuild(t),i=vt.Z.isViewingSubscriptionRoles(t);return null!=o&&null!=e?r.filter((function(t){return function(e,t,n){var r=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).isPreviewingRoles
|
||
;if(!(void 0!==r&&r||e.published))return!1;var o=n.permissionOverwrites[e.role_id];if((0,mt.TG)(n,o))return!0;var i=t.getRole(t.id),a=null!=i&&!bt.Z.has(i.permissions,L.Plq.VIEW_CHANNEL),l=(0,mt.wB)(n,n.permissionOverwrites[t.id]),u=t.getRole(e.role_id);return a&&!l&&null!=u&&(0,mt.MT)(u)&&!(0,mt.wB)(n,o)}(t,o,e,{isPreviewingRoles:i})})):[]}),[t,n,r])}var Ot=n(805537),Et=n(383163),Ct=n(340562),jt=n(795974),St=n.n(jt);function It(e){var t=e.guildId,n=e.channelId,i=gt({guildId:t,channelId:n}),a=(0,yt.GG)(t),l=(0,yt.YB)(t),u=(0,d.e7)([X.Z],(function(){return X.Z.getGuild(t)}),[t]),c=null==u?void 0:u.name,s=(0,d.e7)([et.Z],(function(){return et.Z.getChannel(n)})),f=o.useMemo((function(){var e={},t=!0,n=!1,r=void 0;try{for(var o,i=a[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var l=o.value,u=!0,c=!1,s=void 0;try{for(var f,d=l.subscription_listings_ids[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){e[f.value]=l.id}}catch(e){c=!0;s=e}finally{try{u||null==d.return||d.return()}finally{
|
||
if(c)throw s}}}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}),[a]);(0,Ot.Z)({guildId:t,location:L.Sbl.ROLE_SUBSCRIPTION_GATED_CHANNEL,relevantSubscriptionListingIds:i.map((function(e){return e.id}))});return null==u?(0,r.jsx)("div",{className:St().spinnerContainer,children:(0,r.jsx)(p.$jN,{className:St().spinner})}):(0,r.jsxs)(p.w0Z,{className:St().pageContainer,children:[(0,r.jsx)(p.X6q,{variant:"heading-xl/semibold",className:St().joinCtaTitle,children:D.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_UPSELL_PAGE_CTA.format({serverName:c,channelName:null==s?void 0:s.name})}),(0,r.jsx)(p.xvT,{className:St().joinCtaSubtitle,variant:"text-md/normal",color:"header-secondary",children:null==l?void 0:l.description}),(0,r.jsx)(Et.Z,{guildId:t,children:i.filter((function(e){return null!=f[e.id]})).map((function(e){return(0,r.jsx)(Ct.Z,{guildId:t,listingId:e.id,groupListingId:f[e.id],analyticsLocation:L.Sbl.ROLE_SUBSCRIPTION_GATED_CHANNEL},e.id)}))
|
||
})]})}var _t=n(865050),wt=n(7602),xt=n(361610),Pt=n(396043),Nt=n(804185),At=n(464187),Tt=n(363582);function Zt(e){var t=e.channelId,n=(0,d.e7)([Nt.ZP],(function(){return Nt.ZP.getSection(t)})),o=(0,d.e7)([At.Z],(function(){return At.Z.getGuildId()})),i=n===L.ULH.MEMBERS;return(0,r.jsx)(nt.JO,{tooltip:i?D.Z.Messages.MEMBER_LIST_SHOWN:D.Z.Messages.MEMBER_LIST_HIDDEN,icon:Tt.Z,onClick:function(){Pt.ZP.trackWithMetadata(L.rMx.MEMBER_LIST_TOGGLED,{channel_id:t,guild_id:o,member_list_open:!i});xt.Z.toggleMembersSection()},selected:i})}var Mt=n(25410),Rt=n(933818),Lt=n(592981),Dt=n(473903),kt=n(813357),Ut=n(913928),Bt=[];function Ft(e){var t=e.channel,i=e.onJump,a=(0,d.cj)([Lt.Z],(function(){var e=Lt.Z.getPinnedMessages(t.id),n=null!=e?e.messages:Bt;return{messages:n,loading:null==n||null!=e&&e.loading}})),l=a.messages,u=a.loading,c=(0,d.e7)([x.ZP],(function(){return x.ZP.hasUnreadPins(t.id)})),s=(0,d.e7)([Dt.default],(function(){if(!t.isPrivate())return null
|
||
;var e=Dt.default.getUser(t.getRecipientId());return null!=e?e.username:null}));o.useEffect((function(){c&&Rt.Z.ackPins(t.id)}),[c,t.id]);return(0,r.jsx)(p.VqE,{"aria-label":D.Z.Messages.PINNED_MESSAGES,children:(0,r.jsx)(kt.ZP,{onFetch:function(){Rt.Z.ackPins(t.id);Rt.Z.fetchPins(t.id)},channel:t,messages:l,loading:u,analyticsName:"Channel Pins",onCloseMessage:function(e,n){null!=e&&(n.shiftKey?Rt.Z.unpinMessage(t,e.id):Ut.Z.confirmUnpin(t,e))},onJump:i,getProTip:function(){return t.isPrivate()?t.type===L.d4z.DM?D.Z.Messages.PINNED_MESSAGES_PRO_TIP_BODY_DM.format({other:s}):D.Z.Messages.PINNED_MESSAGES_PRO_TIP_BODY_GROUP_DM:D.Z.Messages.PINNED_MESSAGES_PRO_TIP_BODY_CHANNEL},renderHeader:function(){return(0,r.jsx)(kt.h4,{title:D.Z.Messages.PINNED_MESSAGES})},renderEmptyState:function(e){var o=D.Z.Messages.NO_PINS_IN_CHANNEL;t.isPrivate()&&(o=D.Z.Messages.NO_PINS_IN_DM);var i=e===L.BRd.LIGHT?n(937849):n(772144);return(0,r.jsx)(kt.nH,{msg:o,image:i},"emptystate")},listName:"pins"})})}
|
||
var Gt=n(26468),Ht=n(747126),Vt=n(715173),Wt=n(930948);function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Yt(e,t,n[t])}))}return e}function qt(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Qt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Xt=function(e){
|
||
var t=e.channel,n=function(e){(null==e?void 0:e.shiftKey)||s.dispatch(L.CkL.POPOUT_CLOSE)},i=(0,d.e7)([Ht.Z,Dt.default],(function(){var e=Dt.default.getCurrentUser();return null==e||t.isNSFW()&&(!e.nsfwAllowed||!Ht.Z.didAgree(t.getGuildId()))}),[t]),a=Qt(o.useState(!1),2),l=a[0],u=a[1],c=(0,d.e7)([x.ZP],(function(){return x.ZP.hasUnreadPins(t.id)}),[t]),s=(0,Gt.Aq)(),f=o.useCallback((function(){i||u((function(e){return!e}))}),[i]);o.useEffect((function(){Wt.S.subscribe(L.CkL.TOGGLE_CHANNEL_PINS,f);return function(){Wt.S.unsubscribe(L.CkL.TOGGLE_CHANNEL_PINS,f)}}),[f]);return(0,r.jsx)(p.yRy,{shouldShow:l,animation:p.yRy.Animation.NONE,position:"bottom",align:"right",autoInvert:!1,ignoreModalClicks:!0,onRequestClose:function(){return u(!1)},renderPopout:function(e){return(0,r.jsx)(Ft,qt(Kt({},e),{onJump:n,channel:t}))},children:function(e,t){var n=t.isShown;return(0,r.jsx)(nt.JO,qt(Kt({},e),{onClick:f,tooltip:n?null:D.Z.Messages.PINNED_MESSAGES,icon:Vt.Z,
|
||
"aria-label":D.Z.Messages.PINNED_MESSAGES,disabled:i,showBadge:c,selected:n}))}})};var Jt=n(86271);function $t(e){var t=e.channelId,n=(0,d.e7)([Nt.ZP],(function(){return Nt.ZP.getSection(t)}))===L.ULH.SUMMARIES;return(0,r.jsx)(nt.ZP.Icon,{icon:Jt.Z,onClick:function(){P.default.track(L.rMx.SUMMARIES_SIDEBAR_TOGGLED,{summaries_sidebar_open:!n});xt.Z.toggleSummariesSection()},tooltip:n?D.Z.Messages.SUMMARIES_SHOWN:D.Z.Messages.SUMMARIES_HIDDEN,selected:n,"aria-expanded":n})}var en=n(234503),tn=n(372518),nn=n(358969),rn=n(793998),on=n(386991);function an(e){var t=e.channel,n=(0,nn.r_)(t),o=(0,d.e7)([en.Z],(function(){return en.Z.hasHidden(t.id)})),i=(0,rn.c)(t.id);if(!n||i)return null;return(0,r.jsx)(nt.JO,{tooltip:o?D.Z.Messages.FORUM_CHANNEL_ONBOARDING_SHOW:D.Z.Messages.FORUM_CHANNEL_ONBOARDING_HIDE,icon:on.Z,onClick:function(){return tn.Z.hideAdminOnboarding(t.id,!o)},selected:!o})}
|
||
var ln=n(283099),un=n(418705),cn=n(997244),sn=n(842629),fn=n(436771),dn=n(896490),pn=n(627342),hn=n(774930),yn=n(620597),bn=n(289261),vn=n(904333),mn=n(610773),gn=n(736097),On=n(840922),En=n(407561),Cn=n(439610),jn=n(164760),Sn=n(542231),In=n(348592),_n=n(458947),wn=n(36256),xn=n(23381),Pn=n.n(xn);function Nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function An(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tn(e){Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Tn(e)}function Zn(e,t){return!t||"object"!==Ln(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mn(e,t){Mn=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Mn(e,t)}function Rn(e,t){return function(e){if(Array.isArray(e))return e
|
||
}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ln=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1
|
||
;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Tn(e);if(t){var o=Tn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zn(this,n)}}var kn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Mn(e,t)}(i,e);var t=Dn(i);function i(){An(this,i);var e;(e=t.apply(this,arguments)).handleStartCall=function(t,n){var r=e.props,o=r.channel,i=r.notFriend,a=r.appContext,l=i?o.getRecipientId():null,u=function(){return cn.Z.call(o.id,n,!i&&!o.isManaged()&&t&&!t.shiftKey,l)};n?(0,vn.Z)(u,a):u()};e.handleJoinCall=function(t){sn.default.selectVoiceChannel(e.props.channel.id,t)};e.handleVoiceClick=function(t){
|
||
var n=e.props,r=n.callUnavailable,o=n.callActive;n.canShowActivityGdmTooltip&&(0,dn.EW)(un.z$.ACTIVITY_GDM_CALL_TOOLTIP,{dismissAction:_n.L.AUTO});if(!r)return o?e.handleJoinCall(!1):e.handleStartCall(t,!1)};e.handleStartVideoCall=function(t){e.handleStartCall(t,!0)};e.handleJoinVideoCall=function(){var t=e.props.appContext;(0,vn.Z)((function(){return e.handleJoinCall(!0)}),t)};e.handleBrowserNotSupported=function(){(0,bn.Z)()};return e}var a=i.prototype;a.componentDidMount=function(){Wt.S.subscribe(L.CkL.CALL_START,this.handleVoiceClick)};a.componentWillUnmount=function(){Wt.S.unsubscribe(L.CkL.CALL_START,this.handleVoiceClick)};a.renderVideoCallButton=function(){var e=this.props,t=e.inCall,n=e.callActive,o=e.callUnavailable,i=e.isBlocked,a=e.channel,l=e.mode;if(t||n&&l===L.WtW.VOICE)return null;var u,c,s=a.isManaged(),f=null,d=!1;if(gn.Z.supports(wn.AN.VIDEO))if(i){f=D.Z.Messages.CALL_UNAVAILABLE_BLOCKED_USERS;u=p.ua7.Colors.RED;d=!0}else if(n&&l===L.WtW.VIDEO){
|
||
c=this.handleJoinVideoCall;f=s?D.Z.Messages.CONNECT:D.Z.Messages.JOIN_VIDEO_CALL}else{c=this.handleStartVideoCall;f=s?D.Z.Messages.CONNECT:D.Z.Messages.START_VIDEO_CALL}else{d=!0;c=this.handleBrowserNotSupported;f=D.Z.Messages.BROWSER_NOT_SUPPORTED}return(0,r.jsx)(nt.ZP.Icon,{icon:Sn.Z,onClick:c,disabled:d||o,tooltip:f,tooltipColor:u})};a.renderVoiceCallButton=function(){var e=this.props,t=e.inCall,o=e.canShowTooltip,i=e.callActive,a=e.callUnavailable,l=e.isBlocked,u=e.channel,c=e.canShowActivityGdmTooltip,s=e.dismissibleContentTypes;if(t)return null;var f,d=u.isManaged(),h="",y=!1;if(a){h=d?D.Z.Messages.VOICE_UNAVAILABLE:D.Z.Messages.CALL_UNAVAILABLE;f=p.ua7.Colors.RED;y=!0}else if(l){h=D.Z.Messages.CALL_UNAVAILABLE_BLOCKED_USERS;f=p.ua7.Colors.RED;y=!0}else h=i?d?D.Z.Messages.CONNECT:D.Z.Messages.JOIN_VOICE_CALL:d?D.Z.Messages.CONNECT:D.Z.Messages.START_VOICE_CALL;var b=(0,r.jsx)(nt.ZP.Icon,{icon:jn.Z,onClick:this.handleVoiceClick,disabled:y,tooltip:h,tooltipColor:f});return(0,
|
||
r.jsx)(pn.Z,{contentTypes:s,children:function(e){var i=e.visibleContent,a=e.markAsDismissed;return i===un.z$.ACTIVITY_GDM_CALL_TOOLTIP?(0,r.jsx)(p.yRy,{position:"bottom",align:"center",animation:p.yRy.Animation.TRANSLATE,shouldShow:o&&c&&!t,renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(yn.ZP,{header:(0,r.jsxs)("div",{children:[(0,r.jsx)(Cn.Z,{width:248,height:135,src:n(688694),className:Pn().tooltipImage}),(0,r.jsx)(p.X6q,{variant:"heading-md/bold",color:"always-white",children:D.Z.Messages.EMBEDDED_ACTIVITIES_DM_TOOLTIP_HEADER})]}),content:(0,r.jsxs)("div",{children:[(0,r.jsx)(p.xvT,{variant:"text-sm/normal",color:"always-white",children:D.Z.Messages.EMBEDDED_ACTIVITIES_DM_TOOLTIP_BODY}),(0,r.jsx)(p.eee,{href:In.Z.getArticleURL(L.BhN.ACTIVITIES),children:D.Z.Messages.LEARN_MORE})]}),buttonCTA:D.Z.Messages.GOT_IT,onClick:function(){t();a()},className:Pn().tooltip})},children:function(){return b}}):b}})};a.render=function(){return(0,r.jsxs)(o.Fragment,{
|
||
children:[this.renderVoiceCallButton(),this.renderVideoCallButton()]})};return i}(o.PureComponent);function Un(e){var t=e.channel,n=(0,hn.Z)(),i=(0,d.e7)([g.Z],(function(){return g.Z.getMode(t.id)})),a=(0,d.e7)([En.Z],(function(){return En.Z.isInChannel(t.id)})),l=(0,d.cj)([mn.Z],(function(){return{callActive:mn.Z.isCallActive(t.id),callUnavailable:mn.Z.isCallUnavailable(t.id)}})),u=l.callActive,c=l.callUnavailable,s=t.getRecipientId(),f=(0,d.cj)([On.Z],(function(){return{notFriend:t.type===L.d4z.DM&&null!=s&&!On.Z.isFriend(s),isBlocked:t.type===L.d4z.DM&&null!=s&&On.Z.isBlocked(s)}})),p=f.notFriend,h=f.isBlocked,y=(0,Gt.bp)(),b=[],v=(0,fn.Z)(t.id);v&&b.push(un.z$.ACTIVITY_GDM_CALL_TOOLTIP);var m=Rn(o.useState(!1),2),O=m[0],E=m[1];o.useEffect((function(){var e=setTimeout((function(){E(!0)}),250);return function(){return clearTimeout(e)}}),[]);return n?null:(0,r.jsx)(kn,{channel:t,mode:i,inCall:a,callActive:u,callUnavailable:c,notFriend:p,isBlocked:h,appContext:y,canShowTooltip:O,
|
||
canShowActivityGdmTooltip:v,dismissibleContentTypes:b})}var Bn=n(76107),Fn=n(436817);const Gn=(0,n(260561).B)({kind:"user",id:"2022-10_profile_panel",label:"Profiles In DMs",defaultConfig:{canViewProfilePanel:!1,canSeeThemeColors:!1},treatments:[{id:1,label:"View Profiles In DMs With Theme Colors",config:{canViewProfilePanel:!0,canSeeThemeColors:!0}},{id:2,label:"View Profiles In DMs Without Theme Colors",config:{canViewProfilePanel:!0,canSeeThemeColors:!1}}]});var Hn=n(577216);function Vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){
|
||
if(!e)return;if("string"==typeof e)return Vn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zn(){var e,t=Wn(o.useState(null!==(e=window.innerWidth<1132)&&void 0!==e&&e),2),n=t[0],r=t[1];o.useEffect((function(){var e=function(){r(window.innerWidth<1132)};e();window.addEventListener("resize",e);return function(){return window.removeEventListener("resize",e)}}),[r]);return n}var Yn=n(853039);function Kn(e){var t=e.channel,n=e.showCall,o=(0,d.e7)([Nt.ZP],(function(){return Nt.ZP.getSection(t.id)})),i=(0,Fn.Z)(t.getRecipientId()),a=zn(),l=Gn.useExperiment({},{autoTrackExposure:!0
|
||
}).canViewProfilePanel,u=o===L.ULH.PROFILE&&!a;return l?(0,r.jsx)(nt.JO,{disabled:a||n,tooltip:a||n?D.Z.Messages.SHOW_USER_PROFILE_UNAVAILABLE:u?D.Z.Messages.HIDE_USER_PROFILE:D.Z.Messages.SHOW_USER_PROFILE,icon:Yn.Z,onClick:function(){(0,Hn.a)(i,!u);xt.Z.toggleProfilePanelSection()},selected:u&&!a&&!n}):null}var qn=n(14096),Qn=n(225386),Xn=n(682776);const Jn=o.memo((function(e){var t=e.channel,n=(0,hn.Z)(),i=(0,d.e7)([En.Z],(function(){return En.Z.isInChannel(t.id)})),a=(0,d.e7)([En.Z],(function(){return!s().isEmpty(En.Z.getVoiceStatesForChannel(t.id))})),l=(0,d.e7)([Xn.Z],(function(){return Xn.Z.can(L.Plq.CONNECT,t)})),u=(0,ht.Z)(t.id).needSubscriptionToAccess,c=(0,Qn.$R)(t),f=o.useCallback((function(){qn.Z.handleVoiceConnect({channel:t,connected:i,needSubscriptionToAccess:u,locked:!1})}),[t,i,u]);o.useEffect((function(){Wt.S.subscribe(L.CkL.CALL_START,f);return function(){Wt.S.unsubscribe(L.CkL.CALL_START,f)}}),[f]);return Qn.tM.useExperiment({guildId:t.guild_id
|
||
}).enabled&&!n&&!i&&l&&c&&t.isVocalThread()?(0,r.jsx)(nt.ZP.Icon,{icon:jn.Z,onClick:f,tooltip:a?D.Z.Messages.JOIN_VOICE_CALL:D.Z.Messages.START_VOICE_CALL}):null}));function $n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function er(e){er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return er(e)}function tr(e,t){return!t||"object"!==rr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nr(e,t){nr=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return nr(e,t)}var rr=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function or(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
|
||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=er(e);if(t){var o=er(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tr(this,n)}}var ir={};var ar=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&nr(e,t)}(n,e);var t=or(n);function n(){$n(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){for(var t in e){var n=e[t];ir[t]=new Set(n)}};r.hasViewedPrompt=function(e,t){var n=ir[t];return null!=n&&!!n.has(e)};r.getState=function(){return ir};r.__getLocalVars=function(){return{viewedPrompts:ir}};return n}(d.ZP.PersistedStore);ar.displayName="GuildPromptsStore";ar.persistKey="GuildPromptsStore";const lr=new ar(I.Z,{GUILD_PROMPT_VIEWED:function(e){
|
||
var t=e.prompt,n=e.guildId,r=ir[n];if(null==r){ir[n]=new Set;ir[n].add(t);return!0}if(r.has(t))return!1;r.add(t);return!0},GUILD_DELETE:function(e){var t=e.guild;if(null==ir[t.id]||t.unavailable)return!1;delete ir[t.id];return!0}});var ur=n(21372),cr=n(213192),sr=n.n(cr)()({REAL_NAME_PROMPT:null});const fr=function(e){var t=(0,d.e7)([lr],(function(){return(null==e?void 0:e.hasFeature(L.oNc.HUB))?lr.hasViewedPrompt(sr.REAL_NAME_PROMPT,e.id):null})),n=(0,d.e7)([Dt.default],(function(){return Dt.default.getCurrentUser()})),r=(0,d.e7)([ur.ZP],(function(){return null!=(null==e?void 0:e.id)&&null!=n?ur.ZP.getMember(null==e?void 0:e.id,n.id):null})),i=null!=(null==r?void 0:r.nick);o.useEffect((function(){i&&null!=e&&!1===t&&pt.viewPrompt(sr.REAL_NAME_PROMPT,e.id)}),[i,e,t]);return!1===t&&!i}
|
||
;var dr,pr=n(327930),hr=n(944522),yr=n(451458),br=n(878709),vr=n(841800),mr=n(915840),gr=n(129532),Or=n(943469),Er=n(224134),Cr=n(531304),jr=n(316878),Sr=n(153686),Ir=n(19585),_r=n(855483),wr=n(889025),xr=n(573485),Pr=n(955521),Nr=n(487868),Ar=n(852077),Tr=n(840598),Zr=n(769321),Mr=n(598123),Rr=n(255592),Lr=n(443812),Dr=n(189865),kr=n(183790),Ur=n(890592),Br=n(194212),Fr=n(476770),Gr=n(15084),Hr=n(201891);!function(e){e[e.EmptyContent=0]="EmptyContent";e[e.AutomodViolation=1]="AutomodViolation"}(dr||(dr={}));function Vr(e,t){return{type:e,message:null!=t?t:null}}function Wr(e){return Vr(dr.EmptyContent,e)}function zr(e,t){return null==e||e.type===dr.EmptyContent&&null!=t.content&&t.content.trim().length>0?null:null!==(n=e.message)&&void 0!==n?n:null;var n}var Yr=n(161283),Kr=n(323483),qr=n(367406),Qr=n(593005),Xr=n(59439),Jr=n.n(Xr),$r=n(500360),eo=n.n($r);function to(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
|
||
function no(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function ro(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function oo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ro(e,t,n[t])}))}return e}function io(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ao(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return to(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return to(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var lo=function(e,t){var n,r,o,i,a={label:0,
|
||
sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{
|
||
value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},uo=C.I.THREAD_CREATION;function co(e){var t=e.parentChannelId,n=e.parentMessageId,o=e.location,i=(0,d.e7)([et.Z],(function(){return et.Z.getChannel(t)})),a=(0,Ir.Z)(Sr.Z.CREATE_THREAD).AnalyticsLocationProvider;return null==i?null:(0,r.jsx)(a,{children:(0,r.jsx)(Br.I3,{children:(0,r.jsxs)("section",{"aria-label":D.Z.Messages.CREATE_THREAD,className:Jr().container,children:[(0,r.jsx)(Qe.Z,{channel:i,draftType:tt.d.FirstThreadMessage}),(0,r.jsxs)(nt.ZP,{toolbar:(0,r.jsx)(nt.ZP.Icon,{icon:Dr.Z,tooltip:D.Z.Messages.CLOSE,onClick:function(){return(0,qr.NK)(t)}}),children:[(0,r.jsx)(nt.ZP.Icon,{icon:Ur.Z,disabled:!0,"aria-label":D.Z.Messages.THREAD}),(0,r.jsx)(nt.ZP.Title,{children:D.Z.Messages.NEW_THREAD})]}),(0,r.jsx)(so,{parentChannel:i,parentMessageId:n,location:o})]})})})}function so(e){var t,n=e.parentChannel,i=e.parentMessageId,l=e.location,u=(0,d.e7)([jr.Z],(function(){return jr.Z.messageGroupSpacing})),c=(t=o.useContext(Br.oo),
|
||
o.useCallback((function(){t.bumpDispatchPriority()}),[t])),s=function(e,t){var n=ao(o.useState({}),2),r=n[0],i=n[1],a=o.useCallback((function(n){i((function(e){return oo({},e,n)}));Or.Z.changeThreadSettings(e.id,io(oo({},n),{parentMessageId:t}))}),[e.id,t]);return{threadSettings:r,setThreadSettings:i,updateThreadSettings:a}}(n,i),f=s.threadSettings,h=s.setThreadSettings,y=s.updateThreadSettings,b=function(e,t){var n=ao(o.useState((0,_r.H2)()),2),r=n[0],i=n[1];o.useEffect((function(){var n=function(n){var r,o=tt.Z.getDraft(e.id,tt.d.FirstThreadMessage);0!==o.length&&!0!==n||i((0,_r.eK)(o));t(null!==(r=tt.Z.getThreadSettings(e.id))&&void 0!==r?r:{})};n(!0);tt.Z.addChangeListener(n);return function(){tt.Z.removeChangeListener(n)}}),[e.id,t]);return{textAreaState:r,setTextAreaState:i}}(n,h),v=b.textAreaState,m=b.setTextAreaState,g=(0,Yr.vH)(n),O=function(e){
|
||
var t=e.parentChannel,n=e.parentMessageId,r=e.threadSettings,i=e.privateThreadMode,a=e.textAreaState,l=e.location,u=ao(o.useState(null),2),c=u[0],s=u[1],f=ao(o.useState(null),2),d=f[0],p=f[1],h=(0,Qr.Z)({parentChannel:t,parentMessageId:n,threadSettings:r,privateThreadMode:i,location:l,onThreadCreated:qr.ok,useDefaultThreadName:!0}),y=o.useCallback((v=(b=function(e,o,i){var l,u,c,f,d,y,b;return lo(this,(function(v){switch(v.label){case 0:null==e&&(e=a.textValue);e=e.trim();null!=o&&0!==o.length||(o=null===(l=Ar.Z.getStickerPreview(t.id,uo.drafts.type))||void 0===l?void 0:l.map((function(e){return e.id})));null!=i&&0!==i.length||(i=Rr.Z.getUploads(t.id,tt.d.FirstThreadMessage));c=null!==(u=r.name)&&void 0!==u?u:"";f=null==n&&0===c.length;d=""===e&&(null==o||0===o.length)&&0===i.length;s(f?Wr(D.Z.Messages.FORM_THREAD_NAME_REQUIRED_ERROR):null);p(d?Wr(D.Z.Messages.FORM_THREAD_STARTER_MESSAGE_REQUIRED_ERROR):null);return f||d?[2,{shouldClear:!1,shouldRefocus:!0}]:null!=n?[3,2]:[4,(0,Fr.v)({
|
||
content:e,stickers:o,uploads:i,type:uo,channel:t})];case 1:if(!v.sent().valid)return[2,{shouldClear:!1,shouldRefocus:!0}];v.label=2;case 2:v.trys.push([2,4,,5]);return[4,h(e,o,i)];case 3:v.sent();return[3,5];case 4:y=v.sent();(null===(b=y.body)||void 0===b?void 0:b.code)===L.evJ.AUTOMOD_TITLE_BLOCKED&&s(function(e,t){return Vr(dr.AutomodViolation,(0,Hr.$q)(e,null==t?void 0:t.id))}(y.body,t));return[2,{shouldClear:!1,shouldRefocus:!0}];case 5:(0,Tr.qB)(t.id,uo.drafts.type);return[2,{shouldClear:!0,shouldRefocus:!1}]}}))},function(){var e=this,t=arguments;return new Promise((function(n,r){var o=b.apply(e,t);function i(e){no(o,n,r,i,a,"next",e)}function a(e){no(o,n,r,i,a,"throw",e)}i(void 0)}))}),function(e,t,n){return v.apply(this,arguments)}),[h,a.textValue,r.name,n,t]);var b,v;return{nameError:c,messageError:d,submit:y}}({parentChannel:n,parentMessageId:i,threadSettings:f,privateThreadMode:g,textAreaState:v,location:l}),E=O.nameError,C=O.messageError,j=O.submit,S=(0,
|
||
Yr.oD)(f,g)?kr.Z:Ur.Z;return(0,r.jsx)("div",{className:Jr().chat,onMouseDown:c,onFocus:c,children:(0,r.jsx)("div",{className:a()(Jr().messagesWrapper,"group-spacing-".concat(u)),children:(0,r.jsxs)("form",{onSubmit:function(e){e.preventDefault();j()},className:Jr().form,children:[(0,r.jsx)(p.Ttm,{className:Jr().scroller,fade:!0,children:(0,r.jsxs)("div",{className:Jr().scrollerInner,children:[(0,r.jsxs)(Pr.ZP,{channelId:"create-thread-null",children:[(0,r.jsx)("div",{className:eo().iconWrapper,children:(0,r.jsx)(S,{className:eo().icon})}),(0,r.jsx)(po,{parentChannel:n,parentMessageId:i,threadSettings:f,updateThreadSettings:y,error:E}),n.type===L.d4z.GUILD_TEXT?(0,r.jsx)(fo,{startedFromMessage:null!=i,threadSettings:f,updateThreadSettings:y,privateThreadMode:g}):null]}),(0,r.jsx)(yo,{parentChannel:n,parentMessageId:i})]})}),(0,r.jsxs)("div",{className:Jr().submitContainer,children:[(0,r.jsx)(ho,{parentChannel:n,textAreaState:v,setTextAreaState:m,submit:j,error:C}),(0,r.jsx)(Cr.Z,{
|
||
channel:n,isThreadCreation:!0})]})]})})})}function fo(e){var t=e.startedFromMessage,n=e.threadSettings,o=e.updateThreadSettings,i=e.privateThreadMode,l=(0,Yr.oD)(n,i),u=(0,r.jsx)("div",{className:Jr().privateThreadFormTitle,children:(0,r.jsx)("span",{className:Jr().privateThreadFormTitleText,children:D.Z.Messages.PRIVATE_THREAD})}),c=(0,r.jsx)(p.XZJ,{className:a()(Jr().checkbox),type:p.XZJ.Types.INVERTED,disabled:i===Yr.Jw.PrivateOnly,value:l,onChange:function(e,t){return o({isPrivate:t})},children:(0,r.jsx)(p.xvT,{variant:"text-md/normal",color:"none",children:D.Z.Messages.FORM_THREAD_PRIVATE_THREAD_SECTION_LABEL})});return t||i===Yr.Jw.Disabled?null:(0,r.jsxs)(p.hjN,{title:u,className:Jr().formSection,children:[c,l?(0,r.jsx)(p.xvT,{className:Jr().privateThreadDescription,variant:"text-xs/normal",color:"header-secondary",children:D.Z.Messages.FORM_THREAD_PRIVATE_THREAD_DESCRIPTION}):null]})}function po(e){
|
||
var t,n=e.parentChannel,o=e.parentMessageId,i=e.threadSettings,a=e.updateThreadSettings,l=e.error,u=null!==(t=i.name)&&void 0!==t?t:"",c=zr(l,{content:u}),s=(0,Yr.Od)(n,o),f=null!=o,d=(0,Lr.Dt)();return(0,r.jsx)(p.hjN,{tag:"label",htmlFor:d,title:D.Z.Messages.THREAD_NAME+(f?" (Optional)":""),className:Jr().formSection,children:(0,r.jsx)(p.oil,{value:u,id:d,placeholder:""!==s?s:D.Z.Messages.FORM_THREAD_NAME_PLACEHOLDER,maxLength:L.HN8,onChange:function(e){a({name:(0,Kr.Z)(e,!1)});""!==e?Er.Z.startTyping(n.id):Er.Z.stopTyping(n.id)},onBlur:function(){var e=(0,Kr.Z)(u,!0);e!==u&&a({name:e})},error:c})})}function ho(e){var t=e.parentChannel,n=e.textAreaState,i=e.setTextAreaState,l=e.submit,u=e.error,c=ao(o.useState(!0),2),s=c[0],f=c[1],h=o.useCallback((function(){return f(!0)}),[]),y=o.useCallback((function(){return f(!1)}),[]),b=o.useCallback((function(e,n,r){Or.Z.saveDraft(t.id,n,tt.d.FirstThreadMessage);i((function(e){
|
||
""!==n&&e.textValue!==n?Er.Z.startTyping(t.id):""===n&&Er.Z.stopTyping(t.id);return{textValue:n,richValue:r}}))}),[t.id,i]),v=o.useCallback((function(e){var t=e.value,n=e.uploads,r=e.stickers;return l(t,r,n)}),[l]);(0,Br.yp)({event:L.CkL.TEXTAREA_FOCUS,handler:h});(0,Br.yp)({event:L.CkL.TEXTAREA_BLUR,handler:y});var m=(0,d.e7)([Xn.Z],(function(){return Xn.Z.can(L.Plq.ATTACH_FILES,t)})),g=zr(u,{content:n.textValue});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(xr.Z,{channelId:t.id,type:uo,canAttachFiles:m}),(0,r.jsx)("div",{className:Jr().starterMessageError,children:(0,r.jsx)(p.pdY,{error:g})}),(0,r.jsx)(wr.Z,{type:uo,channel:t,placeholder:D.Z.Messages.FORM_THREAD_STARTER_MESSAGE_PLACEHOLDER,textValue:n.textValue,richValue:n.richValue,focused:s,className:Jr().channelTextArea,innerClassName:a()(Jr().channelTextAreaInner,ro({},Jr().channelTextAreaInnerError,null!=g)),onFocus:h,onBlur:y,onChange:b,onSubmit:v,promptToUpload:Gr.d})]})}function yo(e){
|
||
var t=e.parentChannel,n=e.parentMessageId,o=(0,d.e7)([Mr.Z],(function(){return null==n?null:Mr.Z.getMessage(t.id,n)})),i=Zr.jU.useSetting();return null!=o?(0,r.jsx)(Nr.Z,{className:Jr().messagePreview,message:o,channel:t,compact:i,renderThreadAccessory:!1}):null}var bo=n(536945),vo=n(217973),mo=n(270983),go=n(424198),Oo=n.n(go);function Eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Co(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function jo(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function So(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Io(e){
|
||
var t=e.channel,n=So(o.useState(!1),2),i=n[0],a=n[1],l=(0,d.e7)([bo.Z],(function(){return s().size(bo.Z.getThreadsForParent(t.guild_id,t.id))})),u=(0,d.e7)([Ht.Z,Dt.default],(function(){var e=Dt.default.getCurrentUser();return null==e||t.isNSFW()&&(!e.nsfwAllowed||!Ht.Z.didAgree(t.getGuildId()))}),[t]),c=o.useCallback((function(){a(!1)}),[]),f=o.useCallback((function(){i||(0,vo.U4)("Popout");a(!i)}),[i]);return(0,r.jsx)(p.yRy,{animation:p.yRy.Animation.NONE,position:"bottom",align:"right",autoInvert:!1,shouldShow:i,onRequestClose:c,renderPopout:function(){return(0,r.jsx)(p.VqE,{children:(0,r.jsx)(mo.Z,{className:Oo().browser,channel:t,onClose:c})})},children:function(e,t){var n=t.isShown;return(0,r.jsx)(nt.JO,jo(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
|
||
;r.forEach((function(t){Co(e,t,n[t])}))}return e}({},e),{className:Oo().icon,onClick:f,icon:Ur.Z,"aria-label":D.Z.Messages.THREADS,tooltip:n?null:D.Z.Messages.THREADS,disabled:u,selected:n,children:l>0?(0,r.jsx)(p.xvT,{variant:"text-md/normal",color:"interactive-normal",className:Oo().count,children:l>=100?"99+":l}):null}))}})}var _o=n(426012),wo=n(281873),xo=n(576668),Po=n(874710),No=n(703654),Ao=n(103314),To=n(313031),Zo=n(954814),Mo=n(839463),Ro=n(579583),Lo=n(112897);function Do(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ko(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Uo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
|
||
;r.forEach((function(t){ko(e,t,n[t])}))}return e}function Bo(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Fo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Do(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Do(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Go(e){var t=e.channel,n=function(){l((function(e){return!e}))},i=Fo(o.useState(!1),2),a=i[0],l=i[1],u=D.Z.Messages.MORE;return(0,r.jsx)(p.yRy,{shouldShow:a,animation:p.yRy.Animation.NONE,position:"bottom",align:"right",autoInvert:!1,onRequestClose:function(){return l(!1)},renderPopout:function(e){return(0,r.jsx)(Ho,Bo(Uo({},e),{channel:t}))},children:function(e,t){var o=t.isShown;return(0,r.jsx)(nt.ZP.Icon,Bo(Uo({},e),{onClick:n,tooltip:o?null:u,icon:ee.Z,"aria-label":u,selected:o}))}})}function Ho(e){var t=e.channel,n=e.closePopout,o=e.onSelect,i=(0,wo.Z)(t),a=(0,
|
||
Ao.Z)(t),l=(0,Mo.Z)(t.id),u=(0,Zo.Z)(t),c=(0,Lo.Z)(t.id),f=(0,xo.Z)(t),h=(0,Po.Z)(t,"Toolbar Overflow"),y=(0,To.Z)(t),b=(0,No.Z)(t),v=(0,Ro.Z)(t),m=Zr.vF.useSetting(),g=(0,d.e7)([En.Z],(function(){return!s().isEmpty(En.Z.getVoiceStatesForChannel(t.id))}));return(0,r.jsxs)(p.v2r,{navId:"thread-context",onClose:n,"aria-label":D.Z.Messages.THREAD_ACTIONS_MENU_LABEL,onSelect:o,children:[(0,r.jsxs)(p.kSQ,{children:[h,b]}),(0,r.jsxs)(p.kSQ,{children:[u,y,l,m&&!g?(0,r.jsx)(p.sNh,{id:"open",label:D.Z.Messages.OPEN_IN_SPLIT_VIEW,action:function(){(0,qr.ok)(t)}}):null]}),(0,r.jsxs)(p.kSQ,{children:[v,i,a,f]}),(0,r.jsx)(p.kSQ,{children:c})]})}
|
||
var Vo=n(136836),Wo=n(686874),zo=n(762423),Yo=n(285991),Ko=n(74535),qo=n(784686),Qo=n(177570),Xo=n(491260),Jo=n(793461),$o=n(773148),ei=n(749565),ti=n(924308),ni=n(725691),ri=n(362658),oi=n(735100),ii=n(480480),ai=n(546789),li=n(259317),ui=n(428429),ci=n(467675),si=n(905464),fi=n(470442),di=n(718831),pi=n(941498),hi=n(802390),yi=n.n(hi),bi=n(260036),vi=n.n(bi);function mi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Oi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){
|
||
if(!e)return;if("string"==typeof e)return mi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Ei=function(e){var t=e.header,n=e.children,i=e.isMutualFriendsList,l=void 0!==i&&i,u=e.isLoadingHeader,c=e.isLoadingContents,s=e.loadingContentsCount,f=void 0===s?0:s,d=e.className,h=e.onHover,y=e.onFocus,b=Oi(o.useState(!0),2),v=b[0],m=b[1],g=(0,r.jsx)("div",{className:yi().iconWrapper,children:(0,r.jsx)(di.Z,{direction:v?di.Z.Directions.RIGHT:di.Z.Directions.DOWN})});return(0,r.jsxs)("div",{className:a()(yi().listWrapper,d),children:[(0,r.jsx)(p.zxk,{className:yi().collapseBtn,innerClassName:yi().collapseBtnContent,
|
||
color:p.Ttl.CUSTOM,onMouseEnter:h,onFocus:y,onClick:function(){return m(!v)},children:u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(pi.ZT,{width:34,opacity:.08}),(0,r.jsx)(pi.ZT,{width:135,opacity:.08})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.xvT,{variant:"text-sm/medium",children:t}),g]})}),(0,r.jsx)("ul",{className:a()(yi().connectionList,gi({},yi().isCollapsed,v)),children:c?Array.from({length:f}).map((function(e,t){var n;return(0,r.jsxs)("div",{className:a()((n={},gi(n,vi().mutualFriendItem,l),gi(n,vi().mutualGuildsItem,!l),n)),children:[(0,r.jsx)(pi.ZT,{width:34,opacity:.08}),(0,r.jsx)(pi.ZT,{width:135,opacity:.08})]},t)})):n})]})};var Ci=n(944014);function ji(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Si(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ji(i,r,o,a,l,"next",e)}function l(e){ji(i,r,o,a,l,"throw",e)}a(void 0)}))}}
|
||
function Ii(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _i(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var wi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),
|
||
0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};const xi=function(e){var t=e.connection,o=function(e,t){(0,h.jW)(e,Si((function(){var e,o;return wi(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(85572)]).then(n.bind(n,810848))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,_i(function(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ii(e,t,n[t])}))}return e}({},e),{user:t}))}]}}))})))},i=t.user,a=i.isNonUserBot(),l=(0,d.e7)([Xo.Z],(function(){return a?null:Xo.Z.getStatus(i.id)}));return(0,r.jsx)(Ci.T,{user:i,status:null!=l?l:L.Skl.UNKNOWN,onSelect:function(){(0,zo.m)({userId:i.id,analyticsLocation:{section:L.jXE.DM_PROFILE}})},onContextMenu:function(e){return o(e,i)}})};var Pi=n(769476);function Ni(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Ai(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ni(i,r,o,a,l,"next",e)}function l(e){Ni(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ti(e,t,n){t in e?Object.defineProperty(e,t,{value:n,
|
||
enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Zi(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var Mi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,
|
||
o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};const Ri=function(e){var t=e.connection,o=e.user,i=e.theme,a=t.guild,l=t.nick;return(0,r.jsx)(Pi.D,{guild:a,nick:l,theme:i,user:o,onContextMenu:function(e,t){(0,h.jW)(e,Ai((function(){var e,o;return Mi(this,(function(i){switch(i.label){case 0:
|
||
return[4,Promise.all([n.e(40532),n.e(92224),n.e(46194),n.e(7421),n.e(86502),n.e(76003),n.e(19669),n.e(77357),n.e(9907),n.e(66240),n.e(55325)]).then(n.bind(n,166240))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,Zi(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ti(e,t,n[t])}))}return e}({},e),{guild:t}))}]}}))})))},onSelect:q.X})};var Li=n(734691),Di=n(253567),ki=n(351619),Ui=n(777532),Bi=n(448898),Fi=n(10948),Gi=n.n(Fi);function Hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){
|
||
var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Wi=function(e){var t=e.user,n=e.displayProfile,o=e.channel,i=e.animateAssets,a=e.forceShowPremiumBadge,l=t.isNonUserBot(),u=Vi((0,d.Wu)([Xo.Z],(function(){return[l?null:Xo.Z.getStatus(t.id),Xo.Z.isMobileOnline(t.id)]})),2),c=u[0],s=u[1],f=(0,d.e7)([ti.Z],(function(){return ti.Z.getUserProfile(t.id)
|
||
}));return(0,r.jsxs)("div",{children:[(0,r.jsx)(Di.Z,{user:t,displayProfile:n,profileType:Bi.y0.PANEL,showPremiumBadgeUpsell:!0,isHovering:a,animateOnHover:!i}),(0,r.jsx)(Ui.tZ,{user:t,displayProfile:n,status:c,isMobile:s,channelId:o.id,disableUserProfileLink:!0,hasBanner:null!=(null==n?void 0:n.banner),profileType:Bi.y0.PANEL,animateOnHover:!i}),(0,r.jsx)("div",{className:Gi().badgelistGroup,children:(0,r.jsx)(ki.Z,{className:Gi().badgeList,user:t,openPremiumSettings:function(){P.default.track(L.rMx.PREMIUM_PROMOTION_OPENED,{location_page:L.ZY5.DM_CHANNEL,location_section:L.jXE.DM_PROFILE,location_object:L.qAy.BADGE});Li.Z.open(L.oAB.PREMIUM)},premiumSince:null==f?void 0:f.premiumSince,premiumGuildSince:null==f?void 0:f.premiumGuildSince,size:ki.V.SIZE_22})})]})};var zi=n(905655),Yi=n.n(zi);function Ki(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,
|
||
configurable:!0,writable:!0}):e[t]=n;return e}function Qi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ki(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ki(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Xi=function(e){var t=e.channel,n=e.showCall,i=Gn.useExperiment({},{
|
||
autoTrackExposure:!0}),l=i.canViewProfilePanel,c=i.canSeeThemeColors,s=t.recipients[0],f=Qi(o.useState(!1),2),h=f[0],y=f[1],b=o.useRef(0),v=zn(),m=(0,d.e7)([Dt.default],(function(){return Dt.default.getUser(s)})),g=null==m?void 0:m.isNonUserBot();u()(null!=m,"Profile Panel: user cannot be undefined");var O,E=(0,Fn.Z)(m.id),C=l&&!v&&!n,j=(0,d.cj)([Qo.Z,Xo.Z],(function(){var e=null!=Qo.Z.getAnyStreamForUser(m.id);return{activity:Xo.Z.findActivity(m.id,(function(t){var n=t.type;return e?n===L.IIU.PLAYING:n!==L.IIU.CUSTOM_STATUS})),customStatusActivity:Xo.Z.findActivity(m.id,(function(e){return e.type===L.IIU.CUSTOM_STATUS})),isApplicationStreaming:e,isMobile:Xo.Z.isMobileOnline(m.id),status:g?null:Xo.Z.getStatus(m.id)}})),S=j.activity,I=j.customStatusActivity,_=j.isApplicationStreaming,w=j.isMobile,x=j.status,P=(0,qo.rW)(),N=null!=S||_,A=null!==(O=$o.Z.getNickname(null,t.id,m))&&void 0!==O?O:P?ei.ZP.getName(m):ei.ZP.getGlobalName(m),T=(0,d.e7)([Jo.Z],(function(){
|
||
return Jo.Z.hidePersonalInformation})),Z=Qi((0,d.Wu)([ti.Z],(function(){return[ti.Z.getMutualFriendsCount(m.id),ti.Z.getMutualFriends(m.id),ti.Z.getMutualGuilds(m.id),ti.Z.isFetchingProfile(m.id),ti.Z.isFetchingFriends(m.id)]})),5),M=Z[0],R=Z[1],k=Z[2],U=Z[3],B=Z[4],F=!m.bot&&null!=k&&k.length>0,G=!m.bot&&null!=M&&M>0,H=(0,Ko.ZP)();o.useEffect((function(){b.current=Date.now()}),[]);o.useEffect((function(){l&&(0,ni.Z)(m.id,m.getAvatarURL(void 0,80),{withMutualGuilds:!m.bot,withMutualFriendsCount:!m.bot})}),[m,l]);o.useEffect((function(){null!=E&&C&&(0,Hn.U)({displayProfile:E,isMobile:w,loadDurationMs:Date.now()-b.current,activity:S,customStatusActivity:I,status:x})}),[E,w,S,I,x,C]);var V,W=null==k?void 0:k.map((function(e){return(0,r.jsx)(Ri,{connection:e,user:m,theme:H},e.guild.id)})),z=null==R?void 0:R.map((function(e){return(0,r.jsx)(xi,{connection:e},e.key)})),Y=o.useCallback((function(){m.bot||B||null!=z||(0,Yo.Sr)(m.id)}),[B,z,m.id,m.bot]),K=o.useCallback((function(){return y(!0)
|
||
}),[]),q=o.useCallback((function(){return y(!1)}),[]);return C?(0,r.jsx)("aside",{className:Yi().profilePanel,onMouseEnter:K,onMouseLeave:q,children:(0,r.jsx)(ri.Z,{user:m,profileType:Bi.y0.PANEL,useDefaultClientTheme:!0,pendingThemeColors:c?void 0:[null,null],children:(0,r.jsxs)(p.u2D,{children:[(0,r.jsx)(Wi,{user:m,displayProfile:E,channel:t,animateAssets:h,forceShowPremiumBadge:h}),(0,r.jsxs)(ri.Z.Inner,{children:[(0,r.jsx)(fi.Z,{user:m,nickname:A}),(0,r.jsx)(li.Z,{customStatusActivity:I,animate:h}),(0,r.jsx)(oi.Z,{}),(0,r.jsx)(si.Z,{currentPronouns:null!==(V=null==E?void 0:E.pronouns)&&void 0!==V?V:"",hidePersonalInformation:T}),(0,r.jsx)(ai.Z,{bio:null==E?void 0:E.bio,hidePersonalInformation:T,animateOnHover:!0,isHovering:h}),(0,r.jsx)(ui.Z,{userId:s}),(0,r.jsx)(oi.Z,{}),(0,r.jsx)(ci.Z,{user:m,setNote:!1,hideNote:!1})]}),N?(0,r.jsx)(ri.Z.Inner,{children:(0,r.jsx)(ii.Z,{activity:S,user:m,channelId:t.id})}):null,(0,r.jsxs)(ri.Z.Inner,{className:Yi().profilePanelConnections,
|
||
children:[F?(0,r.jsx)(Ei,{className:Yi().mutualGuildsList,header:D.Z.Messages.MUTUAL_GUILDS_COUNT.format({count:null==k?void 0:k.length}),isLoadingHeader:U,children:W}):null,G?(0,r.jsx)(Ei,{className:a()(Yi().mutualFriendsList,qi({},Yi().mutualFriendsDivider,F)),header:D.Z.Messages.MUTUAL_FRIENDS_COUNT.format({count:M}),isLoadingHeader:U,isLoadingContents:B,loadingContentsCount:M,onFocus:Y,onHover:Y,isMutualFriendsList:!0,children:z}):null]})]})})}):null};var Ji=n(980617),$i=n(135750),ea=n(102909),ta=n(549511),na=n(382060),ra=n(715107);var oa=n(837067),ia=n(733300),aa=n(977005),la=n(72580),ua=n(463473),ca=n(973553),sa=n(798159),fa=n(457217),da=n(289283),pa=n(199731),ha=n(623934),ya=n(80317),ba=n(833667),va=n(837162),ma=n(736543),ga=n(183640),Oa=n(381186),Ea=n(788169),Ca=n(202237),ja=n(380652),Sa=n(310126),Ia=n(742224),_a=n(735551),wa=n.n(_a);function xa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pa(e){
|
||
if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Na(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Aa(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Na(i,r,o,a,l,"next",e)}function l(e){Na(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ta(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Za(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ma(e){Ma=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Ma(e)}function Ra(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}})
|
||
;t&&Ba(e,t)}function La(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Za(e,t,n[t])}))}return e}function Da(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ka(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t)
|
||
;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ua(e,t){return!t||"object"!==Ga(t)&&"function"!=typeof t?Pa(e):t}function Ba(e,t){Ba=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ba(e,t)}function Fa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n)
|
||
;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xa(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ga=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Ha(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ma(e);if(t){var o=Ma(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ua(this,n)}}var Va=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},
|
||
"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Wa=Sa.default.getEnableHardwareAcceleration(),za={origin:{x:38,y:11},targetWidth:232,
|
||
targetHeight:40,offset:{x:0,y:0}},Ya=function(e){Ra(o,e);var t=Ha(o);function o(){Ta(this,o);var e;(e=t.apply(this,arguments)).renderUserContextMenu=function(t){var o=Pa(e);(0,h.jW)(t,Aa((function(){var e,t;return Va(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(3454),n.e(77357),n.e(14136)]).then(n.bind(n,914136))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,Da(La({},e),{user:o.props.user,guildId:o.props.guildId,channel:o.props.channel,showMediaItems:!0}))}]}}))})))};e.handleShiftClick=function(){var t=e.props,n=t.user,r=t.channel,o="@".concat(ei.ZP.getUserTag(n,{decoration:"never"})),i="<@".concat(n.id,">");Wt.S.dispatchToLastSubscribed(L.CkL.INSERT_TEXT,{plainText:o,rawText:i});Er.Z.startTyping(r.id)};e.openGuildSubscriptionModal=function(t){var n=e.props.guildId;if(null!=n){t.stopPropagation();(0,ba.f)({guildId:n,location:{section:L.jXE.MEMBER_LIST,object:L.qAy.BOOST_GEM_ICON}})}};e.renderUserPopout=function(t){
|
||
return(0,r.jsx)(ga.Z,Da(La({},t),{userId:e.props.user.id,guildId:e.props.guildId,channelId:e.props.channel.id}))};return e}var i=o.prototype;i.shouldComponentUpdate=function(e){return!(0,pa.Z)(this.props,e,["channelId"])};i.render=function(){var e=this,t=this.props,n=t.colorString,o=t.colorRoleName,i=t.isOwner,a=t.nick,l=t.user,u=t.currentUser,c=t.activities,s=t.applicationStream,f=t.status,d=t.channel,h=t.guildId,y=t.isTyping,b=t.isMobileOnline,v=t.premiumSince,m=ka(t,["colorString","colorRoleName","isOwner","nick","user","currentUser","activities","applicationStream","status","channel","guildId","isTyping","isMobileOnline","premiumSince"]),g=null!=v?new Date(v):null;return(0,r.jsx)(p.yRy,{preload:function(){return(0,ni.Z)(l.id,l.getAvatarURL(h,80),{guildId:h,channelId:d.id})},renderPopout:this.renderUserPopout,position:da.tq?"window_center":"left",spacing:16,onShiftClick:this.handleShiftClick,children:function(t,p){var v=p.isShown;return(0,r.jsx)(Ia.Z,La({className:wa().member,
|
||
onContextMenu:e.renderUserContextMenu,shouldAnimateStatus:Wa,user:l,currentUser:u,nick:a,status:f,activities:c,applicationStream:s,isOwner:i,premiumSince:g,colorString:n,colorRoleName:o,isTyping:y,channel:d,guildId:h,isMobile:b,onClickPremiumGuildIcon:e.openGuildSubscriptionModal,selected:v,itemProps:m},t))}})};return o}(o.Component),Ka=o.memo((function(e){var t=e.colorRoleId,n=ka(e,["colorRoleId"]),o=e.channel,i=e.user,a=e.index,l=(0,fa.JA)("".concat(a)),u=(0,d.e7)([Ea.Z],(function(){return Ea.Z.isTyping(o.id,i.id)})),c=(0,d.e7)([Dt.default],(function(){return Dt.default.getCurrentUser()})),s=(0,d.e7)([X.Z],(function(){var e,n;return null!=t?null===(n=null===(e=X.Z.getGuild(o.guild_id))||void 0===e?void 0:e.getRole(t))||void 0===n?void 0:n.name:void 0}),[o,t]);return(0,r.jsx)(Ya,Da(La({},n,l),{isTyping:u,currentUser:c,colorRoleName:s}))})),qa=o.memo((function(e){var t=e.id,n=e.title,o=e.count,i=e.guildId,a=(0,va.p9)({roleId:t,guildId:i,size:16});return t===L.Skl.UNKNOWN?(0,
|
||
r.jsx)("div",{className:wa().membersGroup,children:(0,r.jsx)("div",{className:wa().memberGroupsPlaceholder})}):(0,r.jsxs)(Ca.Z,{className:wa().membersGroup,children:[(0,r.jsx)(p.nn4,{children:D.Z.Messages.CHANNEL_MEMBERS_A11Y_LABEL.format({title:n,count:o})}),(0,r.jsxs)("span",{"aria-hidden":!0,children:[null!=a?(0,r.jsx)(ja.Z,La({className:wa().roleIcon},a)):null,n," — ",o]})]})}));function Qa(e){var t=e.index,n=(0,fa.JA)("".concat(t));return(0,r.jsx)(Ia.Z,{itemProps:n})}var Xa=function(e){Ra(n,e);var t=Ha(n);function n(){Ta(this,n);var e;(e=t.apply(this,arguments))._list=null;e.setList=function(t){e._list=t;e.props.listRef.current=t};e.getRowHeight=function(){return e.props.canUseAvatarDecorations?44+Ia.x:44};e.renderSection=function(t){var n=t.section,i=e.props,a=i.groups,l=i.channel,u=a[n];return 0===n?(0,r.jsx)(ma.Z,{tutorialId:"whos-online",position:"left",inlineSpecs:za,children:(0,r.jsx)(qa,Da(La({},u),{guildId:l.guild_id}))},"section-".concat(n)):(0,
|
||
o.createElement)(qa,Da(La({},u),{key:"section-".concat(n),guildId:l.guild_id}))};e.getRowProps=function(t){var n=e.props,r=n.groups,o=n.rows,i=r[t.section];if(null==i)return null;var a=i.index;return null==a||"row"!==t.type?null:o[a+1+t.row]};e.renderRow=function(t){var n=t.section,o=t.row,i=t.rowIndex,a=e.props.channel,l=e.getRowProps(t);if(null!=l&&l.type===Oa.so.MEMBER&&"user"in l){var u=l.colorString,c=l.colorRoleId,s=l.user,f=l.status,d=l.isOwner,p=l.isMobileOnline,h=l.nick,y=l.activities,b=l.applicationStream,v=l.premiumSince;return(0,r.jsx)(Ka,{colorString:u,colorRoleId:c,user:s,status:f,isOwner:d,nick:h,activities:y,applicationStream:b,channel:a,guildId:a.guild_id,premiumSince:v,isMobileOnline:p,index:i},"member-".concat(l.user.id))}return(0,r.jsx)(Qa,{index:i},"placeholder-".concat(n,":").concat(o))};e.handleScroll=function(){e.updateSubscription()};e.updateSubscription=s().debounce((function(){if(null!=e._list){
|
||
var t=e.props.channel,n=e.getDimensions(),r=n.rowHeight,o=n.y,i=n.height;(0,ha.TV)({guildId:t.guild_id,channelId:t.id,y:o,height:i,rowHeight:r})}}),50);e.trackMemberListViewed=function(){var t;if(e.lastReportedAnalyticsChannel!==e.props.channel.id){var n=null===(t=e._list)||void 0===t?void 0:t.getItems(),r=e.getDimensions().rowsVisible;if(void 0!==r&&0!==r&&null!=n){var o=n.map((function(t){return e.getRowProps(t)})).slice(0,r+1).filter(la.lm);if(0!==o.length){var i=o.reduce((function(t,n){if(n.type!==Oa.so.MEMBER)return t;t.num_users_visible++;n.isMobileOnline&&t.num_users_visible_with_mobile_indicator++;if(null!=n.activities&&n.activities.length>0){t.num_users_visible_with_activity++;n.activities.some((function(e){return e.type===L.IIU.PLAYING}))&&t.num_users_visible_with_game_activity++}e.props.canUseAvatarDecorations&&null!=n.user.avatarDecoration&&t.num_users_visible_with_avatar_decoration++;return t}),{num_users_visible:0,num_users_visible_with_mobile_indicator:0,
|
||
num_users_visible_with_game_activity:0,num_users_visible_with_activity:0,num_users_visible_with_avatar_decoration:0});e.lastReportedAnalyticsChannel=e.props.channel.id;Pt.ZP.trackWithMetadata(L.rMx.MEMBER_LIST_VIEWED,La({},i))}}}};return e}var i=n.prototype;i.shouldComponentUpdate=function(e){return e.channel.id!==this.props.channel.id||e.version!==this.props.version||e.groups.length!==this.props.groups.length};i.componentDidMount=function(){this.updateSubscription();this.trackMemberListViewed()};i.componentDidUpdate=function(e){e.channel.id!==this.props.channel.id&&this.updateSubscription();this.trackMemberListViewed()};i.getDimensions=function(){var e=this._list;if(null==e)return{y:0,height:0,rowHeight:0};var t=e.getScrollerState(),n=t.offsetHeight,r=t.scrollTop,o=Math.floor(n/this.getRowHeight());return{height:n,rowHeight:this.getRowHeight(),rowsVisible:o,y:r}};i.render=function(){var e=this,t=this.props,n=t.groups,o=t.listId,i=t.channel;return(0,r.jsx)(p.Wdt,{children:function(t){
|
||
return(0,r.jsx)(Lr.FG,{children:function(l){return(0,r.jsx)("aside",{className:a()(wa().membersWrap,wa().hiddenMembers),"aria-labelledby":l,children:(0,r.jsx)(p.y5t,{component:(0,r.jsx)(p.nn4,{children:(0,r.jsx)(p.H,{id:l,children:D.Z.Messages.MEMBERS_LIST_LANDMARK_LABEL.format({channel:i.name})})}),children:(0,r.jsx)(fa.SJ,{children:function(i){var l=i.ref,u=i.role,c=ka(i,["ref","role"]);return(0,r.jsx)(p.aVo,La({innerRole:u,innerAriaLabel:D.Z.Messages.MEMBERS,ref:function(t){e._list=t;e.props.listRef.current=t;var n;l.current=null!==(n=null==t?void 0:t.getScrollerNode())&&void 0!==n?n:null},className:a()(wa().members,Za({},wa().fullWidth,da.tq)),paddingTop:0,sectionHeight:40,rowHeight:e.getRowHeight,renderSection:e.renderSection,renderRow:e.renderRow,sections:n.map((function(e){return e.count})),onScroll:e.handleScroll,fade:!0,customTheme:!0},c,t),o)}})})})}})}})};return n}(o.Component);function Ja(e){var t=e.channel,n=e.className,i=(0,d.e7)([jr.Z],(function(){
|
||
return jr.Z.keyboardModeEnabled})),l=(0,d.cj)([Oa.ZP],(function(){return Oa.ZP.getProps(t.guild_id,t.id)})),u=l.rows,c=l.groups,s=o.useRef(null),f=o.useCallback((function(e,t){var n=s.current;if(null!=n){var r=parseInt(t,10),o=Fa(n.getSectionRowFromIndex(r),2),i=o[0],a=o[1],l=0===i&&0===a?44:0;n.scrollToIndex({section:i,row:a,padding:l,callback:function(){requestAnimationFrame((function(){var t;return null===(t=document.querySelector(e))||void 0===t?void 0:t.focus({preventScroll:!0})}))}})}}),[]),p=o.useCallback((function(){return new Promise((function(e){var t=s.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),h=o.useCallback((function(){return new Promise((function(e){var t=s.current;if(null==t)return e();t.scrollToBottom({callback:function(){requestAnimationFrame((function(){return setTimeout(e,100)}))}})}))}),[]),y=(0,sa.ZP)({id:"members-".concat(t.id),setFocus:f,isEnabled:i,scrollToStart:p,
|
||
scrollToEnd:h}),b=(0,ya.U)().canUseAvatarDecorations;return(0,r.jsx)("div",{className:a()(wa().container,n),children:(0,r.jsx)(fa.bG,{navigator:y,children:(0,r.jsx)(Xa,Da(La({},e,l),{groups:c,rows:u,listRef:s,canUseAvatarDecorations:b}))})})}function $a(e){var t=e.channel,n=e.className,i=o.useDeferredValue(t);return o.useMemo((function(){return(0,r.jsx)(Ja,{channel:i,className:n})}),[i,n])}var el=n(730381),tl=n.n(el),nl=n(665472),rl=n(828439),ol=n(634698),il=n(258985),al=n(399098),ll=n(60744),ul=n(79308),cl=n(921122),sl=n(70145),fl=n(102921),dl=n(365804),pl=n.n(dl);function hl(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function yl(e){var t,n=e.channel,i=e.summary,l=e.index,u=e.trailingMargin,c=void 0===u||u,s=(0,d.Wu)([Dt.default],(function(){var e;return i.people.map((function(t){return null!==(e=Dt.default.getUser(t))&&void 0!==e?e:null})).filter(la.lm)}),[i.people]),f=o.useCallback((function(){
|
||
P.default.track(L.rMx.SUMMARIES_TOPIC_CLICKED,{source:"sidebar",message_id:i.startId});nl.Z.jumpToMessage({channelId:n.id,messageId:i.startId,jumpType:rl.S.INSTANT,flash:!0});setTimeout((function(){(0,ll.ac)(n.id,l)}),500)}),[n.id,i.startId,l]),h=(0,d.e7)([ul.Z],(function(){return ul.Z.visibleSummaryIndex()})),y=fl.Z.extractTimestamp(i.startId),b=tl()().diff(y,"s")<2592e3?(0,vo.Ye)(y):(0,sl.vc)(tl()(y),"L");return(0,r.jsxs)(p.P3F,{className:a()(pl().topicBox,(t={},hl(t,pl().topicBoxSelected,h===l),hl(t,pl().topicBoxLast,c),t)),onClick:f,children:[(0,r.jsxs)("div",{className:pl().infoRow,children:[(0,r.jsx)(p.xvT,{className:pl().timeAgo,color:"header-secondary",variant:"text-sm/normal",children:b}),(0,r.jsx)(il.Z,{height:4,width:4,"aria-hidden":"true",className:pl().dotSpacer}),(0,r.jsx)(cl.Z,{height:9,width:9,className:pl().chatBubbleIcon}),(0,r.jsx)(p.xvT,{className:pl().messageCount,color:"header-secondary",variant:"text-sm/normal",children:i.count}),(0,r.jsx)(il.Z,{height:4,width:4,
|
||
"aria-hidden":"true",className:pl().dotSpacer}),(0,r.jsx)(al.Z,{partySize:{knownSize:s.length,unknownSize:0,totalSize:s.length},maxAvatarsShown:3,members:s})]}),(0,r.jsx)(p.xvT,{color:"header-primary",variant:"text-sm/semibold",className:pl().topicTitle,children:i.topic}),(0,r.jsx)(p.xvT,{color:"header-secondary",variant:"text-sm/normal",children:i.summShort})]})}function bl(e){var t,n,i=e.channel,a=(0,v.t)(i.guild_id),l=(0,d.Wu)([ul.Z],(function(){return null!==(t=ul.Z.summaries(i.id))&&void 0!==t?t:[]})),u=(0,d.cj)([ul.Z],(function(){return null!==(n=ul.Z.status(i.id))&&void 0!==n?n:{}}),[i]),c=u.fetching,f=u.lastReceivedAt,h=(0,ol.Z)(l);o.useEffect((function(){s().isEqual(h,l)||P.default.track(L.rMx.SUMMARIES_SIDEBAR_VIEWED,{num_summaries:l.length,message_counts:l.map((function(e){return e.count})),start_message_ids:l.map((function(e){return e.startId})),end_message_ids:l.map((function(e){return e.endId})),num_participants:l.map((function(e){return e.people.length}))})}),[l,h]);(0,
|
||
ll.zB)(i.id);return a?(0,r.jsx)(p.h21,{className:pl().container,children:function(e){return null!=e&&e.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.xvT,{color:"interactive-normal",variant:"text-sm/semibold",className:pl().title,children:D.Z.Messages.TOPICS}),e.filter((function(e){return null!=e.people})).map((function(t,n){return(0,r.jsxs)("div",{children:[(0,r.jsx)(yl,{summary:t,channel:i,index:n,trailingMargin:n===e.length-1}),n===e.length-1?null:(0,r.jsx)("div",{className:pl().divider})]},n)}))]}):c&&null==f?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.xvT,{color:"interactive-normal",variant:"text-sm/semibold",className:pl().title,children:D.Z.Messages.TOPICS}),(0,r.jsx)(p.$jN,{})]}):(0,r.jsxs)("div",{className:pl().emptyTopicBox,children:[(0,r.jsx)("div",{role:"img","aria-label":D.Z.Messages.SUMMARY_NO_TOPICS_ALT_TEXT,className:pl().emptyTopicImage}),(0,r.jsx)(p.xvT,{color:"header-primary",variant:"text-sm/semibold",className:pl().emptyTopicTitle,
|
||
children:D.Z.Messages.SUMMARY_NO_TOPICS}),(0,r.jsx)(p.xvT,{color:"header-secondary",variant:"text-sm/normal",children:D.Z.Messages.SUMMARY_EMPTY_TOPICS})]})}(l)}):null}var vl,ml=n(436622),gl=n(996229),Ol=n.n(gl),El=n(192941),Cl=n.n(El),jl=n(232353),Sl=n.n(jl);function Il(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var _l=(Il(vl={},L.BRd.DARK,Cl()),Il(vl,L.BRd.LIGHT,Sl()),vl);const wl=function(){var e=(0,Ko.ZP)();o.useEffect((function(){Pt.ZP.trackWithMetadata(L.rMx.GUILD_OUTAGE_VIEWED,{})}),[]);return(0,r.jsxs)("div",{className:Ol().container,children:[(0,r.jsxs)(ln.Z,{toolbar:(0,r.jsx)(o.Fragment,{}),children:[(0,r.jsx)(ln.Z.Icon,{icon:ml.Z,"aria-hidden":!0}),(0,r.jsx)(ln.Z.Title,{children:D.Z.Messages.GUILD_UNAVAILABLE_HEADER})]}),(0,r.jsxs)("div",{className:Ol().content,children:[(0,r.jsx)("img",{alt:"",className:Ol().splashImage,src:_l[e]}),(0,r.jsx)(p.X6q,{className:Ol().splashHeader,variant:"heading-lg/medium",
|
||
children:D.Z.Messages.GUILD_UNAVAILABLE_TITLE}),(0,r.jsx)(p.xvT,{className:Ol().splashText,variant:"text-md/normal",children:D.Z.Messages.GUILD_UNAVAILABLE_BODY})]})]})};var xl=n(591821),Pl=n(281110),Nl=n(877778);var Al=n(609853),Tl=n(651034);var Zl=n(580987),Ml=n.n(Zl);function Rl(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Ll(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Rl(i,r,o,a,l,"next",e)}function l(e){Rl(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Dl(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function kl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
|
||
;r.forEach((function(t){Dl(e,t,n[t])}))}return e}function Ul(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var Bl=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,
|
||
o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Fl=Sa.default.getEnableHardwareAcceleration();function Gl(e){var t=e.user,o=e.channel,i=(0,d.cj)([On.Z,Dt.default,Xo.Z],(function(){return On.Z.isFriend(t.id)||t===Dt.default.getCurrentUser()?{status:Xo.Z.getStatus(t.id),activities:Xo.Z.getActivities(t.id)}:{}})),a=i.status,l=i.activities,u=(0,d.e7)([Ea.Z],(function(){return null!=Ea.Z.getTypingUsers(o.id)[t.id]})),c=(0,
|
||
d.e7)([Dt.default],(function(){return Dt.default.getCurrentUser()})),s=(0,d.e7)([Xo.Z],(function(){return Xo.Z.isMobileOnline(t.id)})),f=(0,d.e7)([On.Z],(function(){return On.Z.getNickname(t.id)})),y=function(e){(0,h.jW)(e,Ll((function(){var e,i;return Bl(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(97539)]).then(n.bind(n,597539))];case 1:e=a.sent(),i=e.default;return[2,function(e){return(0,r.jsx)(i,Ul(kl({},e),{user:t,channel:o}))}]}}))})))};return(0,r.jsx)(p.yRy,{preload:function(){return(0,ni.Z)(t.id,t.getAvatarURL(void 0,80))},renderPopout:function(e){return(0,r.jsx)(ga.Z,Ul(kl({},e),{userId:t.id,channelId:o.id}))},position:da.tq?"window_center":"left",spacing:16,onShiftClick:function(){var e="@".concat(ei.ZP.getUserTag(t,{decoration:"never"})),n="<@".concat(t.id,">");Wt.S.dispatchToLastSubscribed(L.CkL.INSERT_TEXT,{plainText:e,rawText:n});Er.Z.startTyping(o.id)},children:function(e){return(0,r.jsx)(Ia.Z,kl({user:t,currentUser:c,
|
||
isOwner:t.id===o.ownerId,ownerTooltipText:D.Z.Messages.GROUP_OWNER,shouldAnimateStatus:Fl,isTyping:u,status:a,activities:l,channel:o,onContextMenu:y,isMobile:s,nick:f},e),t.id)}})}function Hl(e){var t,n=e.integration,i=o.useCallback((function(e){(0,h.vq)(e,(function(e){var t=e.onSelect;return(0,r.jsx)(p.v2r,{"aria-label":D.Z.Messages.MANAGE_INTEGRATION,navId:"manage-integration",onClose:h.Zy,onSelect:t,children:(0,r.jsx)(p.sNh,{id:"remove-integration",label:D.Z.Messages.INTEGRATIONS_APPLICATION_REMOVE,action:function(){e=n.channel_id,r=n.application.id,Pl.Z.delete(L.ANM.CHANNEL_INTEGRATION(e,r));var e,r;null!=t&&t()},color:"danger"})})}))}),[n]);return(0,r.jsx)(Tl.Z,{onContextMenu:i,className:Ml().member,name:(0,r.jsx)("span",{className:Ml().username,children:n.application.name}),avatar:(0,r.jsx)(p.qEK,{size:p.EFr.SIZE_32,src:oe.ZP.getApplicationIconURL({id:n.application.id,icon:n.application.icon,bot:null===(t=n.application)||void 0===t?void 0:t.bot,botIconFirst:!0}),
|
||
"aria-label":n.application.name,statusTooltip:!0}),decorators:(0,r.jsx)(Al.Z,{className:Ml().botTag}),id:n.application.id,focusProps:{offset:{top:4,bottom:4,left:4,right:4}}})}function Vl(e){var t=e.channel,n=Dt.default.getCurrentUser(),i=null==n?void 0:n.isStaff(),a=(0,d.Wu)([Dt.default],(function(){return function(e,t){return s()(e).map(t.getUser).unshift(t.getCurrentUser()).filter(la.lm).sortBy((function(e){return e.username.toLowerCase()})).value()}(t.recipients,Dt.default)}),[t.recipients]),l=(0,d.Wu)([Nl.Z],(function(){return Nl.Z.getIntegrations(t.id)}));o.useEffect((function(){if(i){var e=!0,t=!1,n=void 0;try{for(var r,o=a[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var l=r.value;(0,ni.Z)(l.id,l.getAvatarURL(void 0,80),{dispatchWait:!0})}}catch(e){t=!0;n=e}finally{try{e||null==o.return||o.return()}finally{if(t)throw n}}}}),[i,a]);var u=i&&a.every((function(e){return e.isStaff()}));return(0,r.jsx)("div",{className:wa().membersWrap,children:(0,r.jsxs)(p.Ttm,{
|
||
className:wa().members,fade:!0,children:[(0,r.jsxs)(Ca.Z,{className:wa().membersGroup,children:["".concat(D.Z.Messages.MEMBERS,"—").concat(a.length," "),u?(0,r.jsx)(Al.Z,{className:wa().decorator,type:Al.Z.Types.STAFF_ONLY_DM}):null]}),a.map((function(e){return(0,r.jsx)(Gl,{user:e,channel:t},e.id)})),l.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Ca.Z,{className:wa().membersGroup,children:"".concat(D.Z.Messages.APPS,"—").concat(l.length)}),l.map((function(e){return(0,r.jsx)(Hl,{integration:e},e.application.id)}))]})]})})}var Wl=n(29975),zl=[];var Yl=n(436154),Kl=n(465637),ql=n(349491),Ql=n(563135),Xl=n(100542),Jl=n.n(Xl);function $l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eu(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function tu(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){
|
||
eu(i,r,o,a,l,"next",e)}function l(e){eu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function nu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ru(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){nu(e,t,n[t])}))}return e}function ou(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function iu(e,t){
|
||
return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var au=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),
|
||
return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},lu=Sa.default.getEnableHardwareAcceleration();function uu(e){
|
||
var t=e.channel,i=e.sectionId,a=e.userId,l=e.guildOwnerId,u=(0,d.e7)([Ea.Z],(function(){return Ea.Z.isTyping(t.id,a)})),c=(0,d.e7)([ur.ZP],(function(){return ur.ZP.getMember(t.guild_id,a)})),s=(0,d.e7)([X.Z],(function(){var e,n;return null!=(null==c?void 0:c.colorRoleId)?null===(n=null===(e=X.Z.getGuild(t.guild_id))||void 0===e?void 0:e.getRole(c.colorRoleId))||void 0===n?void 0:n.name:void 0}),[t.guild_id,c]),f=(0,d.e7)([Dt.default],(function(){return Dt.default.getUser(a)})),y=(0,d.e7)([Dt.default],(function(){return Dt.default.getCurrentUser()})),b=(null==f?void 0:f.id)===(null==y?void 0:y.id),v=(0,d.e7)([Xo.Z,Yl.Z],(function(){return b?Yl.Z.getStatus():Xo.Z.getStatus(a,t.guild_id)})),m=(0,d.e7)([Xo.Z],(function(){return Xo.Z.isMobileOnline(a)})),g=(0,d.e7)([Xo.Z,Yl.Z],(function(){return b?Yl.Z.getActivities():Xo.Z.getActivities(a,t.guild_id)})),O=(0,d.e7)([Qo.Z],(function(){return Qo.Z.getAnyStreamForUser(a)})),E=(0,fa.JA)(a),C=(0,d.e7)([Wl.Z],(function(){
|
||
return Wl.Z.canUserViewChannel(t.id,i,a)})),j=null!=(null==f?void 0:f.id)&&f.id===l,S=o.useCallback((function(e){null!=f&&(0,h.jW)(e,tu((function(){var e,o;return au(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(78294)]).then(n.bind(n,478294))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,ou(ru({},e),{user:f,guildId:t.guild_id,channel:t}))}]}}))})))}),[f,t]),I=o.useCallback((function(){if(null!=f){var e="@".concat(ei.ZP.getUserTag(f,{decoration:"never"})),n="<@".concat(f.id,">");Wt.S.dispatchToLastSubscribed(L.CkL.INSERT_TEXT,{plainText:e,rawText:n});Er.Z.startTyping(t.id)}}),[f,t]),_=o.useCallback((function(e){e.stopPropagation();(0,ba.f)({guildId:t.guild_id,location:{section:L.jXE.THREAD_MEMBER_LIST,object:L.qAy.BOOST_GEM_ICON}})}),[t.guild_id]);if(null==f)return null;var w=null==c?void 0:c.premiumSince;return(0,r.jsx)(p.yRy,{preload:function(){return(0,ni.Z)(f.id,f.getAvatarURL(t.guild_id,80),{guildId:t.guild_id,
|
||
channelId:t.id})},renderPopout:function(e){return(0,r.jsx)(ga.Z,ou(ru({},e),{userId:f.id,guildId:t.guild_id,channelId:t.id}))},position:da.tq?"window_center":"left",spacing:16,onShiftClick:I,children:function(e,n){var o=n.isShown;return(0,r.jsx)(Ia.Z,ru({onContextMenu:S,shouldAnimateStatus:lu,user:f,currentUser:y,nick:null==c?void 0:c.nick,status:v,activities:g,colorString:null==c?void 0:c.colorString,colorRoleName:s,isTyping:u,channel:t,guildId:t.guild_id,isMobile:m,selected:o,applicationStream:O,premiumSince:null==w?null:new Date(w),onClickPremiumGuildIcon:_,itemProps:E,lostPermissionTooltipText:C?void 0:D.Z.Messages.THREAD_MEMBER_WITHOUT_ACCESS,isOwner:j},e))}})}function cu(e){var t=e.id,n=e.label,o=e.count,i=e.guildId,a=(0,va.p9)({roleId:t,guildId:i,size:16});return t===L.Skl.UNKNOWN?(0,r.jsx)("div",{className:wa().membersGroup,children:(0,r.jsx)("div",{className:wa().memberGroupsPlaceholder})}):(0,r.jsxs)(Ca.Z,{className:wa().membersGroup,
|
||
"aria-label":D.Z.Messages.CHANNEL_MEMBERS_A11Y_LABEL.format({title:n,count:o}),children:[null!=a?(0,r.jsx)(ja.Z,ru({className:wa().roleIcon},a)):null,(0,r.jsxs)("span",{"aria-hidden":!0,children:[n," — ",o]})]})}function su(e){return e.channel.type===L.d4z.PRIVATE_THREAD?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:Jl().divider}),(0,r.jsxs)(p.xvT,{variant:"text-xs/bold",color:"header-secondary",className:Jl().private,children:[(0,r.jsx)(ql.Z,{width:12,height:12})," ",D.Z.Messages.THREAD_BROWSER_PRIVATE]}),(0,r.jsx)(p.xvT,{variant:"text-sm/normal",color:"header-secondary",className:Jl().instructions,children:D.Z.Messages.MEMBER_LIST_PRIVATE_THREAD_INSTRUCTIONS})]}):null}var fu=o.memo(uu),du=o.memo(cu),pu=o.memo(su);function hu(e){var t=e.channel,n=e.guild,i="members-".concat(t.id),l=function(e,t){var n=(0,d.cj)([Wl.Z],(function(){return{version:Wl.Z.getMemberListVersion(e),members:Wl.Z.getMemberListSections(e)}})),r=n.version,i=n.members,a=o.useMemo((function(){
|
||
if(null==t)return zl;var e=s()(t.roles).values().filter((function(e){return e.hoist})).sortBy((function(e){return e.position})).reverse().map((function(e){return e.id})).value();e.push("online","offline");return e.map((function(e){var n,r,o=t.roles[e];return{label:"online"===e?D.Z.Messages.STATUS_ONLINE:"offline"===e?D.Z.Messages.STATUS_OFFLINE:o.name,userIds:null!==(r=null==i||null===(n=i[e])||void 0===n?void 0:n.userIds)&&void 0!==r?r:[],id:e,roleId:e}}))}),[null==t?void 0:t.roles,i,r]);return null!=i?a:zl}(t.id,n),u=l.filter((function(e){return e.userIds.length>0})).reverse()[0],c=(0,ya.U)().canUseAvatarDecorations?44+Ia.x:44,f=function(e,t){var n=(0,d.e7)([jr.Z],(function(){return jr.Z.keyboardModeEnabled})),r=o.useRef(null),i=o.useCallback((function(e,n){var o=r.current;if(null!=o){var i=parseInt(n,10),a=iu(o.getSectionRowFromIndex(i),2),l=a[0],u=a[1],c=0===l&&0===u?t:0;o.scrollToIndex({section:l,row:u,padding:c,callback:function(){requestAnimationFrame((function(){var t
|
||
;return null===(t=document.querySelector(e))||void 0===t?void 0:t.focus({preventScroll:!0})}))}})}}),[t]),a=o.useCallback((function(){return new Promise((function(e){var t=r.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),l=o.useCallback((function(){return new Promise((function(e){var t=r.current;if(null==t)return e();t.scrollToBottom({callback:function(){requestAnimationFrame((function(){return setTimeout(e,100)}))}})}))}),[]);return{navigator:(0,sa.ZP)({id:e,setFocus:i,isEnabled:n,scrollToStart:a,scrollToEnd:l}),listRef:r}}(i,c),h=f.navigator,y=f.listRef;if(0===l.length||l.every((function(e){return 0===e.userIds.length})))return(0,r.jsx)(yu,{channel:t});var b=s().omit(h.containerProps,["ref"]),v=Ql.ZP.getGuildVisualOwnerId(n);return(0,r.jsx)(fa.bG,{navigator:h,children:(0,r.jsx)(p.Wdt,{children:function(e){return(0,r.jsx)("div",{className:a()(wa().membersWrap,wa().hiddenMembers),children:(0,
|
||
r.jsx)(p.aVo,ru({ref:y,className:wa().members,paddingTop:0,sectionHeight:40,renderSection:function(e){var t=e.section,o=l[t];return(0,r.jsx)(du,{id:o.id,label:o.label,count:o.userIds.length,guildId:n.id},o.id)},rowHeight:c,renderRow:function(e){var n=e.section,o=e.row,i=l[n],a=i.userIds,u=i.id;return(0,r.jsx)(fu,{channel:t,sectionId:u,userId:a[o],guildOwnerId:v},a[o])},footerHeight:function(e){return l[e]===u&&t.type===L.d4z.PRIVATE_THREAD?80:0},renderFooter:function(e){return l[e.section]===u?(0,r.jsx)(pu,{channel:t},"footer"):null},innerAriaLabel:D.Z.Messages.MEMBERS,innerTag:"ul",sections:l.map((function(e){return e.userIds.length})),fade:!0},b,e),i)})}})})}function yu(e){var t=e.channel;return(0,r.jsxs)("div",{className:a()(wa().membersWrap,wa().hiddenMembers,wa().members,Jl().emptyState),children:[(0,r.jsx)(p.xvT,{className:Jl().emptyStateHeader,variant:"text-xs/bold",color:"interactive-normal",children:D.Z.Messages.MEMBERS}),(0,r.jsxs)("div",{
|
||
className:Jl().emptyStateIconContainer,children:[(0,r.jsx)("div",{className:Jl().emptyStateIcon,children:(0,r.jsx)(Tt.Z,{width:32,height:32})}),(0,r.jsx)(Kl.Z,{className:Jl().emptyStateStars})]}),(0,r.jsx)(p.X6q,{variant:"heading-md/semibold",children:t.isForumPost()?D.Z.Messages.FORUM_POST_MEMBER_LIST_EMPTY_STATE_HEADER:D.Z.Messages.THREAD_MEMBER_LIST_EMPTY_STATE_HEADER}),(0,r.jsx)(p.xvT,{className:Jl().emptyStateSubtext,variant:"text-sm/normal",color:"header-secondary",children:D.Z.Messages.THREAD_MEMBER_LIST_EMPTY_STATE_SUBTEXT})]})}var bu=n(704271),vu=n(358500),mu=n(79462),gu=n(258875),Ou=n.n(gu);function Eu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cu(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function ju(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Cu(i,r,o,a,l,"next",e)}function l(e){
|
||
Cu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Su(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _u(e){_u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return _u(e)}function wu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Iu(e,t,n[t])}))}return e}function xu(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Pu(e,t){return!t||"object"!==Tu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Nu(e,t){Nu=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Nu(e,t)}function Au(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Eu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
|
||
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eu(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Tu=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Zu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=_u(e);if(t){var o=_u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pu(this,n)}}var Mu=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]
|
||
};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Ru=(0,j.Un)({createPromise:function(){
|
||
return Promise.all([n.e(40532),n.e(7849),n.e(62790)]).then(n.bind(n,662790))},webpackId:662790,renderLoader:function(){return(0,r.jsx)("div",{className:Ou().loader,children:(0,r.jsx)(p.$jN,{})})},name:"ForumChannel"}),Lu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Nu(e,t)}(o,e);var t=Zu(o);function o(){Su(this,o);var e;(e=t.apply(this,arguments)).state={topicExpanded:!1,threadSidebarWidth:void 0,isThreadSidebarFloating:!1};e.handleTitleParentClick=function(){var t=e.props.parentChannel;null!=t&&(0,yr.Kh)(t.id)};e._handleContextMenu=function(t,n){switch(n.type){case L.d4z.GUILD_VOICE:case L.d4z.GUILD_ANNOUNCEMENT:case L.d4z.GUILD_TEXT:case L.d4z.GUILD_FORUM:e.openChannelContextMenu(t,n);break;case L.d4z.ANNOUNCEMENT_THREAD:case L.d4z.PUBLIC_THREAD:case L.d4z.PRIVATE_THREAD:e.openThreadContextMenu(t,n)
|
||
;break;case L.d4z.DM:e.openDMContextMenu(t,n)}};e.handleContextMenu=function(t){u()(null!=e.props.channel,"Missing channel in Channel.handleContextMenu");e._handleContextMenu(t,e.props.channel)};e.handleParentContextMenu=function(t){u()(null!=e.props.parentChannel,"Missing parentChannel in Channel.handleParentContextMenu");e._handleContextMenu(t,e.props.parentChannel)};e.handleThreadSidebarResize=function(t,n){e.setState({threadSidebarWidth:t,isThreadSidebarFloating:n})};e.openUserProfile=function(){var t=e.props.channel;u()(null==t?void 0:t.isPrivate(),"Missing private channel in Channel.openUserProfile");(0,zo.m)({userId:t.getRecipientId(),guildId:t.guild_id,channelId:t.id,analyticsLocation:{section:L.jXE.CHANNEL_HEADER}})};e.renderStreamQualityLiveIndicatorToolbarItem=function(){var t=e.props.selectedParticipant;return(null==t?void 0:t.type)!==vu.fO.STREAM?null:(0,r.jsx)(dt.Z,{size:aa.ZP.Sizes.LARGE,participant:t,showQuality:!0},"live-indicator")};e.renderHeaderToolbar=function(){
|
||
var t=e.props,n=t.channel,o=t.parentChannel,i=t.isLurking,a=t.showCall;u()(null!=n,"Missing channel in Channel.renderHeaderToolbar");var l=[];if(n.isSystemDM())return l;switch(n.type){case L.d4z.GUILD_STAGE_VOICE:case L.d4z.GUILD_VOICE:return l;case L.d4z.DM:l.push(e.renderStreamQualityLiveIndicatorToolbarItem());l.push((0,r.jsx)(Un,{channel:n},"calls"));l.push((0,r.jsx)(Xt,{channel:n},"pins"));l.push((0,r.jsx)(Bn.Z,{channel:n,tooltip:D.Z.Messages.GROUP_DM_ADD_FRIENDS},"invite"));l.push((0,r.jsx)(Kn,{channel:n,showCall:a},"profile"));break;case L.d4z.GROUP_DM:l.push(e.renderStreamQualityLiveIndicatorToolbarItem());l.push((0,r.jsx)(Un,{channel:n},"calls"));l.push((0,r.jsx)(Xt,{channel:n},"pins"));if(!n.isManaged()){var c=D.Z.Messages.GROUP_DM_ADD_FRIENDS;l.push((0,r.jsx)(Bn.Z,{channel:n,tooltip:c},"invite"))}l.push((0,r.jsx)(Zt,{channelId:n.id},"members"));break;case L.d4z.ANNOUNCEMENT_THREAD:case L.d4z.PRIVATE_THREAD:case L.d4z.PUBLIC_THREAD:null!=o&&(o.isForumChannel()||l.push((0,
|
||
r.jsx)(Io,{channel:o},"browser")));n.isVocalThread()&&l.push((0,r.jsx)(Jn,{channel:n},"thread-call"));l.push((0,r.jsx)(_o.Z,{channel:n},"notifications"));l.push((0,r.jsx)(Xt,{channel:n},"pins"));n.isArchivedThread()||l.push((0,r.jsx)(Zt,{channelId:n.id},"members"));l.push((0,r.jsx)(Go,{channel:n},"threads-overflow"));break;case L.d4z.GUILD_ANNOUNCEMENT:l.push((0,r.jsx)(Io,{channel:n},"browser"));i||l.push((0,r.jsx)(Mt.Z,{channel:n},"notifications"));l.push((0,r.jsx)(Xt,{channel:n},"pins"));l.push((0,r.jsx)(Zt,{channelId:n.id},"members"));break;case L.d4z.GUILD_TEXT:l.push((0,r.jsx)(Io,{channel:n},"browser"));i||l.push((0,r.jsx)(Mt.Z,{channel:n},"notifications"));l.push((0,r.jsx)(Xt,{channel:n},"pins"));l.push((0,r.jsx)(Zt,{channelId:n.id},"members"));(0,v.L)(n.guild_id)&&l.push((0,r.jsx)($t,{channelId:n.id},"summaries"));break;case L.d4z.GUILD_FORUM:if(!i){l.push((0,r.jsx)(an,{channel:n},"forum-onboarding"));l.push((0,r.jsx)(Mt.Z,{channel:n},"notifications"))}__OVERLAY__||l.push((0,
|
||
r.jsx)(Zt,{channelId:n.id},"members"));break;case L.d4z.GUILD_DIRECTORY:l.push((0,r.jsx)(Zt,{channelId:n.id},"members"))}return l};e.renderMobileToolbar=function(){var t=e.props.channel;u()(null!=t,"Missing channel in Channel.renderHeaderToolbar");var n=[];if(t.isSystemDM())return n;switch(t.type){case L.d4z.GUILD_STAGE_VOICE:case L.d4z.GUILD_VOICE:case L.d4z.DM:break;case L.d4z.GROUP_DM:n.push((0,r.jsx)(Zt,{channelId:t.id},"members"));break;case L.d4z.ANNOUNCEMENT_THREAD:case L.d4z.PRIVATE_THREAD:case L.d4z.PUBLIC_THREAD:t.isArchivedThread()||n.push((0,r.jsx)(Zt,{channelId:t.id},"members"));break;case L.d4z.GUILD_ANNOUNCEMENT:case L.d4z.GUILD_TEXT:case L.d4z.GUILD_FORUM:case L.d4z.GUILD_DIRECTORY:n.push((0,r.jsx)(Zt,{channelId:t.id},"members"))}return n};e.renderFollowButton=function(){var t=e.props,o=t.showFollowButton,i=t.channel;return o?(0,r.jsx)(p.zxk,{size:p.zxk.Sizes.MIN,color:p.zxk.Colors.PRIMARY,className:Ou().followButton,onClick:function(){return(0,p.ZDy)(ju((function(){
|
||
var e,t;return Mu(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(89594)]).then(n.bind(n,189594))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,wu({channel:i},e))}]}}))})))},children:D.Z.Messages.FOLLOW}):null};e.renderHeaderBar=function(){var t=e.props,n=t.channel,o=t.channelName,i=t.parentChannel,l=t.guild,c=t.guildId,s=t.showCall,f=t.hasVideo,d=t.isMobile,p=t.emojiAndColor,h=t.channelEmojiLeftOfIcon;u()(null!=n,"Missing channel in Channel.renderHeaderBar");u()(null!=o,"Should not be null if channel is not null.");var y=n.isDM()&&!n.isSystemDM()?e.openUserProfile:void 0,b=null!=(null==i?void 0:i.guild_id)&&null!=(null==i?void 0:i.id)?e.handleTitleParentClick:void 0;return(0,r.jsxs)(ln.Z,{guildId:c,channelId:n.id,channelType:n.type,hideSearch:n.isDirectory(),toolbar:e.renderHeaderToolbar(),mobileToolbar:e.renderMobileToolbar(),className:a()(Ou().title,f&&s?(0,ua.Q)(L.BRd.DARK):null),transparent:s,
|
||
"aria-label":D.Z.Messages.CHANNEL_HEADER_BAR_A11Y_LABEL,children:[(0,Xe.ud)({channel:n,channelName:o,parentChannel:i,guild:l,hasVideo:f,isMobile:d,handleContextMenu:e.handleContextMenu,handleParentContextMenu:e.handleParentContextMenu,handleClick:y,handleParentClick:b,renderFollowButton:e.renderFollowButton,emojiAndColor:p,channelEmojiLeftOfIcon:h}),(0,r.jsx)(Xe.TS,{channel:n,guild:l}),(0,Xe.v0)(n,l)]},"header-".concat(n.id))};return e}var i=o.prototype;i.componentDidMount=function(){(0,Wo.e)("guild_channel")};i.componentDidUpdate=function(e){null!=this.props.channel&&null!=e.channel&&this.props.channel.id!==e.channel.id&&this.state.topicExpanded&&this.setState({topicExpanded:!1});this.openChannelModal()};i.openChannelContextMenu=function(e,t){var o=this.props.guild;u()(null!=t,"Missing channel in Channel.openChannelContextMenu");u()(null!=o,"Missing guild in Channel.openChannelContextMenu");(0,h.jW)(e,ju((function(){var e,i;return Mu(this,(function(a){switch(a.label){case 0:
|
||
return[4,Promise.all([n.e(84663),n.e(59295)]).then(n.bind(n,359295))];case 1:e=a.sent(),i=e.default;return[2,function(e){return(0,r.jsx)(i,xu(wu({},e),{channel:t,guild:o}))}]}}))})))};i.openThreadContextMenu=function(e,t){u()(null!=t,"Missing channel in Channel.openChannelContextMenu");(0,h.jW)(e,ju((function(){var e,o;return Mu(this,(function(i){switch(i.label){case 0:return[4,n.e(81580).then(n.bind(n,881580))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,xu(wu({},e),{channel:t}))}]}}))})))};i.openDMContextMenu=function(e,t){u()(null!=t,"Missing channel in Channel.openDMContextMenu");var o=Dt.default.getUser(t.getRecipientId());u()(null!=o,"Missing user in Channel.openDMContextMenu");(0,h.jW)(e,ju((function(){var e,i;return Mu(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(50865)]).then(n.bind(n,550865))];case 1:e=a.sent(),i=e.default;return[2,function(e){return(0,r.jsx)(i,xu(wu({},e),{user:o,channelSelected:!0,
|
||
channel:t}))}]}}))})))};i.renderCall=function(){var e=this.props,t=e.channel,n=e.showCall,o=e.nsfwAllowed,i=e.nsfwAgree;u()(null!=t,"Missing channel in Channel.renderCall");if((null==t?void 0:t.isNSFW())&&(!o||!i))return null;if(!n)return null;switch(t.type){case L.d4z.GUILD_STAGE_VOICE:return(0,r.jsx)(gr.Z,{channel:t},t.id);case L.d4z.GUILD_VOICE:case L.d4z.DM:case L.d4z.GROUP_DM:case L.d4z.PUBLIC_THREAD:case L.d4z.PRIVATE_THREAD:var a=this.props.height-200;return(0,r.jsx)(O.Z,{channel:t,renderExternalHeader:this.renderHeaderBar,maxHeight:a},"call-".concat(t.id));default:return null}};i.renderChat=function(){var e=this.props,t=e.channel,n=e.nsfwAgree,o=e.guild,i=e.nsfwAllowed,a=e.needSubscriptionToAccess;u()(null!=t,"Missing channel in Channel.renderChat");if(a){u()(null!=o,"premium channels must exist within a guild");return(0,r.jsx)(It,{channelId:t.id,guildId:o.id})}if(t.isNSFW()&&(!i||!n))return(0,r.jsx)(bu.Z,{guild:o});if(t.isGuildVocal())return null;if(t.isDirectory()){
|
||
u()(null!=o,"directory channels must exist within a guild");return(0,r.jsx)(Ke,{channel:t,guild:o})}if(t.isForumChannel()){u()(null!=o,"forum channels must exist within a guild");var l={isThreadSidebarFloating:this.state.isThreadSidebarFloating,threadSidebarWidth:this.state.threadSidebarWidth};return(0,r.jsx)(Ru,{channel:t,guild:o,sidebarState:l},t.id)}return(0,r.jsx)(qe.Z,{channel:t,guild:o,chatInputType:C.I.NORMAL},null!=o?o.id:"home")};i.renderSidebar=function(){var e=this.props,t=e.searchId,n=e.channel,o=e.parentChannel,i=e.guild,a=e.needSubscriptionToAccess,l=e.section,c=e.showCall,s=e.showChannelSummaries;u()(null!=n,"Missing channel in Channel.renderSidebar");if(__OVERLAY__||a)return null;if(l===L.ULH.PROFILE&&n.isPrivate())return(0,r.jsx)(Xi,{channel:n,showCall:c},"private-channel-profile-".concat(n.id));if(l===L.ULH.MEMBERS)switch(n.type){case L.d4z.GROUP_DM:return(0,r.jsx)(Vl,{channel:n},"private-channel-recipients-".concat(n.id));case L.d4z.GUILD_DIRECTORY:
|
||
case L.d4z.GUILD_FORUM:case L.d4z.GUILD_ANNOUNCEMENT:case L.d4z.GUILD_TEXT:var f,d=n.type===L.d4z.GUILD_FORUM?n.id:null!==(f=n.guild_id)&&void 0!==f?f:n.id;return(0,r.jsx)($a,{channel:n},"channel-members-".concat(d));case L.d4z.ANNOUNCEMENT_THREAD:if(null!=o)return(0,r.jsx)($a,{channel:o},"channel-members-".concat(o.id));break;case L.d4z.PUBLIC_THREAD:case L.d4z.PRIVATE_THREAD:if(!n.isArchivedThread()&&null!=i)return(0,r.jsx)(hu,{channel:n,guild:i},"channel-members-".concat(n.id))}else{if(l===L.ULH.SEARCH&&null!=t)return(0,r.jsx)(br.Z,{searchId:t});if(l===L.ULH.SUMMARIES&&s&&n.type===L.d4z.GUILD_TEXT)return(0,r.jsx)(bl,{channel:n},"channel-summaries-".concat(n.id))}return null};i.openChannelModal=function(){var e=this.props,t=e.channel,o=e.guildId,i=e.hasModalOpen,a=e.showWelcomeModal,l=e.isLurking,u=e.isUnavailable,c=e.showRealNameModal;if(null==t||null==o||u||i)return null;c&&(0,p.ZDy)(ju((function(){var e,t;return Mu(this,(function(i){switch(i.label){case 0:
|
||
return[4,Promise.all([n.e(40532),n.e(65087)]).then(n.bind(n,565087))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,xu(wu({},e),{guildId:o}))}]}}))})),{onCloseCallback:function(){return pt.viewPrompt(sr.REAL_NAME_PROMPT,o)},modalKey:"Guild Hub Real Name Modal"});a&&(0,p.ZDy)(ju((function(){var e,t;return Mu(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(12777)]).then(n.bind(n,705496))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,xu(wu({},e),{guildId:o}))}]}}))})),{onCloseCallback:function(){return(0,$i.y0)(o,l)},modalKey:"Guild Welcome Screen Modal"});return null};i.renderThreadSidebar=function(){var e,t=this.props,n=t.channel,o=t.section,i=t.threadSidebarState,a=t.nsfwAgree,l=t.nsfwAllowed,u=t.width;if(o!==L.ULH.SIDEBAR_CHAT||null==i)return null;if((null==n?void 0:n.isNSFW())&&(!l||!a))return null;switch(i.type){case vr.t.CREATE_THREAD:if(null==n?void 0:n.isForumChannel())return null;e=(0,r.jsx)(co,{
|
||
parentChannelId:i.parentChannelId,parentMessageId:i.parentMessageId,location:i.location});break;case vr.t.VIEW_THREAD:var c=(null==n?void 0:n.isForumChannel())?ft:Vo.Z;e=(0,r.jsx)(c,{channelId:i.channelId});break;case vr.t.VIEW_CHANNEL:case vr.t.VIEW_MESSAGE_REQUEST:return null;default:(0,la.vE)(i)}var s=(null==n?void 0:n.type)===L.d4z.GUILD_FORUM?528:450,f=u-L.PrS-s;return(0,r.jsx)(ca.Z,{sidebarType:(null==n?void 0:n.type)===L.d4z.GUILD_FORUM?ca.y.PostSidebar:ca.y.ThreadSidebar,maxWidth:f,onWidthChange:this.handleThreadSidebarResize,children:e})};i.render=function(){var e=this.props,t=e.channel,n=e.guild,o=e.formattedChannelName,i=e.showCall,l=e.isUnavailable,u=e.layout,c=e.section,s=e.textInStageEnabled,f=this.state,d=f.threadSidebarWidth,p=f.isThreadSidebarFloating;if(l)return(0,r.jsx)(wl,{});if(null==t)return(0,r.jsx)(xl.Z,{channelId:this.props.channelId});var h,y=c===L.ULH.SIDEBAR_CHAT,b=!t.isForumChannel()&&(s||!t.isGuildStageVoice()),v=null==n?void 0:n.name;return(0,
|
||
r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S.yY,{location:v,subsection:null!=o?o:void 0}),(0,r.jsxs)("div",{className:a()(Ou().chat,(h={},Iu(h,Ou().threadSidebarOpen,y),Iu(h,Ou().threadSidebarFloating,y&&p),h)),children:[b?(0,r.jsx)(Qe.Z,{style:{right:y?d:void 0},className:Ou().uploadArea,channel:t,draftType:tt.d.ChannelMessage}):null,i?null:this.renderHeaderBar(),this.renderCall(),(0,r.jsxs)("div",{className:a()(Ou().content,Iu({},Ou().noChat,u===L.AEg.NO_CHAT)),children:[this.renderChat(),this.renderSidebar()]})]}),this.renderThreadSidebar()]})};return o}(o.PureComponent),Du=(0,y.Z)(Lu);const ku=o.memo((function(){var e,t,n=Au(o.useState(null),2),i=n[0],a=n[1],l=(0,d.e7)([ra.Z],(function(){return ra.Z.getChannelId()})),u=(0,d.e7)([ra.Z],(function(){return ra.Z.getVoiceChannelId()})),c=(0,d.e7)([et.Z],(function(){return et.Z.getChannel(l)}),[l]),h=(0,d.e7)([et.Z],(function(){return et.Z.getChannel(u)}),[u]),y=null==c?void 0:c.parent_id,O=(0,d.e7)([et.Z],(function(){
|
||
return et.Z.getChannel(y)}),[y]),C=(0,d.e7)([X.Z],(function(){return X.Z.getGuild(null==c?void 0:c.guild_id)}),[c]),j=(0,ht.Z)(null!==(e=null==c?void 0:c.id)&&void 0!==e?e:void 0).needSubscriptionToAccess,S=(0,d.e7)([g.Z],(function(){return null!=l&&g.Z.getParticipants(l).length>0}),[l]),I=(0,d.e7)([En.Z],(function(){return null!=c&&c.isVocalThread()&&!s().isEmpty(En.Z.getVoiceStatesForChannel(c.id))}),[c]),_=(0,Ji.Vy)(null==c?void 0:c.guild_id),w=(null==c?void 0:c.isGuildVocal())||S||I,x=(0,f.TH)().welcomeModalChannelId,P=(0,d.e7)([hr.Z],(function(){return null!=c&&hr.Z.isLurking(c.guild_id)}),[c]),N=(0,d.e7)([ea.Z],(function(){return ea.Z.hasSeen(null==c?void 0:c.guild_id,P)}),[c,P]),A=(0,d.e7)([g.Z],(function(){return null!=l?g.Z.getLayout(l):L.AEg.NORMAL}),[l]),T=(0,d.e7)([g.Z],(function(){return null!=c?g.Z.getSelectedParticipant(c.id):null})),Z=(0,d.e7)([Dt.default],(function(){return Dt.default.getCurrentUser()})),M=fr(C),R=function(e,t){var n=(0,d.e7)([X.Z],(function(){
|
||
return X.Z.getGuild(t)})),r=(0,d.e7)([et.Z],(function(){return et.Z.getChannel(e)})),o=(0,d.e7)([ra.Z],(function(){return ra.Z.getChannelId(t)})),i=ta.Z.useExperiment({}).showOnboardingHome;return e===o&&null!=r&&null!=n&&r.getGuildId()===n.id&&(0,na.zi)(r.type)&&n.hasFeature(L.oNc.WELCOME_SCREEN_ENABLED)&&n.hasFeature(L.oNc.COMMUNITY)&&(!i||!n.hasFeature(L.oNc.GUILD_SERVER_GUIDE))}(x,null==C?void 0:C.id),D=(0,d.cj)([Nt.ZP],(function(){return{section:Nt.ZP.getSection(l),threadSidebarState:Nt.ZP.getSidebarState(l)}})),k=D.section,U=D.threadSidebarState,B=(0,E.ZP)(c),F=(0,E.ZP)(c,!0),G=null!=c&&u===c.id,H=null!=c&&c.isGuildStageVoice();o.useEffect((function(){var e,t=(0,Je.s1)();if((null==t||null===(e=t.location)||void 0===e?void 0:e.state)===mu.Df){var n,r,o=(null!==(r=(0,pr.Qj)(null==t||null===(n=t.location)||void 0===n?void 0:n.pathname))&&void 0!==r?r:{}).channelId;null!=o&&a(o)}}),[]);o.useEffect((function(){if(null!=i&&null!=c&&H&&c.id===i&&!G){(0,mr.Cq)(c);a(null)}}),[i,H])
|
||
;var V=(0,v.L)(null!==(t=null==C?void 0:C.id)&&void 0!==t?t:"");o.useEffect((function(){null!=c&&c.isPrivate()&&m.tF.trackExposure({})}),[c]);var W,z=b._.useExperiment({}),Y=z.enabled,K=z.left,q=(0,wt.Z)(null==c?void 0:c.guild_id,!Y),Q=null!=q&&null!=c?q[c.name.toLowerCase()]:void 0,J=null!=Q?[Q,null!==(W=_t.Z[Q])&&void 0!==W?W:"#607D8B"]:void 0;return(0,r.jsx)(Du,xu(wu({guildId:null==c?void 0:c.guild_id,channelId:l,channel:c,channelName:B,formattedChannelName:F,parentChannel:O,voiceChannel:h,layout:A,needSubscriptionToAccess:j,isLurking:P,hasModalOpen:(0,p.$sL)(),section:k,threadSidebarState:U,guild:C,searchId:(0,d.e7)([ia.Z],(function(){return ia.Z.getCurrentSearchId()})),showCall:!j&&w,nsfwAgree:(0,d.e7)([Ht.Z],(function(){return Ht.Z.didAgree(null==c?void 0:c.guild_id)})),isMobile:(0,d.e7)([Xo.Z],(function(){return(null==c?void 0:c.type)===L.d4z.DM&&Xo.Z.isMobileOnline(c.getRecipientId())}),[c]),isUnavailable:(0,d.e7)([oa.Z],(function(){
|
||
return null!=(null==c?void 0:c.guild_id)&&oa.Z.isUnavailable(c.guild_id)}),[c]),showRealNameModal:M,showWelcomeModal:!N&&R,showFollowButton:(null==c?void 0:c.type)===L.d4z.GUILD_ANNOUNCEMENT&&(null==C?void 0:C.hasFeature(L.oNc.NEWS))||!1},(0,d.cj)([En.Z],(function(){return{hasVideo:null!=c&&En.Z.hasVideo(c.id)}}),[c])),{inCall:G,selectedParticipant:T,nsfwAllowed:!0===(null==Z?void 0:Z.nsfwAllowed),textInStageEnabled:_,showChannelSummaries:V,emojiAndColor:J,channelEmojiLeftOfIcon:K}))}))},764079:(e,t,n)=>{"use strict";n.d(t,{Z:()=>wn});var r=n(785893),o=n(667294),i=n(441143),a=n.n(i),l=n(289283),u=n(210595),c=n(842227),s=n(202351),f=n(707961),d=n(943469),p=n(665472),h=n(224134),y=n(567867),b=n(268319),v=(0,n(260561).B)({kind:"user",id:"2022-09_inboxes_v2_frontend",label:"Safety Integrity Platform Inboxes V2",defaultConfig:{enabled:!1,forceConfirmationOnAccept:!1},treatments:[{id:1,label:"Enabled",config:{enabled:!0,forceConfirmationOnAccept:!1}}]})
|
||
;var m=n(770272),g=n(316878),O=n(396043),E=n(49621),C=n(385231),j=n(623313),S=n(272200),I=n(698847),_=n(428107),w=n(281808),x=n(855483),P=n(294184),N=n.n(P),A=n(242922),T=n(97040),Z=n.n(T);function M(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function R(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function L(e){var t,n=e.className,o=e.channel,i=e.section,a=null!=i?(0,A.ky)(i):null;return(0,r.jsx)("div",{className:N()(n,Z().wrapper),children:(0,r.jsx)("div",{className:Z().icon,children:null!=a?(0,r.jsx)(f.ua7,{
|
||
text:null!==(t=null==i?void 0:i.name)&&void 0!==t?t:"",position:"top",children:function(e){return(0,r.jsx)(a,R(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){M(e,t,n[t])}))}return e}({},e),{channel:o,section:i,width:24,height:24}))}}):null})})}const D=o.memo(L);var k=n(901287),U=n(889025),B=n(73948),F=n(598123),G=n(473903),H=n(744564);function V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e){W=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return W(e)}function z(e,t){return!t||"object"!==K(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e
|
||
}(e):t}function Y(e,t){Y=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Y(e,t)}var K=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=W(e);if(t){var o=W(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return z(this,n)}}var Q=new Set;var X=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Y(e,t)}(n,e);var t=q(n);function n(){V(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){
|
||
null!=e&&(Q=new Set(e))};r.hasAllowedSpamUser=function(e){return Q.has(e)};r.getState=function(){return Q};r.__getLocalVars=function(){return{allowedSpamUsers:Q}};return n}(s.ZP.PersistedStore);X.displayName="SpamMessageAcceptStore";X.persistKey="SpamMessageAcceptStore";const J=new X(H.Z,{ALLOW_SPAM_MESSAGES_FOR_USER:function(e){var t=e.userId;Q.add(t)},HIDE_SPAM_MESSAGES_FOR_USER:function(e){var t=e.userId;Q.delete(t)}});var $=n(2590),ee=n(897196);function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return te(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var re=n(105783),oe=n(761953),ie=n(864928),ae=n(424871),le=n(771344),ue=n(300792),ce=n.n(ue);function se(e){var t=e.bannerIcon,n=e.bannerHeader,o=e.bannerSubtext,i=e.containerStyles,a=e.headerStyles,l=e.children;return(0,r.jsxs)("div",{className:ce().spamBanner,children:[(0,r.jsxs)("div",{className:N()(ce().bannerTextContainer,i),children:["string"==typeof t?(0,r.jsx)("img",{src:t,alt:"",className:ce().bannerIcon}):t,(0,r.jsxs)("div",{className:ce().bannerText,children:[(0,r.jsx)("div",{className:N()(ce().bannerHeader,a),children:n}),(0,
|
||
r.jsx)("div",{className:ce().bannerSubtext,children:o})]})]}),(0,r.jsx)("div",{className:ce().actionButtons,children:l})]})}var fe=n(652591);var de=n(473708),pe=n(677154),he=n.n(pe);function ye(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function be(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ye(i,r,o,a,l,"next",e)}function l(e){ye(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ve(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function me(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var ge=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}
|
||
o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Oe=n(513157);function Ee(e){var t,n=e.channel,o=n.getRecipientId(),i=(0,s.e7)([G.default],(function(){var e=G.default.getUser(o);return null!=e?e.username:null})),a=(0,le.V)(n.id,o),l=(t=be((function(){return ge(this,(function(e){switch(e.label){case 0:fe.default.track($.rMx.DM_SAFETY,{channel_id:n.id,channel_type:n.type,safety_prompt:"DMSpamExperiment",response:"block_modal_cancel_click"});return[4,oe.Z.closePrivateChannel(n.id,!0)];case 1:e.sent();return[2]}}))})),function(){return t.apply(this,arguments)}),u=function(){var e=be((function(){return ge(this,(function(e){switch(e.label){case 0:fe.default.track($.rMx.DM_SAFETY,{channel_id:n.id,channel_type:n.type,safety_prompt:"DMSpamExperiment",response:"block_modal_block_click"});return[4,ie.Z.addRelationship({userId:o,context:{location:"DMSpamModal"},type:$.OGo.BLOCKED})]
|
||
;case 1:e.sent();return[4,oe.Z.closePrivateChannel(n.id,!0)];case 2:e.sent();(0,f.CFj)((0,f.Yz2)(de.Z.Messages.SPAMMER_BLOCKED.format({username:i}),f.pCN.SUCCESS));return[2]}}))}));return function(){return e.apply(this,arguments)}}(),c=function(){e=o,H.Z.dispatch({type:"ALLOW_SPAM_MESSAGES_FOR_USER",userId:e});var e;null!=a&&n.hasFlag(ee.zZ.IS_SPAM)&&(0,ae.zd)(a);fe.default.track($.rMx.DM_SAFETY,{channel_id:n.id,channel_type:n.type,safety_prompt:"DMSpamExperiment",response:"not_spam"})};return(0,r.jsxs)(se,{bannerIcon:Oe,bannerHeader:de.Z.Messages.ACCEPT_SPAM_DM_HEADER,bannerSubtext:de.Z.Messages.ACCEPT_SPAM_DM_SUBTEXT,children:[(0,r.jsx)(f.ua7,{text:de.Z.Messages.REPORT_NOT_SPAM_TOOLTIP,color:f.ua7.Colors.BRAND,tooltipClassName:he().notSpamTooltip,children:function(e){return(0,r.jsx)(f.zxk,me(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ve(e,t,n[t])}))}return e}({},e),{className:ce().largeButton,look:f.zxk.Looks.FILLED,size:f.zxk.Sizes.SMALL,color:f.zxk.Colors.PRIMARY,onClick:c,children:de.Z.Messages.REPORT_NOT_SPAM}))}}),(0,r.jsx)(f.zxk,{className:ce().largeButton,look:f.zxk.Looks.FILLED,size:f.zxk.Sizes.SMALL,color:f.zxk.Colors.RED,onClick:function(){fe.default.track($.rMx.DM_SAFETY,{channel_id:n.id,channel_type:n.type,safety_prompt:"DMSpamExperiment",response:"close_channel_click"});re.Z.show({title:de.Z.Messages.BLOCK_SPAMMER_HEADER,body:de.Z.Messages.BLOCK_SPAMMER_SUBHEADER.format({username:i}),onCancel:l,cancelText:de.Z.Messages.CANCEL,onConfirm:u,confirmText:de.Z.Messages.BLOCK});oe.Z.closePrivateChannel(n.id,!0)},children:de.Z.Messages.CLOSE_DM})]})}
|
||
var Ce=n(394352),je=n(614948),Se=n(153686),Ie=n(19585),_e=n(401080),we=n(914563),xe=n(504e3),Pe=n.n(xe);function Ne(e){var t,n=e.guild,o=(0,Ie.Z)(Se.Z.AUTOMOD_PROFILE_QUARANTINE_ALERT).analyticsLocations,i=(0,_e.Z)({guild:n,analyticsLocations:o,openWithoutBackstack:!0});return(0,r.jsx)("div",{children:(0,r.jsx)(se,{bannerIcon:(0,r.jsx)(we.Z,{className:Pe().bannerIcon,width:32,height:32}),bannerHeader:de.Z.Messages.GUILD_AUTOMOD_PROFILE_INVALID_MODAL_TITLE_MOBILE.format({guildName:null!==(t=null==n?void 0:n.name)&&void 0!==t?t:""}),bannerSubtext:de.Z.Messages.GUILD_AUTOMOD_PROFILE_INVALID_DESCRIPTION,containerStyles:Pe().bannerContainer,headerStyles:Pe().bannerHeader,children:(0,r.jsx)(f.zxk,{onClick:function(){null!=n&&i()},size:f.zxk.Sizes.SMALL,children:de.Z.Messages.GUILD_AUTOMOD_UPDATE_PROFILE_CTA})})})}var Ae=n(309945),Te=n(872017),Ze=n(736818),Me=n(21372),Re=n(489881),Le=n(357566),De=n(73407),ke=n(858756);var Ue=n(107672),Be=n(939173),Fe=n.n(Be);function Ge(e){
|
||
var t=e.onClose,n=e.guildName;return(0,r.jsxs)("div",{className:Fe().container,children:[(0,r.jsx)("div",{className:Fe().iconContainer,children:(0,r.jsx)(Le.Z,{className:Fe().icon,width:20,height:20})}),(0,r.jsxs)("div",{className:Fe().header,children:[(0,r.jsx)(f.X6q,{variant:"heading-md/semibold",className:Fe().headerText,children:de.Z.Messages.GUILD_COMMUNICATION_DISABLED_POPOUT_HEADER}),(0,r.jsx)(f.xvT,{variant:"text-sm/normal",children:de.Z.Messages.GUILD_COMMUNICATION_DISABLED_POPOUT_SUBHEADER.format({guildName:n})}),(0,r.jsx)(f.zxk,{onClick:t,className:Fe().button,children:de.Z.Messages.OKAY})]})]})}var He=n(515222),Ve=n(536071),We=n.n(Ve);function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{
|
||
for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ze(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ke(e){var t=e.guild,n=e.disabledUntil,i=Ye((0,Ue.i)(t.id),2),a=i[0],l=i[1];!function(e){var t=null!=e?e:{},n=t.communicationDisabledUntil,r=t.userId,i=t.guildId,a=(0,De.Z)(null!=n?Date.parse(n):Date.now()),l=a.seconds,u=(0,o.useRef)(null);(0,o.useEffect)((function(){if(null!=e&&null!=i&&null!=r){
|
||
l<=0&&null==u.current&&(u.current=setTimeout((function(){ke.Z.clearGuildMemberTimeout(i,r)}),1e3));return function(){if(null!=u.current){clearTimeout(u.current);u.current=null}}}clearTimeout(u.current)}),[i,r,l,n,e])}((0,s.e7)([Me.ZP,Ze.default],(function(){return Me.ZP.getMember(t.id,Ze.default.getId())}),[t.id]));return(0,r.jsxs)("div",{children:[a?(0,r.jsx)(Ge,{onClose:function(){return l(t.id)},guildName:t.name}):null,(0,r.jsx)(se,{bannerIcon:(0,r.jsx)(Le.Z,{className:We().bannerIcon}),bannerHeader:de.Z.Messages.GUILD_COMMUNICATION_DISABLED_NOTICE_HEADER,bannerSubtext:de.Z.Messages.GUILD_COMMUNICATION_DISABLED_CHAT_NOTICE_DESCRIPTION.format({link:He.cu}),containerStyles:We().bannerContainer,headerStyles:We().bannerHeader,children:(0,r.jsx)(f.xvT,{variant:"text-sm/semibold",children:(0,r.jsx)(Re.Z,{deadline:new Date(n),showUnits:!0,stopAtOneSec:!0})})})]})}var qe=n(920803),Qe=n(996344);function Xe(e){var t=function(e){return(0,s.e7)([Qe.Z],(function(){return Qe.Z.isMessageRequest(e)
|
||
}),[e])}(e),n=(0,s.e7)([Qe.Z],(function(){return Qe.Z.isAcceptedOptimistic(e)}),[e]);return t&&!n}var Je=n(451458),$e=n(190624),et=n(804185),tt=n(61209),nt=n(525008),rt=n(132167),ot=n(513157);function it(e){var t=e.channel,n=t.id,i=(0,s.e7)([G.default],(function(){return G.default.getUser(t.recipients[0])}),[t]),a=o.useCallback((function(){(0,f.CFj)((0,f.Yz2)(de.Z.Messages.MESSAGE_REQUEST_REQUEST_ERROR_ALERT_TITLE,f.pCN.FAILURE))}),[]),l=(0,rt._)().hasSingleMessageRequest,u=o.useCallback((function(){$e.Z.closeChannelSidebar(et.uZ)}),[]),c=o.useCallback((function(){$e.Z.closeChannelSidebar(et.uZ);!0===l&&(0,Je.Kh)(n)}),[n,l]),d=(0,nt.m)({user:i,onAcceptSuccess:c,onRejectSuccess:u,onError:a}),p=d.acceptMessageRequest,h=d.rejectMessageRequest,y=d.isAcceptLoading,b=d.isRejectLoading,v=d.isUserProfileLoading,m=d.isOptimisticAccepted,g=d.isOptimisticRejected,O=y||b||v||(m||g);return null==i?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.zxk,{className:ce().largeButton,
|
||
look:f.zxk.Looks.LINK,size:f.zxk.Sizes.SMALL,color:f.Ttl.PRIMARY,submitting:b||g,disabled:O,onClick:function(e){e.stopPropagation();h(n)},children:de.Z.Messages.MESSAGE_REQUEST_IGNORE}),(0,r.jsx)(f.zxk,{className:ce().largeButton,look:f.zxk.Looks.FILLED,size:f.zxk.Sizes.SMALL,color:f.zxk.Colors.BRAND,disabled:O,submitting:y||v||m,onClick:function(e){e.stopPropagation();p(n)},children:de.Z.Messages.MESSAGE_REQUEST_ACCEPT})]})}function at(e){var t=e.channelId,n=(0,s.e7)([tt.Z],(function(){return tt.Z.getChannel(t)}),[t]);return(0,r.jsx)(se,{bannerIcon:ot,bannerHeader:de.Z.Messages.MESSAGE_REQUEST_BANNER_TITLE,bannerSubtext:de.Z.Messages.MESSAGE_REQUEST_BANNER_SUBTITLE,children:(null==n?void 0:n.isPrivate())?(0,r.jsx)(it,{channel:n}):null})}var lt=n(944928),ut=n(30027),ct=n(259135),st=n(214142),ft=n(785085),dt=n(44616),pt=n(248088),ht=n(795470),yt=n(788169),bt=n(125173),vt=n(436187),mt=n(673383),gt=n(809433),Ot=n(188484),Et=n.n(Ot);function Ct(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ct(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var St=o.memo((function(e){var t=e.channelId,n=e.width,i=(0,
|
||
s.e7)([g.Z],(function(){return g.Z.useReducedMotion})),a=(0,s.e7)([dt.ZP],(function(){return dt.ZP.getMostRecentMessageCombo(t)}),[t]),l=jt(o.useState(!1),2),u=l[0],c=l[1];o.useEffect((function(){if(!(null==a?void 0:a.displayed)){c(!1);setImmediate((function(){var e=null!=a?(0,mt.Eo)(a.combo):0;c(e>0)}));var e=setTimeout((function(){c(!1);null!=a&&(0,st.ew)(a)}),2e3);return function(){return clearTimeout(e)}}}),[a]);var d=null!=a?"100%":"200%",p=(0,pt.useSpring)({opacity:u?1:0,translateY:u?"0":d,pointerEvents:"none",width:n,config:i?pt.config.stiff:pt.config.slow});return(0,r.jsx)(r.Fragment,{children:null!=a&&(0,r.jsx)(pt.animated.div,{className:Et().messageComboScore,style:p,children:(0,r.jsx)(f.xvT,{className:Et().comboScore,variant:"text-sm/bold",children:(0,mt.Eo)(a.combo)})})})})),It=o.memo((function(e){var t=e.value,n=e.multiplier,i=o.useMemo((function(){return(0,mt.yz)(n)}),[n]),a=i.color,l=i.square,u=i.flair,c=(0,ht.Lq)(a);return(0,r.jsxs)(r.Fragment,{children:[(0,
|
||
r.jsx)(f.xvT,{className:Et().comboValue,variant:"text-sm/bold",children:t}),(0,r.jsxs)("div",{className:Et().comboNameplate,style:{color:c},children:[(0,r.jsx)(f.xvT,{className:Et().comboMultiplier,style:{color:c},variant:"text-sm/bold",children:de.Z.Messages.POGGERMODE_COMBO.format({multiplier:n})}),l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:N()(Et().comboSquare,Et().left),style:{backgroundColor:c}}),(0,r.jsx)("div",{className:N()(Et().comboSquare,Et().right),style:{backgroundColor:c}})]}),u&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:N()(Et().confettiIcon,Et().left),children:(0,r.jsx)(vt.Z,{width:24,height:24})}),(0,r.jsx)("div",{className:N()(Et().confettiIcon,Et().right),children:(0,r.jsx)(vt.Z,{width:24,height:24})})]}),1===n&&(0,r.jsx)(f.xvT,{className:Et().tip,variant:"text-sm/bold",children:de.Z.Messages.POGGERMODE_COMBO_TIP})]})]})}));const _t=o.memo((function(e){var t=e.channelId,n=(0,s.e7)([Ze.default],(function(){
|
||
return Ze.default.getId()})),i=(0,s.e7)([yt.Z],(function(){return yt.Z.isTyping(t,n)}),[t,n]),a=(0,s.e7)([ft.Z],(function(){return ft.Z.isEnabled()})),l=(0,s.e7)([dt.ZP],(function(){return dt.ZP.isComboing(n,t)}),[t,n]),u=o.useRef(null),c=(0,bt.Z)(u,!0,[i]),f=(0,s.e7)([g.Z],(function(){return g.Z.useReducedMotion})),d=jt(o.useState(!1),2),p=d[0],h=d[1],y=(0,gt.Z)(t),b=a&&l&&i;o.useEffect((function(){b&&h(!0);var e=setTimeout((function(){return h(b)}),1e3);return function(){return clearTimeout(e)}}),[b]);var v=(0,pt.useSpring)({opacity:p?1:0,transform:p?"translateY(0)":"translateY(100%)",pointerEvents:"none",config:pt.config.stiff,immediate:f}),m=o.useMemo((function(){return null!=y?y:{value:0,multiplier:1}}),[y]),O=o.useRef(m);o.useEffect((function(){(m.multiplier>1||m.value>0)&&(O.current=m)}),[m]);var E,C=o.useMemo((function(){return{value:b?m.value:O.current.value,multiplier:b?m.multiplier:O.current.multiplier}}),[b,m,O]),j=C.multiplier,S=C.value;return(0,r.jsxs)(r.Fragment,{
|
||
children:[(0,r.jsx)(St,{channelId:t,width:null!==(E=null==c?void 0:c.width)&&void 0!==E?E:0}),(0,r.jsx)(pt.animated.div,{ref:u,className:Et().combo,style:v,children:(0,r.jsx)(It,{value:S,multiplier:j})})]})}));var wt=n(996739),xt=n(69540);var Pt=n(715919);const Nt=function(e,t){var n=(0,Pt.$)(t),r=(0,s.e7)([F.Z],(function(){return F.Z.getMessages(t.id).length>0}),[t]);return null!=e&&(e.hasFlag($.xW$.QUARANTINED)&&n&&!r)};var At=n(811276),Tt=n(513157);const Zt=function(){return(0,r.jsx)(se,{bannerIcon:Tt,bannerHeader:de.Z.Messages.LIMITED_ACCESS_INFO_MODAL_HEADING,bannerSubtext:de.Z.Messages.LIMITED_ACCESS_DM_BAR_SUBTEXT.format({appealLink:At.Z})})};var Mt=n(28862),Rt=n(798808),Lt=n(840598),Dt=n(736543),kt=n(284610),Ut=n(481056),Bt=n(682776),Ft=n(715107),Gt=n(255592),Ht=n(841804),Vt=n(194212),Wt=n(930948),zt=n(476770),Yt=n(202181),Kt=n(15084),qt=n(99181),Qt=n(771145),Xt=n(301011),Jt=n(405808),$t=n(531304),en=n(213276),tn=n(37707),nn=n(258875),rn=n.n(nn);function on(e,t){
|
||
(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function an(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ln(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function un(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ln(i,r,o,a,l,"next",e)}function l(e){ln(i,r,o,a,l,"throw",e)}a(void 0)}))}}function cn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function fn(e){fn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return fn(e)}function dn(e,t){
|
||
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&vn(e,t)}function pn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){sn(e,t,n[t])}))}return e}function hn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}
|
||
function yn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function bn(e,t){return!t||"object"!==gn(t)&&"function"!=typeof t?an(e):t}function vn(e,t){vn=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return vn(e,t)}function mn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return on(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return on(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var gn=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function On(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=fn(e);if(t){var o=fn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bn(this,n)}}
|
||
var En=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}
|
||
if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Cn(e){e.preventDefault()}var jn=/^\+(?!\w+):?(?!:)(\w+)?:?$/;function Sn(e){var t=e.isSidebar,n=yn(e,["isSidebar"]);return t?(0,r.jsx)("section",hn(pn({},n),{role:"complementary"})):(0,r.jsx)("main",pn({},n))}var In=function(e){dn(n,e);var t=On(n);function n(){cn(this,n);var e;(e=t.apply(this,arguments)).isFirstChange=!0;e.editorRef=null;e.state=hn(pn({},(0,x.eK)(kt.Z.getDraft(e.props.channel.id,kt.d.ChannelMessage))),{contentWarningProps:null});e.draftDidChange=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.props,n=e.state.textValue,r=kt.Z.getDraft(t.channel.id,kt.d.ChannelMessage);n===r||""!==r&&""!==n||e.setState((0,x.eK)(r),(function(){if(n!==r){var t=e.props.onFocus;null==t||t()}}))};e.handleKeyDown=function(t){var n=e.props,r=n.keyboardModeEnabled,o=n.onKeyDown,i=n.channel,a=t.shiftKey||t.altKey||t.ctrlKey||t.metaKey,l=0!==e.state.textValue.length;switch(t.which){
|
||
case $.yXg.DELETE:case $.yXg.BACKSPACE:e.handleIncrementCombo("",1);return;case $.yXg.ARROW_UP:if(a)return;if(l)return;t.preventDefault();if(r)Gt.Z.getUploadCount(i.id,kt.d.ChannelMessage)>0?Wt.S.dispatchToLastSubscribed($.CkL.FOCUS_ATTACHMENT_AREA):Wt.S.dispatchToLastSubscribed($.CkL.FOCUS_MESSAGES,{atEnd:!0});else{var u=e.props.channel,s=F.Z.getLastCommandMessage(u.id),f=F.Z.getLastEditableMessage(u.id);null!=s&&null!=f?c.default.compare(f.id,s.id)>0?e.handleEditLastMessage(f):e.handleRecallLastCommand(s):null!=s?e.handleRecallLastCommand(s):null!=f&&e.handleEditLastMessage(f)}return;case $.yXg.ESCAPE:if(a)return;if(t.target!==t.currentTarget)return;t.preventDefault();if(r){(0,m.rf)();return}if(Gt.Z.getUploadCount(i.id,kt.d.ChannelMessage)>0){y.Z.clearAll(i.id,kt.d.ChannelMessage);return}}null==o||o(t,l)};e.handleIncrementCombo=function(t,n){if(e.props.poggermodeEnabled){
|
||
var r,o=e.props.channel.id,i=Ze.default.getId(),a=dt.ZP.getUserCombo(i,o),l=(null!==(r=null==a?void 0:a.value)&&void 0!==r?r:0)+1;(0,st.SE)({channelId:o,userId:i,value:null!=t?t.length:l,multiplier:n})}};e.handleTextareaChange=function(t,n,r){var o=e.props,i=o.keyboardModeEnabled,a=o.channel.id;d.Z.changeDraft(a,n,kt.d.ChannelMessage);var l=""!==n&&r!==e.state.richValue,u=l&&!jn.test(n)&&!n.startsWith("/")&&(!e.isFirstChange||n!==e.state.textValue);e.isFirstChange=!1;u&&e.state.textValue.length<n.length&&e.handleIncrementCombo();u?h.Z.startTyping(a):""===n&&h.Z.stopTyping(a);l&&i&&(0,m.rf)();e.setState({textValue:n,richValue:r})};var o,i=an(e);e.handleSendMessage=(o=un((function(e){var t,n,r,o,a,l,u,c,s,f,d,h,v;return En(this,(function(m){switch(m.label){case 0:t=e.value,n=e.uploads,r=e.stickers,o=e.command,a=e.commandOptionValues,l=e.isGif;if(!(0!==(t=t.trim()).length||null!=r&&0!==r.length||null!=n&&0!==n.length))return[2,Promise.resolve({shouldClear:!1,shouldRefocus:!0})];u=i.props,
|
||
c=u.guild,s=u.channel,f=u.pendingReply,d=u.chatInputType;h=!1;if(null==o)return[3,2];if(o.inputType===S.iw.BUILT_IN_INTEGRATION){Wt.S.dispatch($.CkL.SHAKE_APP,{duration:200,intensity:2});return[2,Promise.resolve({shouldClear:!1,shouldRefocus:!0})]}return[4,(0,I.Z)(o,null!=a?a:{},{guild:c,channel:s})];case 1:v=m.sent();if(o.inputType!==S.iw.BUILT_IN_TEXT)return[2,Promise.resolve({shouldClear:!0,shouldRefocus:!0})];if(null!=v){t=null!=v.content&&""!==v.content?v.content:t;h=!0===v.tts}m.label=2;case 2:return[2,(0,zt.v)({openWarningPopout:function(e){return i.setState({contentWarningProps:e})},type:i.props.chatInputType,content:t,stickers:r,uploads:n,channel:s}).then((function(e){var o=e.valid,a=e.failureReason;if(!o){if(a===$.zYc.SLOWMODE_COOLDOWN){Wt.S.dispatch($.CkL.SHAKE_APP,{duration:200,intensity:2});Wt.S.dispatch($.CkL.EMPHASIZE_SLOWMODE_COOLDOWN);return{shouldClear:!1,shouldRefocus:!0}}return{shouldClear:!1,shouldRefocus:!1}}var u=(0,lt.g)(t,{channel:s,isEdit:!1});if(null!=u){
|
||
null!=u.content&&(t=u.content);null!=u.tts&&(h=u.tts)}var v=ut.ZP.parse(s,t);v.tts=v.tts||h;var m=p.Z.getSendMessageOptionsForReply(f);if(l){p.Z.sendMessage(s.id,v,void 0,m);(0,Mt.A6)(s.id);return{shouldClear:!1,shouldRefocus:!0}}if(null!=n&&n.length>0){var g=(0,qt.KZ)(n);if((0,qt.Bf)(g,null==c?void 0:c.id)){(0,Kt.G)(s,g);return{shouldClear:!1,shouldRefocus:!1}}b.Z.uploadFiles({channelId:s.id,uploads:n,draftType:kt.d.ChannelMessage,parsedMessage:v,options:hn(pn({},m),{stickerIds:r})});y.Z.clearAll(s.id,kt.d.ChannelMessage)}else null!=r&&r.length>0?""!==t?p.Z.sendMessage(s.id,v,void 0,hn(pn({},m),{stickerIds:r})):p.Z.sendStickers(s.id,r,t,m,v.tts):p.Z.sendMessage(s.id,v,void 0,m);i.setState((0,x.H2)());(0,Mt.A6)(s.id);(0,Lt.qB)(s.id,d.drafts.type);return{shouldClear:!0,shouldRefocus:!0}}))]}}))})),function(e){return o.apply(this,arguments)});e.handleSetValue=function(t){var n,r,o=null===(n=e.editorRef)||void 0===n?void 0:n.getSlateEditor();if(null!=o){B.Q.select(o,[]);o.insertText(t)
|
||
;null===(r=e.editorRef)||void 0===r||r.focus()}};e.renderAttachButton=function(t,n){return(0,r.jsx)(k.Z,{className:n,channel:e.props.channel,draftType:kt.d.ChannelMessage,editorTextContent:e.state.textValue,setValue:e.handleSetValue,canShowPremiumTutorial:t})};e.renderApplicationCommandIcon=function(t,n,o){return(0,r.jsx)(D,{className:o,command:t,section:n,channel:e.props.channel})};return e}var o=n.prototype;o.componentDidMount=function(){kt.Z.addChangeListener(this.draftDidChange)};o.componentWillUnmount=function(){kt.Z.removeChangeListener(this.draftDidChange)};o.componentDidUpdate=function(e,t){var n=this.props.channel,r=this.state.textValue;if(e.channel.id===n.id){if(e.hasModalOpen&&!this.props.hasModalOpen){var o=kt.Z.getDraft(n.id,kt.d.ChannelMessage);o!==r&&this.setState((0,x.eK)(o))}t.textValue.length<$.J6R&&r.length>=$.J6R&&fe.default.track($.rMx.MESSAGE_LENGTH_LIMIT_REACHED,{})}else this.draftDidChange(this.props)};o.handleEditLastMessage=function(e){var t=this.props.channel
|
||
;p.Z.startEditMessage(t.id,e.id,e.content);O.ZP.trackWithMetadata($.rMx.MESSAGE_EDIT_UP_ARROW)};o.handleRecallLastCommand=function(e){var t=this.props.channel,n=j.Z.getCommandFromInteractionData(e.interactionData),r=j.Z.getApplication(null==n?void 0:n.applicationId);if(null!=n){var o,i,a=null!=r?{type:S.Qi.APPLICATION,id:r.id,icon:null!==(i=null==r||null===(o=r.bot)||void 0===o?void 0:o.username)&&void 0!==i?i:r.icon,name:r.name,application:r}:null,l=(0,C.Fi)(n,e.interactionData);E.Po(t.id,n,a,S.Vh.RECALL,l)}};o.render=function(){var e=this,t=this.props,n=t.channel,o=t.focused,i=t.onResize,l=t.onBlur,u=t.onFocus,c=t.highlighted,s=t.pendingReply,d=t.chatInputType,p=t.placeholder,h=t.accessibilityLabel,y=t.shakeIntensity,b=t.poggermodeEnabled,v=this.state.contentWarningProps,m=(0,r.jsx)(U.Z,{textValue:this.state.textValue,richValue:this.state.richValue,focused:o,className:rn().channelTextArea,channel:n,placeholder:p,accessibilityLabel:h,pendingReply:s,type:d,
|
||
onChange:this.handleTextareaChange,onSubmit:this.handleSendMessage,onResize:i,onFocus:u,onBlur:l,onKeyDown:this.handleKeyDown,renderAttachButton:this.renderAttachButton,renderApplicationCommandIcon:this.renderApplicationCommandIcon,promptToUpload:Kt.d,highlighted:c,setEditorRef:function(t){return e.editorRef=t}});return(0,r.jsx)(f.yRy,{position:"top",onRequestClose:function(){var t;null==v||null===(t=v.onCancel)||void 0===t||t.call(v);e.setState({contentWarningProps:null})},shouldShow:null!=v,renderPopout:function(e){var t=e.closePopout;a()(null!=v,"ChannelTextAreaForm > Popout > renderPopout: contentWarningProps cannot be null");return(0,r.jsx)(tn.Z,pn({onClose:t},v))},children:function(){return b?(0,r.jsx)(f.UkV,{isShaking:y>0,intensity:y,children:m}):m}})};return n}(o.PureComponent),_n=function(e){dn(n,e);var t=On(n);function n(){cn(this,n);var e;(e=t.apply(this,arguments)).inputFormRef=o.createRef();e.state={textAreaFocused:!1,textAreaHighlighted:!1,
|
||
currentChannelId:e.props.channel.id};e.dispatchGroupRef=o.createRef();e.handleRequestFocus=function(t){t.channelId===e.props.channel.id&&e.setState({textAreaFocused:!0})};e.getAnalyticsPage=function(){var t=e.props.channel;if(null==t)return null;switch(t.type){case $.d4z.GUILD_ANNOUNCEMENT:case $.d4z.GUILD_TEXT:case $.d4z.GUILD_FORUM:return en.Z.Pages.GUILD_CHANNEL;case $.d4z.GROUP_DM:case $.d4z.DM:return en.Z.Pages.DM_CHANNEL;default:return null}};e.handleInputFocus=function(t){var n;null===(n=e.dispatchGroupRef.current)||void 0===n||n.bumpDispatchPriority();(0,Yt.rB)()||(null!=(null==t?void 0:t.highlight)?e.setState({textAreaFocused:!0,textAreaHighlighted:null==t?void 0:t.highlight}):e.setState({textAreaFocused:!0}))};e.handleInputBlur=function(){(document.hasFocus()||e.props.hasModalOpen)&&e.setState({textAreaFocused:!1,textAreaHighlighted:!1})};e.handleInputKeyDown=function(t,n){e.state.textAreaHighlighted&&e.setState({textAreaHighlighted:!1});n||e._handleMoveToPane(t)}
|
||
;e.handleKeyDown=function(t){var n;(null===(n=e.inputFormRef.current)||void 0===n?void 0:n.contains(t.target))||e._handleMoveToPane(t)};e._handleMoveToPane=function(t){var n=e.props,r=n.keyboardModeEnabled,o=n.chatInputType,i=n.channel;if(r)switch(t.which){case $.yXg.ARROW_LEFT:o===w.I.SIDEBAR&&Wt.S.dispatch($.CkL.FOCUS_CHANNEL_TEXT_AREA,{channelId:Ft.Z.getChannelId()});return;case $.yXg.ARROW_RIGHT:o===w.I.NORMAL&&Wt.S.dispatch($.CkL.FOCUS_CHANNEL_TEXT_AREA,{channelId:et.ZP.getCurrentSidebarChannelId(i.id)})}};e.handleOpenExpressionPicker=function(t){var n=t.activeView;(0,Ce.PG)(n,e.props.chatInputType)};e.handleChatInteract=function(){var t;null===(t=e.dispatchGroupRef.current)||void 0===t||t.bumpDispatchPriority()};e.renderMessageBanner=function(e){var t=e.channel,n=e.showSpamBanner,o=e.showQuarantinedUserBanner,i=e.showMessageRequestBanner,a=e.guild,l=e.communicationDisabledUntil,u=e.hasAutomodQuarantinedProfile;if(t.type===$.d4z.DM){if(n)return(0,r.jsx)(Ee,{channel:t})
|
||
;if(o)return(0,r.jsx)(Zt,{});if(i)return(0,r.jsx)(at,{channelId:t.id})}return null!=l&&(0,Ae.J)(l)&&null!=a&&!Bt.Z.can($.Plq.ADMINISTRATOR,a)?(0,r.jsx)(Ke,{guild:a,disabledUntil:l}):u?(0,r.jsx)(Ne,{guild:a}):null};return e}var i=n.prototype;i.componentDidMount=function(){Wt.S.subscribe($.CkL.FOCUS_CHANNEL_TEXT_AREA,this.handleRequestFocus)};i.componentDidUpdate=function(e){this.props.isEditing===e.isEditing&&this.props.hasModalOpen===e.hasModalOpen||(this.props.isEditing||this.props.hasModalOpen?this.handleInputBlur():this.handleInputFocus())};i.componentWillUnmount=function(){Wt.S.unsubscribe($.CkL.FOCUS_CHANNEL_TEXT_AREA,this.handleRequestFocus)};i.render=function(){
|
||
var e,t=this.props,n=t.channel,o=t.guild,i=t.keyboardModeEnabled,a=t.hasModalOpen,l=t.pendingReply,c=t.chatInputType,s=t.placeholder,d=t.accessibilityLabel,p=t.showQuarantinedUserBanner,h=t.filterAfterTimestamp,y=t.showSpamBanner,b=t.showMessageRequestBanner,v=t.communicationDisabledUntil,m=t.hasAutomodQuarantinedProfile,g=t.shakeIntensity,O=t.poggermodeEnabled,E=this.state,C=E.textAreaFocused,j=E.textAreaHighlighted,S=c===w.I.SIDEBAR;e=S&&n.type===$.d4z.GUILD_VOICE?de.Z.Messages.TEXT_IN_VOICE_A11Y_LABEL:S&&n.type===$.d4z.GUILD_STAGE_VOICE?de.Z.Messages.TEXT_IN_STAGE_A11Y_LABEL:u.T.THREADS.has(n.type)?de.Z.Messages.THREAD_A11Y_LABEL:de.Z.Messages.CHANNEL_A11Y_LABEL;var I,_=(0,r.jsx)(Dt.Z,{tutorialId:"writing-messages",position:"left",offsetX:75,children:(0,r.jsx)(In,{focused:C,highlighted:j,channel:n,guild:o,keyboardModeEnabled:i,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,hasModalOpen:a,pendingReply:l,chatInputType:c,placeholder:s,
|
||
accessibilityLabel:d,shakeIntensity:g,poggermodeEnabled:O})});return(0,r.jsx)(en.Z,{page:this.getAnalyticsPage(),children:(0,r.jsx)(Ht.sW,{children:(0,r.jsxs)(Vt.I3,{ref:this.dispatchGroupRef,children:[(0,r.jsx)(Vt.d9,{event:$.CkL.TEXTAREA_FOCUS,handler:this.handleInputFocus}),(0,r.jsx)(Vt.d9,{event:$.CkL.TEXTAREA_BLUR,handler:this.handleInputBlur}),(0,r.jsx)(Vt.d9,{event:$.CkL.OPEN_EXPRESSION_PICKER,handler:this.handleOpenExpressionPicker}),(0,r.jsxs)(Sn,{isSidebar:S,className:rn().chatContent,"aria-label":e.format({channelName:n.name}),onMouseDown:this.handleChatInteract,onKeyDown:this.handleKeyDown,onFocus:this.handleChatInteract,children:[(0,r.jsx)(Qt.Z,{channel:n,guild:o,narrow:S}),(0,r.jsxs)(f.y5t,{component:(0,r.jsx)(f.nn4,{children:(0,r.jsx)(f.H,{children:de.Z.Messages.CHANNEL_CHAT_HEADING.format({channelName:n.name})})}),children:[(0,r.jsx)(ct.Z,{channel:n,filterAfterTimestamp:h,showingSpamBanner:y,showingQuarantineBanner:p}),null!=n.guild_id?(0,r.jsx)(qe.Z,{
|
||
guildId:n.guild_id,channel:n}):null,null!==(I=this.renderMessageBanner({channel:n,showSpamBanner:y,showQuarantinedUserBanner:p,showMessageRequestBanner:b,guild:o,communicationDisabledUntil:v,hasAutomodQuarantinedProfile:m}))&&void 0!==I?I:(0,r.jsxs)("form",{ref:this.inputFormRef,onSubmit:Cn,className:rn().form,children:[O&&(0,r.jsx)(_t,{channelId:n.id}),n.isPrivate()?(0,r.jsx)(Xt.Z,{channel:n,children:_}):(0,r.jsx)(Jt.Z,{channel:n,children:_}),(0,r.jsx)($t.Z,{channel:n,poggermodeEnabled:O})]}),(0,r.jsx)(Ht.kw,{})]})]})]})})},"messages-".concat(n.id))};n.getDerivedStateFromProps=function(e,t){var n=e.channel,r=t.currentChannelId;return n.id!==r?{textAreaFocused:null!=n&&(!l.tq&&Bt.Z.can($.Plq.SEND_MESSAGES,n)),currentChannelId:n.id}:null};return n}(o.PureComponent);const wn=o.memo((function(e){var t=e.channel,n=e.guild,o=e.chatInputType,i=e.filterAfterTimestamp,a=v.useExperiment({},{autoTrackExposure:!0}).enabled,l=(0,_.Z)(t),u=l.placeholder,c=l.accessibilityLabel,d=function(e){
|
||
var t=e.isDM()&&!e.isSystemDM()&&!e.rawRecipients.some((function(e){return e.bot})),n=e.isPrivate()?e.getRecipientId():null,r=(0,s.e7)([G.default],(function(){var e;return!0===(null===(e=G.default.getUser(n))||void 0===e?void 0:e.hasFlag($.xW$.SPAMMER))}),[n]),o=e.hasFlag(ee.zZ.IS_SPAM),i=ne((0,s.Wu)([F.Z],(function(){var t=F.Z.getMessages(e.id);return[t.length>0,t.toArray().some((function(e){return e.author.id===n}))]}),[e]),2),a=i[0],l=i[1],u=(0,s.e7)([J],(function(){return null!=n&&J.hasAllowedSpamUser(n)}),[n]);return t&&(r&&a||o&&l)&&!u}(t)&&!a,p=Nt(G.default.getCurrentUser(),t),h=mn((0,Te.AB)(null==n?void 0:n.id),1)[0],y=(0,je.Ux)(null==n?void 0:n.id),b=Xe(t.id)&&!a,m=(0,s.e7)([ft.Z],(function(){return ft.Z.isEnabled()})),O=function(e){var t=(0,wt.Z)(xt.oZ.CHAT_INPUT),n=(0,s.e7)([ft.Z],(function(){return ft.Z.isEnabled({shakeLocation:xt.oZ.CHAT_INPUT})}));return(0,s.e7)([yt.Z,dt.ZP,Ze.default],(function(){
|
||
return n&&yt.Z.isTyping(e,Ze.default.getId())?dt.ZP.getUserComboShakeIntensity(Ze.default.getId(),e,t):0}))}(t.id);return(0,r.jsx)(_n,{channel:t,isEditing:null!=(0,s.e7)([Ut.Z],(function(){return Ut.Z.getEditingMessageId(t.id)})),hasModalOpen:(0,f.s9z)(f.JQI),guild:n,keyboardModeEnabled:(0,s.e7)([g.Z],(function(){return g.Z.keyboardModeEnabled})),pendingReply:(0,s.e7)([Rt.Z],(function(){return Rt.Z.getPendingReply(t.id)})),chatInputType:o,placeholder:u,accessibilityLabel:c,filterAfterTimestamp:i,showSpamBanner:d,showQuarantinedUserBanner:p,communicationDisabledUntil:h,hasAutomodQuarantinedProfile:y,showMessageRequestBanner:b,shakeIntensity:O,poggermodeEnabled:m})}))},973553:(e,t,n)=>{"use strict";n.d(t,{y:()=>v,Z:()=>O});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n(944010),c=n(913549),s=n(379991),f=n(421281),d=n(385045),p=n.n(d);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v,m=(0,
|
||
f.Mg)(p().resizeHandleWidth);!function(e){e[e.PostSidebar=0]="PostSidebar";e[e.ThreadSidebar=1]="ThreadSidebar";e[e.CallChatSidebar=2]="CallChatSidebar";e[e.MessageRequestSidebar=3]="MessageRequestSidebar";e[e.HomeSidebar=4]="HomeSidebar"}(v||(v={}));function g(e){var t=e.resizableNode,n=e.onResize,o=e.onResizeEnd,i=e.maxWidth,a=(0,c.Z)({minDimension:450,maxDimension:i,resizableDomNodeRef:t,onElementResize:n,onElementResizeEnd:o,orientation:c.y.HORIZONTAL_LEFT});return(0,r.jsx)("div",{onMouseDown:a,className:p().resizeHandle})}function O(e){var t,n=e.sidebarType,i=e.maxWidth,c=e.onWidthChange,f=e.children,d=e.floatingLayer,h=o.useRef(null),O=function(e){switch(e){case v.PostSidebar:return"postSidebarWidth";case v.ThreadSidebar:return"threadSidebarWidth";case v.CallChatSidebar:return"callChatSidebarWidth";case v.MessageRequestSidebar:return"messageRequestSidebarWidth";case v.HomeSidebar:return"homeSidebarWidth"}}(n),E=b(o.useState(s.ZP[O]),2),C=E[0],j=E[1],S=o.useCallback((function(e){
|
||
u.ZP.updatedUnsyncedSettings(y({},O,e))}),[O]),I=function(e){return e.maxWidth<=450}({maxWidth:i}),_=(0,l.clamp)(C,450,i),w=I?_:_+m;o.useEffect((function(){null==c||c(_,I)}),[_,c,I]);var x=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:a()(p().chatTarget,(t={},y(t,p().floating,I),y(t,p().notFloating,!I),t)),style:{width:w}}),!I&&(0,r.jsx)(g,{maxWidth:i,resizableNode:h,onResize:j,onResizeEnd:S}),(0,r.jsx)("div",{ref:h,className:a()(p().container,y({},p().floating,I)),style:{width:_},children:f})]});if(I){var P=null!=d?d:o.Fragment;return(0,r.jsx)(P,{children:(0,r.jsx)("div",{className:p().chatLayerWrapper,children:x})})}return(0,r.jsx)(r.Fragment,{children:x})}},771145:(e,t,n)=>{"use strict";n.d(t,{Z:()=>H});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(348592),c=n(2590),s=n(473708),f=n(237741),d=n.n(f);function p(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function h(e){
|
||
var t=e.narrow,n=u.Z.getArticleURL(c.BhN.CLYDE_AI);return(0,r.jsx)("div",{className:a()(d().chatHeaderBar,p({},d().narrow,t)),children:(0,r.jsx)(l.xvT,{className:d().chatHeaderBarText,variant:"text-sm/normal",color:"header-secondary",children:s.Z.Messages.CLYDE_NOTICE.format({learnMoreUrl:n})})})}var y=n(337710),b=n(517285),v=n(656793),m=n(396043),g=n(652591),O=n(671293),E=n(225386),C=n(580335),j=n.n(C);function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){S(e,t,n[t])}))}return e}function _(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){
|
||
var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function w(e){var t=e.channel,n=e.narrow,i=(0,E.tc)(t);o.useEffect((function(){g.default.track(c.rMx.CHANNEL_BANNER_VIEWED,_(I({},(0,m.hH)(t.getGuildId()),(0,m.v_)(t)),{banner_type:"thread"}))}),[t]);return(0,r.jsxs)("div",{className:a()(j().chatHeaderBar,S({},j().narrow,n)),children:[(0,r.jsx)(l.xvT,{className:j().chatHeaderBarText,variant:"text-sm/normal",color:"header-secondary",children:t.isForumPost()?s.Z.Messages.FORUM_POST_HEADER_NOTICE_LOCKED:s.Z.Messages.THREAD_HEADER_NOTICE_LOCKED}),i?(0,r.jsx)(l.zxk,{size:n?l.zxk.Sizes.SMALL:l.zxk.Sizes.TINY,className:j().chatHeaderBarButton,color:l.zxk.Colors.PRIMARY,onClick:function(){
|
||
g.default.track(c.rMx.CHANNEL_BANNER_CTA_CLICKED,_(I({},(0,m.hH)(t.getGuildId()),(0,m.v_)(t)),{banner_type:"thread",cta_type:"unarchive"}));O.Z.unarchiveThread(t,!1)},children:s.Z.Messages.UNARCHIVE}):null]})}function x(e){var t=e.channel,n=e.narrow,i=(0,E.Xb)(t);o.useEffect((function(){g.default.track(c.rMx.CHANNEL_BANNER_VIEWED,_(I({},(0,m.hH)(t.getGuildId()),(0,m.v_)(t)),{banner_type:"thread"}))}),[t]);return(0,r.jsxs)("div",{className:a()(j().chatHeaderBar,S({},j().narrow,n)),children:[(0,r.jsx)(l.xvT,{className:j().chatHeaderBarText,variant:"text-sm/normal",color:"header-secondary",children:t.isForumPost()?s.Z.Messages.FORUM_POST_HEADER_NOTICE_ACTIVE_LOCKED:s.Z.Messages.THREAD_HEADER_NOTICE_ACTIVE_LOCKED}),i?(0,r.jsx)(l.zxk,{size:n?l.zxk.Sizes.SMALL:l.zxk.Sizes.TINY,className:j().chatHeaderBarButton,color:l.zxk.Colors.PRIMARY,onClick:function(){g.default.track(c.rMx.CHANNEL_BANNER_CTA_CLICKED,_(I({},(0,m.hH)(t.getGuildId()),(0,m.v_)(t)),{banner_type:"thread",cta_type:"unlock"}))
|
||
;O.Z.unlockThread(t)},children:s.Z.Messages.UNLOCK}):null]})}var P=n(202351),N=n(201459),A=n(773011),T=n(382060),Z=n(61209),M=n(9430),R=n(105538),L=n(962882),D=n.n(L);function k(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){k(e,t,n[t])}))}return e}function B(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function F(e){var t=e.guild,n=e.channel,i=(0,P.cj)([Z.Z,M.Z],(function(){return{category:null!=n.parent_id?Z.Z.getChannel(n.parent_id):null,isGuildMuted:M.Z.isMuted(n.getGuildId()),isCategoryMuted:null!=n.parent_id&&M.Z.isChannelMuted(n.getGuildId(),n.parent_id),isChannelMuted:M.Z.isChannelMuted(n.getGuildId(),n.id),messageNotifications:M.Z.resolvedMessageNotifications(n)}})),a=i.category,u=i.isGuildMuted,f=i.isCategoryMuted,d=i.isChannelMuted,p=i.messageNotifications,h=(0,A.ZP)(n,!0);o.useEffect((function(){g.default.track(c.rMx.CHANNEL_BANNER_VIEWED,B(U({},(0,m.hH)(n.getGuildId()),(0,m.v_)(n)),{banner_type:"chat_notification_settings"}))}),[n]);if(!(0,T.Qm)(n.type)||n.isThread())return null;var y,b,v,O=u||f||d;if(O){var E;if(u){var C;E=null!==(C=null==t?void 0:t.name)&&void 0!==C?C:"???";v=function(){g.default.track(c.rMx.CHANNEL_BANNER_CTA_CLICKED,B(U({},(0,m.hH)(n.getGuildId()),(0,m.v_)(n)),{
|
||
banner_type:"chat_notification_settings",cta_type:"unmute guild"}));N.Z.updateGuildNotificationSettings(n.getGuildId(),{muted:!1})}}else if(f){var j;E=null!==(j=null==a?void 0:a.name)&&void 0!==j?j:"???";v=function(){g.default.track(c.rMx.CHANNEL_BANNER_CTA_CLICKED,B(U({},(0,m.hH)(n.getGuildId()),(0,m.v_)(n)),{banner_type:"chat_notification_settings",cta_type:"unmute parent"}));N.Z.updateChannelOverrideSettings(n.getGuildId(),n.parent_id,{muted:!1})}}else{E=h;v=function(){g.default.track(c.rMx.CHANNEL_BANNER_CTA_CLICKED,B(U({},(0,m.hH)(n.getGuildId()),(0,m.v_)(n)),{banner_type:"chat_notification_settings",cta_type:"unmute channel"}));N.Z.updateChannelOverrideSettings(n.getGuildId(),n.id,{muted:!1})}}y=s.Z.Messages.CHANNEL_CHAT_NOTIFICATION_SETTINGS_NOTICE_MUTED.format({name:E});b=s.Z.Messages.UNMUTE}else{if(p===c.bL.ALL_MESSAGES)return null;y=s.Z.Messages.CHANNEL_CHAT_NOTIFICATION_SETTINGS_NOTICE_ONLY_MENTIONS.format({name:h});b=s.Z.Messages.ENABLE_NOTIFICATIONS_TITLECASE;v=function(){
|
||
g.default.track(c.rMx.CHANNEL_BANNER_CTA_CLICKED,B(U({},(0,m.hH)(n.getGuildId()),(0,m.v_)(n)),{banner_type:"chat_notification_settings",cta_type:"enable all messages"}));N.Z.updateChannelOverrideSettings(n.getGuildId(),n.id,{message_notifications:c.bL.ALL_MESSAGES})}}return(0,r.jsxs)("div",{className:D().chatHeaderBar,children:[(0,r.jsx)(R.Z,{className:D().chatHeaderBarIcon,foreground:O?D().chatHeaderBarIconStrikethrough:void 0}),(0,r.jsx)(l.xvT,{className:D().chatHeaderBarText,variant:"text-sm/normal",color:"header-secondary",children:y}),(0,r.jsx)(l.zxk,{size:l.zxk.Sizes.TINY,color:l.zxk.Colors.PRIMARY,className:D().chatHeaderBarButton,onClick:v,children:b})]})}var G=n(897196);const H=o.memo((function(e){var t=e.channel,n=e.guild,o=e.narrow,i=(0,y.Z)(t),a=t.hasFlag(G.zZ.CLYDE_AI);return t.isArchivedLockedThread()?(0,r.jsx)(w,{channel:t,narrow:o}):t.isLockedThread()?(0,r.jsx)(x,{channel:t,narrow:o}):a?(0,r.jsx)(h,{narrow:o}):i?(0,r.jsx)(b.Z,{channel:t,narrow:o}):(0,v.c)()?(0,
|
||
r.jsx)(F,{guild:n,channel:t}):null}))},251684:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=n(667294),i=n(289283),a=n(202351),l=n(707961),u=n(804185),c=n(489881),s=n(776009),f=n(304562),d=n.n(f);const p=o.memo((function(e){var t=e.message,n=e.subtitle,f=e.countdown,p=e.buttonText,h=e.buttonColor,y=e.buttonSubmitting,b=e.onButtonClick,v=e.imageSrc,m=e.animationSrc,g=e.secondaryButtonText,O=e.onSecondaryButtonClick,E=e.children,C=e.useReducedMotion,j=void 0!==C&&C,S=(0,a.e7)([u.ZP],(function(){return u.ZP.getState().isMembersOpen}));if(i.tq&&S)return null;if(null==t)return(0,r.jsx)(r.Fragment,{children:o.Children.only(E)});var I=null;null!=v?I=(0,r.jsx)("img",{alt:"",src:v,className:d().image}):null!=m&&(I=(0,r.jsx)(s.Z,{importData:m,shouldAnimate:!j,className:d().animation}));return(0,r.jsxs)("div",{className:d().wrapper,children:[(0,r.jsxs)("div",{className:d().content,children:[I,(0,r.jsxs)("div",{className:d().text,children:[(0,r.jsx)(l.X6q,{variant:"heading-md/semibold",
|
||
className:d().title,children:t}),null!=n&&(0,r.jsx)(l.xvT,{color:"text-muted",variant:"text-xs/normal",children:n})]})]}),(0,r.jsxs)("div",{className:d().buttonContainer,children:[null!=g&&(0,r.jsx)(l.zxk,{className:d().button,size:l.zxk.Sizes.SMALL,onClick:O,look:l.zxk.Looks.LINK,color:l.zxk.Colors.PRIMARY,submitting:y,children:g}),null!=p&&(0,r.jsx)(l.zxk,{className:d().button,size:l.zxk.Sizes.SMALL,onClick:b,submitting:y,color:null!=h?h:l.zxk.Colors.PRIMARY,children:p})]}),null!=f&&(0,r.jsx)(c.Z,{className:d().countdown,deadline:f})]})}))},301011:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=(n(667294),n(202351)),i=n(864928),a=n(840922),l=n(348592),u=n(251684),c=n(2590),s=n(473708);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function p(e){var t=e.channel,p=e.children,h=(0,o.e7)([a.Z],(function(){return a.Z.isBlocked(t.getRecipientId())})),y=t.isSystemDM(),b=h&&!y&&!t.isMultiUserDM(),v={};if(y){v.message=s.Z.Messages.SYSTEM_DM_CHANNEL_DESCRIPTION;v.subtitle=s.Z.Messages.SYSTEM_DM_CHANNEL_DESCRIPTION_SUBTEXT;v.buttonText=s.Z.Messages.LEARN_MORE;v.onButtonClick=function(){return open(l.Z.getArticleURL(c.BhN.SYSTEM_DMS))};v.imageSrc=n(32028)}else if(b){v.message=s.Z.Messages.DM_VERIFICATION_TEXT_BLOCKED;v.buttonText=s.Z.Messages.UNBLOCK;v.onButtonClick=function(){i.Z.unblockUser(t.getRecipientId())}}return(0,r.jsx)(u.Z,d(function(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}({},v),{children:p}))}},591821:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(785893),o=n(667294),i=n(289283),a=n(202351),l=n(707961),u=n(708489),c=n(64234),s=n(464187),f=n(327860),d=n(373438),p=n(2590),h=n(473708),y=n(973746),b=n.n(y);function v(e){var t=e.channelId;o.useEffect((function(){u.Z.loadThread(t)}));var y,v=(0,a.e7)([s.Z],(function(){return s.Z.getGuildId()}))===p.I_8,m=(0,a.e7)([c.Z],(function(){return c.Z.theme}));y=v?(0,r.jsx)(f.OZ,{note:h.Z.Messages.FAVORITES_EMPTY_BODY,children:h.Z.Messages.FAVORITES_EMPTY_TITLE}):null!=t?(0,r.jsx)(l.$jN,{type:l.$jN.Type.SPINNING_CIRCLE}):(0,r.jsx)(f.OZ,{note:h.Z.Messages.CHANNELS_UNAVAILABLE_BODY,children:h.Z.Messages.CHANNELS_UNAVAILABLE_TITLE});return(0,
|
||
r.jsxs)("div",{className:b().noChannel,children:[i.tq&&(0,r.jsx)(d.ZP,{children:(0,r.jsx)(o.Fragment,{})}),(0,r.jsxs)(f.ZP,{theme:m,children:[(0,r.jsx)(f.ox,{darkSrc:n(v?128112:16697),lightSrc:n(v?876406:105045),width:272,height:222}),y]})]})}},405808:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Pe});var r=n(785893),o=n(667294),i=n(441143),a=n.n(i),l=n(202351),u=n(707961),c=n(84441),s=n(486826),f=n(327499),d=n(316878),p=n(852626),h=n(153771),y=n(497082),b=n(276985),v=n(886391),m=n(201615),g=n(776009),O=n(443812),E=n(473708),C=n(970795),j=n.n(C);function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}
|
||
return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var _=function(){return n.e(37761).then(n.t.bind(n,299145,19)).then((function(e){return e.default}))};const w=function(e){var t=(0,O.Dt)();return(0,r.jsxs)(u.Y0X,I(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){S(e,t,n[t])}))}return e}({},e),{transitionState:e.transitionState,"aria-labelledby":t,children:[(0,r.jsx)("div",{className:j().animationContainer,children:(0,r.jsx)(g.Z,{importData:_,className:j().animationMiddle})}),(0,r.jsx)(u.hzk,{children:(0,r.jsxs)("div",{className:j().container,children:[(0,r.jsx)(u.X6q,{variant:"heading-xl/semibold",className:j().header,id:t,
|
||
children:E.Z.Messages.MEMBER_VERIFICATION_APPROVED_APPLICATION_MODAL_TITLE.format({guildName:e.guildName})}),(0,r.jsx)(u.xvT,{variant:"text-sm/normal",color:"header-secondary",children:E.Z.Messages.MEMBER_VERIFICATION_APPROVED_APPLICATION_MODAL_DESC}),(0,r.jsx)(u.zxk,{className:j().button,onClick:function(){e.onAccept();e.onClose()},children:E.Z.Messages.MEMBER_VERIFICATION_APPROVED_APPLICATION_MODAL_CONFIRM})]})})]}))};var x=n(347005),P=n(386531);var N=n(145202),A=n(744564),T=n(944522);function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e){M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return M(e)}function R(e,t){return!t||"object"!==D(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L(e,t){L=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return L(e,t)}
|
||
var D=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=M(e);if(t){var o=M(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return R(this,n)}}var U=null,B=null;function F(){var e=T.Z.mostRecentLurkedGuildId();if(null!=e){U=e;B=null}else if(null!=U){B=U;U=null}else{B=null;U=null}}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&L(e,t)}(n,e);var t=k(n);function n(){Z(this,n);return t.apply(this,arguments)}var r=n.prototype
|
||
;r.initialize=function(){this.syncWith([T.Z],F)};r.shouldShowPopout=function(e){return B===e};r.__getLocalVars=function(){return{lurkingGuildId:U,recentlyJoinedGuildId:B}};return n}(l.ZP.Store);G.displayName="LurkerModePopoutStore";const H=new G(A.Z);var V=n(419594),W=n.n(V);const z=function(e){var t=e.guild,o=e.onClose;return(0,r.jsxs)("div",{className:W().container,children:[(0,r.jsx)("img",{alt:"",className:W().image,src:n(419552)}),(0,r.jsxs)("div",{className:W().content,children:[(0,r.jsx)(u.X6q,{variant:"heading-md/semibold",children:E.Z.Messages.LURKER_MODE_POPOUT_SUCCESS_HEADER.format({guild:t.name})}),(0,r.jsx)(u.xvT,{color:"header-secondary",variant:"text-sm/normal",children:E.Z.Messages.LURKER_MODE_POPOUT_SUCCESS_BODY}),(0,r.jsx)("div",{className:W().buttonContainer,children:(0,r.jsx)(u.zxk,{onClick:o,children:E.Z.Messages.LURKER_MODE_POPOUT_SUCCESS_BUTTON})})]})]})}
|
||
;var Y=n(178483),K=n(426797),q=n(784426),Q=n(190624),X=n(64234),J=n(82863),$=n(804185),ee=n(21372),te=n(567403),ne=n(746477),re=n(682776),oe=n(715107),ie=n(473903),ae=n(563135),le=n(251684),ue=n(2590),ce=n(897196),se=n(58118),fe=n(761141),de=n.n(fe);function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function he(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ye(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function be(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ye(i,r,o,a,l,"next",e)}function l(e){ye(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0
|
||
}):e[t]=n;return e}function ge(e){ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return ge(e)}function Oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){me(e,t,n[t])}))}return e}function Ee(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ce(e,t){
|
||
return!t||"object"!==Ie(t)&&"function"!=typeof t?he(e):t}function je(e,t){je=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return je(e,t)}function Se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pe(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ie=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=ge(e);if(t){var o=ge(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ce(this,n)}}var we=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){
|
||
if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,
|
||
writable:!0,configurable:!0}});t&&je(e,t)}(i,e);var t=_e(i);function i(){ve(this,i);var e;(e=t.apply(this,arguments)).state={submitting:!1,shouldShowLurkerModeUpsellPopout:!1,shouldShowLurkerModeSuccessPopout:!1};e.renderSuccessPopout=function(t){var n=t.closePopout,o=e.props.guild;a()(null!=o,"This guildID cannot be null");return(0,r.jsx)(z,{onClose:n,guild:o})};e.handleCancelApplication=function(){var t=e.props.guild;null!=t&&(0,u.h7j)((function(e){return(0,r.jsx)(u.sm4,Ee(Oe({header:E.Z.Messages.MODIFY_FOLLOWED_NEWS_HEADER,confirmText:E.Z.Messages.CONFIRM,cancelText:E.Z.Messages.CANCEL,onConfirm:function(){return h.Z.removeGuildJoinRequest(t.id)},confirmButtonColor:u.zxk.Colors.BRAND},e),{children:(0,r.jsx)(u.xvT,{variant:"text-md/normal",children:E.Z.Messages.MEMBER_VERIFICATION_CANCEL_APPLICATION_SUBTITLE})}))}))};e.handleViewApplicationRejection=function(){var t=e.props.guild;null!=t&&(0,u.ZDy)(be((function(){var e,o;return we(this,(function(i){switch(i.label){case 0:
|
||
return[4,Promise.all([n.e(40532),n.e(25312)]).then(n.bind(n,713621))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,Oe({guildId:t.id},e))}]}}))})))};e.handleShowMemberVerification=function(){var t=e.props.guild;null!=t&&(0,b.hk)(t.id)};e.handleClaimAccount=function(){p.j()};e.handleVerifyPhone=function(){(0,u.ZDy)(be((function(){var e,t;return we(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(11177)]).then(n.bind(n,411177))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,Oe({reason:K.L.GUILD_PHONE_REQUIRED},e))}]}}))})),{modalKey:se.M})};e.handleResendVerification=function(){var e;c.Z.verifyResend();var t=null===(e=ie.default.getCurrentUser())||void 0===e?void 0:e.email;null!=t&&(0,u.h7j)((function(e){return(0,r.jsx)(u.sm4,Ee(Oe({},e),{header:E.Z.Messages.VERIFICATION_EMAIL_TITLE,confirmText:E.Z.Messages.OKAY,confirmButtonColor:u.zxk.Colors.BRAND,children:(0,r.jsx)(u.xvT,{variant:"text-md/normal",
|
||
children:E.Z.Messages.VERIFICATION_EMAIL_BODY.format({email:t})})}))}))};e.handleTextAreaClick=function(){var t=e.props.showLurkerModeUpsellPopout;e.setState({shouldShowLurkerModeUpsellPopout:t})};var o=he(e);e.handleJoinServer=be((function(){var e;return we(this,(function(t){switch(t.label){case 0:o.setState({submitting:!0});e=o.props.channel.getGuildId();t.label=1;case 1:t.trys.push([1,3,,4]);return[4,f.Z.joinGuild(e,{source:ue.vtS.CHAT_INPUT_BLOCKER})];case 2:t.sent();return[3,4];case 3:t.sent();o.setState({submitting:!1});return[3,4];case 4:return[2]}}))}));e.handleGoBack=function(){e.setState({submitting:!0});(0,q.s1)().goBack()};e.handleFollowAnnouncement=function(){var t=e.props.channel;(0,u.ZDy)(be((function(){var e,o;return we(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(89594)]).then(n.bind(n,189594))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,Oe({channel:t},e))}]}}))})))};e.closeLurkerModeUpsellPopout=function(){
|
||
e.setState({shouldShowLurkerModeUpsellPopout:!1})};e.renderLurkerModeUpsellPopout=function(){var t=e.props.guild;a()(null!=t,"GuildVerification.renderLurkerModeUpsellPopout - guild cannot be undefined");return(0,r.jsx)(Y.Z,{type:Y.s.CHAT,guild:t,closePopout:e.closeLurkerModeUpsellPopout})};e.renderMemberVerificationSuccessModal=function(){var t=e.props,n=t.guild,o=t.guildJoinRequest,i=(null==o?void 0:o.applicationStatus)===v.wB.APPROVED;if(null==n||null==o||!i||(0,y.d3)(o))return null;var a=function(){return h.Z.ackUserGuildJoinRequest(n.id,o.id)};return(0,r.jsx)(u.u_l,{renderModal:function(e){return(0,r.jsx)(w,Ee(Oe({},e),{onAccept:a,guildName:n.name}))},onCloseRequest:a})};return e}var l=i.prototype;l.componentDidMount=function(){var e=this.props,t=e.isFollowable,n=e.channelFollowingUsersSeen,r=e.channel;t&&null==n&&s.Z.fetchChannelFollowerStats(r.id)};l.componentDidUpdate=function(e){var t=this.props,n=t.shouldShowLurkerModeSuccessPopout,r=t.guild
|
||
;t.showMemberVerificationModal||e.shouldShowLurkerModeSuccessPopout||!n||null==r||this.setState({shouldShowLurkerModeSuccessPopout:!0})};l.render=function(){var e,t,i,a,l=this,c=this.props,s=c.channel,f=c.guild,d=c.isFollowable,p=c.isLurking,h=c.notClaimed,y=c.notPhoneVerified,b=c.notEmailVerified,m=c.newMember,g=c.memberDeadline,O=c.newAccount,C=c.accountDeadline,j=c.theme,S=c.children,I=c.canSendMessages,_=c.channelFollowingUsersSeen,w=c.showLurkerModeUpsellPopout,N=c.showMemberVerificationModal,A=c.useReducedMotion,T=c.isStaff,Z=c.guildJoinRequest,M=c.isSelectedResourceChannel,R=c.isInSidebar,L=this.state,D=L.shouldShowLurkerModeUpsellPopout,k=L.shouldShowLurkerModeSuccessPopout,U={theme:j,useReducedMotion:A},B=Se(null!=f?(e=f.id,t=s.id,i=P.Z.getResourceChannels(e),(a=i.findIndex((function(e){return e.channelId===t})))<0?[null,null]:[i[a],i[(a+1)%i.length]]):[null,null],2),F=B[0],G=B[1];if(M&&null!=f&&null!=F&&null!=G){U.message=F.title;if(F.channelId!==G.channelId){
|
||
U.buttonText="".concat(E.Z.Messages.NEXT,": ").concat(null==G?void 0:G.title);U.onButtonClick=function(){return R?Q.Z.openResourceChannelAsSidebar({guildId:f.id,channelId:G.channelId}):(0,x.C3)(G.channelId)}}if(!R){U.onSecondaryButtonClick=function(){return(0,q.uL)(ue.Z5c.CHANNEL(f.id,ce.oC.GUILD_HOME))};U.secondaryButtonText=E.Z.Messages.BACK_TO.format({destination:E.Z.Messages.SERVER_GUIDE})}}else if(d&&!I){U.message=E.Z.Messages.FOLLOW_NEWS_CHAT_INPUT_MESSAGE;if(null!=_&&_>=1e3){var H=1e3*Math.floor(_/1e3);U.subtitle=E.Z.Messages.FOLLOW_NEWS_CHAT_INPUT_SUBTITLE.format({count:H.toLocaleString()})}U.buttonText=E.Z.Messages.FOLLOW;U.onButtonClick=this.handleFollowAnnouncement;U.imageSrc=n(40028);if(p){U.onSecondaryButtonClick=this.handleJoinServer;U.secondaryButtonText=E.Z.Messages.LURKER_MODE_CHAT_INPUT_BUTTON}}else if(h){U.message=E.Z.Messages.GUILD_VERIFICATION_TEXT_NOT_CLAIMED;U.buttonText=E.Z.Messages.CLAIM_ACCOUNT
|
||
;U.onButtonClick=N?this.handleShowMemberVerification:this.handleClaimAccount;U.imageSrc=n(976693)}else if(N)switch(null==Z?void 0:Z.applicationStatus){case v.wB.SUBMITTED:U.message=E.Z.Messages.MEMBER_VERIFICATION_APPLICATION_CONFIRMATION_TITLE;U.subtitle=E.Z.Messages.MEMBER_VERIFICATION_APPLICATION_CONFIRMATION_SUBTITLE;U.buttonText=E.Z.Messages.MEMBER_VERIFICATION_CANCEL_APPLICATION;U.onButtonClick=this.handleCancelApplication;U.imageSrc=n(312915);break;case v.wB.REJECTED:U.message=E.Z.Messages.MEMBER_VERIFICATION_REJECTED_TITLE;U.buttonText=E.Z.Messages.MEMBER_VERIFICATION_LEARN_MORE;U.onButtonClick=this.handleViewApplicationRejection;U.imageSrc=n(960362);break;default:U.message=E.Z.Messages.MEMBER_VERIFICATION_CHAT_BLOCKER_TEXT;U.buttonText=E.Z.Messages.MEMBER_VERIFICATION_NOTICE_CTA;U.buttonColor=u.Ttl.BRAND;U.onButtonClick=this.handleShowMemberVerification;U.animationSrc=function(){return n.e(61029).then(n.t.bind(n,640002,19)).then((function(e){return e.default}))}
|
||
}else if(y&&!T){U.message=E.Z.Messages.GUILD_VERIFICATION_TEXT_NOT_PHONE_VERIFIED;U.buttonText=E.Z.Messages.VERIFY_PHONE;U.onButtonClick=this.handleVerifyPhone;U.imageSrc=n(470914)}else if(b){U.message=E.Z.Messages.GUILD_VERIFICATION_TEXT_NOT_VERIFIED;U.buttonText=E.Z.Messages.RESEND_VERIFICATION_EMAIL;U.onButtonClick=this.handleResendVerification;U.imageSrc=n(976693)}else if(m){U.message=E.Z.Messages.GUILD_VERIFICATION_TEXT_MEMBER_AGE.format({min:ue.fDV.MEMBER_AGE});U.countdown=g}else if(O){U.message=E.Z.Messages.GUILD_VERIFICATION_TEXT_ACCOUNT_AGE.format({min:ue.fDV.ACCOUNT_AGE});U.countdown=C}return(0,r.jsx)(u.yRy,{position:"top",align:"left",shouldShow:k,onRequestClose:function(){return l.setState({shouldShowLurkerModeSuccessPopout:!1})},renderPopout:this.renderSuccessPopout,children:function(e){return(0,r.jsx)(le.Z,Ee(Oe({},U),{children:(0,r.jsxs)(o.Fragment,{children:[l.renderMemberVerificationSuccessModal(),w?(0,r.jsx)(u.yRy,{renderPopout:l.renderLurkerModeUpsellPopout,
|
||
shouldShow:D,position:"top",children:function(e){return(0,r.jsx)(u.P3F,Ee(Oe({},e),{className:de().clickableChannelTextArea,onClick:l.handleTextAreaClick,children:S}))}}):S]})}))}})};return i}(o.PureComponent);function Pe(e){var t,n,o,i=e.channel,a=e.children,u=i.getGuildId(),c=(0,l.e7)([te.Z],(function(){return te.Z.getGuild(u)})),s=(0,l.e7)([ne.Z],(function(){return ne.Z.getCheck(u)})),f=i.type===ue.d4z.GUILD_ANNOUNCEMENT&&null!=c&&c.hasFeature(ue.oNc.NEWS),p=(0,l.e7)([J.Z],(function(){return f?J.Z.getFollowerStatsForChannel(i.id):null})),h=(0,l.e7)([T.Z],(function(){return T.Z.isLurking(u)})),y=(0,l.e7)([ie.default],(function(){return ie.default.getCurrentUser()})),b=null!==(t=null==y?void 0:y.isStaff())&&void 0!==t&&t,g=(0,l.e7)([ee.ZP],(function(){var e;return null!=y&&(null!==(n=null===(e=ee.ZP.getMember(u,y.id))||void 0===e?void 0:e.isPending)&&void 0!==n&&n)})),O=!!(null==c?void 0:c.hasVerificationGate()),E=(g||s.notClaimed)&&O,C=(0,l.e7)([H],(function(){
|
||
return H.shouldShowPopout(u)})),j=(0,l.e7)([re.Z],(function(){return re.Z.can(ue.Plq.SEND_MESSAGES,i)})),S=(0,l.e7)([m.Z],(function(){return m.Z.getRequest(u)})),I=(0,N.Z)(i.id),_=(0,l.e7)([oe.Z,$.ZP],(function(){return $.ZP.getCurrentSidebarChannelId(oe.Z.getChannelId())===i.id})),w=Ee(Oe({},s),{guild:c,isLurking:h,isFollowable:f,shouldShowLurkerModeSuccessPopout:C,showLurkerModeUpsellPopout:h&&null!=c&&ae.ZP.canEveryoneRole(ue.Plq.SEND_MESSAGES,i),theme:X.Z.theme,canSendMessages:j,channelFollowingUsersSeen:null!=p?p.usersSeenEver:null,hasVerificationGate:O,showMemberVerificationModal:E,guildJoinRequestStatus:null!==(o=null==S?void 0:S.applicationStatus)&&void 0!==o?o:v.wB.STARTED,guildJoinRequest:S,useReducedMotion:d.Z.useReducedMotion,isStaff:b,isSelectedResourceChannel:I,isInSidebar:_});return(0,r.jsx)(xe,Ee(Oe({},w),{channel:i,children:a}))}},976010:(e,t,n)=>{"use strict";n.d(t,{Z:()=>L})
|
||
;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(64234),s=n(563367),f=n(633878);function d(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function p(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function y(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=h(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",p(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){d(e,t,n[t])}))}return e}({},(0,f.Z)(c)),{width:n,height:i,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M7.19999 18C7.19999 17.3364 6.77 16.8 6.24019 16.8H3.3598C2.82999 16.8 2.39999 17.3364 2.39999 18V20.4C2.39999 21.0636 2.82999 21.6 3.3598 21.6H6.23923C6.76904 21.6 7.19903 21.0636 7.19903 20.4V18H7.19999Z",fill:l,className:u}),(0,r.jsx)("path",{
|
||
d:"M14.4 10.6909C14.4 10.0876 13.9699 9.6 13.44 9.6H10.56C10.0301 9.6 9.60001 10.0876 9.60001 10.6909V20.5091C9.60001 21.1124 10.0301 21.6 10.56 21.6H13.44C13.9699 21.6 14.4 21.1124 14.4 20.5091V10.6909Z",fill:l,className:u}),(0,r.jsx)("path",{d:"M21.6 3.46667C21.6 2.8768 21.1699 2.4 20.64 2.4H17.76C17.2301 2.4 16.8 2.8768 16.8 3.46667V20.5333C16.8 21.1232 17.2301 21.6 17.76 21.6H20.64C21.1699 21.6 21.6 21.1232 21.6 20.5333V3.46667Z",fill:l,className:u})]}))}var b=n(2255),v=n(181152),m=n(2590),g=n(126690),O=n.n(g);function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function j(e){j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return j(e)}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){C(e,t,n[t])}))}return e}function I(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e,t){_=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return _(e,t)}var w,x=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)
|
||
}else n=r.apply(this,arguments);return I(this,n)}}var N,A,T=(C(w={},m.IE4.UNKNOWN,u.ua7.Colors.BLACK),C(w,m.IE4.BAD,u.ua7.Colors.RED),C(w,m.IE4.AVERAGE,u.ua7.Colors.YELLOW),C(w,m.IE4.FINE,u.ua7.Colors.GREEN),w),Z=(C(N={},m.QKv.CONNECTED,O().rtcConnectionStatusConnected),C(N,m.QKv.CONNECTING,O().rtcConnectionStatusConnecting),C(N,m.QKv.ERROR,O().rtcConnectionStatusError),N),M=(C(A={},m.IE4.FINE,O().rtcConnectionQualityFine),C(A,m.IE4.AVERAGE,O().rtcConnectionQualityAverage),C(A,m.IE4.BAD,O().rtcConnectionQualityBad),C(A,m.IE4.UNKNOWN,null),A),R=l.ZP.connectStores([s.Z,c.Z],(function(){return{theme:c.Z.theme,connectionState:s.Z.getState(),hostname:s.Z.getHostname(),averagePing:s.Z.getAveragePing(),lastPing:s.Z.getLastPing(),outboundLossRate:s.Z.getOutboundLossRate(),pings:s.Z.getPings()}}))(v.Z);const L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{
|
||
constructor:{value:e,writable:!0,configurable:!0}});t&&_(e,t)}(n,e);var t=P(n);function n(){E(this,n);var e;(e=t.apply(this,arguments)).renderPopout=function(e){return(0,r.jsx)(R,S({},e))};return e}var o=n.prototype;o.renderPopoutTarget=function(e){return(0,r.jsx)(u.yRy,{renderPopout:this.renderPopout,position:"top",children:e})};o.renderStatus=function(){var e=this.props,t=e.statusTextClassName,n=e.hasVideo,o=e.state,i=b.Z.getStatus(o,n),l=i.connectionStatus,c=i.connectionStatusText;return this.renderPopoutTarget((function(e){var n=e.onClick;return(0,r.jsx)(u.zxk,{look:u.zxk.Looks.BLANK,size:u.zxk.Sizes.NONE,className:a()(t,Z[l]),onClick:n,children:c})}))};o.render=function(){var e,t=this.props,n=t.quality,o=t.smallPing,i=t.lastPing,l=t.state,c=t.className,s=t.children;l===m.hes.RTC_CONNECTED&&(e=(0,r.jsx)(u.ua7,{text:n!==m.IE4.UNKNOWN&&null!=i?"".concat(i.toFixed(0)," ms"):null,color:T[n],children:function(e){return(0,r.jsx)(y,S({className:a()(O().ping,C({},O().smallPing,o)),
|
||
foreground:O().pingForeground},e))}}));return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:a()(O().rtcConnectionStatus,M[n],c),children:[e,(0,r.jsx)("div",{className:O().labelWrapper,children:this.renderStatus()})]}),s]})};return n}(o.PureComponent)},879639:(e,t,n)=>{"use strict";n.d(t,{RE:()=>ge,PZ:()=>Oe,Qj:()=>ve});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(473727),s=n(457217),f=n(289283),d=n(202351),p=n(707961),h=n(761953),y=n(971402),b=n(503370),v=n(80317),m=n(995141),g=n(959468),O=n(621647),E=n(773011),C=n(419051),j=n(289903),S=n(177570),I=n(491260),_=n(717091),w=n(788169),x=n(9430),P=n(473903),N=n(609853),A=n(971611),T=n(860917),Z=n.n(T);function M(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function R(e){
|
||
var t,n=e.selected,o=e.muted,i=void 0!==o&&o,l=e.highlighted,u=void 0!==l&&l,c=e.wrapContent,s=void 0!==c&&c,f=e.avatar,d=e.decorators,p=e.name,h=e.subText,y=e.avatarClassName,b=e.innerClassName;return(0,r.jsxs)("div",{className:a()(b,Z().layout,(t={},M(t,Z().muted,!n&&i),M(t,Z().highlighted,u),M(t,Z().wrappedLayout,s),t)),children:[(0,r.jsx)("div",{className:a()(Z().avatar,y),children:f}),(0,r.jsxs)("div",{className:Z().content,children:[(0,r.jsxs)("div",{className:Z().nameAndDecorators,children:[(0,r.jsx)("div",{className:a()(Z().name,M({},Z().wrappedName,s)),children:p}),d]}),null!=h?(0,r.jsx)("div",{className:Z().subText,children:h}):null]})]})}var L=n(29476),D=n.n(L);function k(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){k(e,t,n[t])}))}return e}function B(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function F(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}const G=o.forwardRef((function(e,t){var n=e.className,o=e.focusProps,i=F(e,["className","focusProps"]);return(0,r.jsx)(p.tEY,B(U({},o),{children:(0,r.jsx)("li",B(U({className:a()(n,D().container)},i),{ref:t}))}))}));var H=n(189865),V=n(82677),W=n(775173),z=n(310126),Y=n(106555),K=n(272362),q=n(2590),Q=n(473708),X=n(406985),J=n.n(X);function $(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function ee(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$(i,r,o,a,l,"next",e)}function l(e){$(i,r,o,a,l,"throw",e)}a(void 0)}))}}function te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ne(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function re(e){
|
||
re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return re(e)}function oe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&ce(e,t)}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ne(e,t,n[t])}))}return e}function ae(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})))
|
||
;n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function le(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ue(e,t){return!t||"object"!==se(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ce(e,t){ce=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return ce(e,t)}var se=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1
|
||
;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=re(e);if(t){var o=re(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ue(this,n)}}var de=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue
|
||
;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},pe=z.default.getEnableHardwareAcceleration()?p.Xo$:p.qEK,he={offset:{top:2,bottom:2,right:4}},ye=function(e){return(0,r.jsx)(p.P3F,ae(ie({className:J().closeButton},e),{focusProps:{offset:{top:-2,bottom:-2,left:-2,right:6}},children:(0,r.jsx)(H.Z,{className:J().closeIcon})}))},be=function(){return(0,r.jsx)(V.Z,{className:J().favoriteIcon})},ve=function(e){oe(n,e);var t=fe(n);function n(){te(this,n);return t.apply(this,arguments)}n.prototype.render=function(){
|
||
var e=this.props,t=e.route,n=e.selected,o=e.icon,i=e.text,l=e.children,u=e.locationState,s=e.onClick,d=e.className,h=e.role,y=e["aria-posinset"],b=e["aria-setsize"],v=le(e,["route","selected","icon","text","children","locationState","onClick","className","role","aria-posinset","aria-setsize"]);return(0,r.jsx)(G,{className:a()(J().channel,ne({},J().fullWidth,f.tq),d),onClick:s,role:h,focusProps:ie({within:!0},he),"aria-posinset":y,"aria-setsize":b,children:(0,r.jsx)(p.vjx,{as:"div",selected:n,className:a()(J().interactive,J().linkButton,ne({},J().interactiveSelected,n)),children:(0,r.jsxs)(c.rU,ae(ie({to:{pathname:t,state:u},className:J().link},v),{children:[(0,r.jsx)(R,{selected:n,muted:!1,avatar:(0,r.jsx)(o,{className:J().linkButtonIcon}),name:i,innerClassName:J().avatarWithText}),l]}))})})};return n}(o.Component),me=function(e){oe(i,e);var t=fe(i);function i(){te(this,i);var e;(e=t.apply(this,arguments)).state={hovered:!1};e._linkRef=o.createRef();e._listItemRef=o.createRef()
|
||
;e.handleMouseEnter=function(){e.setState({hovered:!0})};e.handleMouseLeave=function(){e.setState({hovered:!1})};e.handleClose=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=t){t.preventDefault();t.stopPropagation()}var r=e.props.channel;h.Z.closePrivateChannel(r.id,e.props.selected,n)};e.handleContextMenu=function(t){var o=e.props,i=o.channel,a=o.selected,l=o.user;i.isMultiUserDM()?(0,y.jW)(t,ee((function(){var e,t;return de(this,(function(o){switch(o.label){case 0:return[4,n.e(13035).then(n.bind(n,413035))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,ae(ie({},e),{channel:i,selected:a}))}]}}))})),{noBlurEvent:!0}):(0,y.jW)(t,ee((function(){var e,t;return de(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(50865)]).then(n.bind(n,550865))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,ae(ie({},e),{user:l,channel:i,channelSelected:a}))}]}}))})))}
|
||
;e.handleLeaveGroup=function(t){t.preventDefault();t.stopPropagation();var n=e.props,o=n.channel,i=n.channelName,a=Q.Z.Messages.LEAVE_GROUP_DM_TITLE.format({name:i}),l=Q.Z.Messages.LEAVE_GROUP_DM_BODY.format({name:i});if(o.isManaged()){a=Q.Z.Messages.LEAVE_GROUP_DM_MANAGED_TITLE.format({name:i});l=Q.Z.Messages.LEAVE_GROUP_DM_MANAGED_BODY.format({name:i})}(0,p.h7j)((function(t){return(0,r.jsx)(K.Z,ie({header:a,body:l,onSubmit:e.handleClose},t))}))};e.handleMouseDown=function(){h.Z.preload(q.ME,e.props.channel.id)};e.handleCloseButtonMouseDown=function(e){e.stopPropagation()};e.onContainerClick=function(t){if(t.target===t.currentTarget){var n;null===(n=e._linkRef.current)||void 0===n||n.click()}};return e}var l=i.prototype;l.renderSubtitle=function(){var e=this.props,t=e.channel,n=e.activities,o=e.applicationStream,i={className:J().activity,textClassName:J().activityText,emojiClassName:J().activityEmoji};return t.isSystemDM()?(0,r.jsx)("div",{className:J().subtext,
|
||
children:Q.Z.Messages.SYSTEM_DM_ACTIVITY_TEXT}):t.isMultiUserDM()?(0,r.jsx)("div",{className:J().subtext,children:Q.Z.Messages.MEMBERS_HEADER.format({members:t.recipients.length+1})}):null!=n?(0,r.jsx)(Y.Z,ae(ie({},i),{activities:n,applicationStream:o,animate:this.state.hovered,hideTooltip:!0})):null};l.renderAvatar=function(){var e=this.props,t=e.channel,n=e.user,o=e.status,i=e.activities,a=e.isTyping,l=e.isMobile,c=e.canUseAvatarDecorations,s=void 0!==c&&c;if(t.isMultiUserDM())return(0,r.jsx)(pe,{src:(0,O.x)(t),"aria-hidden":!0,className:J().avatar,size:p.EFr.SIZE_32});u()(null!=n,"PrivateChannel.renderAvatar: Invalid prop configuration - no user or channel");var f=null;n.isSystemUser()||(f=(0,b.Z)(i)?q.Skl.STREAMING:o);var d=s?(0,W.NZ)({userId:n.id,avatarDecoration:n.avatarDecoration,size:(0,m.y)(p.EFr.SIZE_32)}):null;return(0,r.jsx)(pe,{size:p.EFr.SIZE_32,src:n.getAvatarURL(void 0,32),avatarDecoration:d,status:f,isMobile:l,isTyping:a,className:J().avatar,"aria-label":n.username,
|
||
statusTooltip:!0})};l.render=function(){var e=this,t=this.props,n=t.channel,o=t.channelName,i=t.selected,l=t.muted,u=t.hasUnreadMessages,f=t.isFavorite,d=n.isMultiUserDM(),h=n.isSystemDM(),y=(0,j.Q)();return(0,r.jsx)(s.mh,{id:n.id,children:function(t){var s,b=t.role,v=le(t,["role"]);return(0,r.jsx)(G,{className:J().channel,role:b,focusProps:ae(ie({},he),{focusTarget:e._linkRef,ringTarget:e._listItemRef}),ref:e._listItemRef,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,onMouseDown:e.handleMouseDown,onContextMenu:e.handleContextMenu,"aria-setsize":e.props["aria-setsize"],"aria-posinset":e.props["aria-posinset"],children:(0,r.jsxs)(p.vjx,{className:a()(J().interactive,(s={},ne(s,J().interactiveSystemDM,y&&h),ne(s,J().interactiveSelected,i),s)),as:"div",onClick:e.onContainerClick,muted:l,selected:i,children:[(0,r.jsx)(c.rU,ae(ie({innerRef:e._linkRef,to:q.Z5c.CHANNEL(q.ME,n.id),className:J().link,"aria-label":(0,g.Z)({channel:n,unread:u})},v),{children:(0,r.jsx)(R,{
|
||
avatar:e.renderAvatar(),selected:i,highlighted:u,muted:null!=l&&l,subText:e.renderSubtitle(),name:(0,r.jsx)(A.Z,{children:o}),decorators:n.isSystemDM()?(0,r.jsx)(N.Z,{className:J().decorator,type:N.Z.Types.SYSTEM_DM,verified:!0}):null})})),f?(0,r.jsx)(be,{}):null,!h&&(0,r.jsx)(ye,{"aria-label":d?Q.Z.Messages.LEAVE_GROUP_DM:Q.Z.Messages.CLOSE_DM,onClick:d?e.handleLeaveGroup:e.handleClose,onMouseDown:e.handleCloseButtonMouseDown})]})})}})};return i}(o.PureComponent);me.defaultProps={selected:!1};var ge=function(e){var t=e.channel,n=e.selected,o=le(e,["channel","selected"]),i=(0,d.e7)([P.default],(function(){return P.default.getUser(t.getRecipientId())})),a=(0,d.cj)([I.Z,S.Z],(function(){return{status:null!=i?I.Z.getStatus(i.id):null,activities:null!=i?I.Z.getActivities(i.id):null,applicationStream:null!=i?S.Z.getAnyStreamForUser(i.id):null,isMobile:null!=i&&I.Z.isMobileOnline(i.id)}}),[null==i?void 0:i.id]),l=(0,d.e7)([w.Z],(function(){
|
||
return null!=i?w.Z.isTyping(t.id,t.getRecipientId()):void 0})),u=(0,d.e7)([x.Z],(function(){return x.Z.isChannelMuted(t.getGuildId(),t.id)})),c=(0,d.e7)([_.ZP],(function(){return _.ZP.getMentionCount(t.id)>0})),s=(0,E.ZP)(t),f=(0,v.U)().canUseAvatarDecorations,p=(0,d.e7)([C.Z],(function(){return C.Z.isFavorite(t.id)}));return(0,r.jsx)(me,ie({channel:t,channelName:s,selected:n,user:i,isTyping:l,muted:u,hasUnreadMessages:c,canUseAvatarDecorations:f,isFavorite:p},o,a))},Oe=function(e){var t=e.channel,n=e.selected,o=le(e,["channel","selected"]),i=(0,d.e7)([x.Z],(function(){return x.Z.isChannelMuted(t.getGuildId(),t.id)})),a=(0,d.e7)([_.ZP],(function(){return _.ZP.getMentionCount(t.id)>0})),l=(0,E.ZP)(t),u=(0,d.e7)([C.Z],(function(){return C.Z.isFavorite(t.id)}));return(0,r.jsx)(me,ie({channel:t,channelName:l,selected:n,muted:i,hasUnreadMessages:a,isFavorite:u},o))}},272362:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(785893),o=n(667294),i=n(707961),a=n(473708),l=n(168891),u=n.n(l)
|
||
;function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){
|
||
var t=e.header,n=e.body,l=e.onSubmit,c=d(e,["header","body","onSubmit"]),h=p(o.useState(!1),2),y=h[0],b=h[1];return(0,r.jsxs)(i.sm4,f(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){s(e,t,n[t])}))}return e}({header:t,confirmText:a.Z.Messages.LEAVE_GROUP_DM,cancelText:a.Z.Messages.CANCEL,onConfirm:function(){l(null,y)}},c),{children:[(0,r.jsx)(i.xvT,{variant:"text-md/normal",children:n}),(0,r.jsx)(i.XZJ,{type:i.XZJ.Types.INVERTED,value:y,onChange:function(){return b((function(e){return!e}))},className:u().checkbox,children:(0,r.jsx)(i.xvT,{variant:"text-md/normal",children:a.Z.Messages.LEAVE_GROUP_DM_SILENTLY})})]}))}},284952:(e,t,n)=>{"use strict";n.d(t,{Z:()=>W})
|
||
;var r=n(785893),o=n(667294),i=n(823493),a=n.n(i),l=n(457217),u=n(798159),c=n(202351),s=n(199731),f=n(707961),d=n(216151),p=n(316878),h=n(396043),y=n(76107),b=n(996344),v=n(442658),m=n(48315),g=n(64234),O=n(61209),E=n(491260),C=n(796909),j=n(443812),S=n(795909),I=n(202237),_=n(879639),w=n(2590),x=n(473708),P=n(582095),N=n.n(P);function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Z(e){Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Z(e)}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){T(e,t,n[t])}))}return e
|
||
}function R(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function L(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function D(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?function(e){
|
||
if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e,t){k=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return k(e,t)}var U=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Z(e);if(t){var o=Z(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return D(this,n)}}var F,G=44;!function(e){e[e.PAGES=0]="PAGES";e[e.DMS=1]="DMS"}(F||(F={}));var H=o.memo((function(){return(0,r.jsxs)("svg",{width:"184",height:"428",viewBox:"0 0 184 428",className:N().empty,children:[(0,r.jsx)("rect",{x:40,y:6,width:144,height:20,rx:10}),(0,
|
||
r.jsx)("circle",{cx:16,cy:16,r:16}),(0,r.jsx)("rect",{x:40,y:50,width:144,height:20,rx:10,opacity:.9}),(0,r.jsx)("circle",{cx:16,cy:60,r:16,opacity:.9}),(0,r.jsx)("rect",{x:40,y:94,width:144,height:20,rx:10,opacity:.8}),(0,r.jsx)("circle",{cx:16,cy:104,r:16,opacity:.8}),(0,r.jsx)("rect",{x:40,y:138,width:144,height:20,rx:10,opacity:.7}),(0,r.jsx)("circle",{cx:16,cy:148,r:16,opacity:.7}),(0,r.jsx)("rect",{x:40,y:182,width:144,height:20,rx:10,opacity:.6}),(0,r.jsx)("circle",{cx:16,cy:192,r:16,opacity:.6}),(0,r.jsx)("rect",{x:40,y:226,width:144,height:20,rx:10,opacity:.5}),(0,r.jsx)("circle",{cx:16,cy:236,r:16,opacity:.5}),(0,r.jsx)("rect",{x:40,y:270,width:144,height:20,rx:10,opacity:.4}),(0,r.jsx)("circle",{cx:16,cy:280,r:16,opacity:.4}),(0,r.jsx)("rect",{x:40,y:314,width:144,height:20,rx:10,opacity:.3}),(0,r.jsx)("circle",{cx:16,cy:324,r:16,opacity:.3}),(0,r.jsx)("rect",{x:40,y:358,width:144,height:20,rx:10,opacity:.2}),(0,r.jsx)("circle",{cx:16,cy:368,r:16,opacity:.2}),(0,
|
||
r.jsx)("rect",{x:40,y:402,width:144,height:20,rx:10,opacity:.1}),(0,r.jsx)("circle",{cx:16,cy:412,r:16,opacity:.1})]})})),V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&k(e,t)}(n,e);var t=B(n);function n(){A(this,n);var e;(e=t.apply(this,arguments)).state={initialized:!1,preRenderedChildren:0,totalRowCount:0,nonNullChildren:[]};e._list=null;e.hasReportedAnalytics=!1;e.reportAnalytics=function(){var t;if(!e.hasReportedAnalytics){var n=null===(t=e._list)||void 0===t?void 0:t.getScrollerState();if(null!=n){var r=e.props,i=r.privateChannelIds,a=r.channels;if(0!==i.length){var l=o.Children.count(e.props.children),u=G*l;if(null!=n){var c=Math.round((n.offsetHeight-u)/G),s=c>i.length?i.slice(0,c+1):i,f=s.map((function(e){return null!=a[e]?a[e].getRecipientId():null})),d={num_users_visible:s.length,
|
||
num_users_visible_with_mobile_indicator:f.filter((function(e){return null!=e&&E.Z.isMobileOnline(e)})).length};e.hasReportedAnalytics=!0;h.ZP.trackWithMetadata(w.rMx.DM_LIST_VIEWED,M({},d))}}}}};e.getSectionHeight=function(t){var n=e.props.showDMHeader;return t===F.PAGES?0:n?40:0};e.handleScroll=a()((function(){if(null!=e._list){var t=e._list.getScrollerNode();null!=t&&d.Z.updateChannelListScroll(w.ME,t.scrollTop)}}),100);e.renderDM=function(t,n){var o=e.props,i=o.privateChannelIds,a=o.channels,l=o.selectedChannelId,u=e.state,c=u.totalRowCount,s=u.preRenderedChildren,f=a[i[n]];if(null==f)return null;var d=f.isMultiUserDM()?_.PZ:_.RE;return(0,r.jsx)(d,{channel:f,selected:f.id===l,"aria-posinset":s+n+1,"aria-setsize":c},f.id)};e.renderChild=function(t){var n=e.state,r=n.nonNullChildren,i=n.totalRowCount,a=r[t];return o.isValidElement(a)?o.cloneElement(a,{"aria-setsize":i,"aria-posinset":t+1}):a};e.renderRow=function(t){var n=t.section,o=t.row,i=e.props.privateChannelIds
|
||
;return n===F.PAGES?e.renderChild(o):0===o&&0===i.length?(0,r.jsx)(H,{},"no-private-channels"):e.renderDM(n,o)};e.renderSection=function(t){var n=t.section,o=e.props.showDMHeader;return n!==F.PAGES&&o?(0,r.jsxs)(I.Z,{className:N().privateChannelsHeaderContainer,children:[(0,r.jsx)("span",{className:N().headerText,children:x.Z.Messages.DIRECT_MESSAGES}),(0,r.jsx)(y.Z,{tooltip:x.Z.Messages.CREATE_DM,tooltipPosition:"top",popoutAlign:"left",iconClassName:N().privateChannelRecipientsInviteButtonIcon,icon:S.Z,subscribeToGlobalHotkey:!0})]},n):null};e.getRowHeight=function(t,n){var r=e.props.privateChannelIds;return t===F.DMS&&0===n&&0===r.length?428:G};return e}var i=n.prototype;i.componentDidMount=function(){var e=this.props,t=e.selectedChannelId,n=e.homeLink;null!=t&&null!=n&&n.indexOf(t)>=0&&this.scrollToChannel(t);this.reportAnalytics()};i.shouldComponentUpdate=function(e){return!(0,s.Z)(this.props,e,["children"])};i.componentDidUpdate=function(e){
|
||
var t=this.props,n=t.selectedChannelId,r=t.homeLink;null!=n&&n!==e.selectedChannelId?this.scrollToChannel(n):null==n&&r!==e.homeLink&&this.scrollToChannel(null);this.reportAnalytics()};i.scrollToChannel=function(e){if(null!=this._list){var t=this.props.padding,n=this.state.preRenderedChildren,r=null!=e?this.props.privateChannelIds.indexOf(e):-1,o=0;if(r<0||null==e)this._list.scrollTo({to:o});else{o+=G*(r+n)+t;this._list.scrollIntoViewRect({start:Math.max(o-8,0),end:o+G+8})}}};i.render=function(){var e=this,t=this.props,n=t.privateChannelIds,o=t.padding,i=this.state.preRenderedChildren;return(0,r.jsx)(l.SJ,{children:function(t){var a=t.ref,l=t.role,u=L(t,["ref","role"]);return(0,r.jsx)(f.Wdt,{children:function(t){return(0,r.jsx)(f.aVo,M({fade:!0,innerRole:l,innerAriaLabel:x.Z.Messages.DIRECT_MESSAGES,innerTag:"ul",ref:function(t){e._list=t;e.props.listRef.current=t;var n;a.current=null!==(n=null==t?void 0:t.getScrollerNode())&&void 0!==n?n:null},onScroll:e.handleScroll,
|
||
className:N().scroller,sectionHeight:e.getSectionHeight,paddingTop:o,paddingBottom:8,rowHeight:e.getRowHeight,renderSection:e.renderSection,renderRow:e.renderRow,sections:[i,Math.max(n.length,1)]},u,t))}})}})};n.getDerivedStateFromProps=function(e){var t=e.children,n=e.privateChannelIds;if(null==t)return{preRenderedChildren:0,nonNullChildren:[],totalRowCount:n.length};var r=t.filter((function(e){return null!=e})),o=r.length;return{preRenderedChildren:o,nonNullChildren:r,totalRowCount:o+n.length}};return n}(o.Component);V.defaultProps={padding:8};const W=function(e){var t=e.version,n=e.theme,i=e.children,a=e.showDMHeader,s=o.Children.count(i),f=O.Z.getMutablePrivateChannels(),d=(0,v.k1)(f),h=(0,c.Wu)([C.Z,b.Z,m.Z],(function(){var e=C.Z.getPrivateChannelIds();return(0,v.tU)(e,[b.Z,m.Z])}),[]),y=(0,c.cj)([p.Z,g.Z,O.Z],(function(){return{theme:g.Z.darkSidebar?w.BRd.DARK:n,keyboardModeEnabled:p.Z.keyboardModeEnabled,
|
||
version:null!=t?"".concat(t,":").concat(O.Z.getPrivateChannelsVersion()):O.Z.getPrivateChannelsVersion()}})),E=o.useRef(null),S=o.useCallback((function(e){var t=E.current,n=document.querySelector(e);null!=t&&null!=n&&t.scrollIntoViewNode({node:n,callback:function(){requestAnimationFrame((function(){var t;return null===(t=document.querySelector(e))||void 0===t?void 0:t.focus({preventScroll:!0})}))}})}),[]),I=o.useCallback((function(){return new Promise((function(e){var t=E.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),_=o.useCallback((function(){return new Promise((function(e){var t=E.current;if(null==t)return e();t.scrollToBottom({callback:function(){requestAnimationFrame((function(){return setTimeout(e,100)}))}})}))}),[]),x=s+(a?1:0),P=(0,j.Dt)(),N=(0,u.ZP)({id:"private-channels-".concat(P),isEnabled:y.keyboardModeEnabled,scrollToStart:I,scrollToEnd:_,defaultFocused:x.toString(),setFocus:S})
|
||
;return(0,r.jsx)(l.bG,{navigator:N,children:(0,r.jsx)(V,M(R(M({channels:d,privateChannelIds:h,listRef:E,theme:n,version:t},e),{children:i}),y))})}},181152:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(539519),u=n(707961),c=n(797364),s=n(928733),f=n(769321),d=n(736097),p=n(188084),h=n(824456),y=n(652591),b=n(691797),v=n(348592),m=n(2255),g=n(2590),O=n(36256),E=n(473708),C=n(388209),j=n.n(C);function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var I=function(){d.Z.getMediaEngine().once(l.aB.ConnectionStats,(function(e){var t=Object.values(O.Yn).map((function(t){var n=e.filter((function(e){return e.connection.context===t})).map((function(e,n){var r=e.stats;r.context=t;r.index=n;return r})),r=!0,o=!1,i=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u,c=a.value
|
||
;null!=(null==c||null===(u=c.transport)||void 0===u?void 0:u.localAddress)&&(c.transport.localAddress="(redacted)")}}catch(e){o=!0;i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n})).filter((function(e){return e.length>0}));(0,b.JG)(JSON.stringify(t,null,2));(0,u.CFj)((0,u.Yz2)(E.Z.Messages.COPIED,u.pCN.SUCCESS))}))};const _=function(e){(0,o.useEffect)((function(){y.default.track(g.rMx.OPEN_POPOUT,{type:"RTC Connection"})}),[]);var t,n=(0,o.useCallback)((function(){var t=e.closePopout;null!=t&&t();c.bA()}),[e]),i=(0,o.useCallback)((function(){var t=e.hostname,n=e.averagePing,i=e.lastPing,l=e.outboundLossRate,u=f.Sb.getSetting();return(0,r.jsxs)(o.Fragment,{children:[u&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:j().graphContainer,children:(0,r.jsx)(s.Z,{dataPoints:e.pings,width:258,height:80})}),(0,r.jsx)("div",{className:j().popoutText,children:(0,r.jsx)("strong",{children:m.Z.getShortHostname(t)})})]}),(0,r.jsx)("div",{className:j().popoutText,
|
||
children:E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_AVERAGE_PING.format({averagePing:n.toFixed(0)})}),null!=i?(0,r.jsx)("div",{className:j().popoutText,children:E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_LAST_PING.format({lastPing:i.toFixed(0)})}):null,null!=l?(0,r.jsx)("div",{className:j().popoutText,children:E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_LOSS_VALUE.format({outboundLossRate:l.toFixed(1)})}):null,(0,r.jsxs)("div",{className:a()(j().popoutText,j().popoutTextDetails),children:[null==l?E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_DETAILS.format({badPing:250}):null,null!=l?E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_DETAILS_WITH_LOSS.format({badPing:250,badLossRate:10}):null]})]})}),[e]),l=e.connectionState,b=f.Sb.getSetting(),C=(t={},S(t,g.hes.AWAITING_ENDPOINT,E.Z.Messages.RTC_CONNECTION_STATE_AWAITING_ENDPOINT.format({url:g.yXt.STATUS})),S(t,g.hes.CONNECTING,E.Z.Messages.RTC_CONNECTION_STATE_CONNECTING),
|
||
S(t,g.hes.AUTHENTICATING,E.Z.Messages.RTC_CONNECTION_STATE_AUTHENTICATING),S(t,g.hes.DISCONNECTED,E.Z.Messages.RTC_CONNECTION_STATE_DISCONNECTED),S(t,g.hes.RTC_CONNECTING,E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTING),S(t,g.hes.ICE_CHECKING,E.Z.Messages.RTC_CONNECTION_STATE_ICE_CHECKING.format({url:v.Z.getArticleURL(g.BhN.VOICE_CONNECTION_ERRORS)})),S(t,g.hes.DTLS_CONNECTING,E.Z.Messages.RTC_CONNECTION_STATE_ICE_CHECKING.format({url:v.Z.getArticleURL(g.BhN.VOICE_CONNECTION_ERRORS)})),S(t,g.hes.RTC_CONNECTED,i),S(t,g.hes.NO_ROUTE,E.Z.Messages.RTC_CONNECTION_STATE_NO_ROUTE.format({url:v.Z.getArticleURL(g.BhN.VOICE_CONNECTION_ERRORS)})),S(t,g.hes.RTC_DISCONNECTED,E.Z.Messages.RTC_CONNECTION_STATE_DISCONNECTED),t)[l];return(0,r.jsx)("div",{className:j().container,children:(0,r.jsxs)("section",{className:j().section,children:["function"==typeof C?C():(0,r.jsx)("p",{className:a()(j().popoutText,j().popoutTextDetails),children:C}),(0,r.jsx)("hr",{className:j().separator}),(0,
|
||
r.jsxs)("div",{className:j().popoutBottom,children:[(0,r.jsx)("span",{className:j().secured,children:E.Z.Messages.SECURE_CONNECTION}),b&&d.Z.supports(O.AN.DIAGNOSTICS)&&!__OVERLAY__&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(u.eee,{className:j().debugButton,onClick:n,children:[E.Z.Messages.DEBUG,(0,r.jsx)(h.Z,{className:j().launchIcon,width:12,height:12})]}),(0,r.jsxs)(u.eee,{className:j().copyStatsButton,onClick:I,title:"Copy to clipboard",children:[E.Z.Messages.COPY_STATS,(0,r.jsx)(p.Z,{className:j().copyIcon,width:12,height:12})]})]}),!b&&!__OVERLAY__&&(0,r.jsx)(u.eee,{className:j().debugButton,href:v.Z.getArticleURL(g.BhN.VOICE_VIDEO_TROUBLESHOOTING),children:E.Z.Messages.LEARN_MORE})]})]})})}},963429:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(667294),o=n(513328);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){
|
||
return e.__proto__||Object.getPrototypeOf(e)};return a(e)}function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){u=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return u(e,t)}function c(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
|
||
}()}var s=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&u(e,t)}(n,e);var t=f(n);function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r;(r=t.call(this,e))._interval=new o.Xp;r.update=function(){
|
||
var e=r.props,t=e.onUpdate,n=e.numUpdatesToShow,o=e.pointsToSmooth,i=e.updateInterval,a=r.props.getHistoricalTotalBytes(),l=null!=a[0]?a[0].bytes:0,u=c(r.state.deltaBytes.slice(1,n+o)).concat([l-r.state.lastTotalBytes]);r.setState({deltaBytes:u,smoothedDeltaBytes:r.smoothDeltaBytes(u),lastTotalBytes:l},(function(){return null!=t&&t(i)}))};var i=r.props.getHistoricalTotalBytes(),a=r.calculateInitialDeltaBytes(i);r.state={deltaBytes:a,smoothedDeltaBytes:r.smoothDeltaBytes(a),lastTotalBytes:null!=i[0]?i[0].bytes:0};return r}var r=n.prototype;r.componentDidMount=function(){this.update();this._interval.start(this.props.updateInterval,this.update)};r.componentWillUnmount=function(){this._interval.stop()};r.calculateInitialDeltaBytes=function(e){for(var t=this.props,n=t.numUpdatesToShow,r=t.updateInterval,o=t.pointsToSmooth,i=Date.now(),a=0,l=0,u=[],c=null!=e[0]?e[0].bytes:0;a<n+o;a++){for(var s=i-(a+1)*r,f=void 0;l<e.length&&(f=e[l]).timestamp>s;)l++;if(l===e.length)break;if(null!=f){
|
||
u.push(c-f.bytes);c=f.bytes}}for(;a<n+o;a++)u.push(0);u.reverse();return u};r.smoothDeltaBytes=function(e){for(var t=this.props.pointsToSmooth,n=[],r=0;r<e.length-t;r++){for(var o=0,i=0;i<t;i++)o+=e[r+i];n.push(o/t)}return n};r.render=function(){var e=this.props,t=e.numUpdatesToShow,n=e.updateInterval;return(0,e.children)(this.state.smoothedDeltaBytes,n,t)};return n}(r.Component);d.defaultProps={numUpdatesToShow:30,updateInterval:500,pointsToSmooth:10};const p=d},576725:(e,t,n)=>{"use strict";n.d(t,{E:()=>H,Z:()=>V});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(853158),u=n(202351),c=n(336194),s=n(443660),f=n(707961),d=n(784426),p=n(959207),h=n(713094),y=n(454708),b=n(686910),v=n(301041),m=n(898652),g=n(954419),O=n(963429),E=n(2590),C=n(473708),j=n(459874),S=n.n(j);function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}
|
||
function w(e){w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return w(e)}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Z(e,t)}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){_(e,t,n[t])}))}return e}function N(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function A(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function T(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Z(e,t){Z=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Z(e,t)}var M=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function R(e){var t=function(){
|
||
if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}var L,D,k,U,B=(_(U={},E.vxO.INSTALLING,(_(L={},b.J6.NONE,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING.format({name:e})})),_(L,b.J6.SECONDS,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_SECONDS.format({name:e,timeRemaining:t})})),_(L,b.J6.MINUTES,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_MINUTES.format({name:e,timeRemaining:t})})),_(L,b.J6.HOURS,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_HOURS.format({name:e,timeRemaining:t})})),L)),
|
||
_(U,E.vxO.UPDATING,(_(D={},b.J6.NONE,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING.format({name:e})})),_(D,b.J6.SECONDS,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING_SECONDS.format({name:e,timeRemaining:t})})),_(D,b.J6.MINUTES,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING_MINUTES.format({name:e,timeRemaining:t})})),_(D,b.J6.HOURS,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING_HOURS.format({name:e,timeRemaining:t})})),D)),_(U,E.vxO.REPAIRING,(_(k={},b.J6.NONE,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING.format({name:e})})),_(k,b.J6.SECONDS,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_SECONDS.format({name:e,timeRemaining:t})})),_(k,b.J6.MINUTES,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_MINUTES.format({name:e,timeRemaining:t})})),_(k,b.J6.HOURS,(function(e,t){
|
||
return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_HOURS.format({name:e,timeRemaining:t})})),k)),U),F=function(e){x(n,e);var t=R(n);function n(){I(this,n);var e;(e=t.apply(this,arguments)).renderProgressBody=function(t,n){var r=e.props,o=r.state,i=r.application,a=o.stage,l=o.progress,u=o.total,c=o.type;if(null==l||null==u||null==a)return null;var s=t[t.length-1]/n*1e3,f=u-l,d=0!==s?Math.max(1,f/s):null,p=null!=d?d/60:null,h=B[c],y=null!=h?Object.keys(h):[],v=(0,b.CI)(p,y),m=v.unit,g=v.time;if(null!=h&&null!=m){var O=h[m];return null!=O?O(i.name,g):null}return null};return e}var o=n.prototype;o.renderText=function(){var e=this.props,t=e.state,n=e.isPaused;if(t.type===E.vxO.UPDATING||t.type===E.vxO.REPAIRING||t.type===E.vxO.INSTALLING){if(n)return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_PAUSED;if(t.stage===E.f07.PATCHING||t.stage===E.f07.REPAIRING)return(0,r.jsx)(O.Z,{getHistoricalTotalBytes:h.Z.getHistoricalTotalBytesWritten,updateInterval:5e3,
|
||
children:this.renderProgressBody})}return null};o.render=function(){var e=this.renderText();return null!=e?e:C.Z.Messages.LIBRARY};return n}(o.PureComponent),G=function(e){x(n,e);var t=R(n);function n(){I(this,n);var e;(e=t.apply(this,arguments)).state={animationScale:new l.Z.Value(0)};e.handleOnClick=function(t){var n=e.props.onClick;t.preventDefault();t.stopPropagation();null!=n&&n(t);(0,d.uL)(E.Z5c.APPLICATION_LIBRARY)};return e}var o=n.prototype;o.componentWillAppear=function(e){this.state.animationScale.setValue(1);e()};o.componentWillEnter=function(e){l.Z.spring(this.state.animationScale,{toValue:1,duration:200}).start(e)};o.componentWillLeave=function(e){l.Z.spring(this.state.animationScale,{toValue:0,duration:200}).start(e)};o.getTooltipText=function(){var e=this.props,t=e.firstApplication,n=e.firstState,o=e.isPaused;return null==t||null==n?C.Z.Messages.LIBRARY:(0,r.jsx)(F,{application:t,state:n,isPaused:o})};o.render=function(){
|
||
var e=this.props,t=e.percent,n=e.isPaused,o=e.className;return(0,r.jsx)(l.Z.div,{style:{transform:[{scale:this.state.animationScale}]},className:a()(o,S().progressContainer),onClick:this.handleOnClick,children:(0,r.jsx)(f.ua7,{text:this.getTooltipText(),position:"right","aria-label":!1,children:function(e){return(0,r.jsx)("div",N(P({},e),{children:(0,r.jsx)(v.Z,{percent:t,colorOverride:n?c.Z.unsafe_rawColors.PRIMARY_500.css:null,children:(0,r.jsx)(m.Z,{className:S().downloadIcon})})}))}})})};return n}(o.PureComponent);G.defaultProps={strokeSize:v.Z.StrokeSizes.MEDIUM};function H(e,t){return e.reduce((function(e,n){var r=n.applicationId,o=n.branchId,i=t.getState(r,o);null!=i&&e.push(i);return e}),[])}const V=u.ZP.connectStores([y.Z,p.Z,h.Z],(function(){var e=y.Z.activeItems,t=H(e,h.Z),n=g.lK(t),r=n.total,o=n.progress;return{percent:g.xI(o,r),isPaused:y.Z.paused,firstApplication:e.length>0?p.Z.getGame(e[0].applicationId):null,firstState:t.length>0?t[0]:null}}))((function(e){
|
||
var t=e.determineOwnVisibility,n=void 0===t||t,i=A(e,["determineOwnVisibility"]);return n?(0,r.jsx)(s.Z,{component:o.Fragment,children:i.percent>0&&i.percent<100?(0,r.jsx)(G,P({},i)):null}):(0,r.jsx)(G,P({},i))}))},910878:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>d});var r=n(785893),o=(n(667294),n(707961)),i=n(773011),a=n(473708),l=n(407945),u=n.n(l);function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function s(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){
|
||
if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function d(e){var t=e.channel,n=e.category,l=f(e,["channel","category"]),d=(0,i.ZP)(t,!0),p=(0,i.ZP)(n);return(0,r.jsx)(o.sm4,s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){c(e,t,n[t])}))}return e}({header:a.Z.Messages.CONFIRM_CHANNEL_DRAG_TITLE,confirmText:a.Z.Messages.SYNC_PERMISSIONS,cancelText:a.Z.Messages.KEEP_PERMISSIONS,confirmButtonColor:o.zxk.Colors.BRAND},l),{children:(0,r.jsx)(o.xvT,{variant:"text-md/normal",
|
||
className:u().message,selectable:!1,children:a.Z.Messages.SYNC_PERMISSIONS_EXPLANATION.format({channelName:d,categoryName:p})})}))}},75529:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Me});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(202351),s=n(336194),f=n(707961),d=n(846334),p=n(429041),h=n(658689),y=n(316878),b=n(582762),v=n(258104),m=n(545580),g=n(874593),O=n(468235),E=n(228667),C=n(335072),j=n(99827),S=n(293078);function I(){return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_1378_82282)",children:[(0,r.jsx)("path",{
|
||
d:"M8.00009 15.4171C12.0001 15.4171 14.8572 14 14.8572 10.8457C14.8572 7.41711 12.9286 5.21429 9.5 3.5L11.0629 1.67997C11.1315 1.56599 11.1686 1.43593 11.1707 1.30296C11.1727 1.16999 11.1396 1.03885 11.0746 0.922821C11.0096 0.806793 10.9151 0.710005 10.8007 0.642268C10.6862 0.57453 10.5559 0.538252 10.4229 0.537109H5.57723C5.44425 0.538252 5.31394 0.57453 5.1995 0.642268C5.08506 0.710005 4.99057 0.806793 4.92559 0.922821C4.86062 1.03885 4.82747 1.16999 4.82951 1.30296C4.83156 1.43593 4.86872 1.56599 4.93723 1.67997L6.5 3.5C3.07143 5.22571 1.14294 7.43997 1.14294 10.8685C1.14294 14 4.00009 15.4171 8.00009 15.4171Z",fill:"#B9BBBE",stroke:"#B9BBBE",strokeWidth:"1.14286",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsxs)("g",{clipPath:"url(#clip1_1378_82282)",children:[(0,r.jsx)("mask",{id:"path-2-inside-1_1378_82282",fill:"white",children:(0,r.jsx)("path",{
|
||
d:"M11.9667 7.3558L9.45706 7.13802L8.47706 4.83062C8.30077 4.41063 7.69929 4.41063 7.52299 4.83062L6.543 7.1432L4.03857 7.3558C3.58227 7.39209 3.39561 7.96246 3.74301 8.2632L5.64597 9.91208L5.0756 12.3595C4.9719 12.8054 5.45412 13.158 5.84819 12.9195L8.00003 11.6232L10.1519 12.9247C10.5459 13.1632 11.0282 12.8106 10.9245 12.3647L10.3541 9.91208L12.257 8.2632C12.6045 7.96246 12.423 7.39209 11.9667 7.3558ZM8.00003 10.6536L6.05041 11.8306L6.56892 9.61134L4.84745 8.11801L7.11855 7.92098L8.00003 5.83136L8.88669 7.92616L11.1578 8.1232L9.43632 9.61653L9.95483 11.8358L8.00003 10.6536Z"})}),(0,r.jsx)("path",{
|
||
d:"M11.9667 7.3558L9.45706 7.13802L8.47706 4.83062C8.30077 4.41063 7.69929 4.41063 7.52299 4.83062L6.543 7.1432L4.03857 7.3558C3.58227 7.39209 3.39561 7.96246 3.74301 8.2632L5.64597 9.91208L5.0756 12.3595C4.9719 12.8054 5.45412 13.158 5.84819 12.9195L8.00003 11.6232L10.1519 12.9247C10.5459 13.1632 11.0282 12.8106 10.9245 12.3647L10.3541 9.91208L12.257 8.2632C12.6045 7.96246 12.423 7.39209 11.9667 7.3558ZM8.00003 10.6536L6.05041 11.8306L6.56892 9.61134L4.84745 8.11801L7.11855 7.92098L8.00003 5.83136L8.88669 7.92616L11.1578 8.1232L9.43632 9.61653L9.95483 11.8358L8.00003 10.6536Z",fill:"#292B2F"}),(0,r.jsx)("path",{
|
||
d:"M9.45706 7.13802L7.61621 7.91986L8.08626 9.02658L9.28416 9.13053L9.45706 7.13802ZM8.47706 4.83062L6.63292 5.60471L6.63622 5.61247L8.47706 4.83062ZM7.52299 4.83062L9.36448 5.61099L9.36712 5.6047L7.52299 4.83062ZM6.543 7.1432L6.71216 9.13604L7.9139 9.03403L8.38448 7.92356L6.543 7.1432ZM4.03857 7.3558L4.19716 9.34953L4.20773 9.34863L4.03857 7.3558ZM3.74301 8.2632L5.05272 6.75168L5.05201 6.75108L3.74301 8.2632ZM5.64597 9.91208L7.59377 10.366L7.86766 9.19079L6.95567 8.40057L5.64597 9.91208ZM5.0756 12.3595L3.1278 11.9055L3.12758 11.9064L5.0756 12.3595ZM5.84819 12.9195L4.81616 11.2063L4.81258 11.2085L5.84819 12.9195ZM8.00003 11.6232L9.03508 9.91185L8.00209 9.28708L6.968 9.91002L8.00003 11.6232ZM10.1519 12.9247L11.1875 11.2137L11.1869 11.2133L10.1519 12.9247ZM10.9245 12.3647L8.97644 12.8177H8.97644L10.9245 12.3647ZM10.3541 9.91208L9.04439 8.40057L8.13288 9.19037L8.40608 10.3651L10.3541 9.91208ZM12.257 8.2632L10.948 6.75108L10.9473 6.75169L12.257 8.2632ZM8.00003 10.6536L9.03502 8.94219L8.00093 8.31679L6.96635 8.94139L8.00003 10.6536ZM6.05041 11.8306L4.10286 11.3756L3.02377 15.9941L7.08408 13.5428L6.05041 11.8306ZM6.56892 9.61134L8.51647 10.0664L8.79102 8.8913L7.87948 8.10056L6.56892 9.61134ZM4.84745 8.11801L4.67459 6.1255L-0.0310004 6.53375L3.5369 9.62879L4.84745 8.11801ZM7.11855 7.92098L7.29142 9.91349L8.49266 9.80928L8.96131 8.69832L7.11855 7.92098ZM8.00003 5.83136L9.84184 5.05178L7.99691 0.693003L6.15728 5.05402L8.00003 5.83136ZM8.88669 7.92616L7.04488 8.70574L7.51423 9.8146L8.71382 9.91868L8.88669 7.92616ZM11.1578 8.1232L12.4683 9.63398L16.0362 6.53893L11.3307 6.13068L11.1578 8.1232ZM9.43632 9.61653L8.12576 8.10575L7.21422 8.89648L7.48877 10.0716L9.43632 9.61653ZM9.95483 11.8358L8.91984 13.5471L12.9826 16.0042L11.9024 11.3807L9.95483 11.8358ZM12.1396 5.36328L9.62996 5.14551L9.28416 9.13053L11.7938 9.34831L12.1396 5.36328ZM11.2979 6.35618L10.3179 4.04878L6.63622 5.61247L7.61621 7.91986L11.2979 6.35618ZM10.3212 4.05655C9.45878 2.00198 6.54128 2.00198 5.67887 4.05655L9.36712 5.6047C8.8573 6.81927 7.14275 6.81927 6.63294 5.6047L10.3212 4.05655ZM5.68152 4.05027L4.70152 6.36285L8.38448 7.92356L9.36447 5.61098L5.68152 4.05027ZM6.37384 5.15037L3.8694 5.36296L4.20773 9.34863L6.71216 9.13604L6.37384 5.15037ZM3.87998 5.36209C1.64333 5.54001 0.753531 8.32058 2.43401 9.77532L5.05201 6.75108C6.03768 7.60434 5.52122 9.24418 4.19716 9.3495L3.87998 5.36209ZM2.43331 9.77471L4.33626 11.4236L6.95567 8.40057L5.05272 6.75168L2.43331 9.77471ZM3.69816 9.45814L3.1278 11.9055L7.0234 12.8134L7.59377 10.366L3.69816 9.45814ZM3.12758 11.9064C2.62503 14.0674 4.9682 15.7899 6.88379 14.6305L4.81258 11.2085C5.94003 10.5261 7.31876 11.5434 7.02362 12.8125L3.12758 11.9064ZM6.88021 14.6326L9.03205 13.3363L6.968 9.91002L4.81616 11.2063L6.88021 14.6326ZM6.96498 13.3345L9.11682 14.636L11.1869 11.2133L9.03508 9.91185L6.96498 13.3345ZM9.11626 14.6357C11.0319 15.7951 13.375 14.0726 12.8725 11.9116L8.97644 12.8177C8.6813 11.5486 10.06 10.5313 11.1875 11.2137L9.11626 14.6357ZM12.8725 11.9116L12.3021 9.45905L8.40608 10.3651L8.97644 12.8177L12.8725 11.9116ZM11.6638 11.4236L13.5667 9.77471L10.9473 6.75169L9.04439 8.40057L11.6638 11.4236ZM13.566 9.77532C15.2133 8.34936 14.4056 5.54348 12.1253 5.36209L11.8081 9.3495C10.4404 9.2407 9.99563 7.57556 10.948 6.75108L13.566 9.77532ZM6.96635 8.94139L5.01673 10.1184L7.08408 13.5428L9.0337 12.3657L6.96635 8.94139ZM7.99796 12.2856L8.51647 10.0664L4.62138 9.15631L4.10286 11.3756L7.99796 12.2856ZM7.87948 8.10056L6.15801 6.60724L3.5369 9.62879L5.25837 11.1221L7.87948 8.10056ZM5.02032 10.1105L7.29142 9.91349L6.94569 5.92846L4.67459 6.1255L5.02032 10.1105ZM8.96131 8.69832L9.84278 6.6087L6.15728 5.05402L5.2758 7.14364L8.96131 8.69832ZM6.15822 6.61094L7.04488 8.70574L10.7285 7.14659L9.84184 5.05178L6.15822 6.61094ZM8.71382 9.91868L10.9849 10.1157L11.3307 6.13068L9.05956 5.93365L8.71382 9.91868ZM9.84724 6.61242L8.12576 8.10575L10.7469 11.1273L12.4683 9.63398L9.84724 6.61242ZM7.48877 10.0716L8.00729 12.2908L11.9024 11.3807L11.3839 9.16149L7.48877 10.0716ZM10.9898 10.1244L9.03502 8.94219L6.96504 12.3649L8.91984 13.5471L10.9898 10.1244Z",
|
||
fill:"#292B2F",mask:"url(#path-2-inside-1_1378_82282)"}),(0,r.jsx)("mask",{id:"path-4-inside-2_1378_82282",fill:"white",children:(0,r.jsx)("path",{d:"M10.6811 7.81008L8.98505 7.6629L8.32275 6.10351C8.2036 5.81966 7.79711 5.81966 7.67796 6.10351L7.01566 7.66641L5.3231 7.81008C4.62661 7.81008 4.49996 8 5.12336 8.42333L6.40942 9.53768L6.02395 11.1917C6.00007 12 5.86977 12.1684 6.54609 11.5701L8.00036 10.6941L9.45462 11.5737C9.72094 11.7348 10.5001 12.5 9.97675 11.1952L9.59129 9.53768L10.8773 8.42333C11.5001 8.19204 11.7365 7.81008 10.6811 7.81008ZM8.00036 10.0388L6.68275 10.8343L7.03318 9.33443L5.86977 8.32521L7.40463 8.19204L8.00036 6.77983L8.59958 8.19555L10.1344 8.32871L8.97103 9.33794L9.32146 10.8378L8.00036 10.0388Z"})}),(0,r.jsx)("path",{
|
||
d:"M10.6811 7.81008L8.98505 7.6629L8.32275 6.10351C8.2036 5.81966 7.79711 5.81966 7.67796 6.10351L7.01566 7.66641L5.3231 7.81008C4.62661 7.81008 4.49996 8 5.12336 8.42333L6.40942 9.53768L6.02395 11.1917C6.00007 12 5.86977 12.1684 6.54609 11.5701L8.00036 10.6941L9.45462 11.5737C9.72094 11.7348 10.5001 12.5 9.97675 11.1952L9.59129 9.53768L10.8773 8.42333C11.5001 8.19204 11.7365 7.81008 10.6811 7.81008ZM8.00036 10.0388L6.68275 10.8343L7.03318 9.33443L5.86977 8.32521L7.40463 8.19204L8.00036 6.77983L8.59958 8.19555L10.1344 8.32871L8.97103 9.33794L9.32146 10.8378L8.00036 10.0388Z",fill:"#292B2F"}),(0,r.jsx)("path",{
|
||
d:"M10.6811 7.81008L10.5643 9.15667L10.6226 9.16173H10.6811V7.81008ZM8.98505 7.6629L7.74096 8.19129L8.05863 8.93924L8.8682 9.00949L8.98505 7.6629ZM8.32275 6.10351L7.07643 6.62665L7.07866 6.6319L8.32275 6.10351ZM7.67796 6.10351L8.92249 6.6309L8.92427 6.62665L7.67796 6.10351ZM7.01566 7.66641L7.12998 9.01321L7.94215 8.94427L8.26017 8.19379L7.01566 7.66641ZM5.3231 7.81008V9.16173H5.38037L5.43743 9.15689L5.3231 7.81008ZM5.12336 8.42333L6.00849 7.40181L5.94843 7.34977L5.88269 7.30512L5.12336 8.42333ZM6.40942 9.53768L7.7258 9.84446L7.9109 9.05021L7.29455 8.51616L6.40942 9.53768ZM6.02395 11.1917L4.70758 10.8849L4.67689 11.0166L4.6729 11.1518L6.02395 11.1917ZM6.54609 11.5701L5.84862 10.4124L5.74296 10.476L5.65056 10.5577L6.54609 11.5701ZM8.00036 10.6941L8.69987 9.53752L8.00175 9.11529L7.30289 9.53629L8.00036 10.6941ZM9.45462 11.5737L10.1545 10.4173L10.1541 10.4171L9.45462 11.5737ZM9.97675 11.1952L8.66024 11.5014L8.68369 11.6022L8.72224 11.6983L9.97675 11.1952ZM9.59129 9.53768L8.70616 8.51616L8.09014 9.04993L8.27477 9.84385L9.59129 9.53768ZM10.8773 8.42333L10.4067 7.15625L10.1772 7.24149L9.99222 7.40181L10.8773 8.42333ZM8.00036 10.0388L8.69983 8.8822L8.00096 8.45955L7.30177 8.88166L8.00036 10.0388ZM6.68275 10.8343L5.36655 10.5267L4.63728 13.648L7.38134 11.9914L6.68275 10.8343ZM7.03318 9.33443L8.34938 9.64196L8.53493 8.84781L7.91888 8.31341L7.03318 9.33443ZM5.86977 8.32521L5.75294 6.97862L2.57279 7.25452L4.98406 9.34623L5.86977 8.32521ZM7.40463 8.19204L7.52146 9.53863L8.33329 9.4682L8.65001 8.71739L7.40463 8.19204ZM8.00036 6.77983L9.24509 6.25297L7.99825 3.3072L6.75498 6.25448L8.00036 6.77983ZM8.59958 8.19555L7.35484 8.72241L7.67204 9.4718L8.48276 9.54214L8.59958 8.19555ZM10.1344 8.32871L11.0201 9.34973L13.4314 7.25802L10.2513 6.98212L10.1344 8.32871ZM8.97103 9.33794L8.08533 8.31692L7.46929 8.85132L7.65483 9.64546L8.97103 9.33794ZM9.32146 10.8378L8.62198 11.9943L11.3677 13.6549L10.6377 10.5302L9.32146 10.8378ZM10.798 6.46349L9.1019 6.31631L8.8682 9.00949L10.5643 9.15667L10.798 6.46349ZM10.2291 7.13451L9.56684 5.57512L7.07866 6.6319L7.74096 8.19129L10.2291 7.13451ZM9.56905 5.58037C8.98622 4.19185 7.01449 4.19185 6.43166 5.58037L8.92427 6.62665C8.57972 7.44748 7.42099 7.44748 7.07644 6.62665L9.56905 5.58037ZM6.43345 5.57612L5.77114 7.13902L8.26017 8.19379L8.92248 6.63089L6.43345 5.57612ZM6.90133 6.3196L5.20878 6.46328L5.43743 9.15689L7.12998 9.01321L6.90133 6.3196ZM5.3231 6.45843C5.10802 6.45843 4.84452 6.47114 4.58999 6.53325C4.44279 6.56917 3.76471 6.73882 3.47608 7.44908C3.15174 8.24719 3.63364 8.86933 3.75832 9.01788C3.9431 9.23802 4.17343 9.4121 4.36403 9.54153L5.88269 7.30512C5.76159 7.22289 5.77398 7.21448 5.82894 7.27996C5.85758 7.31408 5.94673 7.4254 6.00911 7.60946C6.07876 7.81499 6.1177 8.12916 5.98047 8.46683C5.84997 8.78797 5.62675 8.9651 5.49284 9.04671C5.36321 9.12571 5.25893 9.15263 5.23081 9.15949C5.17642 9.17276 5.18995 9.16173 5.3231 9.16173V6.45843ZM4.23823 9.44484L5.52429 10.5592L7.29455 8.51616L6.00849 7.40181L4.23823 9.44484ZM5.09305 9.2309L4.70758 10.8849L7.34033 11.4985L7.7258 9.84446L5.09305 9.2309ZM4.6729 11.1518C4.66635 11.3734 4.65876 11.4066 4.64988 11.6197C4.64705 11.6874 4.64296 11.806 4.65294 11.9315C4.65839 12 4.68026 12.3558 4.92373 12.6956C5.07395 12.9053 5.30495 13.104 5.61868 13.2083C5.91447 13.3067 6.17762 13.2858 6.3497 13.2504C6.64872 13.1889 6.86511 13.0426 6.93214 12.9973C7.10307 12.8819 7.29288 12.7141 7.44162 12.5826L5.65056 10.5577C5.46114 10.7253 5.41361 10.7608 5.41951 10.7568C5.42905 10.7504 5.462 10.7285 5.51307 10.7028C5.55951 10.6794 5.66173 10.632 5.80505 10.6025C5.95216 10.5722 6.19396 10.5508 6.47159 10.6431C6.76716 10.7414 6.98318 10.9285 7.12116 11.1211C7.24527 11.2943 7.29575 11.4554 7.31684 11.5372C7.33927 11.6243 7.34562 11.6907 7.34773 11.7172C7.35154 11.7651 7.34865 11.7846 7.35083 11.7323C7.35196 11.7051 7.36962 11.4141 7.37501 11.2316L4.6729 11.1518ZM7.24356 12.7279L8.69782 11.8519L7.30289 9.53629L5.84862 10.4124L7.24356 12.7279ZM7.30084 11.8506L8.75511 12.7302L10.1541 10.4171L8.69987 9.53752L7.30084 11.8506ZM8.75473 12.73C8.72817 12.7139 8.72345 12.7086 8.77203 12.7445C8.79887 12.7643 8.87336 12.8202 8.92995 12.8612C9.00019 12.912 9.28841 13.1293 9.62677 13.2298C9.78218 13.276 10.3131 13.4107 10.8463 13.0654C11.4232 12.692 11.4968 12.0983 11.5043 11.8721C11.5127 11.6184 11.4612 11.3899 11.4195 11.2371C11.3729 11.066 11.3079 10.8831 11.2313 10.692L8.72224 11.6983C8.77644 11.8335 8.80159 11.9121 8.81145 11.9483C8.82631 12.0027 8.79771 11.9273 8.80249 11.7828C8.80635 11.6658 8.84988 11.1376 9.37713 10.7962C9.86087 10.483 10.3227 10.6165 10.3968 10.6385C10.466 10.6591 10.514 10.6811 10.5353 10.6914C10.5586 10.7027 10.5715 10.7105 10.5719 10.7107C10.573 10.7114 10.5685 10.7087 10.5574 10.7012C10.5465 10.6938 10.5325 10.684 10.5144 10.6709C10.4686 10.6378 10.4426 10.6177 10.3779 10.5699C10.335 10.5382 10.2476 10.4737 10.1545 10.4173L8.75473 12.73ZM11.2933 10.889L10.9078 9.23151L8.27477 9.84385L8.66024 11.5014L11.2933 10.889ZM10.4764 10.5592L11.7625 9.44484L9.99222 7.40181L8.70616 8.51616L10.4764 10.5592ZM11.3479 9.69041C11.5779 9.60499 11.8316 9.48518 12.0568 9.32017C12.1687 9.23817 12.3127 9.11663 12.4415 8.94784C12.5647 8.78658 12.7427 8.4909 12.7591 8.08449C12.8006 7.05456 11.9118 6.67221 11.6778 6.59303C11.3522 6.48286 10.9945 6.45843 10.6811 6.45843V9.16173C10.8955 9.16173 10.904 9.18505 10.8114 9.15373C10.7647 9.13794 10.5948 9.07633 10.4206 8.90404C10.2138 8.69948 10.0419 8.37256 10.058 7.97545C10.0719 7.63125 10.2211 7.40138 10.2928 7.30747C10.3703 7.20603 10.4402 7.15336 10.4588 7.1397C10.4975 7.11136 10.4881 7.12602 10.4067 7.15625L11.3479 9.69041ZM7.30177 8.88166L5.98417 9.67713L7.38134 11.9914L8.69894 11.1959L7.30177 8.88166ZM7.99895 11.1418L8.34938 9.64196L5.71698 9.02691L5.36655 10.5267L7.99895 11.1418ZM7.91888 8.31341L6.75547 7.30419L4.98406 9.34623L6.14748 10.3555L7.91888 8.31341ZM5.98659 9.6718L7.52146 9.53863L7.2878 6.84546L5.75294 6.97862L5.98659 9.6718ZM8.65001 8.71739L9.24573 7.30518L6.75498 6.25448L6.15925 7.6667L8.65001 8.71739ZM6.75562 7.30669L7.35484 8.72241L9.84432 7.66869L9.24509 6.25297L6.75562 7.30669ZM8.48276 9.54214L10.0176 9.6753L10.2513 6.98212L8.71641 6.84896L8.48276 9.54214ZM9.24874 7.30769L8.08533 8.31692L9.85674 10.359L11.0201 9.34973L9.24874 7.30769ZM7.65483 9.64546L8.00526 11.1453L10.6377 10.5302L10.2872 9.03041L7.65483 9.64546ZM10.0209 9.68117L8.69983 8.8822L7.30088 11.1954L8.62198 11.9943L10.0209 9.68117Z",
|
||
fill:"#292B2F",mask:"url(#path-4-inside-2_1378_82282)"})]})]}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("clipPath",{id:"clip0_1378_82282",children:(0,r.jsx)("rect",{width:"16",height:"16",fill:"white"})}),(0,r.jsx)("clipPath",{id:"clip1_1378_82282",children:(0,r.jsx)("rect",{width:"12.4444",height:"12.4444",fill:"white",transform:"translate(1.77783 2.66602)"})})]})]})}var _=n(734691),w=n(736818),x=n(189865),P=n(652591),N=n(516659),A=n(483255),T=n(2590),Z=n(473708),M=n(170487),R=n.n(M);function L(e){var t=e.streamLengthRequirement,n=e.viewerCountRequirement,o=(0,c.e7)([j.Z],(function(){return j.Z.currentDropQuestStreamProgress})),i=Math.floor(o/100*t).toString();return(0,r.jsxs)("div",{children:[(0,r.jsx)(f.xvT,{variant:"text-sm/bold",className:R().progressBarCount,children:Z.Z.Messages.DROPS_STREAM_PROGRESS_INDICATOR.format({minutesStreamed:i,streamLengthRequirement:t})}),(0,r.jsx)("div",{className:R().progressBarContainer,children:(0,r.jsx)("div",{className:R().progressBarOuter,
|
||
children:(0,r.jsx)("div",{className:R().progressBarInner,style:{width:"".concat(o,"%")}})})}),(0,r.jsxs)(f.xvT,{variant:"text-xs/medium",className:R().viewerCount,children:["*",Z.Z.Messages.DROPS_REQUIRE_NUM_VIEWERS.format({numViewers:n}),"*"]})]})}function D(e){var t=e.onClose,n=e.tooltipAction,o=e.partnerGame,i=(0,N.au)(o);(0,N.op)(o);var a=(0,c.e7)([w.default],(function(){return w.default.getId()}));if(null==i)return null;var l=i.config,u=l.streamLengthRequirement,s=l.viewerCountRequirement,d=i.drop,p=function(e,t,n){var r=t.assets.tooltipSrc;switch(e){case A._e.STREAM_CTA:return{header:Z.Z.Messages.DROP_ENROLLMENT_CTA_TOOLTIP_HEADER.format({gameName:t.title}),body:t.messages.enrollmentTooltip(n),imgSrc:r,imgStyle:R().dropImgPreStreamNotice};case A._e.TRACK_PROGRESS:return{header:Z.Z.Messages.DROP_ENROLLMENT_CTA_TOOLTIP_HEADER.format({gameName:t.title}),body:"",imgSrc:r,imgStyle:R().dropImgProgressTracker};case A._e.QUEST_COMPLETION:return{
|
||
header:Z.Z.Messages.DROPS_QUEST_COMPLETION_TOOLTIP_HEADER,body:t.messages.completionTooltip(n),imgSrc:r,imgStyle:R().dropImgQuestCompletion};case A._e.LOADING_INITIAL_PROGRESS:return{header:"",body:"",imgSrc:r,imgStyle:R().dropImgPreStreamNotice}}}(n,d,u),h=p.header,y=p.body,b=p.imgSrc,v=p.imgStyle,m=function(){P.default.track(T.rMx.DROPS_ACTIVITY_PANEL_POPOVER_CTA_CLICK,{user_id:a,drops_quest_id:d.dropsQuestId,game_id:d.dropsGameId,game_name:d.title.toLowerCase(),tooltip_action:n})},g=function(){t()};return(0,r.jsxs)("div",{className:R().container,children:[(0,r.jsx)("img",{src:b,alt:"",className:v}),(0,r.jsx)(f.P3F,{className:R().buttonClose,"aria-label":Z.Z.Messages.CLOSE,onClick:g,children:(0,r.jsx)(x.Z,{width:16,height:16,className:R().closeIcon})}),n===A._e.LOADING_INITIAL_PROGRESS?(0,r.jsx)(f.$jN,{className:R().spinner}):(0,r.jsx)(f.X6q,{className:R().title,variant:"heading-md/extrabold",children:h}),n===A._e.TRACK_PROGRESS?(0,r.jsx)(L,{streamLengthRequirement:u,
|
||
viewerCountRequirement:s}):(0,r.jsx)(f.xvT,{variant:"text-sm/medium",className:R().subTitle,children:y}),n===A._e.QUEST_COMPLETION?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.zxk,{look:f.zxk.Looks.INVERTED,fullWidth:!0,onClick:function(){t();_.Z.open(T.oAB.INVENTORY);m()},children:Z.Z.Messages.REDEEM}),(0,r.jsx)(f.zxk,{className:R().linkButtonContainer,innerClassName:R().linkButton,onClick:g,look:f.zxk.Looks.LINK,fullWidth:!0,color:f.zxk.Colors.WHITE,children:Z.Z.Messages.NOT_NOW})]}):(0,r.jsx)(f.zxk,{look:f.zxk.Looks.INVERTED,fullWidth:!0,onClick:function(){t();_.Z.open(T.oAB.INVENTORY);m()},children:Z.Z.Messages.LEARN_MORE}),(0,r.jsx)("div",{className:R().pointer})]})}
|
||
var k=n(924066),U=n(866926),B=n(974760),F=n(216299),G=n(944514),H=n(371607),V=n(177570),W=n(61209),z=n(959207),Y=n(5544),K=n(567403),q=n(736097),Q=n(682776),X=n(491260),J=n(671723),$=n(715107),ee=n(375759),te=n(641277),ne=n(776009),re=n(542231),oe=n(634193),ie=n(633531),ae=n(226919),le=n(203742),ue=n(81308),ce=n(168775),se=n(630781),fe=n(984479),de=n(531441),pe=n(977005),he=n(120415),ye=n(714614),be=n.n(ye);function ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function me(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function ge(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){me(i,r,o,a,l,"next",e)}function l(e){me(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ee(e,t,n){t in e?Object.defineProperty(e,t,{value:n,
|
||
enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ce(e){Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Ce(e)}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ee(e,t,n[t])}))}return e}function Se(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ie(e,t){
|
||
if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function _e(e,t){return!t||"object"!==Pe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function we(e,t){we=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return we(e,t)}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()
|
||
}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ve(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Pe=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var o=Ce(this).constructor;n=Reflect.construct(r,arguments,o)
|
||
}else n=r.apply(this,arguments);return _e(this,n)}}var Ae=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}
|
||
i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};var Te=(0,p.Z)((function(e){var t=e.message;return(0,r.jsx)(se.Z,{children:t})})),Ze=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&we(e,t)}(o,e);var t=Ne(o);function o(){Oe(this,o);var e;(e=t.apply(this,arguments)).state={isDropsActivityPanelTooltipOpen:!1,showDropsSparkles:e.props.showDropsSparkles};e.handleClickGoLiveButton=function(){var t=e.props,o=t.guildId,i=t.voiceChannel,a=null!=i?i.getGuildId():o;(0,f.ZDy)(ge((function(){var e,t;return Ae(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(17629)]).then(n.bind(n,417629))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,Se(je({},e),{selectSource:!1,guildId:a,
|
||
analyticsLocation:T.Sbl.ACTIVITY_PANEL}))}]}}))}))).then((function(t){null!=t&&(e.modalKey=t)}))};e.handleClickStopStreamingButton=function(){var t=e.props.stream;(0,H.Z)(t)};e.handleClickInviteButton=function(){var t=e.props,n=t.activity,r=t.analyticsContext;u()(null!=n,"Received null activity");P.default.track(T.rMx.OPEN_MODAL,{type:"Send Join Invite",application_id:n.application_id,location:r.location});(0,d.h7)(n,!1)};e.handleClickDropsButton=function(){var t=e.props,n=t.dropsPartnerGame,r=t.dropsTooltipAction,o=t.userId;if(null!=n){var i=(0,S.BS)(n);if(null!=i){P.default.track(T.rMx.DROPS_ACTIVITY_PANEL_BUTTON_CLICK,{user_id:o,drops_quest_id:i.dropsQuestId,game_id:i.dropsGameId,game_name:i.title.toLowerCase(),show_sparkles:e.state.showDropsSparkles,tooltip_action:r});e.setState({isDropsActivityPanelTooltipOpen:!e.state.isDropsActivityPanelTooltipOpen,showDropsSparkles:!1})}}};e.handleClickLeaveEmbeddedActivityButton=function(t,n){
|
||
var r=e.props,o=r.embeddedActivity,i=r.isLastEligibleEmbeddedActivityHost;return function(){i&&null!=o?(0,g.Z)({embeddedActivity:o,channelId:n.id,shouldDisconnectCall:!1}):(0,b.mW)({channelId:n.id,applicationId:t.id})}};e.renderClipsButton=function(){var t=e.props,n=t.stream,o=t.clipsEnabled;return null!=n&&o?(0,r.jsx)(ce.Z,{tooltipText:Z.Z.Messages.CLIPS_EDIT_SAVE_CLIP,onClick:O.C1,icon:oe.Z,iconForeground:be().actionIcon}):null};return e}var i=o.prototype;i.componentDidUpdate=function(e){!e.dropsActivityPanelExperienceBlocked&&this.props.dropsActivityPanelExperienceBlocked&&this.setState({isDropsActivityPanelTooltipOpen:!1})};i.isJoinableActivity=function(){var e=this.props,t=e.application,n=e.activity,r=e.embeddedActivity;return null!=t&&(null!=n?n.application_id===t.id&&n.type===T.IIU.PLAYING&&(0,m.Z)(n,T.xjy.JOIN):null!=r&&r.application_id===t.id)};i.renderGoLiveButton=function(){
|
||
var e,t,n,o,i=this.props,a=i.canGoLive,l=i.guildId,u=i.isStreaming,c=i.voiceChannel,s=i.canStream,f=i.runningGame,d=i.embeddedActivity;if(null==f&&null!=d)return null;if(!(u||a&&null!=f))return null;if(u){e=!1;t=this.handleClickStopStreamingButton;n=le.Z;o=Z.Z.Messages.STOP_STREAMING}else if(s){e=!1;t=this.handleClickGoLiveButton;n=ue.Z;o=null!=f?Z.Z.Messages.ACTIVITY_PANEL_GO_LIVE_STREAM_GAME.format({game:f.name}):Z.Z.Messages.ACTIVITY_PANEL_GO_LIVE}else{e=!0;t=null;n=ue.Z;o=null!=c?Z.Z.Messages.ACTIVITY_PANEL_GO_LIVE_TOOLTIP_NO_PERMISSION_IN_VOICE:null!=l?Z.Z.Messages.ACTIVITY_PANEL_GO_LIVE_TOOLTIP_NO_PERMISSION_IN_GUILD:Z.Z.Messages.ACTIVITY_PANEL_GO_LIVE_TOOLTIP_NOT_IN_GUILD}return(0,r.jsx)("div",{className:be().panelButtonContainer,children:(0,r.jsx)(ce.Z,{tooltipText:o,disabled:e,onClick:t,icon:n,iconForeground:be().actionIcon})})};i.renderInviteButton=function(){var e=this.props.embeddedActivity;return this.isJoinableActivity()&&null==e?(0,r.jsx)(ce.Z,{
|
||
tooltipText:Z.Z.Messages.INVITE_EMBED_INVITE_TO_JOIN,onClick:this.handleClickInviteButton,icon:ae.Z,iconForeground:be().actionIcon}):null};i.renderDropsButton=function(){var e=this,t=this.props,n=t.dropsTooltipAction,o=t.dropsPartnerGame;if(null==o)return null;var i=this.state.isDropsActivityPanelTooltipOpen,a=function(){return e.setState({isDropsActivityPanelTooltipOpen:!1})};return(0,r.jsx)(f.yRy,{shouldShow:i,position:"top",align:"center",onRequestClose:a,renderPopout:function(){return(0,r.jsx)(D,{partnerGame:o,tooltipAction:n,onClose:a})},children:function(){return(0,r.jsxs)(r.Fragment,{children:[e.state.showDropsSparkles&&e.renderSparkles(),(0,r.jsx)(ce.Z,{"aria-label":Z.Z.Messages.DROPS_ENABLED,tooltipText:i?null:Z.Z.Messages.DROPS_ENABLED,onClick:e.handleClickDropsButton,icon:I})]})}})};i.renderLeaveEmbeddedActivityButton=function(){var e=this.props,t=e.application,n=e.embeddedActivity,o=e.voiceChannel;return null==n||null==t||null==o?null:(0,r.jsx)(ce.Z,{
|
||
tooltipText:Z.Z.Messages.EMBEDDED_ACTIVITIES_LEAVE_ACTIVITY,onClick:this.handleClickLeaveEmbeddedActivityButton(t,o),icon:ie.Z,iconForeground:be().actionIcon})};i.renderSparkles=function(){var e=this.props.useReducedMotion;function t(){return(t=ge((function(){var e;return Ae(this,(function(t){switch(t.label){case 0:return[4,n.e(29615).then(n.t.bind(n,229615,19))];case 1:e=t.sent();return[2,e.default]}}))}))).apply(this,arguments)}return(0,r.jsx)("div",{className:be().sparkleContainer,children:(0,r.jsx)(ne.Z,{importData:function(){return t.apply(this,arguments)},shouldAnimate:!e,className:be().sparkles})})};i.renderActions=function(){var e=this.renderGoLiveButton(),t=this.renderDropsButton(),n=this.renderInviteButton(),o=this.renderLeaveEmbeddedActivityButton(),i=this.renderClipsButton();return null==e&&null==n&&null==o?null:(0,r.jsxs)("div",{className:be().actions,children:[e,n,null==e?o:i,t]})};i.getGameName=function(){var e=this.props,t=e.runningGame,n=e.application
|
||
;return null!=n?n.name:null!=t?t.name:Z.Z.Messages.STATUS_UNKNOWN};i.renderGame=function(){var e=this.props,t=e.isStreaming,n=e.dropsPartnerGame,o=e.application,i=e.runningGame,l=this.getGameName();return(0,r.jsxs)("div",{className:a()(be().gameWrapper,Ee({},be().clickableGameWrapper,null!=o)),children:[(0,r.jsxs)("div",{className:be().gameIconWrapper,children:[(0,r.jsx)(te.Z,{className:be().gameIcon,game:o,pid:null==i?void 0:i.pid}),t?(0,r.jsx)(re.Z,{className:be().liveBadge}):null]}),(0,r.jsx)("div",{className:a()(be().info,Ee({},be().infoWithDrops,null!=n)),children:null!=l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(fe.Z,{children:l}),null!=n&&(0,r.jsx)("div",{className:be().dropsBadgeWrapper,children:(0,r.jsx)(de.IG,{text:Z.Z.Messages.DROPS_AVAILABLE,color:s.Z.unsafe_rawColors.BRAND_500.css,className:be().dropsBadge})})]}):null})]})};i.renderScreenshare=function(){var e=this.props,t=e.isStreaming,n=e.dropsPartnerGame,o=e.streamMetadata,i=(0,B.Z)(o),l=i.title,u=i.sanitizedTitle
|
||
;return(0,r.jsxs)("div",{className:be().gameWrapper,children:[t?(0,r.jsx)(F.Z,{title:u}):(0,r.jsx)(pe.ZP,{look:pe.ZP.Looks.GRAY,size:pe.ZP.Sizes.SMALL,className:be().liveIndicator}),(0,r.jsxs)("div",{className:a()(be().info,Ee({},be().infoWithDrops,null!=n)),children:[(0,r.jsx)(fe.Z,{children:l}),null!=n&&(0,r.jsx)("div",{className:be().dropsBadgeWrapper,children:(0,r.jsx)(de.IG,{text:Z.Z.Messages.DROPS_AVAILABLE,color:s.Z.unsafe_rawColors.BRAND_500.css,className:be().dropsBadge})})]})]})};i.renderEmbeddedActivity=function(){var e=this.props,t=e.application,n=e.embeddedActivity;if(null==n)return null;var o,i={start:n.connectedSince};return(0,r.jsxs)("div",{className:be().gameWrapper,children:[(0,r.jsx)(te.Z,{className:be().gameIcon,game:t}),(0,r.jsxs)("div",{className:be().info,children:[(0,r.jsx)(fe.Z,{children:null!==(o=null==n?void 0:n.name)&&void 0!==o?o:"Unknown"}),(0,r.jsx)(Te,{timestamps:i})]})]})};i.render=function(){
|
||
var e=this,t=this.props,n=t.canGoLive,o=t.embeddedActivity,i=t.runningGame,l=t.isStreaming,u=t.streamMetadata,c=t.className;if(!l){if(!this.isJoinableActivity()&&!n)return null;if(null==i&&null==o)return null}return(0,r.jsx)("div",{className:a()(be().panel,c),children:(0,r.jsxs)("div",{className:be().body,children:[null==i||l&&null==(null==u?void 0:u.pid)?null!=o?e.renderEmbeddedActivity():e.renderScreenshare():e.renderGame(),this.renderActions()]})})};return o}(o.PureComponent);const Me=(0,h.Z)((function(e){var t=e.guildId,n=Ie(e,["guildId"]),o=(0,c.e7)([w.default],(function(){return w.default.getId()})),i=(0,c.e7)([J.ZP,ee.Z],(function(){return(0,G.Z)(J.ZP,ee.Z)})),a=(0,c.e7)([$.Z,W.Z],(function(){return W.Z.getChannel($.Z.getVoiceChannelId())})),l=xe((0,c.Wu)([V.Z],(function(){return[V.Z.getCurrentUserActiveStream(),V.Z.getStreamerActiveStreamMetadata()]})),2),u=l[0],s=l[1],f=(0,c.e7)([y.Z],(function(){return y.Z.useReducedMotion})),d=(0,c.e7)([j.Z],(function(){
|
||
return j.Z.getActivityPanelTooltipAction()})),p=xe((0,c.Wu)([K.Z,Q.Z,v.ZP,z.Z,Y.ZP],(function(){var e=!1,n=null;if(null!=a){e=k.JL(a,K.Z,Q.Z,!1);n=v.ZP.getSelfEmbeddedActivityForChannel(a.id)}else if(null!=t){e=k.h_(Y.ZP.getChannels(t),K.Z,Q.Z).length>0}var r=null;null!=s&&null!=s.id?r=z.Z.getGame(s.id):null!=i?r=z.Z.getGameByGameData(i):null!=n&&(r=z.Z.getGame(n.application_id));return[e,n,r]})),3),h=p[0],b=p[1],m=p[2],g=(0,c.e7)([v.ZP],(function(){return null!=m&&v.ZP.isLastEligibleHost(o,m.id)})),O=(0,c.e7)([q.Z],(function(){return(0,U.Z)(q.Z)&&(0,he.ED)()})),S=(0,c.e7)([X.Z],(function(){return null!=o?X.Z.findActivity(o,(function(e){return e.type===T.IIU.PLAYING})):null})),I=(0,E.G)(),_=(0,c.e7)([C.Z],(function(){return C.Z.getSettings().clipsEnabled})),x=null!=u&&u.ownerId===o&&u.state!==T.jm8.ENDED;return(0,r.jsx)(Ze,Se(je({},n),{guildId:t,canGoLive:O,activity:S,embeddedActivity:b,showDropsSparkles:!1,dropsPartnerGame:null,dropsActivityPanelExperienceBlocked:!1,userId:o,
|
||
runningGame:i,application:m,useReducedMotion:f,isStreaming:x,voiceChannel:a,canStream:h,dropsTooltipAction:d,stream:u,streamMetadata:s,isLastEligibleEmbeddedActivityHost:g,clipsEnabled:I&&_}))}))},37707:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(336194),a=n(707961),l=n(396043),u=n(64234),c=n(6171),s=n(652591),f=n(2590),d=n(473708),p=n(482196),h=n.n(p),y=n(913198),b=n.n(y);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function g(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){
|
||
i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,
|
||
r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function C(e){var t=e.onClose,p=e.onConfirm,y=e.onCancel,v=e.channel,C=e.analyticsType,j=e.popoutText,S=e.animation;o.useEffect((function(){s.default.track(f.rMx.OPEN_POPOUT,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){g(e,t,n[t])}))}return e}({type:C},(0,l.v_)(v)))}),[C,v]);var I=o.useCallback((function(){null==p||p();t()}),[p,t]),_=o.useCallback((function(){null==y||y();t()}),[y,t]),w=o.useRef(null);o.useEffect((function(){var e,t,r=u.Z.theme,o=!1;null!=S&&(t=function(){var t,i,a,l;return E(this,(function(u){switch(u.label){case 0:return[4,Promise.all([Promise.resolve().then(n.t.bind(n,211248,23)),r===f.BRd.DARK?S.dark():S.light()])];case 1:t=O.apply(void 0,[u.sent(),2]),i=t[0],a=i.default,l=t[1];if(o)return[2];e=a.loadAnimation({container:w.current,renderer:"svg",loop:!0,autoplay:!0,animationData:l});return[2]}}))},function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){m(i,r,o,a,l,"next",e)}function l(e){m(i,r,o,a,l,"throw",e)}a(void 0)}))})()
|
||
;return function(){o=!0;if(null!=e){e.destroy();e=void 0}}}),[S]);return(0,r.jsx)(a.VqE,{"aria-labelledby":"content-warning-popout-label",children:(0,r.jsxs)("form",{className:h().contentWarningPopout,onSubmit:I,children:[(0,r.jsxs)("div",{className:h().body,children:[null!=S&&(0,r.jsx)("div",{className:h().animation,ref:w}),(0,r.jsxs)("div",{className:h().content,children:[(0,r.jsx)("div",{className:h().header,children:d.Z.Messages.SELF_XSS_HEADER}),(0,r.jsx)(a.xvT,{id:"content-warning-popout-label",className:b().markup,variant:"text-sm/normal",children:j.body}),(0,r.jsxs)("div",{className:h().buttonWrapper,children:[(0,r.jsxs)("div",{className:h().buttonContainer,children:[(0,r.jsx)(a.zxk,{className:h().button,color:a.zxk.Colors.PRIMARY,onClick:_,children:d.Z.Messages.EDIT_MESSAGE}),(0,r.jsx)(a.xvT,{variant:"text-xs/normal",className:h().buttonHint,children:d.Z.Messages.EVERYONE_POPOUT_ESC.format()})]}),(0,r.jsxs)("div",{className:h().buttonContainer,children:[(0,r.jsx)(a.zxk,{
|
||
className:h().button,onClick:I,type:"submit",autoFocus:!0,children:d.Z.Messages.EVERYONE_POPOUT_SEND_NOW}),(0,r.jsx)(a.xvT,{variant:"text-xs/normal",className:h().buttonHint,children:d.Z.Messages.EVERYONE_POPOUT_ENTER.format()})]})]})]})]}),null!=j.footer&&""!==j.footer?(0,r.jsxs)("div",{className:h().footer,children:[(0,r.jsx)(c.Z,{color:i.Z.unsafe_rawColors.PRIMARY_400.css,className:h().icon}),(0,r.jsx)(a.xvT,{variant:"text-sm/normal",children:j.footer})]}):null]})})}},341305:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(785893),o=n(667294),i=n(202351),a=n(423427),l=n(773011),u=n(284610),c=n(747126),s=n(746477),f=n(50433),d=n(682776),p=n(840922),h=n(473903),y=n(930948),b=n(15084),v=n(665328),m=n(949995),g=n(2590),O=n(473708);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const j=function(e){var t=e.className,n=e.style,E=e.channel,j=e.draftType,S=C(o.useState(!0),2),I=S[0],_=S[1],w=(0,i.e7)([f.Z],(function(){return f.Z.hasLayers()})),x=(0,i.e7)([d.Z],(function(){
|
||
return null!=E&&d.Z.can(g.Plq.ATTACH_FILES,E)}),[E]),P=null!=(0,i.e7)([a.Z],(function(){return a.Z.getActiveCommand(E.id)})),N=E.getGuildId(),A=j===u.d.FirstThreadMessage,T=(0,i.e7)([h.default],(function(){var e;return!0==!(null===(e=h.default.getCurrentUser())||void 0===e?void 0:e.nsfwAllowed)})),Z=(0,i.e7)([c.Z],(function(){return c.Z.didAgree(N)}))&&!T,M=o.useMemo((function(){return!w&&(E.isPrivate()&&!E.isManaged()||null!=N&&(!E.isNSFW()||Z)&&x&&s.Z.canChatInGuild(N))}),[x,Z,E,N,w]),R=A?E.type===g.d4z.GUILD_FORUM?O.Z.Messages.UPLOAD_TO_NEW_POST:O.Z.Messages.UPLOAD_TO_NEW_THREAD:I?O.Z.Messages.UPLOAD_TO.format({destination:(0,l.F6)(E,h.default,p.Z,!0)}):O.Z.Messages.UPLOAD_AREA_TITLE_NO_CONFIRMATION;return P||!M?null:(0,r.jsx)(v.Z,{className:t,style:n,title:R,description:A?O.Z.Messages.UPLOAD_AREA_NEW_THREAD_HELP:O.Z.Messages.UPLOAD_AREA_HELP,icons:m.J6,onDrop:function(e){if(P)return!1;if(M&&null!=E){(0,b.d)(e,E,j,{requireConfirm:I,showLargeMessageDialog:!1})
|
||
;y.S.dispatchToLastSubscribed(g.CkL.TEXTAREA_FOCUS)}},onDragClear:function(){return _(!0)},onDragOver:function(e){if(P)return!1;A||e.shiftKey!==I||_(!e.shiftKey)}})}},665328:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(159895),c=n(799066),s=n(793008),f=n(444663),d=n(473708),p=n(36627),h=n.n(p),y=n(587161),b=n.n(y);function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function g(e){g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return g(e)}function O(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e,t){E=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e}
|
||
;return E(e,t)}var C=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function S(){return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:a()(b().sparkleWhite,h().sparkleOne)}),(0,r.jsx)("div",{className:a()(b().sparkleWhite,h().sparkleTwo)}),(0,r.jsx)("div",{className:a()(b().lightWhite,h().lightOne)}),(0,r.jsx)("div",{className:a()(b().lightWhite,h().lightTwo)}),(0,r.jsx)("div",{className:a()(b().crossWhite,h().crossOne)}),(0,r.jsx)("div",{className:a()(b().crossWhite,h().crossTwo)}),(0,r.jsx)("div",{
|
||
className:a()(b().popWhite,h().popOne)})]})}const I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&E(e,t)}(n,e);var t=j(n);function n(){v(this,n);var e;(e=t.apply(this,arguments)).state={isDragging:!1,isOverZone:!1};e.dragOverTimeout=null;e.elementDOMRef=o.createRef();e.isAllDropFiles=function(e){for(var t=0;t<e.length;t++)try{var n,r=null!==(n=e[t].webkitGetAsEntry())&&void 0!==n?n:e[t].getAsEntry();if(r&&!r.isFile)return!1}catch(e){continue}return!0};e.preventUnwantedDrop=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.dataTransfer;if(null==r)return!0;var o=Array.isArray(r.types)&&-1!==r.types.indexOf("text/uri-list")&&-1===r.types.indexOf("application/json"),i=null!=r.items&&!e.isAllDropFiles(r.items);if(o||i){t.stopPropagation();t.preventDefault();r.effectAllowed="none"
|
||
;r.dropEffect="none";if(n){e.setState({isDragging:!1});(0,f.openUploadError)({title:d.Z.Messages.UPLOAD_AREA_INVALID_FILE_TYPE_TITLE,help:d.Z.Messages.UPLOAD_AREA_INVALID_FILE_TYPE_HELP,icons:e.props.icons})}return!1}return!0};e.handleDragOver=function(t){var n,r;if(!e.preventUnwantedDrop(t))return!1;var o=t.dataTransfer;if(null!=o){o.dropEffect="copy";(0,l.nfh)(f.UPLOAD_ERROR_MODAL_KEY)&&(0,l.Mr3)(f.UPLOAD_ERROR_MODAL_KEY);t.stopPropagation();t.preventDefault();null===(r=(n=e.props).onDragOver)||void 0===r||r.call(n,t);if(!e.state.isDragging){var i;(0,u.I6)(c.Z);var a=null===(i=e.elementDOMRef.current)||void 0===i?void 0:i.ownerDocument.defaultView;(null!=a&&o.types instanceof a.DOMStringList&&o.types.contains("application/x-moz-file")||-1!==o.types.indexOf("Files"))&&e.setState((function(e){return e.isDragging?{}:{isDragging:!0}}))}clearTimeout(e.dragOverTimeout);e.dragOverTimeout=setTimeout((function(){var t,n;e.setState({isDragging:!1})
|
||
;null===(n=(t=e.props).onDragClear)||void 0===n||n.call(t)}),1e3)}};e.handleDragOverZone=function(){e.setState({isOverZone:!0})};e.handleDragLeaveZone=function(){e.setState({isOverZone:!1})};e.handleDragLeave=function(t){if(e.state.isDragging){t.stopPropagation();t.preventDefault();e.clearDragging()}};e.clearDragging=function(){var t,n;e.setState({isDragging:!1,isOverZone:!1});null===(n=(t=e.props).onDragClear)||void 0===n||n.call(t)};e.handleDrop=function(t){if(!e.preventUnwantedDrop(t,!0))return!1;var n=t.dataTransfer;if(null==n)return!0;if(e.state.isDragging){t.preventDefault();t.stopPropagation();e.props.onDrop(n.files);e.clearDragging()}};return e}var i=n.prototype;i.componentDidMount=function(){var e=this.elementDOMRef.current;if(null!=e){e.ownerDocument.body.addEventListener("dragover",this.handleDragOver,!1);e.ownerDocument.body.addEventListener("drop",this.handleDragLeave,!1);e.addEventListener("dragover",this.handleDragOverZone,!1)
|
||
;e.addEventListener("dragleave",this.handleDragLeaveZone,!1);e.addEventListener("drop",this.handleDrop,!1)}};i.componentWillUnmount=function(){var e=this.elementDOMRef.current;if(null!=e){e.ownerDocument.body.removeEventListener("dragover",this.handleDragOver,!1);e.ownerDocument.body.removeEventListener("drop",this.handleDragLeave,!1);e.removeEventListener("dragover",this.handleDragOverZone,!1);e.removeEventListener("dragleave",this.handleDragLeaveZone,!1);e.removeEventListener("drop",this.handleDrop,!1)}clearTimeout(this.dragOverTimeout)};i.render=function(){var e,t=this.props,n=t.title,o=t.description,i=t.icons,l=t.style,u=t.className;return(0,r.jsx)("div",{ref:this.elementDOMRef,className:a()(u,h().uploadArea,(e={},m(e,h().droppable,this.state.isDragging),m(e,h().uploadModalIn,this.state.isOverZone),e)),style:l,children:(0,r.jsxs)("div",{className:h().uploadDropModal,children:[this.state.isDragging&&(0,r.jsx)(S,{}),(0,r.jsx)("div",{className:h().bgScale}),(0,r.jsxs)("div",{
|
||
className:h().inner,children:[(0,r.jsx)(s.Z,{icons:i}),(0,r.jsx)("div",{className:h().title,children:n}),(0,r.jsx)("div",{className:h().instructions,children:(0,r.jsx)("pre",{children:o})})]})]})})};return n}(o.Component)},704271:(e,t,n)=>{"use strict";n.d(t,{Z:()=>S});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(327499),s=n(473903),f=n(554904),d=n(348592),p=n(2590),h=n(473708),y=n(991320),b=n.n(y);function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e){m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return m(e)}function g(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e,t){O=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return O(e,t)}var E=function(e){
|
||
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&O(e,t)}(n,e);var t=C(n);function n(){v(this,n);var e;(e=t.apply(this,arguments)).scroller=o.createRef();e.handleDisagree=function(){var t=e.props.guild;null!=t&&c.Z.nsfwReturnToSafety(t.id)};e.handleAgree=function(){var t=e.props.guild
|
||
;null!=t&&c.Z.nsfwAgree(t.id)};return e}var i=n.prototype;i.componentDidMount=function(){var e=this.scroller.current;null==e||e.scrollToBottom()};i.render=function(){var e=this.props.nsfwDisallowed,t=h.Z.Messages.NSFW_DESCRIPTION;t=e?h.Z.Messages.AGE_GATE_NSFW_UNDERAGE_BODY.format({helpURL:d.Z.getArticleURL(p.BhN.NSFW_AGE_GATING)}):h.Z.Messages.AGE_GATE_NSFW_DESCRIPTION;var n=e?(0,r.jsx)(f.Z,{onAgree:this.handleAgree,onDisagree:this.handleDisagree,title:h.Z.Messages.AGE_GATE_NSFW_UNDERAGE_HEADER,description:t,agreement:null,disagreement:h.Z.Messages.BACK,imageClassName:b().ageGatedImage}):(0,r.jsx)(f.Z,{onAgree:this.handleAgree,onDisagree:this.handleDisagree,title:h.Z.Messages.NSFW_TITLE,description:t,agreement:h.Z.Messages.NSFW_ACCEPT,disagreement:h.Z.Messages.NSFW_DECLINE});return(0,r.jsx)(u.Den,{ref:this.scroller,className:b().scroller,children:(0,r.jsx)("div",{className:a()(this.props.className,b().wrapper),children:n})})};return n}(o.PureComponent)
|
||
;const S=l.ZP.connectStores([s.default],(function(){var e;return{nsfwDisallowed:!1===(null===(e=s.default.getCurrentUser())||void 0===e?void 0:e.nsfwAllowed)}}))(j)},387927:(e,t,n)=>{"use strict";n.d(t,{Q:()=>d,$:()=>p});var r=n(791216),o=n(660177),i=n(327499),a=n(567403),l=n(682776),u=n(407561),c=n(602397),s=n(2590),f="DRAGGABLE_USER";function d(e){return(0,r.G)(f,{canDrop:function(e){var t,n,r=e.channel,o=r.getGuildId(),i=null!==(n=null===(t=a.Z.getGuild(o))||void 0===t?void 0:t.maxVideoChannelUsers)&&void 0!==n?n:-1,f=c.ZP.countVoiceStatesForChannel(r.id),d=null!=o&&u.Z.hasVideo(r.id)&&i>0&&f>=i+1;return l.Z.can(s.Plq.MOVE_MEMBERS,r)&&l.Z.can(s.Plq.CONNECT,r)&&!d},drop:function(e,t){var n=e.channel,r=u.Z.getVoiceStateForUser(t.getItem().user.id);(null==r?void 0:r.channelId)!==n.id&&i.Z.setChannel(n.getGuildId(),t.getItem().user.id,n.id)}},(function(e,t){return{connectUserDropTarget:e.dropTarget(),isUserOver:t.isOver()&&t.canDrop()}}))(e)}function p(e){return(0,o.E)(f,{
|
||
canDrag:function(e){e.user;var t=e.canDrag;return null!=t&&t},beginDrag:function(e){return{user:e.user}}},(function(e){return{connectUserDragSource:e.dragSource()}}))(e)}},251295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(667294),o=n(539381);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function l(e){a(i,r,o,l,u,"next",e)}function u(e){a(i,r,o,l,u,"throw",e)}l(void 0)}))}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{
|
||
a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}var f=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},
|
||
trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function d(e){
|
||
var t=u(r.useState(!1),2),n=t[0],i=t[1],a=u(r.useState(null),2),s=a[0],d=a[1],p=r.useCallback(l((function(){var t,n,r,a,l=arguments;return f(this,(function(u){switch(u.label){case 0:for(t=l.length,n=new Array(t),r=0;r<t;r++)n[r]=l[r];u.label=1;case 1:u.trys.push([1,3,4,5]);d(null);i(!0);return[4,e.apply(void 0,c(n))];case 2:return[2,u.sent()];case 3:a=u.sent();d(new o.Z(a));return[3,5];case 4:i(!1);return[7];case 5:return[2]}}))})),[e]);return[p,{loading:n,error:s}]}},913549:(e,t,n)=>{"use strict";n.d(t,{y:()=>l,Z:()=>s});var r=n(667294),o=n(496486);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{
|
||
a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l,u;!function(e){e[e.VERTICAL_TOP=0]="VERTICAL_TOP";e[e.VERTICAL_BOTTOM=1]="VERTICAL_BOTTOM";e[e.HORIZONTAL_LEFT=2]="HORIZONTAL_LEFT";e[e.HORIZONTAL_RIGHT=3]="HORIZONTAL_RIGHT"}(l||(l={}));!function(e){e[e.VERTICAL=0]="VERTICAL";e[e.HORIZONTAL=1]="HORIZONTAL"}(u||(u={}));function c(e){return e===l.HORIZONTAL_LEFT||e===l.HORIZONTAL_RIGHT?u.HORIZONTAL:u.VERTICAL}const s=function(e){
|
||
var t=e.initialElementDimension,n=e.resizableDomNodeRef,i=e.maxDimension,s=e.minDimension,f=e.onElementResize,d=e.onElementResizeEnd,p=e.throttleDuration,h=void 0===p?300:p,y=e.orientation,b=e.usePointerEvents,v=void 0!==b&&b,m=a(r.useState(!1),2),g=m[0],O=m[1],E=r.useRef(0),C=r.useRef(null==t?0:t);r.useLayoutEffect((function(){var e=function(e){var t=c(y)===u.HORIZONTAL?e.screenX:e.screenY,n=y===l.VERTICAL_TOP||y===l.HORIZONTAL_LEFT,r=(t-E.current)*(n?-1:1),a=C.current+r;return(0,o.clamp)(a,null!=s?s:0,null!=i?i:a)};if(g&&null!=n.current){var t=(0,o.throttle)(f,h),r=function(r){if(null==n.current)return null;var o=e(r),i=c(y)===u.HORIZONTAL?"width":"height";n.current.style[i]="".concat(o,"px");t(o)},a=function(t){O(!1);var n=e(t);f(n);null==d||d(n)},p=v?"pointerup":"mouseup",b=v?"pointermove":"mousemove",m=n.current.ownerDocument;m.addEventListener(p,a);m.addEventListener(b,r);return function(){m.removeEventListener(p,a);m.removeEventListener(b,r);t.cancel()}}}),[g,f,s,i,y,n,h,d,v])
|
||
;return r.useCallback((function(e){var t=c(y)===u.HORIZONTAL;null!=n.current&&(C.current=t?n.current.offsetWidth:n.current.offsetHeight);E.current=t?e.screenX:e.screenY;O(!0)}),[y,n])}},442921:(e,t,n)=>{"use strict";n.d(t,{Sr:()=>_,Xq:()=>w,Zg:()=>x});var r,o=n(400394),i=n(941248),a=n(484524),l=n(847294),u=n(512566),c=n(196444),s=n(956485),f={binds:["mod+k","mod+t"],comboKeysBindGlobal:!0,action:function(){(0,s.$Z)("KEYBIND","");return!1}},d=n(153080),p=n(469471),h=n(678483),y=n(520522),b=n(877944),v=n(735892),m=n(436703),g=n(886076),O=n(452006),E=n(805181),C=n(2590),j=n(473708);function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map((function(e){var t=_[e];if(null==t)throw new Error("getBindsFor(...): No bind for ".concat(t));return t.binds[0]}))}var _=(S(r={},C.EkH.SERVER_NEXT,y.nq),S(r,C.EkH.SERVER_PREV,y.X3),
|
||
S(r,C.EkH.CHANNEL_NEXT,i.tQ),S(r,C.EkH.CHANNEL_PREV,i.x5),S(r,C.EkH.NAVIGATE_BACK,i.Nx),S(r,C.EkH.NAVIGATE_FORWARD,i.On),S(r,C.EkH.UNREAD_NEXT,E.pd),S(r,C.EkH.UNREAD_PREV,E.wk),S(r,C.EkH.MENTION_CHANNEL_NEXT,E.Nv),S(r,C.EkH.MENTION_CHANNEL_PREV,E.uX),S(r,C.EkH.TOGGLE_PREVIOUS_GUILD,i.$c),S(r,C.EkH.JUMP_TO_GUILD,a.u),S(r,C.EkH.SUBMIT,b.z),S(r,C.EkH.TEXTAREA_FOCUS,v.U),S(r,C.EkH.MARK_CHANNEL_READ,l.f),S(r,C.EkH.MARK_SERVER_READ,u.l),S(r,C.EkH.TOGGLE_MUTE,m.iN),S(r,C.EkH.TOGGLE_DEAFEN,m.oV),S(r,C.EkH.TOGGLE_CATEGORY_COLLAPSED,g.u),S(r,C.EkH.SCROLL_UP,p.B2),S(r,C.EkH.SCROLL_DOWN,p.gN),S(r,C.EkH.SEARCH_EMOJIS,h.S),S(r,C.EkH.TOGGLE_HOTKEYS,O._),S(r,C.EkH.JUMP_TO_FIRST_UNREAD,c.O),S(r,C.EkH.RETURN_TO_AUDIO_CHANNEL,d.F),S(r,C.EkH.CALL_ACCEPT,o.IL),S(r,C.EkH.CALL_START,o.FI),S(r,C.EkH.QUICKSWITCHER_SHOW,f),r),w=S({},C.EkH.QUICKSWITCHER_SHOW,f);function x(){return[{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_NAVIGATE_SERVERS,binds:I(C.EkH.SERVER_PREV,C.EkH.SERVER_NEXT)},{
|
||
description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_NAVIGATE_CHANNELS,binds:I(C.EkH.CHANNEL_PREV,C.EkH.CHANNEL_NEXT)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_NAVIGATE_BACK_FORWARD,binds:I(C.EkH.NAVIGATE_BACK,C.EkH.NAVIGATE_FORWARD)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_UNREAD_CHANNELS,binds:I(C.EkH.UNREAD_PREV,C.EkH.UNREAD_NEXT)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_UNREAD_MENTION_CHANNELS,binds:I(C.EkH.MENTION_CHANNEL_PREV,C.EkH.MENTION_CHANNEL_NEXT),groupEnd:!0},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_PREVIOUS_GUILD,binds:I(C.EkH.TOGGLE_PREVIOUS_GUILD)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_MARK_SERVER_READ,binds:I(C.EkH.MARK_SERVER_READ)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_MARK_CHANNEL_READ,binds:I(C.EkH.MARK_CHANNEL_READ)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_SEARCH_EMOJIS,binds:I(C.EkH.SEARCH_EMOJIS),groupEnd:!0},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_MUTE,
|
||
binds:I(C.EkH.TOGGLE_MUTE)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_TOGGLE_DEAFEN,binds:I(C.EkH.TOGGLE_DEAFEN)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_CALL_ACCEPT,binds:I(C.EkH.CALL_ACCEPT)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_CALL_DECLINE,binds:I(C.EkH.MARK_CHANNEL_READ)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_CALL_START,binds:I(C.EkH.CALL_START),groupEnd:!0},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_SCROLL_CHAT,binds:I(C.EkH.SCROLL_UP,C.EkH.SCROLL_DOWN)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_JUMP_TO_FIRST_UNREAD,binds:I(C.EkH.JUMP_TO_FIRST_UNREAD)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_FOCUS_TEXT_AREA,binds:I(C.EkH.TEXTAREA_FOCUS)},{description:j.Z.Messages.KEYBIND_DESCRIPTION_MODAL_QUICKSWITCHER,binds:I(C.EkH.QUICKSWITCHER_SHOW)}]}},242839:(e,t,n)=>{"use strict";n.d(t,{u:()=>f});var r=n(809784),o=n(26468),i=n(419289),a=n(881532),l=n(930948),u=n(288457),c=n(2590);function s(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){s(e,t,n[t])}))}return e}({POP_LAYER:{binds:["esc"],comboKeysBindGlobal:!0,action:function(e){if((0,i.Vb)())return!1;if(l.S.hasSubscribers(c.CkL.CALL_DECLINE)){l.S.dispatch(c.CkL.CALL_DECLINE);return!1}if(a.Z.close())return!1;if((0,r.k)(e.target)){var t=(0,o.J5)(e.target);if(null==t?void 0:t.hasSubscribers(c.CkL.POPOUT_CLOSE)){t.dispatch(c.CkL.POPOUT_CLOSE);return!1}}if(l.S.hasSubscribers(c.CkL.MODAL_CLOSE)){l.S.dispatch(c.CkL.MODAL_CLOSE);return!1}l.S.dispatch(c.CkL.LAYER_POP_ESCAPE_KEY)}}},u.ZP)},587683:(e,t,n)=>{"use strict";n.d(t,{m:()=>r,o:()=>h})
|
||
;var r,o=n(495414),i=n(242715),a=n(736818),l=n(61209),u=n(584690),c=n(563367),s=n(407561),f=n(652591),d=n(2590);!function(e){e.SELF_VIDEO="self_video";e.SELF_STREAM="self_stream";e.REMOTE_VIDEO="remote_video";e.REMOTE_STREAM="remote_stream";e.CHANGE_VIDEO_BACKGROUND="change_video_background";e.VIDEO_PLAYER="video_player";e.REPLAY_VIDEO_STREAM="replay_video_stream"}(r||(r={}));var p=new Map;var h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.spinnerVisibleStart=null;this.logger=new o.Z(t)}var t=e.prototype;t.onSpinnerStarted=function(){null==this.spinnerVisibleStart&&(this.spinnerVisibleStart=(0,i.zO)())};t.trackSpinnerDuration=function(e,t,n){if(null!=this.spinnerVisibleStart){var r=function(e){var t,n=(null!==(t=p.get(e))&&void 0!==t?t:0)+1;p.set(e,n);return n}(n),o=(0,i.zO)()-this.spinnerVisibleStart;this.spinnerVisibleStart=null
|
||
;if(o<0||o>2e4)this.logger.warn("spinner duration not in [0, ".concat(2e4,"]: ").concat(o," ms\n [").concat(e,", count for stream: ").concat(r,"]"));else{this.logger.info("spinner visible for ".concat(o," ms\n [").concat(e,", count for stream: ").concat(r,"]"));var h=c.Z.getGuildId(),y=s.Z.getUserVoiceChannelId(h,a.default.getId()),b=function(e){if(null!=e){if(e.isGuildVoice())return"guild_voice";if(e.isGuildStageVoice())return"is_stage_channel";if(e.isDM())return"dm";if(e.isGroupDM())return"group_dm"}return null}(l.Z.getChannel(y));f.default.track(d.rMx.VIDEO_SPINNER_SHOWN_V2,{video_spinner_context:e,duration_video_spinner_visible_ms:o,rtc_connection_id:c.Z.getRTCConnectionId(),media_session_id:c.Z.getMediaSessionId(),event_count_for_stream:r,guild_id:h,channel_id:y,channel_type:b,spinning_user_id:t,connection_type:u.Z.getType(),effective_connection_speed:u.Z.getEffectiveConnectionSpeed(),service_provider:u.Z.getServiceProvider()})}}};return e}()},460471:(e,t,n)=>{
|
||
"use strict";n.d(t,{Z:()=>E});var r=n(281110),o=n(101566),i=n(474717),a=n(124453),l=n(473708);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e,t,n){d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}};return d(e,t,n||e)}function p(e){p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){
|
||
return e.__proto__||Object.getPrototypeOf(e)};return p(e)}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}function y(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function b(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?function(e){
|
||
if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e,t){v=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return v(e,t)}var m=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}var O=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){
|
||
return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{
|
||
value:e,writable:!0,configurable:!0}});t&&v(e,t)}(n,e);var t=g(n);function n(){s(this,n);return t.apply(this,arguments)}var u=n.prototype;u.uploadFiles=function(e,t,r){var i=this,a=this;return c((function(){var u;return O(this,(function(c){switch(c.label){case 0:d(p(n.prototype),"upload",i).call(a,{name:l.Z.Messages.ATTACHMENT_PROCESSING},t,e);c.label=1;case 1:c.trys.push([1,5,,6]);a.files=e;if(a._aborted)return[2];u=new AbortController;a._handleStart((function(){return u.abort()}));return[4,a.compressAndCheckFileSize()];case 2:if(!c.sent())return[2];a.setUploadingTextForUI();return[4,(0,o.$)(a.files,!0,a._recomputeProgress.bind(a))];case 3:c.sent();return[4,a._createMessage(u.signal,t,r)];case 4:return[2,c.sent()];case 5:c.sent();a._handleError({});return[3,6];case 6:return[2]}}))}))()};u._createMessage=function(e,t,n){var o=this;return c((function(){var l,u,c,s,f,d,p;return O(this,(function(b){switch(b.label){case 0:l=[];o.files.forEach((function(e,t){var n=(0,a.B)(e,t)
|
||
;e.item.platform===i.ow.WEB&&l.push(h({},n))}));u=null!=n&&null!=t?o._addAttachmentsToPayload(t,n,l):y(h({},t),{attachments:l});c={url:o._url,body:u,signal:e};s="POST"===o._method?r.Z.post:r.Z.patch;b.label=1;case 1:b.trys.push([1,3,,4]);return[4,s(c)];case 2:f=b.sent();o._handleComplete(f.body);return[3,4];case 3:d=b.sent();o._handleError({code:null==d||null===(p=d.body)||void 0===p?void 0:p.code,body:null==d?void 0:d.body});return[3,4];case 4:return[2]}}))}))()};return n}(o.Z)},173242:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Q});var r=n(785893),o=n(667294),i=n(707961),a=n(744564),l=n(301928),u=n(294184),c=n.n(u),s=n(318715),f=n(308739),d=n(153686),p=n(19585),h=n(607739),y=n(288634),b=n(549069),v=n(451936),m=n(473903),g=n(107364),O=n(366007),E=n(443812),C=n(558820),j=n(95891),S=n(652591),I=n(775173),_=n(120415),w=n(310126),x=n(224813),P=n(308921);const N={acceptInvite:function(e){var t=this,n=x.Z.getInviteContext("Desktop Invite Modal",e);x.Z.acceptInvite({inviteKey:e.code,context:n,
|
||
callback:function(e){null==e||null==e.guild||null==e.channel||__OVERLAY__||x.Z.transitionToInvite(e)}}).then((function(){return t.close()}),(function(e){a.Z.dispatch({type:"INVITE_MODAL_ERROR",message:(0,P.O)(e.code)})}))},close:function(){a.Z.dispatch({type:"INVITE_MODAL_CLOSE"})}};var A=n(353049),T=n(2590),Z=n(203600),M=n(473708),R=n(343695),L=n.n(R),D=n(518280),k=n.n(D);function U(){var e=(0,p.Z)(d.Z.PREMIUM_UPSELL_TOOLTIP),t=e.analyticsLocations,n=e.sourceAnalyticsLocations;o.useEffect((function(){S.default.track(T.rMx.PREMIUM_UPSELL_VIEWED,{type:Z.cd.GUILD_CAP_INLINE_INVITE_MODAL,location:{page:T.ZY5.NATIVE_INVITE_MODAL},location_stack:n})}),[n]);return(0,r.jsxs)(i.P3F,{onClick:function(){return(0,b.Z)({analyticsSource:{page:T.Sbl.EXTERNAL_INVITE_LINK_MODAL},analyticsLocation:{page:T.Sbl.EXTERNAL_INVITE_LINK_MODAL,section:T.jXE.GUILD_CAP_UPSELL_MODAL},analyticsLocations:t})},className:L().experimentUpsellError,children:[(0,r.jsx)(j.Z,{width:24,height:24,
|
||
className:L().experimentUpsellIcon,color:O.JX.PREMIUM_TIER_2}),(0,r.jsx)("span",{className:L().experimentUpsellText,children:M.Z.Messages.GUILD_CAP_UPSELL_TOOLTIP}),(0,r.jsx)("span",{className:L().experimentGetNitro,children:M.Z.Messages.GUILD_CAP_UPSELL_GET_NITRO})]})}function B(e){var t=e.transitionState,n=function(){null!=l&&N.acceptInvite(l)};(0,s.ZP)([m.default],(function(){var e;return null===(e=m.default.getCurrentUser())||void 0===e?void 0:e.premiumType}));var a=(0,s.cj)([A.Z],(function(){return A.Z.getProps()})),l=a.invite,u=a.error,b=a.submitting;o.useEffect((function(){if(!__OVERLAY__){(0,_.ED)()?w.default.minimize():w.default.restore();w.default.focus()}}),[]);var O=(0,E.Dt)(),j=(0,p.Z)(d.Z.INVITE_MODAL).AnalyticsLocationProvider;if(null==l||null==l.channel)return null;var S,x,P=l.guild,T=l.channel,Z=l.inviter,R=l.target_application,D=null!=P,B=null!=l.stage_instance,F=null==l.guild&&null==l.channel&&null!=l.inviter;if(null!=R){S=null==P?void 0:P.name
|
||
;x=v.Z.createFromServer(R).getCoverImageURL(1024)}else if(null!=P){S=P.name;x=I.ZP.getGuildSplashURL({id:P.id,splash:P.splash})}else{null!=(S=T.name)&&""!==S||null==Z||(S=Z.username);if(null==S)throw new Error("no name for group DM invite")}var G=(0,y.yU)(),H=B?M.Z.Messages.INSTANT_INVITE_ACCEPT_STAGE:M.Z.Messages.INVITE_MODAL_BUTTON.format({guildName:S});F&&(H=M.Z.Messages.ACCEPT_INVITE_MODAL_BUTTON);return(0,r.jsx)(j,{children:(0,r.jsxs)(i.Y0X,{size:i.CgR.DYNAMIC,"aria-labelledby":O,transitionState:t,className:L().container,children:[(0,r.jsx)("div",{className:L().contentWrapper,children:(0,r.jsx)(i.Ttm,{className:L().scroller,children:(0,r.jsxs)(g.Z,{className:L().inviteContent,direction:g.Z.Direction.VERTICAL,justify:g.Z.Justify.BETWEEN,children:[(0,r.jsx)("div",{id:O,className:k().marginBottom20,children:(0,r.jsx)(f.Z,{invite:l,disableUser:D,error:u})}),B&&null!=P?(0,r.jsx)("div",{className:c()(k().marginBottom20,L().stage),children:(0,r.jsx)(h.Z,{isCard:!0,
|
||
stageInstance:l.stage_instance,guild:P})}):null,(0,r.jsxs)("div",{children:[G?(0,r.jsx)(U,{}):null,null==R?(0,r.jsx)(i.ua7,{text:G?M.Z.Messages.TOO_MANY_USER_GUILDS_DESCRIPTION:null,position:"bottom",children:function(e){var t=e.onMouseEnter,o=e.onMouseLeave;return(0,r.jsx)(C.zx,{size:C.zx.Sizes.LARGE,onClick:n,submitting:b,disabled:G,color:B?C.zx.Colors.GREEN:C.zx.Colors.BRAND,onMouseEnter:t,onMouseLeave:o,children:G?M.Z.Messages.GUILD_CAP_INVITE_MODAL_BUTTON:H})}}):(0,r.jsxs)("div",{className:L().buttonGroup,children:[(0,r.jsx)(C.zx,{size:C.zx.Sizes.LARGE,onClick:n,submitting:b,children:M.Z.Messages.PLAY}),(0,r.jsx)(C.zx,{color:C.zx.Colors.PRIMARY,size:C.zx.Sizes.LARGE,onClick:n,submitting:b,children:M.Z.Messages.SPECTATE})]}),(0,r.jsx)(g.Z,{justify:g.Z.Justify.CENTER,className:k().marginTop8,children:(0,r.jsx)(C.zx,{look:C.zx.Looks.LINK,className:L().noThanksButton,onClick:function(){N.close()},color:C.zx.Colors.TRANSPARENT,children:M.Z.Messages.INIVTE_MODAL_NO_THANKS})})]})]})})
|
||
}),null!=x&&(0,r.jsx)("div",{className:L().inviteSplash,style:{backgroundImage:"url(".concat(x,")")}})]})})}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function H(e){H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return H(e)}function V(e,t){return!t||"object"!==z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function W(e,t){W=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return W(e,t)}var z=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0
|
||
;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=H(e);if(t){var o=H(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V(this,n)}}var K="INVITE_MODAL_KEY",q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&W(e,t)}(n,e);var t=Y(n);function n(){F(this,n);return t.apply(this,arguments)}var o=n.prototype;o._initialize=function(){a.Z.subscribe("INVITE_MODAL_OPEN",this.handleOpenModal);a.Z.subscribe("INVITE_MODAL_CLOSE",this.handleCloseModal)};o._terminate=function(){(0,i.Mr3)(K);a.Z.subscribe("INVITE_MODAL_OPEN",this.handleOpenModal);a.Z.subscribe("INVITE_MODAL_CLOSE",this.handleCloseModal)};o.handleOpenModal=function(){A.Z.isOpen()&&!(0,i.nfh)(K)&&(0,i.h7j)((function(e){return(0,
|
||
r.jsx)(B,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){G(e,t,n[t])}))}return e}({},e))}),{modalKey:K,onCloseRequest:function(){return a.Z.dispatch({type:"INVITE_MODAL_CLOSE"})}})};o.handleCloseModal=function(){(0,i.Mr3)(K)};o.__getLocalVars=function(){return{INVITE_MODAL_KEY:K}};return n}(l.Z);const Q=new q},353049:(e,t,n)=>{"use strict";n.d(t,{Z:()=>M});var r=n(202351),o=n(744564),i=n(665278),a=n(784426),l=n(382060),u=n(848285),c=n(61209),s=n(567403),f=n(757753),d=n(682776),p=n(473903),h=n(310126),y=n(2590),b=n(897196);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e){O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return O(e)}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){g(e,t,n[t])}))}return e}function C(e,t){return!t||"object"!==I(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function j(e,t){j=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return j(e,t)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var I=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1
|
||
;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}var w,x=y.IlC.APP,P=!1,N=!1,A=[];function T(){P=!0}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&j(e,t)}(n,e);var t=_(n);function n(){m(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(s.Z,f.Z,p.default)};r.isOpen=function(){var e=__OVERLAY__?y.IlC.OVERLAY:y.IlC.APP;return Boolean(P&&A.length&&x===e)};r.getProps=function(){return{invite:A.length>0?A[0][0]:null,error:null!=w&&""!==w?w:null,submitting:N}}
|
||
;r.__getLocalVars=function(){return{context:x,connected:P,error:w,submitting:N,invites:A}};return n}(r.ZP.Store);Z.displayName="InviteModalStore";const M=new Z(o.Z,{OVERLAY_INITIALIZE:T,CONNECTION_OPEN:T,CONNECTION_CLOSED:function(){P=!1},INVITE_MODAL_OPEN:function(e){var t=e.invite;if(null==t)return!1;var n=t.channel,r=t.guild;if(null==n)return!1;if((0,l.bc)(n.type)){if(null!=c.Z.getChannel(n.id)){(0,a.XU)(y.ME,n.id);h.default.focus();return!1}}else{if(null==r)return!1;if(null!=s.Z.getGuild(r.id)&&!(0,i.TY)(t)){var o=function(e){if((0,i.W6)(e))return b.oC.ROLE_SUBSCRIPTIONS;var t=e.channel;if(null!=t){var n=c.Z.getChannel(t.id);if(d.Z.can(y.Plq.VIEW_CHANNEL,n))return t.id}return null}(t);(0,a.XU)(r.id,o);h.default.focus();return!1}}if(A.some((function(e){return S(e,1)[0].code===v})))return!1;var f=t.approximate_member_count,p=t.approximate_presence_count,v=t.code,m=t.target_type,g=t.target_user,O=t.target_application,C=t.stage_instance,j=t.type;x=e.context;N=!1;var I={code:v,
|
||
approximate_member_count:f,approximate_presence_count:p,target_type:m,target_user:g,target_application:O,channel:E({},n),stage_instance:C,type:j};null!=r&&(I.guild=new u.Z(r));null!=t.inviter&&(I.inviter=E({},t.inviter));A.push([I,e.resolve])},INVITE_MODAL_CLOSE:function(){w=null;N=!1;if(A.length>0){var e=S(A.shift(),2)[1];null!=e&&e()}},INVITE_ACCEPT:function(){N=!0},INVITE_MODAL_ERROR:function(e){var t=e.message;w=t;N=!1}})},52330:(e,t,n)=>{"use strict";n.d(t,{T:()=>b,E:()=>v});var r=n(667294),o=n(202351),i=n(28661),a=n(473903),l=n(325213),u=n(72580),c=n(120415),s=n(144153),f=n(258104),d=n(515209),p=n(838733);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){var n;return null!==(n=v(e).find((function(e){return e.application.id===t})))&&void 0!==n?n:null}function v(e){var t,n=(0,o.e7)([a.default],a.default.getCurrentUser),h=(0,o.Wu)([f.ZP],(function(){return f.ZP.getBundleItems(e)})),b=(0,o.Wu)([f.ZP],(function(){return f.ZP.getShelfActivities(e)})),v=(0,o.e7)([l.Z],(function(){return l.Z.testModeEmbeddedApplicationId})),m=(0,s.Uu)(),g=m?b.map((function(e){return e.application_id})):h.map((function(e){return e.application_id})),O=null!=v?[v].concat(y(g)):g,E=(0,i.Z)(O).filter(u.lm),C=null!=v&&E.length>0&&E[0].id===v?[{
|
||
activity:E[0].embeddedActivityConfig,application:E[0]}]:[],j=(0,o.e7)([f.ZP],(function(){var e;return null!==(e=f.ZP.getState().freePeriodActivities)&&void 0!==e?e:[]})),S=r.useMemo((function(){return b.map((function(e){var t=E.find((function(t){return t.id===e.application_id}));return null==t?null:{activity:e,application:t}})).filter(u.lm)}),[b,E]);return(m?y(C).concat(y(S)):(0,d.ZP)(h,E,j)).filter((function(e){var n=e.activity;return(null!==(t=n.supported_platforms)&&void 0!==t?t:[]).includes((0,p.Z)((0,c.Ij)()))})).filter((function(e){return!e.activity.requires_age_gate||!0===(null==n?void 0:n.nsfwAllowed)||null==(null==n?void 0:n.nsfwAllowed)}))}},417290:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(202351),o=n(560213),i=n(667294),a=n(73904),l=n(88067);function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){u(e,t,n[t])}))}return e}function s(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var f=n(473903),d=n(850841),p=n(52330),h=n(312242),y=n(203600);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e){var t=(0,r.e7)([f.default],(function(){return f.default.getCurrentUser()})),n=(0,p.E)(e);return i.useMemo((function(){var e,r=new Map;if(null==t)return[];n.forEach((function(e){
|
||
var n,o=function(e,t){return(0,h.Z)(e.activity)||null==e.activity.premium_tier_requirement||(0,d.M5)(t,y.p9.TIER_2)?l.Qy.UNLOCKED:l.Qy.NEEDS_NITRO}(e,t),i=null!==(n=r.get(o))&&void 0!==n?n:[];i.push(e);r.set(o,i)}));var o=null!==(e=r.get(l.Qy.UNLOCKED))&&void 0!==e?e:[];if(!d.ZP.canUsePremiumActivities(t)){var i=o.sort((function(e,t){return Number((0,h.Z)(t.activity))-Number((0,h.Z)(e.activity))}));r.set(l.Qy.UNLOCKED,i)}return Array.from(r.entries()).sort((function(e,t){return v(e,1)[0]<=v(t,1)[0]?-1:1}))}),[n,t])}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}
|
||
}return i}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function j(e){var t=(0,r.cj)([o.Z],(function(){return{enableDeveloperActivityShelf:o.Z.getIsEnabled(),filter:o.Z.getFilter()}
|
||
})),n=t.enableDeveloperActivityShelf,f=t.filter,d=m(e),p=function(){var e=(0,r.cj)([o.Z],(function(){return{isEnabled:o.Z.getIsEnabled(),lastUsedObject:o.Z.getLastUsedObject()}}),[]),t=e.isEnabled,n=e.lastUsedObject,f=(0,r.Wu)([o.Z],(function(){return o.Z.getDeveloperShelfItems()}),[]),d=i.useMemo((function(){if(!t)return[];var e={label_type:a.ww.NONE,label_until:null};return f.map((function(t){var n;return{application:t,activity:s(c({},t.embeddedActivityConfig),{free_period_starts_at:null,free_period_ends_at:null,premium_tier_requirement:null,client_platform_config:(n={},u(n,a.C3.WEB,e),u(n,a.C3.IOS,e),u(n,a.C3.ANDROID,e),n)})}})).sort((function(e,t){var r=n[e.application.id],o=n[t.application.id];return null==r?1:null==o?-1:o-r}))}),[f,t,n]);return d.length<=0?[]:[[l.Qy.UNLOCKED,d]]}();return E(p).concat(E(d)).map((function(e){var t=O(e,2);return[t[0],t[1].filter((function(e){return!n||""===f||e.application.name.toLocaleLowerCase().includes(f.toLocaleLowerCase())}))]}))}},
|
||
933954:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>c,QN:()=>s});var r=n(667294),o=n(202351),i=n(28661),a=n(473903),l=n(72580),u=n(258104);function c(e,t){return f((0,o.Wu)([u.ZP],(function(){return null!=e&&null!=e.id&&""!==e.id?u.ZP.getEmbeddedActivitiesForChannel(e.id):u.i6})),t)}function s(e){var t=f((0,o.e7)([u.ZP],(function(){return null!=e?u.ZP.getEmbeddedActivitiesForGuild(e):u.i6})));return r.useMemo((function(){var e=new Map;t.forEach((function(t){var n,r=t.embeddedActivity.channelId,o=null!==(n=e.get(r))&&void 0!==n?n:[];o.push(t);e.set(r,o)}));return e}),[t])}function f(e,t){var n=e.map((function(e){return e.application_id})),u=(0,i.Z)(n),c=new Set([]),s=!0,f=!1,d=void 0;try{for(var p,h=e[Symbol.iterator]();!(s=(p=h.next()).done);s=!0){var y=p.value,b=!0,v=!1,m=void 0;try{for(var g,O=y.connections.keys()[Symbol.iterator]();!(b=(g=O.next()).done);b=!0){var E=g.value;c.add(E)}}catch(e){v=!0;m=e}finally{try{b||null==O.return||O.return()}finally{if(v)throw m}}}}catch(e){f=!0;d=e
|
||
}finally{try{s||null==h.return||h.return()}finally{if(f)throw d}}var C=(0,o.Wu)([a.default],(function(){var e=[],t=!0,n=!1,r=void 0;try{for(var o,i=c[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var l=o.value;e.push(a.default.getUser(l))}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}),[c]),j=r.useMemo((function(){var n=new Map;C.forEach((function(e){null!=e&&n.set(e.id,e)}));var r=e.map((function(e,r){var o=u[r],i=[];if(null!=i){var a=!0,l=!1,c=void 0;try{for(var s,f=e.connections.keys()[Symbol.iterator]();!(a=(s=f.next()).done);a=!0){var d=s.value,p=n.get(d);if(null!=p&&null!=t){var h=t(p);null!=h&&i.push(h)}}}catch(e){l=!0;c=e}finally{try{a||null==f.return||f.return()}finally{if(l)throw c}}}return null==o?null:{embeddedActivity:e,application:o,userParticipantAvatarUrls:i}})).filter(l.lm);return r}),[e,u,C,t]);return j}},555086:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p})
|
||
;var r=n(667294),o=n(202351),i=n(325213),a=n(72580),l=n(240697),u=n(560213),c=n(582762),s=n(258104),f=n(120819),d=n(436771);function p(e,t){var n=(0,o.e7)([i.Z],(function(){return i.Z.testModeEmbeddedApplicationId})),p=(0,o.cj)([u.Z],(function(){return{isDeveloperActivityShelfEnabled:u.Z.getIsEnabled(),developerActivityShelfFetchState:u.Z.getFetchState()}}),[]),h=p.isDeveloperActivityShelfEnabled,y=p.developerActivityShelfFetchState,b=(0,o.Wu)([u.Z],(function(){return u.Z.getDeveloperShelfItems()}),[]),v=l.s8.useExperiment({}).enableNitroActivities,m=(0,f.z)(),g=(0,o.e7)([s.ZP],(function(){return s.ZP.getBundleItems(e).length})),O=(0,d.Z)(t),E=function(e){return null!=e&&""!==e}(e)||O;r.useEffect((function(){E&&m&&(0,c.w1)(e)}),[e,m,E]);r.useEffect((function(){m&&h&&null==y&&(0,c.$h)()}),[m,h,y]);return E&&m&&(v||(0,a.lm)(n)||g>0||h&&b.length>0)}},22664:(e,t,n)=>{"use strict";n.d(t,{a:()=>l});var r=n(202351),o=n(473903),i=n(850841),a=n(258104),l=function(e){var t=e.appId,n=(0,
|
||
r.e7)([o.default],(function(){return o.default.getCurrentUser()})),l=i.ZP.canUsePremiumActivities(n);return(0,r.e7)([a.ZP],(function(){return a.ZP.getState().shouldShowNewActivityIndicator||!l&&a.ZP.shouldShowIndicatorForActivity(t)}))}},9018:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2590);function o(e,t){var n=window.GLOBAL_ENV.CDN_HOST,o=window.GLOBAL_ENV.API_ENDPOINT;return null!=n?"".concat(location.protocol,"//").concat(n,"/app-assets/").concat(e,"/store/").concat(t,".mp4"):"".concat(location.protocol).concat(o).concat(r.ANM.STORE_ASSET(e,t,"mp4"))}},565957:(e,t,n)=>{"use strict";n.d(t,{J:()=>r,Z:()=>E});var r,o=n(202351),i=n(73904),a=n(19585),l=n(473903),u=n(120415),c=n(850841),s=n(582762),f=n(258104),d=n(61040),p=n(718482),h=n(933954),y=n(838733),b=n(9018),v=n(312242),m=n(483535),g=n(92585),O=n(39732);!function(e){e.START="START";e.JOIN="JOIN";e.LEAVE="LEAVE"}(r||(r={}));function E(e){
|
||
var t,n=e.activityItem,E=e.channel,C=e.guildId,j=e.locationObject,S=e.onActivityItemSelected,I=e.embeddedActivitiesManager,_=e.assetNames,w=(0,a.Z)().analyticsLocations,x=n.application,P=n.activity,N=P.client_platform_config[(0,y.Z)((0,u.Ij)())],A=N.label_type===i.ww.NEW&&null!=N.label_until&&Date.now()<Date.parse(N.label_until),T=(0,g.Z)({applicationId:x.id,size:250,names:_}),Z=(0,o.e7)([l.default],(function(){return l.default.getCurrentUser()})),M=null!=P.activity_preview_video_asset_id?(0,b.Z)(x.id,P.activity_preview_video_asset_id):null,R=(0,m.Z)(),L=(0,h.ZP)(E).find((function(e){var t=e.embeddedActivity;return x.id===t.application_id})),D=(0,O.c)({channelId:null!==(t=null==E?void 0:E.id)&&void 0!==t?t:""}),k=r.START,U=function(){(0,p.Z)({activityItem:n,currentActivity:R,locationObject:j,guildId:C,channelId:null==E?void 0:E.id,embeddedActivitiesManager:I,analyticsLocations:w}).then((function(e){return e&&(null==S?void 0:S({applicationId:x.id}))}))}
|
||
;if(null!=E&&(null==R?void 0:R.id)===x.id){k=r.LEAVE;U=function(){if(!f.ZP.isLaunchingActivity()){if(!D()){(0,s.mW)({channelId:E.id,applicationId:x.id});I.leaveActivity({channelId:E.id,applicationId:x.id})}null==S||S({applicationId:x.id})}}}else if(null!=L){k=r.JOIN;U=function(){f.ZP.isLaunchingActivity()||(0,d.Z)({activity:L.embeddedActivity,currentEmbeddedApplication:R,activityChannelId:null==E?void 0:E.id,locationObject:j,embeddedActivitiesManager:I,analyticsLocations:w}).then((function(e){return e&&(null==S?void 0:S({applicationId:x.id}))}))}}var B=c.ZP.canUsePremiumActivities(Z),F=k===r.START&&(0,v.Z)(P)&&!B;return{imageBackground:T,videoUrl:M,joinableEmbeddedApp:L,activityAction:k,onActivityItemSelected:U,showTryItOutBadge:F,showNewBadge:A}}},92585:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(667294),o=n(3564);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){return function(e){if(Array.isArray(e))return e
|
||
}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l=["embedded_cover","embedded_background"];function u(e){
|
||
var t=e.applicationId,n=e.size,i=e.names,u=void 0===i?l:i,c=a(r.useState(null),2),s=c[0],f=c[1],d=a(r.useState(!0),2),p=d[0],h=d[1],y=(0,o.xF)(t,s,n),b=p?"loading":null!=y?"fetched":"not-found";r.useEffect((function(){(0,o.GR)(t,u).then((function(e){h(!1);var t=!0,n=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if(null!=a&&""!==a){f(a);return}}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}))}),[t]);return{url:y,state:b}}},650875:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(785893),o=n(667294),i=n(633878);function a(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function l(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function c(e){var t=e.width,n=void 0===t?24:t,o=e.height,c=void 0===o?24:o,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=u(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",l(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){a(e,t,n[t])}))}return e}({},(0,i.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{className:d,fill:f,d:"M21 5V11.59L18 8.59L14 12.59L10 8.59L6 12.59L3 9.59V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H19C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5ZM18 11.42L21 14.42V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V12.42L6 15.42L10 11.42L14 15.42L18 11.42Z"})}))}var s=n(744979),f=n.n(s);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{
|
||
for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){var t=e.imageBackground,n=e.applicationName,i=e.imageClassName,a=e.imageNotFoundClassName,l=p(o.useState(!1),2),u=l[0],s=l[1];return"not-found"===t.state||u?(0,r.jsx)("div",{className:a,children:(0,r.jsx)(c,{className:f().brokenImageIcon})}):"loading"===t.state?null:(0,r.jsx)("img",{alt:n,className:i,src:t.url,
|
||
onError:function(){return s(!0)}})}},93191:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=(n(667294),n(707961)),i=n(744564),a=n(895303),l=n(301928),u=n(473708);function c(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,l,"next",e)}function l(e){c(i,r,o,a,l,"throw",e)}a(void 0)}))}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function p(e){p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return p(e)}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){d(e,t,n[t])}))}return e}function y(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e,t){b=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return b(e,t)}var v=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)
|
||
}else n=r.apply(this,arguments);return y(this,n)}}var g=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}
|
||
i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},O="ActivityInviteManager",E=function(){i.Z.dispatch({type:"ACTIVITY_INVITE_MODAL_CLOSE"})};const C=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&b(e,t)}(l,e);var t=m(l);function l(){f(this,l);return t.apply(this,arguments)}var c=l.prototype;c._initialize=function(){i.Z.subscribe("ACTIVITY_INVITE_MODAL_OPEN",this.handleModalOpen);i.Z.subscribe("ACTIVITY_INVITE_MODAL_CLOSE",this.handleModalClose)};c._terminate=function(){i.Z.unsubscribe("ACTIVITY_INVITE_MODAL_OPEN",this.handleModalOpen);i.Z.unsubscribe("ACTIVITY_INVITE_MODAL_CLOSE",this.handleModalClose)};c.handleModalOpen=function(e){var t=e.activity;e.isPrivate?(0,o.h7j)((function(e){return(0,r.jsx)(a.default,h({
|
||
title:u.Z.Messages.ACTIVITY_INVITE_MODAL_HEADER.format({name:t.name}),body:u.Z.Messages.ACTIVITY_INVITE_PRIVATE,confirmText:u.Z.Messages.OKAY},e))}),{onCloseCallback:E,modalKey:O}):(0,o.ZDy)(s((function(){var e,t;return g(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(27684)]).then(n.bind(n,727684))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,h({},e))}]}}))})),{onCloseCallback:E,modalKey:O})};c.handleModalClose=function(e){(0,o.Mr3)(O)};c.__getLocalVars=function(){return{modalKey:O,onCloseCallback:E}};return l}(l.Z))},238852:(e,t,n)=>{"use strict";n.d(t,{Y:()=>N});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(248088),u=n(202351),c=n(336194),s=n(707961),f=n(473903),d=n(349491),p=n(95891),h=n(850841),y=n(463473),b=n(599055),v=n(565957),m=n(650875),g=n(391186),O=n(2590),E=n(473708),C=n(824695),j=n.n(C);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
var w,x=["embedded_cover"],P={tension:800,friction:24};!function(e){e[e.THIRTEEN_BY_ELEVEN=0]="THIRTEEN_BY_ELEVEN";e[e.SIXTEEN_BY_NINE=1]="SIXTEEN_BY_NINE"}(w||(w={}));function N(e){var t,n=e.channel,i=e.activityItem,C=e.onClick,S=e.aspectRatio,N=void 0===S?w.THIRTEEN_BY_ELEVEN:S,A=e.animatedDivClass,T=function(){switch(D){case v.J.JOIN:return(0,r.jsx)("div",{className:j().activityAction,children:(0,r.jsx)("div",{className:j().activityActionButton,children:(0,r.jsx)(s.xvT,{variant:"text-sm/medium",color:"always-white",children:E.Z.Messages.JOIN})})});case v.J.LEAVE:return(0,r.jsx)("div",{className:j().activityAction,children:(0,r.jsx)("div",{className:a()(j().activityActionButton,j().activityActionButtonDanger),children:(0,r.jsx)(s.xvT,{variant:"text-sm/medium",color:"always-white",children:E.Z.Messages.EMBEDDED_ACTIVITIES_LEAVE})})});case v.J.START:default:return(0,r.jsx)(r.Fragment,{})}},Z=(0,u.e7)([f.default],(function(){return f.default.getCurrentUser()}),[]),M=(0,v.Z)({channel:n,
|
||
activityItem:i,guildId:null!==(t=n.getGuildId())&&void 0!==t?t:void 0,locationObject:{},onActivityItemSelected:C,embeddedActivitiesManager:g.Z,assetNames:x}),R=M.onActivityItemSelected,L=M.imageBackground,D=M.activityAction,k=_(o.useState(!1),2),U=k[0],B=k[1],F=o.useCallback((function(){B(!0)}),[B]),G=o.useCallback((function(){B(!1)}),[B]),H=(0,s.dQu)(c.Z.unsafe_rawColors.PREMIUM_PERK_PINK);return(0,r.jsx)(s.zxk,{onClick:R,color:"transparent",look:s.zxk.Looks.BLANK,size:s.zxk.Sizes.NONE,onFocus:F,onBlur:G,onMouseEnter:F,onMouseLeave:G,innerClassName:j().activityItemButtonInnerClass,children:(0,r.jsx)(l.Spring,{config:P,from:{value:0},to:{value:U?1:0},children:function(e){var t,n=e.value;return(0,r.jsx)(l.animated.div,{className:a()((0,y.Q)(O.BRd.DARK),j().activityItem,A,(t={},I(t,j().activityItem_13_11,N===w.THIRTEEN_BY_ELEVEN),I(t,j().activityItem_16_9,N===w.SIXTEEN_BY_NINE),t)),style:{transform:n.to([0,1],[1,1.05]).to((function(e){return"scale(".concat(e,")")}))},children:(0,
|
||
r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.Z,{imageBackground:L,applicationName:i.application.name,imageClassName:j().activitySuggestionImage,imageNotFoundClassName:j().brokenImageIconWrapper}),(0,b.Z)(i.activity)?null:h.ZP.canUsePremiumActivities(Z)?(0,r.jsx)("div",{className:j().iconOuterContainer,children:(0,r.jsx)("div",{className:a()(j().iconInnerContainer,j().nitroIconContainer),children:(0,r.jsx)(p.Z,{width:16,height:16,color:H.hex(),className:j().nitroIcon})})}):(0,r.jsx)("div",{className:a()(j().iconOuterContainer,j().lockBackground),children:(0,r.jsx)("div",{className:a()(j().iconInnerContainer,j().lockIconContainer),children:(0,r.jsx)(d.Z,{color:"var(--interactive-active)",className:j().lock})})}),T()]})})}})})}N.AspectRatio=w},948243:(e,t,n)=>{"use strict";n.d(t,{T:()=>r,A:()=>s});var r,o=n(785893),i=(n(667294),n(294184)),a=n.n(i),l=n(459023),u=n.n(l);function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}
|
||
!function(e){e[e.POPOUT=0]="POPOUT";e[e.SECONDARY=1]="SECONDARY";e[e.BLACK=2]="BLACK"}(r||(r={}));var s=function(e){var t,n=e.left,i=void 0===n?void 0:n,l=e.top,s=void 0===l?0:l,f=e.right,d=void 0===f?0:f,p=e.bottom,h=void 0===p?void 0:p,y=e.size,b=void 0===y?8:y,v=e.alert,m=void 0!==v&&v,g=e.maskColor,O=void 0===g?r.SECONDARY:g;return(0,o.jsx)("span",{className:a()(u().dot,(t={},c(t,u().alert,m),c(t,u().maskPopout,O===r.POPOUT),c(t,u().maskSecondary,O===r.SECONDARY),c(t,u().maskBlack,O===r.BLACK),t)),style:{height:b,width:b,left:i,top:s,right:d,bottom:h}})}},283133:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});function r(e,t){return"activityembed:".concat(e,":").concat(t)}},260211:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(260561).B)({kind:"user",id:"2021-05_application_command_suggestions",label:"Application Command Suggestion experiment",defaultConfig:{showApplicationCommandSuggestions:!1},treatments:[{id:1,label:"Show suggestions",config:{showApplicationCommandSuggestions:!0}}]
|
||
})},836296:(e,t,n)=>{"use strict";n.d(t,{f:()=>O});var r,o=n(73904),i=n(284610),a=n(255592),l=n(385231),u=n(99885),c=n(384411),s=n(849172),f=n(248046),d=n(127624),p=n(473708);function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var y=(h(r={},o.jw.SUB_COMMAND,(function(){return{success:!1}})),h(r,o.jw.SUB_COMMAND_GROUP,(function(){return{success:!1}})),h(r,o.jw.STRING,(function(e,t){var n,r=null===(n=function(e){switch(e.type){case"emoji":return e.surrogate;case"text":return e.text}}(e))||void 0===n?void 0:n.trim();return null==t.choices||null!=r&&t.choices.map((function(e){return e.displayName})).includes(r)?t.type!==o.jw.STRING||void 0===t.minLength&&void 0===t.maxLength?{success:!0}:void 0!==r?function(e,t,n){if(void 0!==t.minLength&&e.length<t.minLength||void 0!==t.maxLength&&e.length>t.maxLength){if(void 0!==t.maxLength&&void 0!==t.minLength&&t.minLength===t.maxLength)return{success:!1,
|
||
error:n.exactRangeErrorMessage.format({value:m(t.minLength)})};if(void 0!==t.maxLength&&void 0!==t.minLength)return{success:!1,error:n.rangeErrorMessage.format({minimum:m(t.minLength),maximum:m(t.maxLength)})};if(void 0!==t.minLength)return{success:!1,error:n.minErrorMessage.format({minimum:m(t.minLength)})};if(void 0!==t.maxLength)return{success:!1,error:n.maxErrorMessage.format({maximum:m(t.maxLength)})}}return{success:!0}}(r,t,{exactRangeErrorMessage:p.Z.Messages.COMMAND_VALIDATION_STRING_EXACT_RANGE_ERROR,rangeErrorMessage:p.Z.Messages.COMMAND_VALIDATION_STRING_RANGE_ERROR,minErrorMessage:p.Z.Messages.COMMAND_VALIDATION_STRING_MINIMUM_ERROR,maxErrorMessage:p.Z.Messages.COMMAND_VALIDATION_STRING_MAXIMUM_ERROR}):{success:!0}:{success:!1}})),h(r,o.jw.BOOLEAN,(function(e){if("text"!==e.type)return{success:!1};var t=e.text.trim();return{success:d.ak.map((function(e){return e.displayName.toLowerCase()})).includes(t.toLowerCase())}})),h(r,o.jw.INTEGER,(function(e,t,n){
|
||
if("text"!==e.type||t.type!==o.jw.INTEGER)return{success:!1};var r=e.text.trim();if(0===r.length)return{success:!1};if(null!=t.choices)return t.choices.map((function(e){return e.displayName})).includes(r)?{success:!0}:{success:!1};var i=s.Z.getAutocompleteLastChoices(n,t.name);if(null!=i&&i.map((function(e){return e.displayName})).includes(r))return{success:!0};var a=Number(l.AS(c.default.locale,r));return!isNaN(a)&&Number.isInteger(a)&&Number.isSafeInteger(a)?v(a,t,p.Z.Messages.COMMAND_VALIDATION_NUMBER_RANGE_ERROR,p.Z.Messages.COMMAND_VALIDATION_NUMBER_MINIMUM_ERROR,p.Z.Messages.COMMAND_VALIDATION_NUMBER_MAXIMUM_ERROR):{success:!1}})),h(r,o.jw.NUMBER,(function(e,t,n){if("text"!==e.type||t.type!==o.jw.NUMBER)return{success:!1};var r=e.text.trim();if(0===r.length)return{success:!1};if(null!=t.choices)return t.choices.map((function(e){return e.displayName})).includes(r)?{success:!0}:{success:!1};var i=s.Z.getAutocompleteLastChoices(n,t.name);if(null!=i&&i.map((function(e){
|
||
return e.displayName})).includes(r))return{success:!0};var a=Number(l.AS(c.default.locale,r));return isNaN(a)||a>Number.MAX_SAFE_INTEGER||a<Number.MIN_SAFE_INTEGER?{success:!1}:v(a,t,p.Z.Messages.COMMAND_VALIDATION_NUMBER_RANGE_ERROR,p.Z.Messages.COMMAND_VALIDATION_NUMBER_MINIMUM_ERROR,p.Z.Messages.COMMAND_VALIDATION_NUMBER_MAXIMUM_ERROR)})),h(r,o.jw.USER,(function(e,t,n,r){if("text"===e.type){if((0,f.BH)(e.text))return{success:!0};var o=(0,u.K)(e.text,r,n);return{success:"userMention"===(null==o?void 0:o.type)}}return{success:"userMention"===e.type}})),h(r,o.jw.CHANNEL,(function(e,t,n,r){if("text"===e.type){if((0,f.BH)(e.text))return{success:!0};var o=(0,u.K)(e.text,r,n);return{success:"channelMention"===(null==o?void 0:o.type)}}return{success:"channelMention"===e.type}})),h(r,o.jw.ROLE,(function(e,t,n,r){if("text"===e.type){if((0,f.BH)(e.text))return{success:!0};var o=(0,u.K)(e.text,r,n);return{success:"roleMention"===(null==o?void 0:o.type)}}return{success:b(e)}})),
|
||
h(r,o.jw.MENTIONABLE,(function(e,t,n,r){if("text"===e.type){if((0,f.BH)(e.text))return{success:!0};var o=(0,u.K)(e.text,r,n);return{success:null!=o&&("userMention"===o.type||b(o))}}return{success:"userMention"===e.type||b(e)}})),h(r,o.jw.ATTACHMENT,(function(e,t,n){if("text"!==e.type)return{success:!1};var r=a.Z.getUpload(n,t.name,i.d.ChannelMessage);return{success:null!=r&&r.filename===e.text}})),r),b=function(e){return"roleMention"===e.type||"textMention"===e.type&&"@everyone"===e.text};function v(e,t,n,r,o){if(null!=t.minValue&&e<t.minValue||null!=t.maxValue&&e>t.maxValue){if(null!=t.maxValue&&null!=t.minValue)return{success:!1,error:n.format({minimum:m(t.minValue),maximum:m(t.maxValue)})};if(null!=t.minValue)return{success:!1,error:r.format({minimum:m(t.minValue)})};if(null!=t.maxValue)return{success:!1,error:o.format({maximum:m(t.maxValue)})}}return{success:!0}}function m(e){return e.toLocaleString(p.Z.getLocale(),{useGrouping:!1})}const g=y;function O(e,t,n,r,u){
|
||
if(e.type===o.jw.ATTACHMENT){var c=a.Z.getUpload(r,e.name,i.d.ChannelMessage);return e.required&&null==c&&!u?{success:!1,error:p.Z.Messages.COMMAND_VALIDATION_REQUIRED_ERROR}:{success:!0}}var s=null!=t?(0,l.KF)({content:t},"content").trim():"";if(e.required&&""===s&&!u)return{success:!1,error:p.Z.Messages.COMMAND_VALIDATION_REQUIRED_ERROR};if(null==t)return{success:!0};if(""===s)return u?{success:!0}:{success:!1,error:(0,d.al)(e)};var f=t.length>1?{type:"text",text:s}:t[0],h=g[e.type](f,e,r,n);h.success||null!=h.error||(h.error=(0,d.al)(e));return h}},470856:(e,t,n)=>{"use strict";n.d(t,{K:()=>r});var r;!function(e){e[e.STREAM=0]="STREAM";e[e.VIDEO=1]="VIDEO"}(r||(r={}))},180306:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(473708);function o(e,t,n,o){return o?r.Z.Messages.CONSOLE_CONNECTING_DISABLED:n?r.Z.Messages.SUPPRESSED:t?r.Z.Messages.SERVER_MUTED_DIALOG_TITLE:e?r.Z.Messages.UNMUTE:r.Z.Messages.MUTE}},400572:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l})
|
||
;var r=n(9134),o=n(255088),i=n(182306),a=n(229400);function l(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=o.ZP.useExperiment({guildId:e.guild_id}).allowSoundboard,l=(0,a.f)(),u=(0,i.Z)(e),c=r.Z.useExperiment({guildId:e.guild_id},{autoTrackExposure:t}).isSharedCanvasEnabled;return n&&l&&u||c}},666305:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>m});var r=n(785893),o=(n(667294),n(707961)),i=n(213276),a=n(46106),l=n(761065),u=n(755380),c=n(202351),s=n(656645),f=n(736097);var d=n(734691),p=n(466317),h=n(2590),y=n(473708);var b=n(681192),v=n.n(b);function m(e){var t,n,b,m,g=e.onClose,O=e.renderOutputDevices,E=void 0!==O&&O,C=e.renderInputDevices,j=void 0!==C&&C,S=e.renderInputModes,I=void 0!==S&&S,_=e.renderInputVolume,w=void 0!==_&&_,x=e.renderOutputVolume,P=void 0!==x&&x,N=e.onSelect,A=(0,r.jsx)(o.sNh,{id:"voice-settings",label:y.Z.Messages.VOICE_SETTINGS,action:function(){return d.Z.open(h.oAB.VOICE)},icon:p.Z}),T=(t=(0,c.e7)([f.Z],(function(){
|
||
return Object.values(f.Z.getInputDevices())})),n=(0,c.e7)([f.Z],(function(){return f.Z.getInputDeviceId()})),t.map((function(e){var t=e.id,i=e.disabled,a=e.name;return(0,r.jsx)(o.k5B,{id:"input-".concat(t),group:"input-devices",disabled:i,label:a,checked:t===n,action:function(){return s.Z.setInputDevice(t)}},"input-".concat(t))}))),Z=(b=(0,c.e7)([f.Z],(function(){return Object.values(f.Z.getOutputDevices())})),m=(0,c.e7)([f.Z],(function(){return f.Z.getOutputDeviceId()})),b.map((function(e){var t=e.id,n=e.disabled,i=e.name;return(0,r.jsx)(o.k5B,{group:"output-devices",id:"output-".concat(t),disabled:n,label:i,checked:t===m,action:function(){return s.Z.setOutputDevice(t)}},"output-".concat(t))}))),M=(0,a.Z)(),R=(0,l.Z)(),L=(0,u.Z)();return(0,r.jsx)(i.Z,{object:h.qAy.CONTEXT_MENU,children:(0,r.jsxs)(o.v2r,{onSelect:N,className:v().menu,onClose:g,navId:"audio-device-context","aria-label":y.Z.Messages.AUDIO_DEVICE_ACTIONS,children:[j?(0,r.jsx)(o.kSQ,{label:y.Z.Messages.INPUT_DEVICE,
|
||
children:T}):null,E?(0,r.jsx)(o.kSQ,{label:y.Z.Messages.OUTPUT_DEVICE,children:Z}):null,I?(0,r.jsx)(o.kSQ,{label:y.Z.Messages.FORM_LABEL_INPUT_MODE,children:M}):null,(0,r.jsxs)(o.kSQ,{children:[w?R:null,P?L:null,A]})]})})}},922189:(e,t,n)=>{"use strict";n.d(t,{Z:()=>$u});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(202351),s=n(418705),f=n(513328),d=n(707961),p=n(744564),h=n(247250),y=n(971402),b=n(842629),v=n(481008),m=n(944010),g=n(832763),O=n(269839),E=n(107364),C=n(26708);function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e){I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return I(e)}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){S(e,t,n[t])}))}return e}function w(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function x(e,t){return!t||"object"!==N(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function P(e,t){P=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return P(e,t)}var N=function(e){
|
||
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=I(e);if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}const T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&P(e,t)}(n,e);var t=A(n);function n(){j(this,n);var e;(e=t.apply(this,arguments)).renderPopout=function(t){var n=t.closePopout,o=e.props,i=o.options,a=o.value,l=o.renderOption,u=o.popoutClassName,c=o.scroller;return(0,r.jsx)(C.W,{scroller:Boolean(c),
|
||
className:u,options:i,value:a,renderOption:l,onChange:function(t){e.handleChange(t);n()}})};e.handleChange=function(t){var n=e.props.onChange;null==n||n(t)};return e}n.prototype.render=function(){var e=this.props,t=e.label,n=e.value,o=e.renderValue,i=e.className,a=e.popoutProps;return(0,r.jsx)(d.yRy,w(_({},a),{renderPopout:this.renderPopout,children:function(e,a){var l=a.isShown;return(0,r.jsx)(d.P3F,w(_({},e),{className:i,"aria-haspopup":"listbox","aria-expanded":l,children:(0,r.jsx)(C.Z,{label:t,value:n,renderValue:o})}))}}))};return n}(o.PureComponent);var Z=n(473708),M=n(167708),R=n.n(M);function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D(e){D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return D(e)}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{
|
||
constructor:{value:e,writable:!0,configurable:!0}});t&&B(e,t)}function U(e,t){return!t||"object"!==F(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function B(e,t){B=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return B(e,t)}var F=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=D(e);if(t){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return U(this,n)}}var H={position:"bottom",autoInvert:!1},V=function(e){
|
||
var t=e.region,n=e.className,o=void 0===n?R().regionSelectName:n,i=t.name.replace(/ \(VIP\)$/,"");return(0,r.jsx)("div",{className:o,children:i})},W=function(e){k(n,e);var t=G(n);function n(){L(this,n);return t.apply(this,arguments)}n.prototype.render=function(){var e=this.props,t=e.region,n=e.selected;return(0,r.jsxs)(E.Z,{align:E.Z.Align.CENTER,className:a()({selected:n}),children:[(0,r.jsx)(V,{region:t,className:R().regionSelectName}),n?(0,r.jsx)("i",{className:R().check}):null]})};return n}(o.PureComponent),z=function(e){k(n,e);var t=G(n);function n(){L(this,n);var e;(e=t.apply(this,arguments)).renderOption=function(e,t){return(0,r.jsx)(W,{region:e.value,selected:t},e.value.id)};e.getSelectedRegion=function(){var t,n=e.props,r=n.regions,o=n.call;return o.regionUpdated&&null!=r&&null!=o.region?null!==(t=r.find((function(e){return e.id===o.region})))&&void 0!==t?t:{name:o.region,id:o.region}:{id:"automatic",name:Z.Z.Messages.AUTOMATIC_REGION,vip:!1,deprecated:!1,hidden:!1}}
|
||
;e.handleChangeVoiceRegion=function(t){var n=t.value,r=e.props.call.channelId;g.Z.changeCallRegion(r,n.id)};return e}var o=n.prototype;o.componentDidMount=function(){null==this.props.regions&&g.Z.fetchRegions(null)};o.render=function(){var e=this.props.regions;if(null==e)return null;var t=this.getSelectedRegion(),n={label:t.name,value:t},o=e.filter((function(e){return!e.deprecated&&!e.hidden})).map((function(e){return{label:e.name,value:e,key:e.id}}));return(0,r.jsx)(T,{label:Z.Z.Messages.REGION,options:o,value:n,onChange:this.handleChangeVoiceRegion,renderOption:this.renderOption,popoutProps:H,popoutClassName:R().regionSelectPopout})};return n}(o.PureComponent);const Y=c.ZP.connectStores([O.Z],(function(){return{regions:O.Z.getRegions(null)}}))(z);var K=n(213276),q=n(677681),Q=n(634698),X=n(913549),J=n(26468),$=n(560213),ee=n(258104),te=n(555086),ne=n(53912),re=n(930948),oe=n(2590);function ie(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}
|
||
l.done?t(u):Promise.resolve(u).then(r,o)}function ae(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ie(i,r,o,a,l,"next",e)}function l(e){ie(i,r,o,a,l,"throw",e)}a(void 0)}))}}function le(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var ue=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop()
|
||
;a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function ce(){var e=function(e){var t=e.applicationId;(0,d.ZDy)(ae((function(){var e,o;return ue(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(91730)]).then(n.bind(n,591730))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
|
||
;r.forEach((function(t){le(e,t,n[t])}))}return e}({applicationId:t},e))}]}}))})))};o.useEffect((function(){re.S.subscribe(oe.CkL.LAST_NITRO_HOST_LEFT,e);return function(){re.S.unsubscribe(oe.CkL.LAST_NITRO_HOST_LEFT,e)}}),[]);return null}var se=n(153686),fe=n(396043),de=n(19585),pe=n(228667),he=n(335072),ye=n(575907),be=n(732068),ve=n(319086),me=n(634193),ge=n(468235),Oe=n(541421),Ee=n(730793),Ce=n.n(Ee);function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Se(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Se(e,t,n[t])}))}return e}function _e(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function we(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){
|
||
var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(e){var t=e.onView;return(0,r.jsx)(ye.Z,{children:(0,r.jsx)("div",{className:Ce().popout,children:(0,r.jsxs)(d.xvT,{variant:"text-sm/medium",children:[Z.Z.Messages.CLIPS_CALL_TOOLTIP_TITLE,(0,r.jsx)("div",{children:(0,r.jsx)(ve.Z,{onClick:t,children:Z.Z.Messages.CLIPS_CALL_TOOLTIP_LINK_CTA})
|
||
})]})})})}function Ne(e){e.participant;var t=we(e,["participant"]),n=xe(o.useState(null),2),i=n[0],a=n[1],l=o.useRef(new f.V7),u=(0,c.e7)([he.Z],(function(){return he.Z.getClips().length})),s=(0,Q.Z)(u);o.useEffect((function(){if(null!=s&&u>s){a("recent");l.current.start(5e3,(function(){return a(null)}))}}),[u,s]);var p=function(){l.current.stop();a("gallery")};return(0,r.jsx)(d.yRy,{positionKey:"".concat(i,"-popout"),position:"top",renderPopout:function(e){if("recent"===i)return(0,r.jsx)(ye.Z,{children:(0,r.jsx)(Pe,{onView:p})});if("gallery"===i)return(0,r.jsx)(ye.Z,{children:(0,r.jsx)(Oe.Z,Ie({},e))});throw new Error("Invalid popout type!")},shouldShow:null!=i,onRequestClose:function(){return a(null)},children:function(e){var n=e.onClick,o=we(e,["onClick"]);return(0,r.jsx)(be.Z,Ie(_e(Ie({},o),{onClick:function(e){(0,ge.C1)();n(e)},label:Z.Z.Messages.CLIPS_SAVE,iconComponent:me.Z}),t))}})}
|
||
var Ae=n(188344),Te=n(409125),Ze=n(122590),Me=n(566706),Re=n(627342),Le=n(50433),De=n(679450),ke=n(774209),Ue=n(496486),Be=n.n(Ue),Fe=n(620597),Ge=n(175293),He=n.n(Ge),Ve=n(417454),We=n.n(Ve),ze=n(32358),Ye=n.n(ze),Ke=null;function qe(e){var t=e.onDismiss,n=e.onAccept,o=e.popoutPosition,i=e.gameConsoleAccounts;u()(i.length>0,"Rendering ConsoleNUXTooltip without a game console account");null!=Ke&&null!=i.find((function(e){return e.type===Ke}))||(Ke=Be().shuffle(i)[0].type);var a=null,l=null;switch(Ke){case oe.ABu.XBOX:a=Z.Z.Messages.CONSOLE_NUX_TOOLTIP_BODY_XBOX;l=Ye();break;case oe.ABu.PLAYSTATION:case oe.ABu.PLAYSTATION_STAGING:a=Z.Z.Messages.CONSOLE_NUX_TOOLTIP_BODY_PS5;l=We()}return(0,r.jsx)(Fe.ZP,{header:Z.Z.Messages.CONSOLE_NUX_TOOLTIP_HEADER,content:a,asset:(0,r.jsx)("img",{src:l,alt:"",className:He().art}),onClick:n,onSecondaryClick:t,markAsDismissed:t,buttonCTA:Z.Z.Messages.CONSOLE_NUX_TOOLTIP_ACCEPT,secondaryButtonCTA:Z.Z.Messages.CONSOLE_NUX_TOOLTIP_DISMISS,
|
||
caretPosition:"top"===o?Fe.DF.BOTTOM_LEFT:Fe.DF.TOP_LEFT})}var Qe=n(292571),Xe=n(302123),Je=n(550677),$e=n(860),et=n.n($e);function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){nt(e,t,n[t])}))}return e}function ot(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable
|
||
})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function it(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function at(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tt(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lt(e){var t=e.onClose,n=e.channel,o=(0,Xe.Z)(n);return(0,r.jsx)(d.v2r,{onClose:t,onSelect:function(){return null},navId:"transfer-menu","aria-label":Z.Z.Messages.TRANSFER,children:o})}function ut(e){return null!=e?e===Je.YE.XBOX?Z.Z.Messages.XBOX_REMOTE_CONNECTED_RAW:Z.Z.Messages.PLAYSTATION_REMOTE_CONNECTED_RAW:Z.Z.Messages.CONSOLE_TRANSFER}function ct(e){var t,n=e.channel,i=e.showLeftDivider,a=void 0!==i&&i,l=it(e,["channel","showLeftDivider"]),u=(0,Ze.Z)(),f=(0,c.e7)([De.Z],(function(){var e
|
||
;return null===(e=De.Z.getSessionById(null!==(t=null==u?void 0:u.sessionId)&&void 0!==t?t:""))||void 0===e?void 0:e.clientInfo.os})),p=(0,c.e7)([Le.Z],(function(){return Le.Z.hasLayers()})),h=at((0,c.Wu)([Me.Z],(function(){return[Me.Z.getMode(n.id),Me.Z.getLayout(n.id)]})),2),y=h[0],b=h[1],v=(0,d.s9z)(d.JQI),m=(0,ke.Z)(),g=m.filter((function(e){return e.twoWayLink})),O=at(o.useState(!1),2),E=O[0],C=O[1];if(null==u&&0===m.length)return null;var j=oe.WtW.VOICE!==y&&[oe.AEg.NO_CHAT,oe.AEg.FULL_SCREEN].includes(b)?"top":"bottom",S=[];g.length>0&&S.push(s.z$.DONUT_DESKTOP_NUX);return(0,r.jsx)(Re.Z,{contentTypes:S,children:function(e){var t=e.visibleContent,o=e.markAsDismissed,i=t===s.z$.DONUT_DESKTOP_NUX,u=!p&&!v;return(0,r.jsx)(d.yRy,{position:j,spacing:i?16:void 0,positionKey:"".concat(y,":").concat(b),onRequestClose:function(){return C(!1)},shouldShow:(i||E)&&u,renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(ye.Z,{children:i?(0,r.jsx)(qe,{popoutPosition:j,onDismiss:o,
|
||
onAccept:function(){o();C(!0)},gameConsoleAccounts:g}):(0,r.jsx)(lt,{onClose:function(){t()},channel:n})})},children:function(e){return(0,r.jsxs)(r.Fragment,{children:[a?(0,r.jsx)("div",{className:et().leftDivider}):null,(0,r.jsx)(be.Z,ot(rt({},e,l),{onClick:function(){return C(!0)},label:ut(f),iconComponent:(0,Qe.Z)(f)}))]})}})}})}var st=n(306263),ft=n(924066),dt=n(15338),pt=n(979197),ht=n(784426),yt=n(379991),bt=n(270662),vt=n(672380),mt=n(853158),gt=n(443660),Ot=n(74535),Et=n(901654),Ct=n(661782),jt=n(358500),St=n(155549),It=n.n(St),_t=n(913957),wt=n.n(_t),xt=n(587161),Pt=n.n(xt);function Nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function At(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Tt(e){Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Tt(e)}function Zt(e,t){
|
||
return!t||"object"!==Rt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mt(e,t){Mt=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Mt(e,t)}var Rt=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Tt(e);if(t){var o=Tt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zt(this,n)}}var Dt=23,kt=17,Ut=26,Bt={SCALE_MIN:.7,SCALE_MAX:1,DURATION_IN:300,DURATION_OUT:170,EASING_IN:mt.Z.Easing.inOut(mt.Z.Easing.back()),EASING_OUT:mt.Z.Easing.quad},Ft=200,Gt=125,Ht=function(e){
|
||
!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Mt(e,t)}(n,e);var t=Lt(n);function n(){Nt(this,n);var e;(e=t.apply(this,arguments)).scaleAnimation=new mt.Z.Value(0);e.spriteAnimation=new mt.Z.Value(0);e.spriteOpacity=new mt.Z.Value(0);e.widthAnimation=new mt.Z.Value(0);return e}var o=n.prototype;o.componentDidMount=function(){this.componentDidAppear()};o.componentDidAppear=function(){var e=this.scaleAnimation,t=this.widthAnimation;e.setValue(1);t.setValue(1)};o.componentWillEnter=function(e){var t=this.scaleAnimation,n=this.widthAnimation;t.setValue(0);n.setValue(0);mt.Z.parallel([mt.Z.timing(t,{toValue:1,duration:Bt.DURATION_IN,easing:Bt.EASING_IN}),mt.Z.timing(n,{toValue:1,duration:Ft})]).start(e)};o.componentWillLeave=function(e){
|
||
var t=this,n=t.scaleAnimation,r=t.spriteAnimation,o=t.spriteOpacity,i=t.widthAnimation;o.setValue(1);r.setValue(0);for(var a=[],l=0;l<Dt;l++)a.push(mt.Z.timing(r,{toValue:-Ut*l,duration:kt}));mt.Z.sequence([mt.Z.timing(n,{toValue:0,duration:Bt.DURATION_OUT,easing:Bt.EASING_OUT}),mt.Z.sequence(a),mt.Z.timing(i,{toValue:0,duration:Gt})]).start(e)};o.getScaleStyle=function(){var e=this.scaleAnimation;return mt.Z.accelerate({transform:[{scale:e.interpolate({inputRange:[0,1],outputRange:[Bt.SCALE_MIN,Bt.SCALE_MAX]})}],opacity:e})};o.getSpriteStyle=function(){return{backgroundPosition:this.spriteAnimation,opacity:this.spriteOpacity}};o.getWidthStyle=function(){return{width:this.widthAnimation.interpolate({inputRange:[0,1],outputRange:["0px","".concat(this.props.width,"px")]})}};o.render=function(){var e,t=this.props,n=t.theme,o=t.children,i=t.className,l=n===oe.BRd.DARK,u=a()(It().sprite,(At(e={},Pt().crossWhite,l),At(e,Pt().crossGrey,!l),e));return(0,r.jsxs)(mt.Z.div,{
|
||
className:a()(It().transition,i),style:this.getWidthStyle(),children:[(0,r.jsx)("div",{className:a()(It().spriteWrapper,wt().horizontal,wt().justifyCenter,wt().alignCenter),children:(0,r.jsx)(mt.Z.div,{className:u,style:this.getSpriteStyle()})}),(0,r.jsx)(mt.Z.div,{style:this.getScaleStyle(),children:o})]})};return n}(o.PureComponent);function Vt(e){var t=e.participants,n=e.onContextMenu,o=e.className,i=e.onClick,l=e.width,u=e.guildId,s=(0,Ot.ZP)(),f=function(e,t){return((0,d.pxk)(d.EFr.SIZE_80)+16)*t>e?d.EFr.SIZE_40:d.EFr.SIZE_80}(l,t.length),p=(0,c.e7)([Et.Z],(function(){return Et.Z.isFocused()})),h=t.map((function(e){if(e.type!==jt.fO.USER)return null;var t,o,a=e.user,l=e.voiceState,c=e.speaking,h=e.ringing;return(0,r.jsx)(Ht,{className:It().participant,width:(0,d.pxk)(f),theme:s,children:(0,r.jsx)(Ct.Z,{src:a.getAvatarURL(u,(0,d.pxk)(f),c&&p),size:f,muted:null!==(t=null==l?void 0:l.isVoiceMuted())&&void 0!==t&&t,deafen:null!==(o=null==l?void 0:l.isVoiceDeafened())&&void 0!==o&&o,
|
||
speaking:c,ringing:h,onClick:function(t){return null==i?void 0:i(e,t)},onContextMenu:function(t){return null==n?void 0:n(e,t)}},e.id)},a.id)}));return(0,r.jsx)(gt.Z,{component:"div",className:a()(It().root,o),children:h})}var Wt=n(736818),zt=n(276985),Yt=n(716371),Kt=n(791271),qt=n(730380),Qt=n(788671),Xt=n.n(Qt);function Jt(e,t){return 0===t.length?Z.Z.Messages.CURRENTLY_IN_VOICE_EMPTY:1===t.length?Z.Z.Messages.CURRENTLY_IN_VOICE_1.format({a:(0,Kt.Z)(e,t[0])}):2===t.length?Z.Z.Messages.CURRENTLY_IN_VOICE_2.format({a:(0,Kt.Z)(e,t[0]),b:(0,Kt.Z)(e,t[1])}):t.length>2?Z.Z.Messages.CURRENTLY_IN_VOICE_2_N.format({a:(0,Kt.Z)(e,t[0]),b:(0,Kt.Z)(e,t[1]),n:t.length-2}):void 0}const $t=function(e){var t=e.participants,n=e.channel,i=e.hasConnectPermission,a=t.filter(jt.Io),l=(0,Yt.J)(n.guild_id),u=o.useCallback((function(){l?(0,zt.hk)(n.guild_id,(function(){return b.default.selectVoiceChannel(n.id)})):b.default.selectVoiceChannel(n.id)}),[n.id,n.guild_id,l]),c=4===a.length?2:3;return(0,
|
||
r.jsxs)("div",{className:Xt().container,children:[(0,r.jsx)("div",{className:Xt().tiles,style:{maxWidth:168*c},children:a.slice(0,5).map((function(e){return(0,r.jsx)(qt.ZP,{participant:e,channel:n,className:Xt().tile,paused:!0,inCall:!0,noVideoRender:!0,inPopout:!1,width:48},e.id)}))}),(0,r.jsx)(d.X6q,{className:Xt().channelName,variant:"heading-xxl/semibold",children:n.name}),(0,r.jsx)("div",{className:Xt().participantsRow,children:(0,r.jsx)(d.xvT,{color:"header-secondary",variant:"text-sm/normal",children:Jt(n,a)})}),(0,r.jsx)(d.zxk,{disabled:!i,className:Xt().joinButton,color:i?d.zxk.Colors.GREEN:d.zxk.Colors.PRIMARY,onClick:u,size:d.zxk.Sizes.MEDIUM,children:i?Z.Z.Messages.JOIN_VOICE:Z.Z.Messages.CHANNEL_LOCKED_SHORT})]})};var en=n(316878),tn=n(520436),nn=n(776009),rn=n(622094),on=n.n(rn);function an(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ln(e){var t=e.height,o=(0,c.e7)([en.Z],(function(){
|
||
return en.Z.useReducedMotion}));return(0,r.jsxs)("div",{className:on().root,children:[(0,r.jsx)(nn.Z,{importData:function(){return n.e(8197).then(n.t.bind(n,573581,19)).then((function(e){return e.default}))},shouldAnimate:!o,className:a()(on().art,an({},on().hidden,t<=280))}),(0,r.jsx)(d.X6q,{className:on().header,variant:"heading-md/bold",children:Z.Z.Messages.PLAYSTATION_TRANSFERRING}),(0,r.jsx)(d.xvT,{variant:"text-md/normal",color:"header-secondary",children:Z.Z.Messages.CONSOLE_TRANSFERRING_SUBTITLE.format({onCancel:tn.s6})})]})}var un,cn=n(999357),sn=n(260561),fn=(0,sn.B)({kind:"user",id:"2023-03_pax_vc_tile_activities",label:"PAX VC Tile Activities",defaultConfig:{enabled:!1},treatments:[{id:1,label:"Enable PAX VC Tile Activities",config:{enabled:!0}}]});!function(e){e.CONTROL="CONTROL";e.ONE_OR_TWO_USERS="ONE_OR_TWO_USERS";e.ANY_NUMBER_OF_USERS="ANY_NUMBER_OF_USERS"}(un||(un={}));var dn=(0,sn.B)({kind:"user",id:"2023-01_vc_tile_activities_entry_point",
|
||
label:"VC Tile Activities Entry Point",defaultConfig:{vcTileActivityExperimentType:un.CONTROL},treatments:[{id:1,label:"Enable one or two users VC Tile Activities Entry Point",config:{vcTileActivityExperimentType:un.ONE_OR_TWO_USERS}},{id:2,label:"Enable any number of users VC Tile Activities Entry Point",config:{vcTileActivityExperimentType:un.ANY_NUMBER_OF_USERS}}]}),pn=n(59732),hn=n(674748),yn=n(590070),bn=n(15970),vn=n(567403),mn=n(682776),gn=n(993137),On=n(483902),En=n(918176),Cn=n.n(En);function jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function In(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value)
|
||
;if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var _n=16/9;function wn(e,t){return Math.floor((t-e)/(8+e))+1}function xn(e,t,n){for(var r=t-e;r>0;){var o=e,i=Math.floor(r/2);if(n(o+=i)){e=o+1;r-=i+1}else r=i}return e}function Pn(e,t,n){var r,o=Math.floor(t/25),i=t;if(e>25)r=xn(o,i,(function(e){var r=wn(e,t),o=function(e,t){var n=e/_n;return Math.ceil((t-n)/(8+n))+1}(e,n);return r*o>25}));else{r=xn(o,i,(function(r){
|
||
var o=wn(r,t),i=function(e,t){var n=e/_n;return Math.floor((t-n)/(8+n))+1}(r,n);return o*i>=e}));r-=1}var a=wn(r,t),l=function(e,t){return Math.ceil(t/e)}(a,e);return{tileWidth:r,columns:Math.max(1,a),rows:l}}function Nn(e){var t,n=e.className,i=e.children,l=e.keyExtractor,u=e.paddingTop,c=void 0===u?0:u,s=e.paddingBottom,f=void 0===s?0:s,d=In(o.useState({width:0,height:0}),2),p=d[0],h=d[1],y=p.width,b=p.height,v=null!==(t=null==i?void 0:i.length)&&void 0!==t?t:0,m=y-16,g=b-(c+f),O=o.useMemo((function(){return function(e,t,n){var r=Pn(e,t,n),o=r.rows,i=r.columns,a=r.tileWidth;return{tileStyle:{width:a},tileWidth:a,rows:o,columns:i}}(v,m,g)}),[v,m,g]),E=O.tileStyle,C=O.tileWidth,j=O.rows,S=O.columns,I=S+1,_=I*C+8*(I-1)<=y,w=Math.floor(C/_n)+8,x=Math.max(0,g-w*j)/2;return(0,r.jsx)(On.Z,{fade:!0,className:n,listPadding:[c+x,0,f+x-8,8],renderRow:function(e){var t,n=e*S;return(0,r.jsx)("div",{className:Cn().row,
|
||
children:null===(t=null==i?void 0:i.slice(n,n+S))||void 0===t?void 0:t.map((function(e,t){var o,i,u=n+t;return(0,r.jsx)("div",{style:E,className:a()(Cn().tile,(i={},Sn(i,Cn().padColumn,_),Sn(i,Cn().noVerticalMargin,u>=(j-1)*S),Sn(i,Cn().noHorizontalMargin,(u+1)%S==0||u===v-1),i)),children:(0,r.jsx)(gn.Z,{className:Cn().tileSizer,aspectRatio:_n,children:e(C)})},null!==(o=null==l?void 0:l(u))&&void 0!==o?o:u)}))},e)},rowCount:j,rowCountBySection:[j],rowHeight:w,onResize:h})}var An=n(336194),Tn=n(579581),Zn=n(417290);function Mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o
|
||
}}return i}}(e,t)||Dn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ln(e){return function(e){if(Array.isArray(e))return Mn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Dn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dn(e,t){if(e){if("string"==typeof e)return Mn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mn(e,t):void 0}}var kn=n(238852),Un=n(691648),Bn=n(896490),Fn=n(431089),Gn=n(189865),Hn=n(127661),Vn=n(491275),Wn=n(108206),zn=n(633878);function Yn(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Kn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function qn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Qn(e){
|
||
var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=qn(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",Kn(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Yn(e,t,n[t])}))}return e}({},(0,zn.Z)(c)),{width:n,height:i,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M5.66747 20.3625C4.60336 21.4277 4.25395 25.5781 4.25395 25.5781C4.25395 25.5781 8.40516 25.2302 9.47018 24.165C9.96634 23.6697 10.2203 23.0275 10.2539 22.3785L7.46675 22.3647L7.4522 19.5781C6.80337 19.6118 6.16363 19.8662 5.66747 20.3625Z",fill:l,className:u}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M7.18187 16.9929L12.8389 22.6489L14.253 21.2347L15.3137 25.8309L17.0815 24.0632V18.4063L20.6171 14.8707C22.0313 13.4566 24.8598 10.0617 23.4455 6.38545C19.7684 4.97117 16.3744 7.79971 14.9606 9.21422L7.18187 16.9929ZM18.3172 13.5111C19.4217 13.5111 20.3172 12.6156 20.3172 11.5111C20.3172 10.4065 19.4217 9.51106 18.3172 9.51106C17.2126 9.51106 16.3172 10.4065 16.3172 11.5111C16.3172 12.6156 17.2126 13.5111 18.3172 13.5111Z",fill:l,className:u}),(0,r.jsx)("path",{d:"M11.4246 12.7495H5.76775L4 14.5172L8.59617 15.5779L11.4246 12.7495Z",fill:l,className:u}),(0,r.jsx)("path",{d:"M25 18V21H28V23H25V26H23V23H20V21H23V18H25Z",fill:l,className:u})]}))}var Xn=n(652591),Jn=n(463473),$n=n(408816),er=n(88067),tr=n(880926),nr=n.n(tr),rr=n(558607),or=n.n(rr);function ir(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function ar(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){
|
||
ir(i,r,o,a,l,"next",e)}function l(e){ir(i,r,o,a,l,"throw",e)}a(void 0)}))}}function lr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ur(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){lr(e,t,n[t])}))}return e}function cr(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function sr(e,t){
|
||
if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var fr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop()
|
||
;a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function dr(e){var t=e.channel,n=e.guild,o=e.width,i=e.inPopout,a=e.handleClose,l=e.userParticipantCount,u=fn.useExperiment({}).enabled;return o<250?(0,r.jsx)(pr,{channel:t,guild:n,width:o,inPopout:i,handleClose:a,userParticipantCount:l}):l>1||u?(0,r.jsx)(br,{channel:t,guild:n,width:o,inPopout:i,handleClose:a,userParticipantCount:l}):(0,r.jsx)(hr,{channel:t,guild:n,width:o,inPopout:i})}function pr(e){var t=e.channel,n=e.inPopout,o=e.handleClose,i=(0,de.Z)(se.Z.VC_TILE_ACTIVITY_SHELF_BUTTON),l=i.analyticsLocations,u=i.AnalyticsLocationProvider,c=(0,Tn.O)(),s=(0,
|
||
d.dQu)(An.Z.colors.INTERACTIVE_NORMAL).hex();return(0,r.jsx)(u,{children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.ua7,{text:Z.Z.Messages.EMBEDDED_ACTIVITIES_START_AN_ACTIVITY,children:function(e){var o=e.onClick,i=sr(e,["onClick"]);return(0,r.jsx)(d.P3F,cr(ur({},i),{className:nr().clickableTile,onClick:function(){null==o||o();(0,Un.Z)({channel:t,guildId:t.guild_id,locationObject:c.location,openInPopout:n,analyticsLocations:l})},children:(0,r.jsx)($n.Z,{className:nr().root,children:(0,r.jsx)("div",{className:nr().iconContainer,children:(0,r.jsx)(Qn,{width:40,height:40})})})}))}}),(0,r.jsx)(d.P3F,{onClick:o,className:a()((0,Jn.Q)(oe.BRd.DARK),nr().shelfButtonCloseButton),children:(0,r.jsx)(Hn.Z,{width:24,height:24,className:nr().closeButtonIcon,backgroundColor:s})})]})})}function hr(e){var t=e.channel,i=e.guild,a=e.inPopout,l=e.width;o.useEffect((function(){Xn.default.track(oe.rMx.VC_TILE_ACTIVITIES_ENTRY_POINT_VIEWED,{tile_type:"activity invite",n_participants:1})}),[]);var u=(0,
|
||
Tn.O)(),c=(0,de.Z)(se.Z.VC_TILE_ACTIVITY_INVITE),s=c.analyticsLocations,f=c.AnalyticsLocationProvider;return(0,r.jsx)(f,{children:(0,r.jsxs)($n.Z,{className:nr().root,children:[l>400?(0,r.jsx)("img",{src:or(),className:nr().art,alt:Z.Z.Messages.EMBEDDED_ACTIVITIES_SHELF_CHARACTERS_ALT_TEXT}):null,(0,r.jsx)(d.xvT,{className:nr().heading,variant:"text-md/semibold",children:Z.Z.Messages.EMBEDDED_ACTIVITIES_VC_TILE_ENTRY_POINT_INVITE}),(0,r.jsxs)("div",{className:nr().buttonContainer,children:[(0,r.jsxs)(d.zxk,{size:d.zxk.Sizes.LARGE,color:d.zxk.Colors.PRIMARY,className:nr().button,innerClassName:nr().buttonContents,onClick:function(){(0,d.ZDy)(ar((function(){var e,o;return fr(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:e=a.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,cr(ur({},e),{guild:i,channel:t,source:oe.t4x.ACTIVITY_ENTRY_POINT_TILE}))}]}}))})),{contextKey:a?d.u1M:d.z1l})},
|
||
children:[(0,r.jsx)(Vn.Z,{width:16,height:16}),(0,r.jsx)(d.xvT,{variant:"text-sm/medium",children:Z.Z.Messages.INVITE_FRIENDS})]}),(0,r.jsxs)(d.zxk,{size:d.zxk.Sizes.LARGE,className:nr().button,innerClassName:nr().buttonContents,onClick:function(){(0,Un.Z)({channel:t,guildId:t.guild_id,locationObject:u.location,openInPopout:a,analyticsLocations:s})},children:[(0,r.jsx)(Wn.Z,{width:16,height:16}),(0,r.jsx)(d.xvT,{variant:"text-sm/medium",children:Z.Z.Messages.EMBEDDED_ACTIVITIES_ACTIVITY_ENTRY_POINT_TILE_CHOOSE_AN_ACTIVITY})]})]})]})})}var yr=function(e){var t=e.userParticipantCount,n=e.guildId,r=fn.useExperiment({}).enabled,i=function(e){var t=(0,Zn.Z)(e);return o.useMemo((function(){var e=[];t.forEach((function(t){var n,r=Rn(t,2)[1];(n=e).push.apply(n,Ln(r))}));var n=new Set;return e.filter((function(e){if(n.has(e.application.id))return!1;n.add(e.application.id);return!0}))}),[t])}(n);return r?i.filter((function(e){return[er.f9,er.PD,er.js].includes(e.application.id)
|
||
})):2===t?i.filter((function(e){return[er.jT,er.f9,er.fE].includes(e.application.id)})):i.slice(0,3)};function br(e){var t=e.channel,n=e.guild,i=e.handleClose,l=e.width,u=e.userParticipantCount;o.useEffect((function(){Xn.default.track(oe.rMx.VC_TILE_ACTIVITIES_ENTRY_POINT_VIEWED,{tile_type:"activity suggestion",n_participants:u})}),[]);var c=yr({userParticipantCount:u,guildId:n.id}),f=(0,de.Z)(se.Z.VC_TILE_ACTIVITY_SUGGESTION).AnalyticsLocationProvider;return(0,r.jsx)(f,{children:(0,r.jsxs)($n.Z,{className:nr().root,children:[l>480?(0,r.jsx)("img",{className:nr().art,src:or(),alt:Z.Z.Messages.EMBEDDED_ACTIVITIES_SHELF_CHARACTERS_ALT_TEXT}):null,l>300?(0,r.jsx)(d.xvT,{className:nr().heading,variant:l>550?"text-md/semibold":"text-sm/semibold",children:Z.Z.Messages.EMBEDDED_ACTIVITIES_VC_TILE_ENTRY_POINT_TITLE}):null,(0,r.jsx)("div",{className:a()(nr().activitiesContainer,lr({},nr().activitiesContainerSmol,l<=300)),children:c.map((function(e){return(0,r.jsx)(kn.Y,{channel:t,
|
||
activityItem:e,aspectRatio:kn.Y.AspectRatio.SIXTEEN_BY_NINE,animatedDivClass:nr().activitySuggestion},e.application.id)}))}),(0,r.jsxs)(d.P3F,{className:nr().checkboxContainer,onClick:function(){Xn.default.track(oe.rMx.VC_TILE_ACTIVITIES_ENTRY_POINT_CLOSED,{tile_type:"activity suggestion",close_type:"permanent",n_participants:u});(0,Bn.EW)(s.z$.VC_TILE_ACTIVITIES_ENTRY_POINT)},children:[(0,r.jsx)(Fn.Z,{}),(0,r.jsx)(d.xvT,{variant:"text-sm/medium",children:Z.Z.Messages.DONT_SHOW_AGAIN})]}),(0,r.jsx)(d.P3F,{className:nr().closeButtonContainer,onClick:function(){Xn.default.track(oe.rMx.VC_TILE_ACTIVITIES_ENTRY_POINT_CLOSED,{tile_type:"activity suggestion",close_type:"temporary",n_participants:u});i()},children:(0,r.jsx)(Gn.Z,{className:nr().closeButton})})]})})}var vr=(0,n(38736).Z)((function(){return{dismissedActivityEntryPointTileChannel:null}})),mr=n(988533),gr=n(129112),Or=n.n(gr),Er=n(222917),Cr=n.n(Er);function jr(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}
|
||
l.done?t(u):Promise.resolve(u).then(r,o)}function Sr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){jr(i,r,o,a,l,"next",e)}function l(e){jr(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ir(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _r(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var wr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},
|
||
"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function xr(e){var t=e.channel,o=e.guild,i=e.width,a=e.inPopout;return(0,
|
||
r.jsx)($n.Z,{className:Or().root,children:(0,r.jsx)(mr.Z,{artURL:Cr(),size:(0,mr.L)(i),header:Z.Z.Messages.STREAM_SINGLE_PERSON_BODY,onCTAClick:function(){return(0,d.ZDy)(Sr((function(){var e,i;return wr(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:e=a.sent(),i=e.default;return[2,function(e){return(0,r.jsx)(i,_r(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ir(e,t,n[t])}))}return e}({},e),{guild:o,channel:t,source:oe.t4x.CHANNEL_CALL}))}]}}))})),{contextKey:a?d.u1M:d.z1l})},callToAction:Z.Z.Messages.INSTANT_INVITE})})}var Pr=n(857602),Nr=n.n(Pr);function Ar(e){
|
||
var t=e.participants,n=e.onClick,i=e.onDoubleClick,a=e.onContextMenu,l=e.channel,u=e.className,f=e.inCall,d=e.totalNumberOfParticipants,p=e.paused,h=void 0!==p&&p,y=(0,J.bp)()===oe.IlC.POPOUT,b=(0,c.e7)([vn.Z],(function(){return vn.Z.getGuild(l.guild_id)}),[l.guild_id]),v=vr().dismissedActivityEntryPointTileChannel,m=(0,c.e7)([Me.Z],(function(){return Me.Z.getUserParticipantCount(l.id)}),[l]),g=o.useCallback((function(){vr.setState({dismissedActivityEntryPointTileChannel:l.id})}),[l.id]);o.useEffect((function(){null!=v&&l.id!==v&&vr.setState({dismissedActivityEntryPointTileChannel:null})}),[l.id,v]);var O=(0,c.e7)([mn.Z],(function(){return l.isPrivate()||(0,bn.b)(mn.Z,b,l)}),[b,l]),E=(null==b?void 0:b.afkChannelId)===l.id,C=l.userLimit<=0||l.userLimit>1,j=dn.useExperiment({}).vcTileActivityExperimentType;l.isGuildVoice()&&dn.trackExposure({});var S=(0,c.e7)([ee.ZP],(function(){return ee.ZP.getEmbeddedActivitiesForChannel(l.id).length<=0})),I=(0,
|
||
yn.N)(s.z$.VC_TILE_ACTIVITIES_ENTRY_POINT),_=(0,pn.KF)(l.id)!==pn.jy.CAN_LAUNCH,w=null!=v&&v===l.id,x=fn.useExperiment({}).enabled,P=t.map((function(e){return function(t){return(0,r.jsx)(qt.ZP,{participant:e,channel:l,className:Nr().tile,paused:h,onClick:n,onDoubleClick:i,onContextMenu:a,inCall:f,width:t,inPopout:y},e.id)}}));(0,hn.Z)({type:cn.nv.VIEW,name:cn.zs.CHANNEL_CALL_VIDEO_GRID_VIEW,properties:{total_participants:d,can_invite:O,is_afk_channel:E,channel_user_limit:l.userLimit}},{trackOnInitialLoad:!0},[]);null==b||E||(x?P.push((function(e){return(0,r.jsx)(dr,{channel:l,guild:b,width:e,inPopout:y,handleClose:g,userParticipantCount:m})})):!(j===un.ONE_OR_TWO_USERS&&2===m||j===un.ANY_NUMBER_OF_USERS&&m>=2)||!S||_||I||w?C&&1===m&&O&&([un.ONE_OR_TWO_USERS,un.ANY_NUMBER_OF_USERS].includes(j)&&S&&!_?P.push((function(e){return(0,r.jsx)(dr,{channel:l,guild:b,width:e,inPopout:y,handleClose:g,userParticipantCount:m})})):P.push((function(e){return(0,r.jsx)(xr,{width:e,channel:l,guild:b,
|
||
inPopout:y})}))):P.push((function(e){return(0,r.jsx)(dr,{channel:l,guild:b,width:e,inPopout:y,handleClose:g,userParticipantCount:m})})));var N=o.useCallback((function(e){var n,r;return null!==(r=null===(n=t[e])||void 0===n?void 0:n.id)&&void 0!==r?r:"empty-tile"}),[t]);return(0,r.jsx)(Nn,{className:u,keyExtractor:N,paddingTop:64,paddingBottom:64,children:P})}var Tr=n(248088),Zr=n(498246),Mr=n(736097),Rr=n(630631),Lr=n(862762),Dr=n(341160),kr=n.n(Dr);function Ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Br(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return Ur(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ur(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Fr="CameraPreviewPosition";function Gr(e){var t=e.width,n=e.onContextMenuParticipant,i=e.height,a=e.channel,l=e.participants,u=Br(function(){var e=Br(o.useState((function(){return Rr.Z.get(Fr,oe.VD2.BOTTOM_RIGHT)})),2),t=e[0],n=e[1];return[t,o.useCallback((function(e){Rr.Z.set(Fr,e);n(e)}),[])]}(),2),c=u[0],s=u[1],f=o.useRef(null),d=null==a.getGuildId()?70:50;o.useLayoutEffect((function(){var e;null===(e=f.current)||void 0===e||e.ensureIsInPosition()}),[l.length]);return(0,r.jsx)("div",{className:kr().container,children:(0,
|
||
r.jsx)(Lr._,{position:c,id:0,ref:f,onMove:function(e,t){return s(t)},maxX:t,maxY:i,edgeOffsetTop:d,edgeOffsetBottom:70,edgeOffsetLeft:16,edgeOffsetRight:16,children:(0,r.jsx)("div",{className:kr().tileContainer,children:l.map((function(e){return(0,r.jsx)(qt.ZP,{participant:e,channel:a,onContextMenu:n,className:kr().tile,fit:qt.BP.COVER,inCall:!0,inPopout:!1,width:160},e.id)}))})})})}var Hr=n(72580),Vr=n(781295);var Wr=n(453597),zr=n(487012),Yr=n.n(zr);function Kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||Xr(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qr(e){return function(e){if(Array.isArray(e))return Kr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Xr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xr(e,t){if(e){if("string"==typeof e)return Kr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kr(e,t):void 0}}var Jr=864e13,$r=16/9*112+8,eo=1e4;function to(e){var t=String(Jr).length;return String(Jr-e).padStart(t,"0")}function no(e){var t,n=Wt.default.getId()
|
||
;return e.type===jt.fO.USER&&e.user.id===n&&(null===(t=e.voiceState)||void 0===t?void 0:t.selfVideo)}function ro(e,t){var n=qr(o.useState(Date.now()),2),r=n[0],i=n[1];o.useEffect((function(){var e=setTimeout((function(){i(Date.now())}),eo);return function(){clearTimeout(e)}}),[t]);var a=o.useRef({}),l=o.useMemo((function(){var n=Date.now(),r=(0,Ue.sortBy)(t,(function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();switch(e.type){case jt.fO.ACTIVITY:return"\0".concat(e.sortKey);case jt.fO.HIDDEN_STREAM:case jt.fO.STREAM:return"".concat((0,Wr.qz)(e.userNick,e.user));case jt.fO.USER:var n,r="";e.speaking?r="":t-e.lastSpoke<eo?r="":(null===(n=e.voiceState)||void 0===n?void 0:n.selfVideo)&&(r="");return"".concat(r).concat(to(e.lastSpoke)).concat((0,Wr.qz)(e.userNick,e.user))}}(e,n)})),o=qr((0,Ue.partition)(r,jt._5),2),i=o[0],l=o[1],u=l.findIndex(no),c=null;if(-1!==u){c=l[u];l.splice(u,1)}
|
||
var s=null!=c?e-$r-8:e,f=Math.floor((s-8)/132),d=Math.max(0,Math.min(f,12,t.length)),p=Math.min((s-8)/d-8,$r),h=Math.max(0,d-i.length),y=i.slice(0,d),b=l.slice(0,h),v=new Array(h);if(h>0){var m=[],g=!0,O=!1,E=void 0;try{for(var C,j=b[Symbol.iterator]();!(g=(C=j.next()).done);g=!0){var S=C.value,I=a.current[S.id];null!=I&&I<h?v[I]=S:m.push(S)}}catch(e){O=!0;E=e}finally{try{g||null==j.return||j.return()}finally{if(O)throw E}}for(var _=0;_<v.length;_++)if(null==v[_]){var w=m.shift();if(null==w)break;v[_]=w}}var x=v.filter(Hr.lm),P=(0,Ue.keyBy)((0,Ue.range)(x.length),(function(e){return x[e].id}));a.current=P;var N=Qr(y).concat(Qr(x));null!=c&&N.push(c);return{visibleParticipants:N,participantTileWidth:p}}),[e,t,r]);return{visibleParticipants:l.visibleParticipants,participantTileWidth:l.participantTileWidth}}function oo(e){
|
||
var t=e.participants,n=e.participantTileWidth,o=e.selectedParticipantId,i=e.onDoubleClick,a=e.onContextMenu,l=e.onClick,u=e.channel,c=e.inCall,s=e.popoutWindow,f=e.paused,d=void 0!==f&&f,p=null!=s;return(0,r.jsx)("div",{className:Yr().root,children:t.map((function(e){if(null==e)return null;var t=no(e);return(0,r.jsx)("div",{className:Yr().tileSizer,style:t?{flexShrink:0}:void 0,children:(0,r.jsx)(qt.ZP,{participant:e,selected:o===e.id,channel:u,className:Yr().tile,fit:qt.BP.COVER,onClick:l,onDoubleClick:i,onContextMenu:a,width:t?$r:n,inCall:c,paused:d,inPopout:p})},e.id)}))})}var io=n(581541),ao=n.n(io),lo=n(953514),uo=n.n(lo);function co(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function so(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function fo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){so(e,t,n[t])}))}return e}function po(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ho(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{
|
||
try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return co(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return co(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var yo=120;function bo(e){
|
||
var t=e.onSelectParticipant,n=e.onContextMenuParticipant,i=e.onFullscreenParticipant,l=e.participants,u=e.filteredParticipants,c=e.popoutWindow,s=e.inCall,f=e.channel,d=e.selectedParticipant,p=e.showParticipants,h=void 0===p||p,y=e.className,b=e.paused,v=e.width,m=e.height,g=e.layout,O=e.idle,E=null!=c,C=Mr.Z.getVideoComponent(),j=Wt.default.getId(),S=ho(o.useState(null),2),I=S[0],_=S[1],w=ho(o.useState(!0),2),x=w[0],P=w[1],N=ho(o.useState(!1),2),A=N[0],T=N[1],Z=d.type===jt.fO.ACTIVITY,M=!Z&&null!=d.streamId,R=M&&null!=I&&I.width>0&&I.height>0?I.width/I.height:1.7777777777777777,L=m<=384,D=h&&!L,k=(0,Q.Z)(D),U=0;(Z||D)&&(U+=72);Z&&!D&&(U+=48);D&&(U+=68);var B,F=m-2*U,G=F*R,H=Math.floor(Math.min(v,G)/R),V=m>v/R+72+yo+8;B=!D&&!Z?40+Math.max(0,72-(m-H)/2):D?-16:-8;o.useEffect((function(){var e=setTimeout((function(){P(!1)}),250);return function(){clearTimeout(e)}}),[]);var W=(0,Tr.useSpring)({value:D?1:0,delay:V||!D?0:100,config:po(fo({},Tr.config.stiff),{clamp:!0}),onStart:function(){
|
||
return T(!0)},onChange:function(){return re.S.dispatch(oe.CkL.REMEASURE_TARGET)},onRest:function(){T(!1);re.S.dispatch(oe.CkL.REMEASURE_TARGET)}}),z=(0,Tr.useSpring)({value:D?1:0,config:po(fo({},Tr.config.stiff),{clamp:!0})}),Y=(0,Tr.useSpring)({value:G,config:po(fo({},Tr.config.stiff),{clamp:!0}),immediate:k===D&&z.value.idle}),K=(0,Tr.useSpring)({value:B,config:po(fo({},Tr.config.stiff),{clamp:!0})}),q=(0,Tr.useTransition)(d,{keys:function(e){return null==e?void 0:e.id},config:po(fo({},Tr.config.stiff),{clamp:!0}),initial:null,from:{opacity:0},enter:{opacity:1},leave:{opacity:0}}),X=o.useCallback((function(e){_(e);P(!1)}),[]),J=D||b?[]:function(e,t,n){return null==t||t.type===jt.fO.ACTIVITY?[]:[t.type===jt.fO.STREAM?e.find((function(e){return e.type===jt.fO.USER&&e.id===(null==t?void 0:t.user.id)&&e.id!==n&&(0,Vr.Z)(e)})):null,t.type===jt.fO.USER?e.find((function(e){return e.type===jt.fO.STREAM&&e.user.id===(null==t?void 0:t.user.id)&&null!=e.streamId
|
||
})):null,t.id!==n?e.find((function(e){return e.type===jt.fO.USER&&e.id===n&&(0,Vr.Z)(e)})):null].filter(Hr.lm)}(l,d,j),$=ro(v,u),ee=$.visibleParticipants,te=$.participantTileWidth;return(0,r.jsxs)("div",{className:a()(uo().root,ao().flexCenter,y),children:[(0,r.jsxs)("div",{className:uo().tileWrapper,style:{opacity:M&&x?0:1},children:[(0,r.jsxs)(Tr.animated.div,{className:uo().videoFrame,style:{top:z.value.to((function(e){return-e*yo/2}))},children:[(0,r.jsx)(Tr.animated.div,{style:{width:Y.value},className:uo().videoWrapper,children:(0,r.jsx)(gn.Z,{className:ao().videoSizer,aspectRatio:R,children:q((function(e,o,a){var l=a.key;return null!=o?(0,r.jsx)(Tr.animated.div,{className:ao().videoWrapperAnimated,style:e,children:(0,r.jsx)(qt.ZP,{focused:!0,noBorder:G>=v||F>=m,channel:f,className:ao().focusedVideo,videoComponent:C,paused:b,width:v,participant:o,onClick:t,onDoubleClick:i,onContextMenu:n,onVideoResize:X,inCall:s,inPopout:E})},l):null}))})
|
||
}),L||g===oe.AEg.MINIMUM||g===oe.AEg.NORMAL?null:(0,r.jsx)(Tr.animated.div,{className:a()(uo().actionRow,so({},uo().idle,O)),style:{bottom:K.value},children:(0,r.jsx)(Zr.Z,{channelId:f.id,isParticipantsOpen:h,isVertical:!0})})]}),(0,r.jsx)(Tr.animated.div,{className:uo().participantsWrapperAnimated,style:{translateY:W.value.to((function(e){return e*yo/2})),opacity:W.value,visibility:W.value.to((function(e){return 0===e?"hidden":"visible"}))},children:(0,r.jsx)(oo,{channel:f,onClick:t,onContextMenu:n,onDoubleClick:i,participants:ee,participantTileWidth:te,selectedParticipantId:d.id,inCall:s,paused:b||A||!h,popoutWindow:c})})]}),J.length>0?(0,r.jsx)(Gr,{onContextMenuParticipant:n,width:v,height:m,channel:f,participants:J}):null]})}var vo=n(153996);function mo(e){var t=e.width,n=e.className,o=e.channelId,i=e.noArt,a=void 0!==i&&i;return(0,r.jsx)(mr.Z,{artURL:vo,noArt:a,size:(0,mr.L)(t),className:n,callToAction:Z.Z.Messages.STREAM_SHOW_ALL_PARTICIPANTS,
|
||
header:Z.Z.Messages.STREAM_PARTICIPANTS_HIDDEN.format(),onCTAClick:function(){return h.Z.toggleVoiceParticipantsHidden(o,!1)}})}const go=(0,vt.Z)((function(e){var t=e.participants,n=e.filteredParticipants,i=e.selectedParticipant,l=e.participantsVersion,u=e.layout,c=e.onSelectParticipant,s=e.onContextMenuParticipant,f=e.onFullscreenParticipant,d=e.channel,p=e.hasConnectPermission,h=e.className,y=e.inCall,b=e.showParticipants,v=void 0===b||b,m=e.paused,g=void 0!==m&&m,O=e.width,C=e.height,j=e.idle,S=e.mode,I=e.popoutWindow,_=e.awaitingRemoteSessionInfo;o.useEffect((function(){re.S.dispatch(oe.CkL.REMEASURE_TARGET)}),[O,C]);var w=o.useMemo((function(){return n.filter((function(e){return e.type!==jt.fO.ACTIVITY||!e.participants.has(Wt.default.getId())}))}),[n,l]);if((null==_?void 0:_.channelId)===d.id)return(0,r.jsx)(ln,{height:C});if((null==d?void 0:d.isGuildVocal())&&!y)return(0,r.jsx)($t,{channel:d,participants:t,hasConnectPermission:p});if(S===oe.WtW.VOICE)return(0,r.jsx)(Vt,{
|
||
guildId:d.guild_id,width:O,className:ao().voiceCallWrapper,participants:t,onContextMenu:s});n=y?n:t;return null==i?0===n.length?(0,r.jsx)(mo,{className:a()(ao().videoGrid,ao().hiddenParticipants),channelId:d.id,width:O}):(0,r.jsx)(E.Z,{className:ao().videoGridWrapper,justify:E.Z.Justify.CENTER,align:E.Z.Align.CENTER,children:(0,r.jsx)(Ar,{channel:d,className:ao().videoGrid,participants:w,totalNumberOfParticipants:t.length,onClick:c,onDoubleClick:f,onContextMenu:s,paused:g,inCall:y})}):(0,r.jsx)(bo,{onFullscreenParticipant:f,onContextMenuParticipant:s,onSelectParticipant:c,selectedParticipant:i,filteredParticipants:w,participants:t,popoutWindow:I,className:h,idle:j,height:C,width:O,layout:u,inCall:y,channel:d,showParticipants:v})}));var Oo,Eo=n(173388),Co=n(714602),jo=n(636398),So=n(299836),Io=n(729139),_o=n(613665),wo=n(692432),xo=n.n(wo);function Po(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function No(e,t){
|
||
if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}!function(e){e[e.UP=0]="UP";e[e.DOWN=1]="DOWN"}(Oo||(Oo={}));function Ao(e){var t=e.direction,n=e.className,o=No(e,["direction","className"]);return(0,r.jsx)(be.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Po(e,t,n[t])}))}return e}({className:a()(n,xo().arrow,Po({},xo().up,t===Oo.UP)),iconComponent:_o.Z},o))}Ao.Directions=Oo;const To=Ao
|
||
;var Zo=n(372417),Mo=n(987152),Ro=n(427054),Lo=n(656262),Do=n(631443),ko=n(821297),Uo=n(468811),Bo=n.n(Uo),Fo=n(77413),Go=n(770512),Ho=n.n(Go);function Vo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function zo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Wo(e,t,n[t])}))}return e}function Yo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}
|
||
}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||qo(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ko(e){return function(e){if(Array.isArray(e))return Vo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||qo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qo(e,t){if(e){if("string"==typeof e)return Vo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vo(e,t):void 0}}
|
||
var Qo=[Ho().emoji1,Ho().emoji2,Ho().emoji3,Ho().emoji4],Xo=o.memo((function(e){var t,n=e.emoji,i=e.onAnimationEnd,l=(0,Ue.sample)(Qo),u=o.useCallback((function(){i(n.key)}),[n.key,i]);return(0,r.jsx)("div",{className:a()(Ho().emoji,l),onAnimationEnd:u,children:(0,r.jsx)(Fo.Z,{emojiId:n.id,emojiName:n.name,animated:null!==(t=n.animated)&&void 0!==t&&t})})}));function Jo(e){var t=e.channelId,n=(0,c.e7)([en.Z],(function(){return en.Z.useReducedMotion})),i=Yo(o.useState([]),2),a=i[0],l=i[1];o.useEffect((function(){var e=function(e){var r=e.channelId,o=e.emoji;r!==t||n||null==o||l((function(e){return Ko(e).concat([zo({key:Bo()()},o)])}))};p.Z.subscribe("VOICE_CHANNEL_EFFECT_SEND",e);return function(){p.Z.unsubscribe("VOICE_CHANNEL_EFFECT_SEND",e)}}),[t,n]);var u=o.useCallback((function(e){l((function(t){return t.filter((function(t){return t.key!==e}))}))}),[]);return n?null:(0,r.jsx)("div",{className:Ho().container,"aria-hidden":!0,children:a.map((function(e){return(0,r.jsx)(Xo,{emoji:e,
|
||
onAnimationEnd:u},e.key)}))})}var $o=n(177570),ei=n(77457),ti=n(610773),ni=n(717091),ri=n(715107),oi=n(473903),ii=n(407561),ai=n(531441),li=n(176758),ui=n(120415),ci=n(310126),si=n(202181),fi=n(91036),di=n(400572),pi=n(509097),hi=n(753705),yi=n(385028),bi=n(679724),vi=n(807801),mi=n(28661),gi=n(773011),Oi=n(469023),Ei=n(201441),Ci=n(373438),ji=n(269300),Si=n(616918),Ii=n(864736),_i=n.n(Ii);function wi(e){var t=e.guildEvent;return null==t?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Ci.ZP.Divider,{className:_i().divider}),(0,r.jsx)(Si.z,{startTime:t.scheduled_start_time,isActive:(0,ji.xt)(t),isEnded:(0,ji.Z2)(t),liveText:Z.Z.Messages.LIVE_EVENT,className:_i().eventSchedule,textVariant:"text-lg/semibold",eventType:t.entity_type}),(0,r.jsx)(d.xvT,{color:"header-secondary",variant:"text-md/normal",className:_i().eventName,children:t.name})]})}var xi=n(865050),Pi=n(7602),Ni=n(283099),Ai=n(684412),Ti=n(179678),Zi=n(491260),Mi=n(773148);var Ri=n(641277),Li=n(562545),Di=n(188084)
|
||
;var ki=n(577635),Ui=n(816251);function Bi(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Fi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Bi(i,r,o,a,l,"next",e)}function l(e){Bi(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Gi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hi(e){Hi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Hi(e)}function Vi(e,t){return!t||"object"!==zi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wi(e,t){Wi=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Wi(e,t)}var zi=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Yi(e){var t=function(){
|
||
if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Hi(e);if(t){var o=Hi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Vi(this,n)}}var Ki=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0]
|
||
;continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},qi=function(){function e(){Gi(this,e);this.isInCallscopeCall=!1;this.rtcConnections=new Set;this.callStartedAt=new Date;this.blindIds=[];this.hasIssues=!1;this.issues=[]}var t=e.prototype;t.getDescription=function(){var e=this;return Fi((function(){var t,n,r,o,i,a,l,u,c,s,f,d,p,h,y,b,v,m;return Ki(this,(function(g){switch(g.label){case 0:t={callStartedAt:e.callStartedAt.toISOString(),blindIds:[],issues:[]};n=function(t){return"".concat(t.toISOString()," (").concat(t.getTime()-e.callStartedAt.getTime(),")")};r=!0,o=!1,i=void 0
|
||
;g.label=1;case 1:g.trys.push([1,6,7,8]);a=e.blindIds[Symbol.iterator]();g.label=2;case 2:if(r=(l=a.next()).done)return[3,5];u=l.value;s=(c=t.blindIds).push;f={date:n(u.date)};return[4,u.ids];case 3:s.apply(c,[(f.ids=g.sent(),f.context=u.context,f)]);g.label=4;case 4:r=!0;return[3,2];case 5:return[3,8];case 6:d=g.sent();o=!0;i=d;return[3,8];case 7:try{r||null==a.return||a.return()}finally{if(o)throw i}return[7];case 8:p=!0,h=!1,y=void 0;try{for(b=e.issues[Symbol.iterator]();!(p=(v=b.next()).done);p=!0){m=v.value;t.issues.push("".concat(n(m.date),": ").concat(m.description))}}catch(e){h=!0;y=e}finally{try{p||null==b.return||b.return()}finally{if(h)throw y}}return[2,t]}}))}))()};t.shouldShowUI=function(){return Qi.isInCallscopeCall};t.submit=function(){var e=this;return Fi((function(){var t,n,r,o;return Ki(this,(function(i){switch(i.label){case 0:if(!e.hasIssues)return[2];console.log("[callscope] Submitting issues...");return[4,e.getDescription()];case 1:t=i.sent();i.label=2;case 2:
|
||
i.trys.push([2,4,,5]);return[4,(0,Ui.E_)(oe.GU0.RTC,t)];case 3:i.sent();return[3,5];case 4:n=i.sent();console.error("[callscope] Error uploading logs",n);return[3,5];case 5:i.trys.push([5,7,,8]);r=oi.default.getCurrentUser();return[4,(0,ki.ZD)({name:"Issue from ".concat(null==r?void 0:r.username,"#").concat(null==r?void 0:r.discriminator),priority:1,description:JSON.stringify(t,void 0,4),feature:{asana_inbox_id:"1204198429044032"},url:""},{overridePlatformInformation:!1})];case 6:i.sent();return[3,8];case 7:o=i.sent();console.error("[callscope] Error submitting report",o);return[3,8];case 8:return[2]}}))}))()};return e}(),Qi=new qi;function Xi(){return Qi}var Ji=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Wi(e,t)}(n,e);var t=Yi(n);function n(){Gi(this,n);return t.apply(this,arguments)}
|
||
n.prototype.__getLocalVars=function(){return{state:Qi}};return n}(c.ZP.Store);Ji.displayName="CallscopeStore";new Ji(p.Z,{RTC_CONNECTION_STATE:function(e){var t,n=(null!==(t=e.channelId)&&void 0!==t?t:"unknown")+e.context;switch(e.state){case oe.hes.DISCONNECTED:Qi.rtcConnections.delete(n);if(0===Qi.rtcConnections.size){Qi.submit();Qi=new qi}break;case oe.hes.RTC_CONNECTED:if(null!=e.rtcLogEphemeralKey){var r=Wt.default.getId(),o=(0,Ui.sb)(e.channelId,r,e.rtcLogEphemeralKey);0===Qi.rtcConnections.size&&(Qi.callStartedAt=new Date);Qi.isInCallscopeCall=!0;Qi.blindIds.push({date:new Date,context:e.context,ids:o});Qi.rtcConnections.add(n)}}}});function $i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ea(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function ta(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var na=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},
|
||
"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},ra={marginTop:"12px",marginBottom:"12px"},oa={marginTop:"12px",marginBottom:"12px"
|
||
},ia={marginLeft:".5em"};function aa(){var e=oi.default.getCurrentUser();return null!=e&&e.isStaff()}function la(){return(0,r.jsx)(Li.Z,{width:"1em",height:"1em"})}function ua(e){var t=ta(o.useState(""),2),n=t[0],i=t[1],a=ta(o.useState(null),2),l=a[0],u=a[1];o.useEffect((function(){(e=function(){return na(this,(function(e){switch(e.label){case 0:return[4,Xi().getDescription()];case 1:u.apply(void 0,[e.sent()]);return[2]}}))},function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ea(i,r,o,a,l,"next",e)}function l(e){ea(i,r,o,a,l,"throw",e)}a(void 0)}))})();var e}),[]);var c=o.useCallback((function(){console.log("[callscope] Issue marker closed ".concat(n,"."));!function(e){Qi.issues.push({date:new Date,description:e});Qi.hasIssues=!0}(n);e.onClose()}),[e,n]),s=o.useCallback((function(){e.onClose()}),[e]),f=aa()?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(d.xJW,{style:ra,children:[(0,r.jsx)(d.xvT,{variant:"text-md/normal",style:oa,
|
||
children:"Because all user and channel data is anonymized some additional information is needed for Discord to retrieve the logs. You may be asked to provide these IDs so we can associate the incident."}),(0,r.jsx)(sa,{description:l})]}),(0,r.jsx)(d.xJW,{style:ra,children:(0,r.jsxs)(d.xvT,{variant:"text-md/normal",style:oa,children:["Shortly after the call, you can enter the blinded channel ID into the"," ",(0,r.jsx)(d.eee,{href:"https://callscope.discord.tools/",children:"callscope visualizer"}),"."]})})]}):(0,r.jsx)(r.Fragment,{});return(0,r.jsxs)(d.Y0X,{transitionState:d.Dvm.ENTERING,size:d.CgR.MEDIUM,children:[(0,r.jsxs)(d.hzk,{children:[(0,r.jsx)(d.X6q,{variant:"heading-xl/semibold",style:ra,children:Z.Z.Messages.NOTICE_CALLSCOPE_DIALOG_HEADER}),(0,r.jsxs)(d.xJW,{style:ra,children:[(0,r.jsxs)(d.xvT,{variant:"text-md/normal",style:oa,children:["We marked the time of your ",(0,
|
||
r.jsx)(la,{})," ",Z.Z.Messages.NOTICE_CALLSCOPE_MARK_ISSUE," button press in the analytics logs. It can be used multiple times during your call."]}),(0,r.jsx)(d.Kx8,{placeholder:Z.Z.Messages.NOTICE_CALLSCOPE_DIALOG_INPUT,autoFocus:!0,rows:5,value:n,maxLength:500,onChange:i})]}),f]}),(0,r.jsxs)(d.mzw,{children:[(0,r.jsx)(d.zxk,{onClick:c,children:"Submit Issue"}),(0,r.jsx)(d.zxk,{look:d.iLD.BLANK,onClick:s,children:(0,r.jsx)(d.xvT,{variant:"text-md/medium",children:Z.Z.Messages.CANCEL})})]})]})}function ca(e){var t=o.useCallback((function(){ci.default.copy(e.text)}),[e.text]);return(0,r.jsx)(d.eee,{style:ia,onClick:t,title:"Copy to clipboard",children:(0,r.jsx)(Di.Z,{width:"1em",height:"1em"})})}function sa(e){var t=o.useCallback((function(){ci.default.copy(JSON.stringify(e,void 0,4))}),[e]);return null==e.description?(0,r.jsx)(d.xvT,{variant:"text-md/medium",children:"Unable to locate blind IDs."}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.xvT,{variant:"text-md/medium",children:(0,
|
||
r.jsx)("ul",{children:e.description.blindIds.map((function(e){var t=e.context,n=e.ids;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("li",{children:[(0,r.jsxs)("strong",{children:["Blind channel ID (",t,"):"]})," ",(0,r.jsx)("kbd",{style:{userSelect:"text"},children:n.blindChannelId}),(0,r.jsx)(ca,{text:n.blindChannelId})]}),(0,r.jsxs)("li",{children:[(0,r.jsxs)("strong",{children:["Blind user ID (",t,"):"]})," ",(0,r.jsx)("kbd",{style:{userSelect:"text"},children:n.blindUserId}),(0,r.jsx)(ca,{text:n.blindUserId})]})]},t)}))})}),(0,r.jsx)(d.zxk,{onClick:t,children:"Copy All"})]})}var fa="callscope-report-issue-dialog";function da(e){var t=(0,d.vRw)(),n=o.useCallback((function(){(0,d.Mr3)(fa)}),[]),i=o.useCallback((function(){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;console.log("[callscope] Issue marker pressed.");p.Z.dispatch({type:"RTC_LOG_MARKER",marker:e})}();(0,d.ZDy)((function(){return Promise.resolve((function(e){return(0,r.jsx)(ua,{onClose:n})}))
|
||
}),{contextKey:t,modalKey:fa})}),[t,n]);return Qi.shouldShowUI()?(0,r.jsx)(be.Z,{onClick:i,iconComponent:Li.Z,"aria-label":Z.Z.Messages.NOTICE_CALLSCOPE_MARK_ISSUE,className:e.className,label:Z.Z.Messages.NOTICE_CALLSCOPE_MARK_ISSUE}):(0,r.jsx)(r.Fragment,{})}var pa=n(544475),ha=n(607072),ya=n(667286),ba=n(353945);function va(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ma(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ga(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{}
|
||
;var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Oa(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=ga(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",ma(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){va(e,t,n[t])}))}return e}({},(0,zn.Z)(c)),{width:n,height:i,viewBox:"0 0 24 24",fill:"none",children:[(0,r.jsx)("rect",{className:u,x:"4",y:"4",width:"7",height:"7",rx:"1",fill:l}),(0,
|
||
r.jsx)("rect",{className:u,x:"4",y:"13",width:"7",height:"7",rx:"1",fill:l}),(0,r.jsx)("rect",{className:u,x:"13",y:"4",width:"7",height:"7",rx:"1",fill:l}),(0,r.jsx)("rect",{className:u,x:"13",y:"13",width:"7",height:"7",rx:"1",fill:l})]}))}function Ea(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ca(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ja(e){var t=e.channelId,n=Ca(e,["channelId"]);return(0,r.jsx)(be.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ea(e,t,n[t])}))}return e}({onClick:function(){h.Z.selectParticipant(t,null)},label:Z.Z.Messages.VIDEO_CALL_RETURN_TO_GRID,iconComponent:Oa,tooltipPosition:"bottom"},n))}var Sa=n(363582),Ia=n(303377),_a=n.n(Ia);function wa(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function xa(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Pa(e){var t=e.className,n=e.count;return(0,r.jsxs)("div",{
|
||
className:a()(_a().root,_a().comboIcon,t),children:[(0,r.jsx)(Sa.Z,{className:_a().icon}),(0,r.jsx)(d.xvT,{color:"none",className:_a().count,variant:"text-md/normal",children:n})]})}function Na(e){var t=e.count,n=xa(e,["count"]);return(0,r.jsx)(be.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){wa(e,t,n[t])}))}return e}({label:Z.Z.Messages.CHANNEL_CALL_PARTICIPANTS,iconComponent:function(e){var n=e.className;return(0,r.jsx)(Pa,{className:n,count:t})},tooltipPosition:"bottom"},n))}function Aa(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ta(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Za(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ma(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Za(e,["width","height","color","foreground"]);return(0,
|
||
r.jsxs)("svg",Ta(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Aa(e,t,n[t])}))}return e}({},(0,zn.Z)(c)),{width:n,height:i,viewBox:"0 0 24 24",fill:"none",children:[(0,r.jsx)("rect",{className:u,x:"3",y:"3",width:"18",height:"10",rx:"1",fill:l}),(0,r.jsx)("rect",{className:u,x:"3",y:"15",width:"8",height:"6",rx:"1",fill:l}),(0,r.jsx)("rect",{className:u,x:"13",y:"15",width:"8",height:"6",rx:"1",fill:l})]}))}function Ra(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function La(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){
|
||
var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Da(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ka(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Da(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",La(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ra(e,t,n[t])}))}return e}({},(0,zn.Z)(c)),{width:n,height:i,viewBox:"0 0 24 24",fill:"none",children:[(0,r.jsx)("rect",{className:u,x:"1",y:"4",width:"13",height:"16",rx:"2",fill:l}),(0,r.jsx)("rect",{className:u,x:"16",y:"4",width:"7",height:"7",rx:"1",fill:l}),(0,r.jsx)("rect",{className:u,x:"16",y:"13",width:"7",height:"7",rx:"1",fill:l})]}))}function Ua(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ba(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Fa(e){var t=e.channelId,n=e.isHorizontal,o=Ba(e,["channelId","isHorizontal"]);return(0,r.jsx)(be.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ua(e,t,n[t])}))}return e}({onClick:function(){h.Z.selectParticipant(t,jt.dF.AUTO)},label:Z.Z.Messages.VIDEO_CALL_AUTO_SELECT,iconComponent:n?Ma:ka,tooltipPosition:"bottom"},o))}var Ga=n(377128),Ha=n(91717),Va=n(977005),Wa=n(950761),za=n(430510),Ya=n(492692),Ka=n(670843),qa=n(830271);function Qa(e){var t=e.channelId,n=e.onClose,o=e.appContext,i=e.exitFullScreen,a=e.onSelect,l=(0,c.e7)([Me.Z],(function(){return Me.Z.getSelectedParticipant(t)})),u=(null==l?void 0:l.type)===jt.fO.STREAM?l.stream:null
|
||
;return(0,r.jsxs)(d.v2r,{navId:"channel-call-overflow-popout",onClose:n,"aria-label":Z.Z.Messages.CHANNEL_CALL_OVERFLOW_MENU_LABEL,onSelect:a,children:[(0,Wa.Z)(t),(0,Ya.Z)(),(0,za.Z)(t),(0,qa.Z)(t),(0,Ka.Z)(u,o,i)]})}var Xa=n(973198),Ja=n(602397),$a=n(929138),el=n.n($a);function tl(e){var t=e.channel,n=(0,c.e7)([Ja.ZP],(function(){return Ja.ZP.getVoiceStatesForChannel(t)}));return(0,r.jsxs)("div",{className:el().root,children:[(0,r.jsx)(d.xvT,{variant:"text-xs/bold",className:el().header,children:Z.Z.Messages.CHANNEL_CALL_MEMBERS_POPOUT_HEADER.format({count:n.length})}),(0,r.jsx)(d.Ttm,{className:el().scroller,children:(0,r.jsx)(Xa.Z,{allowDragging:!1,allowPreviews:!1,className:el().voiceUsers,channel:t,voiceStates:n,collapsed:!1,location:oe.Sbl.CHANNEL_CALL})})]})}var nl=n(347190),rl=n.n(nl);function ol(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function il(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ol(e,t,n[t])}))}return e}function al(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ll(e){var t=e.channelId,n=e.guildId,o=Date.now(),i=(0,c.e7)([Ga.Z,Me.Z],(function(){return Be()(Ga.Z.getSpeakers()).map((function(e){return Me.Z.getParticipant(t,e)})).filter((function(e){return null!=e&&e.type===jt.fO.USER&&!(0,Vr.Z)(e)&&e.speaking
|
||
})).sortBy((function(e){return-Ga.Z.getSpeakingDuration(e.user.id,o)})).slice(0,3).value()}));return 0===i.length?null:(0,r.jsx)(r.Fragment,{children:i.map((function(e,t){return(0,r.jsx)(d.ua7,{position:"bottom",color:d.ua7.Colors.GREY,text:Z.Z.Messages.CHANNEL_CALL_CURRENT_SPEAKER.format({username:e.user.username}),children:function(o){return(0,r.jsx)(Ha.Z,al(il({},o),{className:a()(rl().speaker,ol({},rl().last,t===i.length-1)),user:e.user,speaking:!0,collapsed:!0,guildId:n}))}},e.id)}))})}function ul(e){var t=e.channel,n=e.appContext,i=e.inCall,a=e.isChatOpen,l=e.exitFullScreen,u=t.id,s=(0,c.cj)([Me.Z],(function(){return{selectedParticipant:Me.Z.getSelectedParticipant(u),voiceParticipantsHidden:Me.Z.getVoiceParticipantsHidden(u),userParticipantCount:Me.Z.getUserParticipantCount(u)}}),[t.id]),f=s.voiceParticipantsHidden,p=s.selectedParticipant,h=s.userParticipantCount,y=(0,di.Z)(t),b=(0,jo.Y)("popup"),v=b.preventIdle,m=b.allowIdle,g=[];if(y){
|
||
var O=(null==p?void 0:p.type)===jt.fO.STREAM?(0,st.my)(p.id):void 0;g.push((0,r.jsx)(Ro.Z,{className:rl().button,channel:t,stream:O,exitFullScreen:l,analyticsLocation:t.type===oe.d4z.GUILD_VOICE?oe.ZY5.GUILD_CHANNEL:oe.ZY5.DM_CHANNEL},"invite-button"))}f&&g.push((0,r.jsx)(ll,{channelId:u,guildId:t.guild_id},"current-speaker"));if((null==p?void 0:p.type)===jt.fO.STREAM){g.push((0,r.jsx)(ya.Z,{className:rl().button,participant:p},"warning"));g.push((0,r.jsx)(pa.Z,{size:Va.ZP.Sizes.LARGE,className:rl().button,participant:p,showQuality:!0},"live-indicator"))}f&&g.push((0,r.jsx)(d.yRy,{position:"bottom",renderPopout:function(){return(0,r.jsx)(ye.Z,{children:(0,r.jsx)(tl,{channel:t})})},children:function(e,t){var n=t.isShown;return(0,o.createElement)(Na,al(il({},e),{isActive:n,count:h,key:"call-members",className:rl().button}))}},"call-members-popout"));i&&g.push(null!=p?(0,r.jsx)(ja,{className:rl().button,channelId:u},"deselect-participant"):(0,r.jsx)(Fa,{className:rl().button,channelId:u,
|
||
isHorizontal:!0},"select-participant"));g.push((0,r.jsx)(ha.Z,{onOpen:v,onClose:m,className:rl().button},"recents"));g.push((0,r.jsx)(da,{className:rl().button}));g.push((0,r.jsx)(d.yRy,{position:"bottom",renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(ye.Z,{children:(0,r.jsx)(Qa,{channelId:u,onClose:t,appContext:n,exitFullScreen:l})})},children:function(e,t){var n=t.isShown;return(0,o.createElement)(ba.Z,al(il({},e),{key:"more-options",isActive:n,className:rl().lastButton}))}},"more-options-popout"));if(!a){g.push((0,r.jsx)(Ci.ZP.Divider,{className:rl().divider},"divider"));g.push((0,r.jsx)(Zo.T,{channelId:t.id,className:rl().chatButtonSpacer,disabled:!0},"chat-spacer"))}return(0,r.jsx)(r.Fragment,{children:g})}var cl=n(796080),sl=n(488462),fl=n(999042),dl=n.n(fl);function pl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return pl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pl(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yl(e){var t=e.focusedParticipant,n=e.channel,o=(0,J.bp)(),i=(0,c.e7)([Me.Z],(function(){return Me.Z.getLayout(n.id,o)}));return(0,r.jsx)(jo.Z,{children:(0,r.jsx)(cl.Z,{className:dl().participants,
|
||
participant:t,maxVisibleUsers:5,guildId:n.getGuildId(),channelId:n.id,disableInteraction:o===oe.IlC.POPOUT||i===oe.AEg.FULL_SCREEN})})}function bl(e){var t=e.user,n=e.channel,o=e.stream,i=e.color,a=function(e,t,n){var r=(0,c.e7)([Zi.Z],(function(){return null!=n?(0,Ti.L2)(n,Zi.Z):null}),[n]),o=Mi.Z.getName(e.getGuildId(),e.id,t);return null==n?o:null!=(null==r?void 0:r.name)?Z.Z.Messages.GO_LIVE_USER_PLAYING.format({applicationName:null==r?void 0:r.name,username:o}):Z.Z.Messages.GO_LIVE_TILE_SCREEN.format({username:o})}(n,t,o);return null==t||null==o?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(yi.Z,{className:dl().avatar,size:d.EFr.SIZE_24,user:t,animate:!1}),(0,r.jsx)(d.xvT,{className:dl().playingText,variant:"text-md/medium",color:i,children:a})]})}function vl(e){var t,n=e.focusedApplication,o=e.focusedParticipant,i=e.channel,a=(0,di.Z)(i,!0),l=(0,Ei.qY)(i.id),u=null!=l;if((null==o?void 0:o.type)===jt.fO.ACTIVITY)null!=n&&(t=(0,r.jsxs)(r.Fragment,{children:[(0,
|
||
r.jsx)(Ci.ZP.Divider,{className:dl().divider}),(0,r.jsx)(Ri.Z,{game:n,className:dl().activityIcon}),(0,r.jsx)(d.xvT,{className:dl().playingText,variant:"text-md/normal",color:"none",children:(0,vi.Z)(n.name)}),a&&(0,r.jsx)(yl,{channel:i,focusedParticipant:o})]}));else if((null==o?void 0:o.type)===jt.fO.STREAM){var c=o.user,s=o.stream;t=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Ci.ZP.Divider,{className:dl().divider}),(0,r.jsx)(bl,{user:c,channel:i,stream:s,color:a?"header-primary":"none"}),a&&(0,r.jsx)(yl,{channel:i,focusedParticipant:o})]})}else u&&(t=(0,r.jsx)(wi,{guildEvent:l}));return(0,r.jsx)("div",{className:dl().container,children:t})}function ml(e){var t=e.channel,n=e.guild,o=e.appContext,i=e.inCall,a=e.isChatOpen,l=e.exitFullScreen,u=(0,c.cj)([Me.Z],(function(){return{focusedParticipant:Me.Z.getSelectedParticipant(t.id),participantsOpen:Me.Z.getParticipantsOpen(t.id)}}),[t.id]).focusedParticipant,s=(0,gi.ZP)(t),f=(0,Oi.Z)(t),d=hl((0,
|
||
mi.Z)((null==u?void 0:u.type)===jt.fO.ACTIVITY?[u.id]:[]),1)[0],p=Z.Z.Messages.VOICE_CHANNEL;t.isDM()?p=Z.Z.Messages.DM:t.isGroupDM()&&(p=Z.Z.Messages.GROUP_DM);var h,y=bi._.useExperiment({}),b=y.enabled,v=y.left,m=(0,Pi.Z)(t.guild_id,!b),g=null!=m?m[t.name.toLowerCase()]:void 0,O=null!=g?[g,null!==(h=xi.Z[g])&&void 0!==h?h:"#607D8B"]:void 0;return(0,r.jsxs)(Ci.ZP,{onDoubleClick:Ni.O,transparent:!0,className:(0,Jn.Q)(sl.BR.DARK),toolbar:(0,r.jsx)(ul,{channel:t,appContext:o,inCall:i,isChatOpen:a,exitFullScreen:l}),children:[null!=O&&v?(0,r.jsx)(Ai.MA,{emojiAndColor:O,channelEmojiLeftOfIcon:v}):null,null!=f?(0,r.jsx)(Ci.ZP.Icon,{icon:f,disabled:!0,"aria-label":p}):null,null==O||v?null:(0,r.jsx)(Ai.MA,{emojiAndColor:O,channelEmojiLeftOfIcon:v}),(0,r.jsx)(Ci.ZP.Title,{children:s}),(0,r.jsx)(Ai.TS,{channel:t,guild:n}),(0,r.jsx)(vl,{focusedApplication:d,focusedParticipant:u,channel:t})]})}var gl=(0,
|
||
d.Xvx)("VoiceChannelEffectsCall"),Ol=gl.Layer,El=gl.LayerContainer,Cl=gl.LayerProvider,jl=El,Sl=Cl;const Il=Ol;var _l=n(9134),wl=n(255088),xl=n(182306),Pl=n(229400),Nl=n(563135),Al=n(318715),Tl=n(468874),Zl=n(407761),Ml=n(99452),Rl=n(472034),Ll=n(15162),Dl=n(668785),kl=n(962627),Ul=n.n(kl);function Bl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fl(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Gl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Fl(e,t,n[t])}))}return e}function Hl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Vl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Bl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bl(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wl(e){var t=e.renderPopout,n=e.onMouseEnter,i=e.onMouseLeave,a=e.closePopout,l=e.isHovered,u=Hl(e,["renderPopout","onMouseEnter","onMouseLeave","closePopout","isHovered"]);o.useEffect((function(){l||a()}),[a,l]);return(0,r.jsx)("div",{onMouseEnter:n,onMouseLeave:i,children:t(Gl({closePopout:a},u))})}function zl(e){var t=e.renderPopout,n=e.children,i=function(e){"focus"===e.type||s||b()},a=function(){s||v()},l=function(e){m();f(!s);h&&!s||e()},u=(0,J.bp)(),c=Vl(o.useState(!1),2),s=c[0],f=c[1],p=(0,Ll.Z)(200,300),h=p.isHovered,y=p.setIsHovered,b=p.onMouseEnter,v=p.onMouseLeave,m=p.cancelTimers,g=h||s,O=u===oe.IlC.POPOUT;return(0,r.jsx)(d.yRy,{shouldShow:g,animationPosition:"top",position:"top",align:O?"left":"center",spacing:16,onRequestClose:function(){y(!1);f(!1)},renderPopout:function(e){return(0,r.jsx)(Wl,Gl({
|
||
isHovered:g,onFocus:function(){return f(!0)},onMouseEnter:b,onMouseLeave:a,renderPopout:t},e))},children:function(e){var t=e.onClick,o=e.onKeyDown;return(0,r.jsx)(r.Fragment,{children:n({onClick:function(e){return l((function(){return t(e)}))},onKeyDown:function(e){return function(e,t){e.key!==Dl.vn.ENTER&&e.key!==Dl.vn.SPACE||l((function(){return t(e)}))}(e,o)},className:Ul().actionBarButton,onMouseEnter:i,onMouseLeave:a,isActive:g})})}})}function Yl(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Kl(){Kl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return Kl.apply(this,arguments)}function ql(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){
|
||
var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ql(){var e=(0,Al.ZP)([Zl.Z],(function(){return Zl.Z.getDrawMode()})),t=(null==e?void 0:e.type)===Ml.W.LINE,n=function(){t?(0,Tl.Bo)(null):(0,Tl.Bo)({type:Ml.W.LINE})};return(0,r.jsx)(zl,{renderPopout:function(){return null},children:function(e){var o=Kl({},e);return(0,r.jsx)(be.Z,ql(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Yl(e,t,n[t])}))}return e}({},o),{label:Z.Z.Messages.SHARED_CANVAS_DRAW_MODE_LINE,isActive:t,iconComponent:Rl.Z,onClick:n}))}})}var Xl=n(869530)
|
||
;function Jl(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function $l(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function eu(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function tu(e){
|
||
var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=eu(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",$l(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Jl(e,t,n[t])}))}return e}({},(0,zn.Z)(c)),{width:n,height:i,viewBox:"0 0 20 16",children:[(0,r.jsx)("path",{d:"M15.428 8.127H4.368a.923.923 0 0 1-.921-.921c0-.576.533-.859 1.012-.931l8.656-1.754-.49-2.782L4.3 3.524C2.068 3.856.681 5.267.681 7.206a3.69 3.69 0 0 0 3.687 3.686h11.06a.922.922 0 0 1 0 1.843H2.063a.46.46 0 0 0-.461.461v1.843a.46.46 0 0 0 .46.461h13.364a3.686 3.686 0 1 0 0-7.373Z",fill:l,className:u}),(0,r.jsx)("path",{
|
||
d:"M19.152 1.602a.46.46 0 0 0-.477-.38l-3.305.166-.089-.507a.46.46 0 0 0-.534-.374l-.907.16a.46.46 0 0 0-.374.534l.64 3.63a.46.46 0 0 0 .534.374l.908-.16a.46.46 0 0 0 .373-.534l-.09-.507 3.163-.974a.46.46 0 0 0 .318-.52l-.16-.908Z",fill:l,className:u})]}))}function nu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ru(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ou(e){var t=e.channel,n=(0,Al.ZP)([Zl.Z],(function(){return Zl.Z.getDrawMode()})),o=(null==n?void 0:n.type)===Ml.W.EMOJI_HOSE,i=function(e,t){null!=e?(0,
|
||
Tl.Bo)({type:Ml.W.EMOJI_HOSE,emojiName:e.name,emojiId:e.id}):o&&(0,Tl.Bo)(null);null==t||t()};return(0,r.jsx)(zl,{renderPopout:function(e){var n=e.closePopout,o=e.onFocus;return(0,r.jsx)(ye.Z,{children:(0,r.jsx)(Xl.Z,{title:Z.Z.Messages.SHARED_CANVAS_DRAW_MODE_EMOJI_HOSE,channel:t,closePopout:n,onFocus:o,onSelectEmoji:function(e){return i(e,n)}})})},children:function(e){return(0,r.jsx)(be.Z,ru(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){nu(e,t,n[t])}))}return e}({},e),{iconComponent:tu,isActive:o||e.isActive,onClick:function(t){i(null);e.onClick(t)}}))}})}var iu=n(73407),au=n(761449),lu=n(986279),uu=n(957430);function cu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}
|
||
function su(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function fu(e){var t=e.channel,n=(0,c.e7)([lu.Z],(function(){return lu.Z.effectCooldownEndTime})),i=o.useMemo((function(){return null!=n?(n.getTime()-Date.now())/1e3:0}),[n]),a=(0,iu.Z)(null!=n?n:new Date).seconds,l=a>0;return(0,r.jsx)(zl,{renderPopout:function(e){var n=e.closePopout,o=e.onFocus;return(0,r.jsx)(ye.Z,{children:(0,r.jsx)(uu.Z,{channel:t,closePopout:n,onFocus:o})})},children:function(e){var t=e.onMouseEnter,n=su(e,["onMouseEnter"]);return(0,r.jsx)(au.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){cu(e,t,n[t])}))}return e}({totalCooldownSeconds:i,remainingCooldownSeconds:a,onMouseEnter:function(e){return function(e,t){l||t(e)}(e,t)}},n))}})}var du=n(641429),pu=n(79987),hu=n(203158);function yu(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function bu(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){yu(i,r,o,a,l,"next",e)}function l(e){yu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function vu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function mu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){vu(e,t,n[t])}))}return e}var gu=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}
|
||
if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Ou(e){var t=e.channel,o=function(e){null!=i&&(0,y.jW)(e,bu((function(){var e,t;return gu(this,(function(o){switch(o.label){case 0:return[4,n.e(56674).then(n.bind(n,656674))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,mu({guildId:i},e))}]}}))})))},i=t.getGuildId(),a=(0,pu.Z)(t),l=a.mute,u=a.suppress,c=(0,Al.ZP)([Mr.Z],(function(){return Mr.Z.isDeaf()}));return null==i?null:(0,r.jsx)(zl,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(ye.Z,{children:(0,r.jsx)(du.Z,{guildId:i,onClose:t,analyticsSource:"action bar button"})})},children:function(e){return(0,r.jsx)(be.Z,mu({
|
||
label:l?Z.Z.Messages.SOUNDBOARD_OPEN_SOUNDBOARD_ERROR_GUILD_MUTE:u?Z.Z.Messages.SOUNDBOARD_OPEN_SOUNDBOARD_ERROR_SUPPRESSED:c?Z.Z.Messages.SOUNDBOARD_OPEN_SOUNBOARRD_ERROR_DEAFENED:void 0,iconComponent:hu.Z,disabled:l||u||c,onContextMenu:o},e))}})}var Eu=n(532378);function Cu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ju(){ju=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return ju.apply(this,arguments)}function Su(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Iu(){var e=(0,Al.ZP)([Zl.Z],(function(){return!Zl.Z.visibleOverlayCanvas}));return(0,r.jsx)(zl,{renderPopout:function(){return null},children:function(t){var n=ju({},t);return(0,r.jsx)(be.Z,Su(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Cu(e,t,n[t])}))}return e}({},n),{label:Z.Z.Messages.SHARED_CANVAS_HIDE_OVERLAY_DRAWINGS,isActive:e,iconComponent:Eu.Z,onClick:Tl.LT}))}})}var _u=n(80305),wu=n.n(_u);function xu(e){var t,n,o=e.channel,i=e.hasActiveStream,a=(0,c.e7)([oi.default],(function(){var e=oi.default.getCurrentUser();u()(null!=e,"CenterControlTray: currentUser cannot be undefined");return e})),l=null!=(0,Ze.Z)(),s=_l.Z.useExperiment({
|
||
guildId:null!==(t=null==o?void 0:o.guild_id)&&void 0!==t?t:""}).isSharedCanvasEnabled,f=wl.ZP.useExperiment({guildId:null!==(n=null==o?void 0:o.guild_id)&&void 0!==n?n:""}).allowSoundboard;if(null==o||o.isPrivate()||l)return null;var d=f&&(0,xl.Z)(o)&&(0,Pl.O)(),p=Nl.ZP.can({permission:oe.Plq.ADD_REACTIONS,user:a,context:o});return(0,r.jsxs)("div",{className:wu().voiceEffectsActionBar,children:[d&&(0,r.jsx)(Ou,{channel:o}),p&&(0,r.jsx)(fu,{channel:o}),s&&i&&(0,r.jsx)(Ql,{}),s&&i&&(0,r.jsx)(ou,{channel:o}),s&&i&&(0,r.jsx)(Iu,{})]})}var Pu=n(730704),Nu=n.n(Pu);function Au(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zu(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Mu(e){return function(){var t=this,n=arguments
|
||
;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Zu(i,r,o,a,l,"next",e)}function l(e){Zu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ru(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}function Du(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ku(e){ku=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return ku(e)}function Uu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Du(e,t,n[t])}))}return e}
|
||
function Bu(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Fu(e,t){return!t||"object"!==Vu(t)&&"function"!=typeof t?Tu(e):t}function Gu(e,t){Gu=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Gu(e,t)}function Hu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o
|
||
}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Au(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Au(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Vu=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Wu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=ku(e);if(t){var o=ku(this).constructor;n=Reflect.construct(r,arguments,o)
|
||
}else n=r.apply(this,arguments);return Fu(this,n)}}var zu,Yu,Ku=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop()
|
||
;continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},qu=(Du(zu={},oe.AEg.NORMAL,Nu().normal),Du(zu,oe.AEg.MINIMUM,Nu().minimum),Du(zu,oe.AEg.NO_CHAT,Nu().noChat),Du(zu,oe.AEg.FULL_SCREEN,Nu().fullScreen),zu),Qu=(Du(Yu={},oe.IlC.POPOUT,Nu().popout),Du(Yu,oe.IlC.APP,null),Du(Yu,oe.IlC.OVERLAY,null),Yu);function Xu(e){var t=e.resizableNode,n=e.onResize,i=e.onResizeEnd,a=e.maxHeight,l=Hu(o.useState(null),2),u=l[0],c=l[1];o.useEffect((function(){var e,n;c(null!==(n=null===(e=t.current)||void 0===e?void 0:e.offsetHeight)&&void 0!==n?n:null)}),[t]);var s=(0,X.Z)({initialElementDimension:u,minDimension:200,maxDimension:a,resizableDomNodeRef:t,onElementResize:n,onElementResizeEnd:i,orientation:X.y.VERTICAL_BOTTOM});return(0,r.jsx)("div",{onMouseDown:s,className:Nu().resizeHandle})}var Ju=function(e){!function(e,t){
|
||
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Gu(e,t)}(i,e);var t=Wu(i);function i(){Ru(this,i);var e;(e=t.apply(this,arguments))._prevLayout=oe.AEg.MINIMUM;e._wrapperRef=o.createRef();e._callContainerRef=o.createRef();e._channelChatRef=o.createRef();e._contentRef=o.createRef();e._videoBackgroundTooltipTimeout=new f.V7;e._lastIdleProps=null;e.state={resizedHeight:yt.ZP.callHeaderHeight};e.handleFullScreenChange=function(){var t=e.getRootNode();null!=t&&((0,si.rB)(t,e.currentDocument)||e.props.layout!==oe.AEg.FULL_SCREEN||e.handleFullScreen())};e.handleFullScreen=function(){var t=e.getRootNode();if(null!=t)if(e.props.layout!==oe.AEg.FULL_SCREEN){e._prevLayout=e.props.layout;e.handleChangeLayout(oe.AEg.FULL_SCREEN);(0,si.Dj)(t)}else e.maybeLeaveFullScreen()};e.maybeLeaveFullScreen=function(){var t=e.getRootNode()
|
||
;if(null!=t&&e.props.layout===oe.AEg.FULL_SCREEN){e.handleChangeLayout(e._prevLayout);(0,si.Pr)(t,e.currentDocument)}};e.handleToggleLayout=function(){e.handleChangeLayout(e.props.layout===oe.AEg.NORMAL?oe.AEg.NO_CHAT:oe.AEg.NORMAL)};e.handleChangeLayout=function(t){var n=e.props,r=n.channel,o=n.appContext;if(n.layout!==t){h.Z.updateLayout(r.id,t,o);t===oe.AEg.FULL_SCREEN&&r.isPrivate()&&re.S.dispatch(oe.CkL.TEXTAREA_BLUR)}};e.handleDisconnect=function(){e.props.layout===oe.AEg.FULL_SCREEN&&e.handleFullScreen()};e.handleContextMenu=function(t,o){var i,a,l=e.props,c=l.channel,s=l.appContext,f=l.layout,d={onClose:function(){var t;return null===(t=e._lastIdleProps)||void 0===t?void 0:t.onAllowIdle("menu")},context:s};null===(i=e._lastIdleProps)||void 0===i||i.onPreventIdle("menu");null===(a=e._lastIdleProps)||void 0===a||a.onActive();switch(t.type){case jt.fO.HIDDEN_STREAM:case jt.fO.STREAM:var p=Tu(e);(0,y.jW)(o,Mu((function(){var e,o;return Ku(this,(function(i){switch(i.label){case 0:
|
||
return[4,n.e(97848).then(n.bind(n,997848))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,Bu(Uu({},e),{stream:t.stream,exitFullscreen:p.maybeLeaveFullScreen,appContext:s}))}]}}))})),d);return;case jt.fO.USER:var h=oi.default.getUser(t.id);if(null!=h)switch(c.type){case oe.d4z.DM:return(0,y.jW)(o,Mu((function(){var e,t;return Ku(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(50865)]).then(n.bind(n,550865))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,Bu(Uu({},e),{showChannelCallItems:!0,showMediaItems:!0,user:h,channel:c,showModalItems:!0}))}]}}))})),d);case oe.d4z.GROUP_DM:return(0,y.jW)(o,Mu((function(){var e,t;return Ku(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(97539)]).then(n.bind(n,597539))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,Bu(Uu({},e),{showChannelCallItems:!0,showMediaItems:!0,
|
||
showChatItems:f===oe.AEg.MINIMUM||f===oe.AEg.NORMAL,user:h,channel:c,showModalItems:!0}))}]}}))})),d);case oe.d4z.GUILD_VOICE:var b=c.getGuildId();u()(null!=b,"GuildID null for guild voice channel");return(0,y.jW)(o,Mu((function(){var e,t;return Ku(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(3454),n.e(77357),n.e(14136)]).then(n.bind(n,914136))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,Bu(Uu({},e),{showMediaItems:!0,showChannelCallItems:!0,showChatItems:!1,user:h,channel:c,guildId:b,showModalItems:!0}))}]}}))})),d)}}};e.handleCallResize=function(t){e.setState({resizedHeight:t})};e.handleSelectParticipant=function(t,n){var r=e.props,o=r.channel,i=r.selectedParticipant,a=r.allActiveStreams,l=r.inCall,u=r.mode;if((0,jt._5)(t)&&(0,ft.p9)(o,ii.Z,vn.Z,mn.Z,Te.Z)[0]){b.default.selectVoiceChannel(o.id);0===a.filter((function(e){return(0,st.V9)(e)===t.id&&e.state!==oe.jm8.ENDED})).length&&(0,v.rn)((0,st.my)(t.id),{
|
||
forceMultiple:n.shiftKey})}l&&u===oe.WtW.VIDEO&&((null==i?void 0:i.id)===t.id?h.Z.selectParticipant(o.id,null):h.Z.selectParticipant(o.id,t.id))};e.handleOpenPopout=function(){var t=e.props,n=t.channel,r=function(){var e=n.getGuildId();null!=e&&(0,ht.uL)((0,li.LY)(e));dt.hP(n)};t.connectedToEmbeddedActivity?(0,ne.Z)(r):r()};e.handleStayOnTop=function(e){dt.hY(oe.KJ3.CHANNEL_CALL_POPOUT,e)};e.handleClosePopout=function(){dt.xv(oe.KJ3.CHANNEL_CALL_POPOUT)};e.handleFullscreenParticipant=function(t,n){var r=e.props,o=r.layout,i=r.selectedParticipant,a=o===oe.AEg.FULL_SCREEN;(!a&&(null==i?void 0:i.id)!==t.id||a&&(null==i?void 0:i.id)===t.id)&&e.handleSelectParticipant(t,n);e.handleFullScreen()};e.renderRegionSelect=function(){var t,n=e.props,o=n.call,i=n.channel,a=n.layout;e.inPopout||a===oe.AEg.FULL_SCREEN||null==o||i.isManaged()||(t=(0,r.jsx)(Y,{call:o}));return(0,r.jsx)(E.Z,{justify:E.Z.Justify.END,children:t})};e.renderBottomCenter=function(){
|
||
var t=e.props,n=t.channel,o=t.inCall,i=t.layout;return o||i===oe.AEg.MINIMUM||i===oe.AEg.NORMAL?(0,r.jsx)(bt.ZP,{exitFullScreen:e.maybeLeaveFullScreen,channel:n,onDisconnectCall:e.handleDisconnect,idleProps:e._lastIdleProps}):null};e.renderBottomLeft=function(){var t=e.props,n=t.layout,o=t.mentionCount,i=t.channel,l=t.appContext,u=t.useNewInviteButton,c=t.selectedParticipant,s=t.shouldUseVoiceEffectsActionBar,f=t.inCall,d=t.participants;if(!f)return null;var p=n===oe.AEg.NO_CHAT?To.Directions.UP:To.Directions.DOWN,h=[oe.AEg.FULL_SCREEN,oe.AEg.NO_CHAT].includes(n),y=d.some((function(e){return e.type===jt.fO.STREAM})),b=n===oe.AEg.FULL_SCREEN?function(){e._prevLayout=oe.AEg.NORMAL;e.handleFullScreen()}:e.handleToggleLayout,v=e.viewProperties,m=v.canChangeLayout,g=v.canInvite,O=u?(0,r.jsx)(Eo.Z,{channel:i,stream:(null==c?void 0:c.type)===jt.fO.STREAM?(0,st.my)(c.id):void 0,applicationId:(null==c?void 0:c.type)===jt.fO.ACTIVITY?c.id:void 0,appContext:l,className:Nu().leftTrayIcon,
|
||
exitFullScreen:e.maybeLeaveFullScreen,analyticsLocation:i.type===oe.d4z.GUILD_VOICE?oe.ZY5.GUILD_CHANNEL:oe.ZY5.DM_CHANNEL}):(0,r.jsx)(Ro.Z,{channel:i,stream:(null==c?void 0:c.type)===jt.fO.STREAM?(0,st.my)(c.id):void 0,className:Nu().leftTrayIcon,exitFullScreen:e.maybeLeaveFullScreen,analyticsLocation:i.type===oe.d4z.GUILD_VOICE?oe.ZY5.GUILD_CHANNEL:oe.ZY5.DM_CHANNEL});return s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(xu,{channel:i,hasActiveStream:y}),(0,r.jsx)(ct,{showLeftDivider:!0,themeable:e.viewProperties.useTheme,className:Nu().leftTrayIcon,channel:i})]}):(0,r.jsxs)(r.Fragment,{children:[g?O:null,m?(0,r.jsxs)(E.Z,{className:Nu().iconWrapper,align:E.Z.Align.CENTER,grow:0,children:[(0,r.jsx)(To,{label:h?Z.Z.Messages.SHOW_CHAT:Z.Z.Messages.HIDE_CHAT,direction:p,className:Nu().leftTrayIcon,onClick:b}),h&&o>0?(0,r.jsx)(ai.mA,{className:Nu().badge,count:o}):null]}):null,(null==c?void 0:c.type)===jt.fO.STREAM||(null==c?void 0:c.type)===jt.fO.ACTIVITY?(0,r.jsx)(jo.Z,{children:(0,
|
||
r.jsx)(cl.Z,{className:a()(Nu().leftTrayIcon,Nu().viewersButton),participant:c,maxVisibleUsers:4,guildId:i.getGuildId(),channelId:i.id,disableInteraction:e.inPopout||n===oe.AEg.FULL_SCREEN})}):null,(0,r.jsx)(ct,{themeable:e.viewProperties.useTheme,className:Nu().leftTrayIcon,channel:i})]})};e.renderBottomRight=function(){var t=e.props,n=t.popoutWindow,o=t.popoutWindowAlwaysOnTop,i=t.currentUserId,a=t.selectedParticipant,l=t.clipsEnabled,u=e.viewProperties,c=u.canFullscreen,s=u.canStayOnTop,f=u.canPopout,d=u.useTheme;return(0,r.jsxs)(r.Fragment,{children:[l&&(null==a?void 0:a.type)===jt.fO.STREAM?(0,r.jsx)(Ne,{className:Nu().rightTrayIcon,participant:a}):null,null!=a&&a.type!==jt.fO.ACTIVITY&&a.user.id!==i?(0,r.jsx)(ko.Z,{context:(0,fi.Z)(a.type),userId:a.user.id,currentWindow:e.inPopout?null!=n?n:void 0:window,sliderClassName:Nu().volumeSlider,className:Nu().rightTrayIcon}):null,s?(0,r.jsx)(Do.Z,{className:Nu().rightTrayIcon,popoutWindowAlwaysOnTop:o,onToggleStayOnTop:e.handleStayOnTop
|
||
}):null,f?(0,r.jsx)(Lo.Z,{themeable:d,popoutOpen:e.popoutOpen,className:Nu().rightTrayIcon,onOpenPopout:e.handleOpenPopout,onClosePopout:e.handleClosePopout}):null,c?(0,r.jsx)(Mo.Z,{themeable:d,node:e.getRootNode(),guestWindow:n,className:Nu().rightTrayIcon,onClick:e.handleFullScreen}):null]})};e.renderChatButton=function(t){var n=t.className,o=t.showingClassName,i=e.props,a=i.channel,l=i.chatOpen,u=i.inCall;return l||e.popoutOpen&&!e.inPopout&&u?null:(0,r.jsx)(Zo.T,{channelId:a.id,className:n,showingClassName:o})};e.renderChatToasts=function(){var t=e.props,n=t.showChatToasts,o=t.chatOpen,i=t.channel,a=t.inCall;return!n||o||e.popoutOpen&&!e.inPopout&&a?null:(0,r.jsx)(pi.ZP,{children:(0,r.jsx)(So.Z,{className:Nu().chatToasts,channelId:i.id})})};e.renderVoiceChannelEffects=function(){var t=e.props.channel;return(0,r.jsx)(Il,{children:(0,r.jsx)(Jo,{channelId:t.id})})};e.renderHeader=function(){
|
||
var t=e.props,n=t.renderExternalHeader,o=t.channel,i=t.guild,a=t.appContext,l=t.chatOpen,u=t.inCall,c=e.viewProperties,s=c.useExternalHeader,f=c.canSelectRegion;return c.renderHeader?(0,r.jsxs)(jo.Z,{children:[(0,r.jsx)("div",{className:Nu().headerWrapper,children:s?null==n?void 0:n():(0,r.jsx)(ml,{channel:o,guild:i,appContext:a,inCall:u,isChatOpen:l||e.popoutOpen&&!e.inPopout&&u,exitFullScreen:e.maybeLeaveFullScreen})}),f?e.renderRegionSelect():null]}):null};return e}var l=i.prototype;l.getRootNode=function(){var e,t;return(null!==(t=null===(e=this.props.popoutWindow)||void 0===e?void 0:e.window)&&void 0!==t?t:window).document.getElementById("app-mount")};l.componentDidMount=function(){var e=this.props,t=e.channel,n=e.layout;this.currentDocument.addEventListener(si.NO,this.handleFullScreenChange);Xn.default.track(oe.rMx.VIDEO_LAYOUT_TOGGLED,Uu({video_layout:this.inPopout?"popout":n},(0,fe.AB)(t.id)))};l.componentWillUnmount=function(){this._videoBackgroundTooltipTimeout.stop()
|
||
;this.currentDocument.removeEventListener(si.NO,this.handleFullScreenChange);this.inPopout&&(0,ui.id)()||this.maybeLeaveFullScreen()};l.componentDidUpdate=function(e){var t=this,n=this.props,r=n.participantsOpen,o=n.inCall,i=n.mode,a=n.layout,l=this.getRootNode();null!=l&&e.mode===oe.WtW.VIDEO&&i===oe.WtW.VOICE&&(0,si.rB)(l,this.currentDocument)&&(0,si.Pr)(l,this.currentDocument);if(e.participantsOpen!==r||a!==e.layout){var u;null===(u=this._contentRef.current)||void 0===u||u.triggerResize()}e.inCall&&!o&&this.inPopout&&p.Z.wait((function(){return t.handleClosePopout()}))};l.renderContent=function(e){var t=this.props,n=t.selectedParticipant,o=t.inCall,i=t.hasConnectPermission,a=t.mode,l=t.popoutWindow,u=t.participantsOpen,c=t.participants,s=t.filteredParticipants,f=t.participantsVersion,d=t.channel,p=t.guild,h=t.layout,y=t.forceShowControls,b=t.awaitingRemoteSessionInfo,v=h===oe.AEg.MINIMUM,m=v||h===oe.AEg.NORMAL,g=o&&a===oe.WtW.VIDEO;this._lastIdleProps=e;return(0,r.jsx)(Io.Z,Bu(Uu({
|
||
renderHeader:this.renderHeader,renderBottomLeft:this.renderBottomLeft,renderBottomCenter:this.renderBottomCenter,renderBottomRight:this.renderBottomRight,renderChatButton:d.isGuildVoice()?this.renderChatButton:void 0,renderChatToasts:d.isGuildVoice()?this.renderChatToasts:void 0,renderVoiceChannelEffects:this.renderVoiceChannelEffects},e),{screenMessage:this.screenMessage,disableGradients:v,idle:!y&&o&&!v&&e.idle,children:o&&this.popoutOpen&&!this.inPopout?null:(0,r.jsx)(go,{ref:this._contentRef,inCall:o,paused:this.paused,channel:d,hasConnectPermission:i,guild:p,participants:c,filteredParticipants:s,participantsVersion:f,selectedParticipant:g?n:null,layout:h,idle:e.idle,mode:a,onSelectParticipant:this.handleSelectParticipant,onContextMenuParticipant:this.handleContextMenu,showParticipants:u&&!m,popoutWindow:this.inPopout?l:null,awaitingRemoteSessionInfo:b})}))};l.render=function(){
|
||
var e,t=this,n=this.props,o=n.layout,i=n.channel,l=n.guild,u=n.mode,c=n.chatOpen,s=n.appContext,f=n.maxSidebarWidth,d=n.maxHeight,p=n.inCall,h=this.state.resizedHeight,y=u===oe.WtW.VIDEO,b=o!==oe.AEg.NO_CHAT&&o!==oe.AEg.FULL_SCREEN&&null!=d;return(0,r.jsxs)("div",{className:a()(Nu().wrapper,qu[o],Qu[s],(e={},Du(e,Nu().poppedOut,this.popoutOpen&&!this.inPopout&&o!==oe.AEg.NO_CHAT&&i.isPrivate()),Du(e,Nu().video,y),Du(e,Nu().chatSidebarOpen,c),e)),ref:function(e){t._wrapperRef.current=e;t.props.wrapperRef.current=e},style:b&&null!=h?{minHeight:200,maxHeight:d,height:h}:void 0,children:[(0,r.jsx)("div",{className:a()(Nu().callContainer,Du({},(0,Jn.Q)(oe.BRd.DARK),y)),ref:function(e){t._callContainerRef.current=e;t.props.callContainerRef.current=e},children:(0,r.jsx)(Co.ZP,{timeout:2e3,children:function(e){return t.renderContent(e)}})}),b&&(0,r.jsx)(Xu,{maxHeight:d,resizableNode:this._wrapperRef,onResize:this.handleCallResize,onResizeEnd:this.props.updateStoredCallHeaderHeight}),(0,
|
||
r.jsx)("div",{className:Nu().channelChatWrapper,ref:function(e){t._channelChatRef.current=e;t.props.channelChatRef.current=e},children:c&&(!p||!this.popoutOpen||this.inPopout)&&(0,r.jsx)(hi.Z,{channel:i,guild:l,maxWidth:f})})]})};!function(e,t,n){t&&Lu(e.prototype,t);n&&Lu(e,n)}(i,[{key:"nativePopoutSupported",get:function(){return ui.FB&&ci.default.supportsFeature(oe.eRX.POPOUT_WINDOWS)}},{key:"popoutSupported",get:function(){return!ui.FB||this.nativePopoutSupported}},{key:"popoutOpen",get:function(){var e=this.props.popoutWindow;return null!=e&&!e.closed}},{key:"currentDocument",get:function(){var e=this.props.popoutWindow;return null!=e&&this.popoutOpen&&this.inPopout?e.document:document}},{key:"screenMessage",get:function(){return this.popoutOpen&&!this.inPopout&&this.props.inCall?{mainText:Z.Z.Messages.POPOUT_PLAYER_OPENED}:null}},{key:"paused",get:function(){return this.popoutOpen&&!this.inPopout}},{key:"inPopout",get:function(){return this.props.appContext===oe.IlC.POPOUT}},{
|
||
key:"viewProperties",get:function(){var e=this.props,t=e.layout,n=e.mode,r=e.channel,o=e.inCall,i=n===oe.WtW.VIDEO&&o&&!(this.popoutOpen&&!this.inPopout),a=n===oe.WtW.VIDEO&&o&&this.popoutSupported,l=n!==oe.WtW.VOICE&&r.isPrivate()&&!this.inPopout&&o,u=r.type===oe.d4z.GUILD_VOICE,c=t===oe.AEg.MINIMUM||t===oe.AEg.NORMAL,s=this.inPopout&&this.nativePopoutSupported,f={renderHeader:!0,useTheme:!1,useExternalHeader:c,canInvite:u,canPopout:a,canFullscreen:i,canSelectRegion:r.isPrivate(),canChangeLayout:l,canStayOnTop:s};if(!o)return Bu(Uu({},f),{canFullscreen:i,useTheme:!0});switch(t){case oe.AEg.FULL_SCREEN:return Bu(Uu({},f),{canPopout:!this.inPopout&&this.popoutOpen&&f.canPopout});case oe.AEg.MINIMUM:return Bu(Uu({},f),{canPopout:!1,useTheme:!0});case oe.AEg.NO_CHAT:case oe.AEg.NORMAL:return Uu({},f)}}}]);return i}(o.PureComponent);const $u=function(e){var t,n,i=e.channel,a=e.renderExternalHeader,l=e.maxHeight,u=(0,q.Z)(),f=u.width,p=void 0===f?0:f,h=u.ref,y=(0,
|
||
q.Z)(),b=y.width,v=void 0===b?0:b,g=y.height,O=void 0===g?0:g,E=y.ref,C=(0,q.Z)().ref,j=(0,J.bp)(),S=(0,Ze.Z)(),I=(0,c.e7)([ri.Z],(function(){return(null!==(t=null==S?void 0:S.channelId)&&void 0!==t?t:ri.Z.getVoiceChannelId())===i.id})),_=(0,c.cj)([Me.Z],(function(){var e=j===oe.IlC.POPOUT,t=Me.Z.getMode(i.id);e&&(t=oe.WtW.VIDEO);var n=t===oe.WtW.VIDEO?Me.Z.getLayout(i.id,j):oe.AEg.MINIMUM;e&&n!==oe.AEg.FULL_SCREEN&&(n=oe.AEg.NO_CHAT);return{mode:t,layout:n,selectedParticipant:t!==oe.WtW.VOICE?Me.Z.getSelectedParticipant(i.id):null,participants:Me.Z.getParticipants(i.id),filteredParticipants:Me.Z.getFilteredParticipants(i.id),participantsOpen:Me.Z.getParticipantsOpen(i.id),chatOpen:Me.Z.getChatOpen(i.id),participantsVersion:Me.Z.getParticipantsVersion(i.id)}}),[i.id,i.type,I]),w=_.participants,x=_.filteredParticipants,P=_.participantsVersion,N=_.mode,A=_.layout,T=_.participantsOpen,M=_.chatOpen,R=_.selectedParticipant,L=(0,c.Wu)([$o.Z],(function(){return $o.Z.getAllActiveStreams()
|
||
})),D=(0,c.cj)([$o.Z],(function(){return{selectedStream:null!=R?$o.Z.getActiveStreamForStreamKey(R.id):null}}),[R]).selectedStream,k=(0,c.e7)([vn.Z],(function(){return vn.Z.getGuild(i.getGuildId())})),U=(0,c.e7)([ti.Z],(function(){return ti.Z.getCall(i.id)}),[i.id]),B=(0,c.e7)([ni.ZP],(function(){return ni.ZP.getMentionCount(i.id)}),[i.id]),F=(0,c.e7)([Wt.default],(function(){return Wt.default.getId()})),G=(0,c.cj)([pt.Z],(function(){return{popoutWindow:pt.Z.getWindow(oe.KJ3.CHANNEL_CALL_POPOUT),popoutWindowAlwaysOnTop:pt.Z.getIsAlwaysOnTop(oe.KJ3.CHANNEL_CALL_POPOUT)}})),H=G.popoutWindow,V=G.popoutWindowAlwaysOnTop,W=(0,c.e7)([mn.Z],(function(){return mn.Z.can(oe.Plq.CONNECT,i)})),z=(0,c.e7)([ei.Z],(function(){return ei.Z.getToastsEnabled(i.id)})),Y=(0,c.e7)([Te.Z],(function(){return Te.Z.getAwaitingRemoteSessionInfo()})),X=(0,c.e7)([yt.ZP],(function(){return yt.ZP.callHeaderHeight})),ne=o.useCallback((function(e){m.ZP.updatedUnsyncedSettings({callHeaderHeight:e})
|
||
}),[]),re=null!==(n=null==k?void 0:k.id)&&void 0!==n?n:null,ie=(0,te.Z)(re,i.id),ae=(0,c.e7)([$.Z],(function(){return $.Z.getFetchState()}),[]),le=(0,Q.Z)(ae);o.useEffect((function(){"errored"===ae&&"errored"!==le&&(0,d.CFj)((0,d.Yz2)(Z.Z.Messages.EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR,d.pCN.FAILURE))}),[ae,le]);var ue=(0,c.e7)([ee.ZP],(function(){return null!=ee.ZP.getSelfEmbeddedActivityForChannel(i.id)}),[i]);ce();o.useEffect((function(){var e,t=!1,n=null,r=(e=Mu((function(){return Ku(this,(function(e){switch(e.label){case 0:return I&&N===oe.WtW.VIDEO?[4,ci.default.blockDisplaySleep()]:[3,2];case 1:n=e.sent();t&&null!=n&&ci.default.unblockDisplaySleep(n);e.label=2;case 2:return[2]}}))})),function(){return e.apply(this,arguments)});r();return function(){null!=n?ci.default.unblockDisplaySleep(n):t=!0}}),[I,N]);var fe=(0,di.Z)(i,!0),ye=(0,Ae.bn)(s.z$.CALL_CHAT_BUTTON_TEXT_IN_VOICE_COACH_MARK),be=(0,de.Z)(se.Z.CHANNEL_CALL).AnalyticsLocationProvider,ve=p-550,me=(0,
|
||
pe.G)(),ge=(0,c.e7)([he.Z],(function(){return he.Z.getSettings().clipsEnabled}));return(0,r.jsx)(be,{children:(0,r.jsx)(K.Z,{page:oe.ZY5.CHANNEL_CALL,children:(0,r.jsx)(pi.B2,{children:(0,r.jsxs)(Sl,{children:[(0,r.jsx)(Ju,{channel:i,guild:k,hasConnectPermission:W,participantsOpen:T,renderExternalHeader:a,appContext:j,call:U,popoutWindow:H,popoutWindowAlwaysOnTop:V,mentionCount:B,selectedStream:D,mode:N,inCall:I,participants:w,filteredParticipants:x,participantsVersion:P,layout:A,chatOpen:M,maxSidebarWidth:ve,shouldUseVoiceEffectsActionBar:fe,currentUserId:F,selectedParticipant:R,allActiveStreams:L,useNewInviteButton:ie,connectedToEmbeddedActivity:ue,showChatToasts:z,storedCallHeaderHeight:X,updateStoredCallHeaderHeight:ne,wrapperRef:h,callContainerDimensions:{width:v,height:O},callContainerRef:E,channelChatRef:C,width:p,maxHeight:l,forceShowControls:ye,awaitingRemoteSessionInfo:Y,clipsEnabled:me&&ge}),!i.isPrivate()&&(0,r.jsx)(jl,{}),(0,r.jsx)(pi.H_,{})]})})})})}},509097:(e,t,n)=>{
|
||
"use strict";n.d(t,{H_:()=>l,B2:()=>u,ZP:()=>c});var r=(0,n(707961).Xvx)("ChannelCallChat"),o=r.Layer,i=r.LayerContainer,a=r.LayerProvider,l=i,u=a;const c=o},753705:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(785893),o=n(667294),i=n(418705),a=n(247250),l=n(764079),u=n(973553),c=n(341305),s=n(281808),f=n(896490),d=n(284610),p=n(921122),h=n(189865),y=n(373438),b=n(930948),v=n(509097),m=n(2590),g=n(458947),O=n(473708),E=n(75627),C=n.n(E);const j=function(e){var t=e.channel,n=e.guild,E=e.maxWidth;o.useEffect((function(){(0,f.EW)(i.z$.CALL_CHAT_BUTTON_TEXT_IN_VOICE_COACH_MARK,{dismissAction:g.L.AUTO})}),[]);var j=o.useCallback((function(){a.Z.updateChatOpen(t.id,!1);b.S.safeDispatch(m.CkL.FOCUS_CHAT_BUTTON)}),[t.id]),S=(0,r.jsx)(y.ZP.Icon,{icon:h.Z,tooltip:O.Z.Messages.CLOSE,onClick:j});return(0,r.jsxs)(u.Z,{sidebarType:u.y.CallChatSidebar,maxWidth:E,floatingLayer:v.ZP,children:[(0,r.jsx)(c.Z,{channel:t,draftType:d.d.ChannelMessage}),(0,r.jsxs)(y.ZP,{toolbar:S,
|
||
"aria-label":O.Z.Messages.CHANNEL_HEADER_BAR_A11Y_LABEL,children:[(0,r.jsx)(y.ZP.Icon,{icon:p.Z,disabled:!0,"aria-label":O.Z.Messages.VOICE_CHAT_TEXT_CHANNEL}),(0,r.jsx)(y.ZP.Title,{children:t.name})]}),(0,r.jsx)("div",{className:C().chat,children:(0,r.jsx)(l.Z,{channel:t,guild:n,chatInputType:s.I.SIDEBAR},t.id)})]})}},496388:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(785893),o=(n(667294),n(441143)),i=n.n(o),a=n(202351),l=n(707961),u=n(213276),c=n(473903),s=n(656645),f=n(736097);var d=n(289150),p=n(2590),h=n(473708);function y(e){var t,n,o=e.onClose,y=e.onSelect,b=(0,a.e7)([c.default],(function(){var e=c.default.getCurrentUser();i()(null!=e,"VideoDeviceMenu: currentUser cannot be undefined");return e})),v=(t=(0,a.e7)([f.Z],(function(){return Object.values(f.Z.getVideoDevices())})),n=(0,a.e7)([f.Z],(function(){return f.Z.getVideoDeviceId()})),t.map((function(e){var t=e.id,o=e.disabled,i=e.name;return(0,r.jsx)(l.k5B,{group:"video-devices",id:"video-device-".concat(t),disabled:o,
|
||
label:i,checked:t===n,action:function(){return s.Z.setVideoDevice(t)}},"video-device-".concat(t))}))),m=(0,d.Z)(b.id);return(0,r.jsx)(u.Z,{object:p.qAy.CONTEXT_MENU,children:(0,r.jsxs)(l.v2r,{onClose:o,navId:"video-device-context","aria-label":h.Z.Messages.FORM_LABEL_VIDEO_DEVICE,onSelect:y,children:[(0,r.jsx)(l.kSQ,{label:h.Z.Messages.FORM_LABEL_VIDEO_DEVICE,children:v}),(0,r.jsx)(l.kSQ,{children:m})]})})}},668269:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(785893),o=(n(667294),n(707961)),i=n(656645),a=n(895303),l=n(126976),u=n(473708);function c(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,l,"next",e)}function l(e){c(i,r,o,a,l,"throw",e)}a(void 0)}))}}function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e){
|
||
for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}function p(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var h=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i
|
||
;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function y(e,t){t&&(0,l.p)()?(0,o.ZDy)(s((function(){var e,t;return h(this,(function(o){switch(o.label){case 0:
|
||
return[4,Promise.all([n.e(40532),n.e(32013)]).then(n.bind(n,432013))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,d({},e))}]}}))}))):t?(0,o.h7j)((function(e){return(0,r.jsx)(a.default,p(d({},e),{title:u.Z.Messages.SUPPRESSED,body:u.Z.Messages.SUPPRESSED_PERMISSION_BODY}))})):e?(0,o.h7j)((function(e){return(0,r.jsx)(a.default,p(d({},e),{title:u.Z.Messages.SERVER_MUTED_DIALOG_TITLE,body:u.Z.Messages.SERVER_MUTED_DIALOG_BODY}))})):i.Z.toggleSelfMute()}},284278:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(785893),o=(n(667294),n(944010)),i=n(895303),a=n(470856),l=n(473708);function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e)
|
||
;for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function s(e){var t=e.type,n=e.onConfirm,s=c(e,["type","onConfirm"]),f=t===a.K.STREAM?l.Z.Messages.HIDE_SELF_STREAM_CONFIRMATION_HEADER:l.Z.Messages.HIDE_SELF_VIDEO_CONFIRMATION_HEADER,d=t===a.K.STREAM?l.Z.Messages.HIDE_SELF_STREAM_CONFIRMATION_BODY:l.Z.Messages.HIDE_SELF_VIDEO_CONFIRMATION_BODY;return(0,r.jsx)(i.default,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){u(e,t,n[t])}))}return e}({confirmText:l.Z.Messages.CONFIRM,secondaryConfirmText:l.Z.Messages.DONT_ASK_AGAIN,title:f,cancelText:l.Z.Messages.CANCEL,onConfirm:n,onConfirmSecondary:function(){o.ZP.updatedUnsyncedSettings({
|
||
disableHideSelfStreamAndVideoConfirmationAlert:!0});n()},body:d},s))}},950761:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(247250),l=n(566706),u=n(473708);function c(e){var t=(0,o.e7)([l.Z],(function(){return l.Z.getVoiceParticipantsHidden(e)}));return(0,r.jsx)(i.S89,{id:"no-video-hide",label:u.Z.Messages.STREAM_SHOW_NON_VIDEO,checked:!t,action:function(){return a.Z.toggleVoiceParticipantsHidden(e,!t)}})}},430510:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(379991),l=n(481008),u=n(177570),c=n(736818);var s=n(284278),f=n(470856),d=n(473708);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name)
|
||
;if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){var n=b(function(e,t){var n=(0,o.e7)([c.default],(function(){return c.default.getId()})),r=(0,o.e7)([u.Z],(function(){var t=u.Z.getCurrentUserActiveStream();return null!=t&&t.channelId===e}),[e]);return[(null==t||t===n)&&r,(0,o.e7)([u.Z],(function(){return u.Z.isSelfStreamHidden(e)}),[e]),function(t){(0,l.pR)(e,t)}]}(e,t),3),p=n[0],v=n[1],m=n[2],g=(0,o.e7)([a.ZP],(function(){return a.ZP.disableHideSelfStreamAndVideoConfirmationAlert}));return p?(0,r.jsx)(i.S89,{id:"self-stream-hide",label:d.Z.Messages.SHOW_SELF_STREAM,checked:!v,action:function(){if(g||v)return m(!v);(0,i.h7j)((function(e){return(0,r.jsx)(s.Z,y(function(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){h(e,t,n[t])}))}return e}({},e),{type:f.K.STREAM,onConfirm:function(){return m(!v)}}))}))}}):null}},492692:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(379991),l=n(656645),u=n(736818),c=n(736097),s=n(36256);function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Yn.DEFAULT,n=(0,o.e7)([u.default],(function(){return u.default.getId()})),r=(0,o.e7)([c.Z],(function(){return c.Z.supports(s.AN.DISABLE_VIDEO)&&c.Z.isVideoEnabled()})),i=(0,o.e7)([c.Z],(function(){return c.Z.isLocalVideoDisabled(n,t)}),[n,t]),a=function(e){l.Z.setDisableLocalVideo(n,e,t)},f=null==e||e===n,d=f&&(r||i);return[d,i,a]}var d=n(284278),p=n(470856),h=n(473708);function y(e,t){
|
||
(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){b(e,t,n[t])}))}return e}function m(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}
|
||
function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Yn.DEFAULT,n=g(f(e,t),3),l=n[0],u=n[1],c=n[2],y=(0,
|
||
o.e7)([a.ZP],(function(){return a.ZP.disableHideSelfStreamAndVideoConfirmationAlert})),b=function(){if(y||u)return c(!u);(0,i.h7j)((function(e){return(0,r.jsx)(d.Z,m(v({},e),{type:p.K.VIDEO,onConfirm:function(){return c(!u)}}))}))};return l?(0,r.jsx)(i.S89,{id:"self-video-hide",label:h.Z.Messages.SHOW_SELF_VIDEO,checked:!u,action:b}):null}},289150:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(504001),l=n(736818),u=n(736097),c=n(473708),s=n(965126),f=n.n(s);function d(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,l,"next",e)}function l(e){d(i,r,o,a,l,"throw",e)}a(void 0)}))}}function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var b=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1
|
||
};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function v(e){var t=(0,i.vRw)(),s=(0,o.e7)([u.Z],(function(){return u.Z.isVideoEnabled()})),d=(0,o.e7)([l.default],(function(){return l.default.getId()===e})),v=(0,a.Z)();return s&&!v||!d?null:(0,r.jsx)(i.sNh,{id:"change-video-background",label:(0,r.jsx)("div",{className:f().item,children:s?c.Z.Messages.CAMERA_CHANGE_VIDEO_BACKGROUND_MENU_ITEM:c.Z.Messages.CAMERA_PREVIEW_MENU_ITEM}),action:function(){(0,i.ZDy)(p((function(){var e,t;return b(this,(function(o){switch(o.label){case 0:
|
||
return[4,Promise.all([n.e(40532),n.e(17260),n.e(26785),n.e(87820),n.e(70606),n.e(91418),n.e(50763),n.e(96043),n.e(10675),n.e(61012),n.e(76674)]).then(n.bind(n,763361))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,y(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){h(e,t,n[t])}))}return e}({},e),{videoEnabled:s}))}]}}))})),{modalKey:"camera-preview",contextKey:t})}})}},830271:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(980617),l=n(77457),u=n(61209),c=n(744564);const s=function(e,t){c.Z.dispatch({type:"CALL_CHAT_TOASTS_SET_ENABLED",channelId:e,toastsEnabled:t})};var f=n(473708);function d(e){var t=(0,o.e7)([u.Z],(function(){return u.Z.getChannel(e)})),n=(0,
|
||
a.Vy)(null==t?void 0:t.guild_id),c=(0,o.e7)([l.Z],(function(){return l.Z.getToastsEnabled(e)}));return(null==t?void 0:t.isGuildStageVoice())&&!n?null:(0,r.jsx)(i.S89,{id:"show-call-chat-toasts",label:f.Z.Messages.SHOW_NEW_MESSAGE_PREVIEWS,checked:c,action:function(){return s(e,!c)}})}},959468:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(382060),o=n(840922),i=n(473903),a=n(773011),l=n(2590),u=n(473708);function c(e){var t=e.isSubscriptionGated,n=e.needSubscriptionToAccess;if(t)return n?u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_PREMIUM_LOCKED:u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_PREMIUM_UNLOCKED}function s(e){var t,n=e.channel,s=e.unread,f=void 0!==s&&s,d=e.mentionCount,p=void 0===d?0:d,h=e.userCount,y=e.embeddedActivitiesCount,b=e.isSubscriptionGated,v=e.needSubscriptionToAccess,m=(0,a.F6)(n,i.default,o.Z);switch(n.type){case l.d4z.DM:t=f?u.Z.Messages.DIRECT_MESSAGE_A11Y_LABEL_WITH_UNREADS:u.Z.Messages.DIRECT_MESSAGE_A11Y_LABEL;break;case l.d4z.GROUP_DM:
|
||
t=f?u.Z.Messages.GROUP_MESSAGE_A11Y_LABEL_WITH_UNREADS:u.Z.Messages.GROUP_MESSAGE_A11Y_LABEL;break;case l.d4z.GUILD_STORE:t=u.Z.Messages.GUILD_SIDEBAR_STORE_CHANNEL_A11Y_LABEL;break;case l.d4z.GUILD_DIRECTORY:t=u.Z.Messages.GUILD_SIDEBAR_DIRECTORY_CHANNEL_A11Y_LABEL;break;case l.d4z.GUILD_ANNOUNCEMENT:t=p>0?u.Z.Messages.GUILD_SIDEBAR_ANNOUNCEMENT_CHANNEL_A11Y_LABEL_WITH_MENTIONS:f?u.Z.Messages.GUILD_SIDEBAR_ANNOUNCEMENT_CHANNEL_A11Y_LABEL_WITH_UNREADS:u.Z.Messages.GUILD_SIDEBAR_ANNOUNCEMENT_CHANNEL_A11Y_LABEL;break;case l.d4z.GUILD_VOICE:var g=[u.Z.Messages.GUILD_SIDEBAR_VOICE_CHANNEL_A11Y_LABEL.format({channelName:n.name})];p>0&&g.push(u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_MENTIONS.format({mentionCount:p}));f&&g.push(u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_UNREAD);if(null!=h){var O=n.userLimit;null!=O&&O>0?g.push(u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_LIMIT.format({userCount:h,limit:O})):g.push(u.Z.Messages.GUILD_SIDEBAR_VOICE_CHANNEL_A11Y_LABEL_USERS.format({
|
||
userCount:h}))}null!=y&&y>0&&g.push(u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_ACTIVITIES.format({activitiesCount:y}));var E=c({isSubscriptionGated:b,needSubscriptionToAccess:v});null!=E&&g.push(E);return g.join(", ");case l.d4z.GUILD_STAGE_VOICE:t=u.Z.Messages.GUILD_SIDEBAR_STAGE_CHANNEL_A11Y_LABEL;break;default:t=r.Ec.has(n.type)?p>0?u.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL_WITH_MENTIONS:f?u.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL_WITH_UNREADS:u.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL:p>0?u.Z.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL_WITH_MENTIONS:f?u.Z.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL_WITH_UNREADS:u.Z.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL}var C=[t.format({channelName:m,mentionCount:p})],j=c({isSubscriptionGated:b,needSubscriptionToAccess:v});null!=j&&C.push(j);return C.join(", ")}},428107:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(773011),o=n(2590),i=n(473708);function a(e){
|
||
var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,r.ZP)(e,!0),a=(0,r.ZP)(e,!1);return null==e||null==n?{placeholder:"",accessibilityLabel:""}:t?{placeholder:i.Z.Messages.READ_ONLY_CHANNEL,accessibilityLabel:i.Z.Messages.READ_ONLY_CHANNEL}:e.isForumPost()?{placeholder:i.Z.Messages.FORUM_POST_TEXTAREA_PLACEHOLDER.format({channel:n}),accessibilityLabel:i.Z.Messages.TEXTAREA_FORUM_POST_A11Y_LABEL.format({channel:a})}:o.TPd.THREADS.has(e.type)?{placeholder:i.Z.Messages.TEXTAREA_PLACEHOLDER.format({channel:n}),accessibilityLabel:i.Z.Messages.TEXTAREA_THREAD_A11Y_LABEL.format({channel:a})}:e.type===o.d4z.DM?{placeholder:i.Z.Messages.DM_TEXTAREA_PLACEHOLDER.format({channel:n}),accessibilityLabel:i.Z.Messages.TEXTAREA_TEXT_DM_A11Y_LABEL.format({channel:a})}:{placeholder:i.Z.Messages.TEXTAREA_PLACEHOLDER.format({channel:n}),accessibilityLabel:i.Z.Messages.TEXTAREA_TEXT_CHANNEL_A11Y_LABEL.format({channel:a})}}},696978:(e,t,n)=>{"use strict";n.d(t,{A:()=>a})
|
||
;var r=n(74535),o=n(795470),i=n(2590);function a(){var e=(0,r.ZP)();return(0,o.Lq)(e===i.BRd.DARK?i.Ilk.BRAND_330:i.Ilk.BRAND_530)}},438355:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(633878)),i=n(696978);function a(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function l(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t)
|
||
;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function c(e){var t=e.width,n=void 0===t?16:t,c=e.height,s=void 0===c?16:c,f=u(e,["width","height"]),d=(0,i.A)();return(0,r.jsxs)("svg",l(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){a(e,t,n[t])}))}return e}({},(0,o.Z)(f)),{width:n,height:s,viewBox:"0 0 16 16",children:[(0,r.jsx)("path",{
|
||
d:"M11.7791 8.47509L9.24568 7.08859C9.10351 7.00927 8.98757 6.89018 8.91209 6.74591L7.52592 4.22089C7.49677 4.16776 7.45388 4.12344 7.40174 4.09257C7.3496 4.0617 7.29012 4.04541 7.22953 4.04541C7.16893 4.04541 7.10946 4.0617 7.05731 4.09257C7.00517 4.12344 6.96228 4.16776 6.93313 4.22089L5.5447 6.74591C5.46783 6.88684 5.35203 7.00268 5.21112 7.07957L2.67544 8.47509C2.62232 8.50425 2.57801 8.54715 2.54715 8.5993C2.51628 8.65146 2.5 8.71095 2.5 8.77156C2.5 8.83216 2.51628 8.89165 2.54715 8.94381C2.57801 8.99596 2.62232 9.03886 2.67544 9.06802L5.21112 10.4545C5.35187 10.5316 5.46763 10.6474 5.5447 10.7882L6.93088 13.3245C6.96003 13.3776 7.00292 13.4219 7.05506 13.4528C7.1072 13.4837 7.16668 13.5 7.22727 13.5C7.28786 13.5 7.34734 13.4837 7.39948 13.4528C7.45163 13.4219 7.49452 13.3776 7.52367 13.3245L8.90984 10.7882C8.98682 10.6473 9.10259 10.5315 9.24342 10.4545L11.7791 9.06802C11.8322 9.03886 11.8765 8.99596 11.9074 8.94381C11.9383 8.89165 11.9545 8.83216 11.9545 8.77156C11.9545 8.71095 11.9383 8.65146 11.9074 8.5993C11.8765 8.54715 11.8322 8.50425 11.7791 8.47509Z",
|
||
fill:d}),(0,r.jsx)("path",{
|
||
d:"M15.3186 2.57078L14.1492 1.92939C14.1147 1.90911 14.0863 1.87988 14.067 1.84477L13.4267 0.673342C13.398 0.620858 13.3557 0.577078 13.3042 0.546584C13.2528 0.516089 13.1941 0.5 13.1344 0.5C13.0746 0.5 13.0159 0.516089 12.9645 0.546584C12.9131 0.577078 12.8708 0.620858 12.842 0.673342L12.1996 1.84699C12.1796 1.88239 12.1504 1.91166 12.1151 1.93162L10.9457 2.57301C10.8933 2.60181 10.8496 2.64419 10.8192 2.69571C10.7888 2.74723 10.7727 2.80599 10.7727 2.86586C10.7727 2.92573 10.7888 2.9845 10.8192 3.03602C10.8496 3.08754 10.8933 3.12992 10.9457 3.15872L12.1173 3.80011C12.152 3.81912 12.1806 3.84772 12.1996 3.88251L12.8398 5.05393C12.8686 5.10641 12.9109 5.15019 12.9623 5.18069C13.0137 5.21118 13.0724 5.22727 13.1322 5.22727C13.1919 5.22727 13.2506 5.21118 13.302 5.18069C13.3534 5.15019 13.3957 5.10641 13.4245 5.05393L14.0647 3.88251C14.0841 3.84666 14.1134 3.81725 14.1492 3.79788L15.3186 3.1654C15.3732 3.13737 15.419 3.09478 15.451 3.04232C15.483 2.98986 15.5 2.92957 15.5 2.86809C15.5 2.80661 15.483 2.74632 15.451 2.69386C15.419 2.6414 15.3732 2.59881 15.3186 2.57078Z",
|
||
fill:d})]}))}},901287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_e});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(418705),c=n(707961),s=n(557617),f=n(634698),d=n(545580),p=n(228667),h=n(335072),y=n(541421),b=n(422513),v=n(468235),m=n(473708),g=n(694641),O=n.n(g);function E(e){var t=e.onOpenClips,n=e.lastClipsSession,i=e.closePopout;o.useEffect((function(){return function(){(0,v.eL)()}}),[]);return null==n?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)("div",{className:O().recentClipsPopout,children:[(0,r.jsx)(c.X6q,{className:O().header,color:"header-primary",variant:"heading-md/extrabold",children:m.Z.Messages.CLIPS_SESSION_ENDED_TOOLTIP_HEADER.format({count:n.numberOfClipsTaken})}),(0,r.jsx)(c.xvT,{color:"text-normal",className:O().content,variant:"text-sm/medium",children:m.Z.Messages.CLIPS_SESSION_ENDED_TOOLTIP_BODY.format({applicationName:n.applicationName})}),(0,r.jsxs)("div",{className:O().buttonsContainer,children:[(0,r.jsx)(c.zxk,{color:c.zxk.Colors.PRIMARY,
|
||
look:c.zxk.Looks.LINK,onClick:function(){(0,b.Kw)(b.v6.CLIPS_CHANNEL_ATTACH_REMINDER);i()},children:m.Z.Messages.CLIPS_SESSION_ENDED_TOOLTIP_SECONDARY_CTA}),(0,r.jsx)(c.zxk,{color:c.zxk.Colors.BRAND,onClick:t,children:m.Z.Messages.CLIPS_SESSION_ENDED_TOOLTIP_PRIMARY_CTA})]})]})}var C=n(896490),j=n(398344),S=n(305082),I=n(645573),_=n(964262),w=n(225386),x=n(769321),P=n(682776),N=n(436154),A=n(366007),T=n(553480),Z=n(940547),M=n(930948),R=n(120415),L=n(15084),D=n(19585),k=n(159895),U=n(799066),B=n(367406),F=n(531441),G=n(652591),H=n(275374),V=n(855483),W=n(773011),z=n(840922),Y=n(473903),K=n(318313),q=n(634193),Q=n(532378),X=n(119141),J=n(713891),$=n(633878);function ee(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function te(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){
|
||
var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ne(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function re(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?22:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=ne(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",te(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ee(e,t,n[t])}))}return e}({},(0,$.Z)(c)),{width:n,height:i,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{className:u,d:"M18.7004 11.0733V4.20411L14.4456 0H3.8556C3.36366 0.000630619 2.89205 0.193989 2.5442 0.537669C2.19635 0.881349 2.00064 1.3473 2 1.83333V18.3333C2.00056 18.8194 2.19625 19.2854 2.54412 19.6291C2.89199 19.9728 3.36364 20.1661 3.8556 20.1667H13.7669C13.3284 19.2602 13.112 18.2644 13.1355 17.26C13.159 16.2555 13.4215 15.2707 13.902 14.3851C14.3824 13.4996 15.0672 12.7384 15.9008 12.163C16.7345 11.5876 17.6936 11.2143 18.7004 11.0733V11.0733ZM10.3502 13.75H4.7834V11.9167H10.3502V13.75ZM13.1336 10.0833H4.7834V8.25H13.1336V10.0833ZM13.1336 0.916667L17.7726 5.5H13.1336V0.916667Z",fill:l}),(0,r.jsx)("path",{className:u,
|
||
d:"M19.6303 13.3696L15.2632 17.6844L16.5751 18.9805L18.7025 16.8786V22H20.5581V16.8786L22.6856 18.9805L23.9975 17.6844L19.6303 13.3696Z",fill:l})]}))}var oe,ie=n(890592),ae=n(260915),le=n(2590);!function(e){e.UPLOAD_A_FILE="UPLOAD_A_FILE";e.UPLOAD_TEXT_AS_FILE="UPLOAD_TEXT_AS_FILE";e.INVITE_TO_PLAY_GAME="INVITE_TO_GAME";e.INVITE_TO_LISTEN="INVITE_TO_LISTEN";e.INVITE_TO_WATCH="INVITE_TO_WATCH";e.CREATE_THREAD="CREATE_THREAD";e.SLASH_COMMAND="SLASH_COMMAND";e.CLIPS="CLIPS"}(oe||(oe={}));var ue=n(381152),ce=n.n(ue);function se(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function fe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){se(i,r,o,a,l,"next",e)}function l(e){se(i,r,o,a,l,"throw",e)}a(void 0)}))}}function de(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function pe(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var he=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],
|
||
done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function ye(e,t,o,i){(0,c.ZDy)(fe((function(){var a,l;return he(this,(function(u){switch(u.label){case 0:return[4,Promise.all([n.e(40532),n.e(39810)]).then(n.bind(n,139810))];case 1:a=u.sent(),l=a.default;return[2,function(n){return(0,r.jsx)(l,pe(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){de(e,t,n[t])}))}return e}({},n),{activity:e,channel:t,activityActionType:o,analyticsLocations:i}))}]}}))})))}var be=RegExp("(.*)```(\\w+)\\n(.*)```(.*)","s");function ve(e){var t=e.channel,n=e.options,i=e.onFileUpload,a=e.onClose,l=e.onSelect,u=e.draftType,s=e.editorTextContent,f=e.setValue,d=e.openClips,p=function(){(0,B.R6)(t,void 0,"Plus Button")},h=function(){f("/",(0,V.JM)("/"))},y=function(){d()},b=function(){var e=s,n="txt",r="",o=s.match(be);if(null!=o){r=o[1];n=o[2];e=o[3];r+=o[4]}(0,L.d)([(0,H.dp)(new Blob([e],{type:"text/plain"}),"message.".concat(n))],t,u);M.S.dispatchToLastSubscribed(le.CkL.CLEAR_TEXT);""!==r&&M.S.dispatchToLastSubscribed(le.CkL.INSERT_TEXT,{plainText:r})};(0,k.Z$)(U.Z);var v=(0,D.Z)().analyticsLocations;o.useEffect((function(){G.default.track(le.rMx.OPEN_POPOUT,{type:"Send Attachment"})}),[]);return(0,r.jsx)(c.v2r,{onSelect:l,navId:"channel-attach",onClose:a,
|
||
"aria-label":m.Z.Messages.CHANNEL_ACTIONS_MENU_LABEL,className:ce().menu,children:n.map((function(e){var n=(0,r.jsxs)("div",{className:ce().optionLabel,children:[(0,r.jsx)(e.icon,{className:ce().optionIcon}),(0,r.jsx)("div",{className:ce().optionName,children:e.display}),null!=e.badgeVal&&e.badgeVal>0&&(0,r.jsx)(F.mA,{className:ce().badge,count:e.badgeVal})]});switch(e.type){case oe.UPLOAD_A_FILE:return(0,r.jsx)(c.sNh,{id:"upload-file",label:n,subtext:(0,r.jsx)("span",{className:ce().tipSubtext,children:m.Z.Messages.UPLOAD_FILE_SUBTEXT.format({icon:function(e,t){return(0,r.jsx)(T.Z,{className:ce().tipIcon},t)}})}),action:i},"upload-file");case oe.UPLOAD_TEXT_AS_FILE:return""===s?null:(0,r.jsx)(c.sNh,{id:"upload-text-as-file",label:n,action:b},"upload-text-as-file");case oe.CLIPS:return(0,r.jsx)(c.sNh,{id:"clips",label:n,action:y},"clips");case oe.INVITE_TO_PLAY_GAME:return(0,r.jsx)(c.sNh,{id:"play",label:n,action:function(){return function(e){G.default.track(le.rMx.OPEN_MODAL,{
|
||
type:"Send Join Invite",application_id:e.application_id,location:le.jXE.CHANNEL_TEXT_AREA});ye(e,t,le.mFx.JOIN,v)}(e.activity)}},"play");case oe.INVITE_TO_LISTEN:return(0,r.jsx)(c.sNh,{id:"listen",label:n,action:function(){return function(e){G.default.track(le.rMx.OPEN_MODAL,{type:"Send Listen Invite",location:le.jXE.CHANNEL_TEXT_AREA});ye(e,t,le.mFx.LISTEN,v)}(e.activity)}},"listen");case oe.INVITE_TO_WATCH:return(0,r.jsx)(c.sNh,{id:"watch",label:n,action:function(){return function(e){G.default.track(le.rMx.OPEN_MODAL,{type:"Send Watch Invite",location:le.jXE.CHANNEL_TEXT_AREA});ye(e,t,le.mFx.WATCH,v)}(e.activity)}},"watch");case oe.CREATE_THREAD:return(0,r.jsx)(c.sNh,{id:"THREAD",label:n,action:p},"THREAD");case oe.SLASH_COMMAND:return(0,r.jsx)(c.sNh,{id:"SLASH_COMMAND",label:n,action:h},"SLASH_COMMAND");default:return null}}))})}var me=n(872535),ge=n.n(me);function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ee(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ee(e,t,n[t])}))}return e}function je(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e){var t=e.className,n=e.channel,i=e.draftType,v=e.editorTextContent,g=e.setValue,O=e.canShowPremiumTutorial,D=o.useRef(null),k=(0,l.e7)([N.Z],(function(){return N.Z.getActivities()})),U=(0,
|
||
l.e7)([h.Z],(function(){return h.Z.getSettings().clipsEnabled})),B=(0,l.e7)([h.Z],(function(){return h.Z.getLastClipsSession()})),F=(0,l.e7)([h.Z],(function(){return h.Z.getState().newClipsCount})),G=(0,l.e7)([b.qc],(function(){return b.qc.hasHotspot(b.v6.CLIPS_CHANNEL_ATTACH_REMINDER)})),H=Se(o.useState(null),2),V=H[0],$=H[1],ee=(0,p.G)()&&U,te=n.isPrivate(),ne=(0,l.e7)([P.Z],(function(){return te||P.Z.can(le.Plq.ATTACH_FILES,n)&&P.Z.can(le.Plq.SEND_MESSAGES,n)})),ue=(0,f.Z)(B);!(null==ue?void 0:ue.ended)&&(null==B?void 0:B.ended)&&null==V&&G&&$("recentClips");o.useEffect((function(){var e=function(){var e;return null===(e=D.current)||void 0===e?void 0:e.activateUploadDialogue()};M.S.subscribe(le.CkL.UPLOAD_FILE,e);return function(){M.S.unsubscribe(le.CkL.UPLOAD_FILE,e)}}));var ce=(0,w.NE)(n),se=(0,w.Xu)(n),fe=ce||se,de=!x.dN.useSetting()&&!(0,R.eL)()&&null!=window.ResizeObserver,pe=P.Z.can(le.Plq.USE_APPLICATION_COMMANDS,n),he=function(e){
|
||
var t=e.canAttachFiles,n=e.canStartThreads,r=e.useSlate,o=e.canUseApplicationCommands,i=e.hasClips,a=e.channel,l=e.activities,u=e.newClipsCount,c=[];if(t){c.push({type:oe.UPLOAD_A_FILE,icon:ae.Z,display:m.Z.Messages.CHAT_ATTACH_UPLOAD_A_FILE});c.push({type:oe.UPLOAD_TEXT_AS_FILE,icon:re,display:m.Z.Messages.CHAT_ATTACH_UPLOAD_TEXT_AS_FILE})}i&&c.push({type:oe.CLIPS,icon:q.Z,display:m.Z.Messages.CLIPS_POST_A_CLIP,badgeVal:u});n&&c.push({type:oe.CREATE_THREAD,icon:ie.Z,display:m.Z.Messages.CREATE_THREAD});r&&o&&c.push({type:oe.SLASH_COMMAND,icon:K.Z,display:m.Z.Messages.CHAT_ATTACH_USE_SLASH_COMMAND});l.forEach((function(e){if(!(0,d.Z)(e,le.xjy.EMBEDDED)){e.type===le.IIU.PLAYING&&(0,d.Z)(e,le.xjy.JOIN)&&c.push({type:oe.INVITE_TO_PLAY_GAME,icon:X.Z,display:m.Z.Messages.CHAT_ATTACH_INVITE_TO_PLAY_GAME.format({channel:(0,W.F6)(a,Y.default,z.Z,!0),game:null!=e?e.name:""}),activity:e});e.type===le.IIU.LISTENING&&(0,d.Z)(e,le.xjy.SYNC)&&c.push({type:oe.INVITE_TO_LISTEN,icon:J.Z,
|
||
display:m.Z.Messages.CHAT_ATTACH_INVITE_TO_LISTEN.format({channel:(0,W.F6)(a,Y.default,z.Z,!0),name:null!=e?e.name:""}),activity:e});e.type===le.IIU.WATCHING&&(0,d.Z)(e,le.xjy.SYNC)&&c.push({type:oe.INVITE_TO_WATCH,icon:Q.Z,display:m.Z.Messages.CHAT_ATTACH_INVITE_TO_WATCH.format({channel:(0,W.F6)(a,Y.default,z.Z,!0),name:null!=e?e.name:""}),activity:e})}}));return c}({canAttachFiles:ne,canStartThreads:fe,useSlate:de,hasClips:ee,canUseApplicationCommands:pe,channel:n,activities:k,newClipsCount:F}),ye=(0,C.wE)(u.z$.PREMIUM_TUTORIAL_FILE_UPLOAD_COMPOSER_TOOLTIP),be=(0,S.AR)()&&O&&!ye;if(0===he.length)return null;var me=k.some((function(e){return(0,d.Z)(e,le.xjy.SYNC)})),Oe=k.some((function(e){return(0,d.Z)(e,le.xjy.JOIN)&&!(0,d.Z)(e,le.xjy.EMBEDDED)}))||me?(0,r.jsx)(Z.Z,{className:ge().attachButtonIcon,foreground:ge().attachButtonPlay,background:be?ge().attachButtonPlusGradient:ge().attachButtonPlus,width:24,height:24,color:be?A.JX.PREMIUM_TRIAL_TUTORIAL:"currentColor"}):(0,r.jsx)(T.Z,{
|
||
className:ge().attachButtonIcon,foreground:be?ge().attachButtonPlusNoFill:ge().attachButtonPlus,width:24,height:24,color:be?A.JX.PREMIUM_TRIAL_TUTORIAL:"currentColor"}),Ee=(0,r.jsx)(c.yRy,{shouldShow:null!=V,animation:c.yRy.Animation.NONE,align:"recentClips"===V?"center":"left",position:"top",positionKey:null!=V?V:"null",onRequestOpen:function(){return $("attachMenu")},onRequestClose:function(){(0,c.$sL)()||$(null)},renderPopout:function(e){switch(V){case"clips":return(0,r.jsx)(y.Z,Ce({},e));case"recentClips":return(0,r.jsx)(E,je(Ce({},e),{onOpenClips:function(){return $("clips")},lastClipsSession:B}));case"attachMenu":(0,_.$u)(u.z$.PREMIUM_TUTORIAL_FILE_UPLOAD_COMPOSER_TOOLTIP);return(0,r.jsx)(ve,je(Ce({},e),{onClose:function(){return $(null)},options:he,channel:n,onFileUpload:function(){var e;return null===(e=D.current)||void 0===e?void 0:e.activateUploadDialogue()},draftType:i,editorTextContent:v,setValue:g,openClips:function(){return $("clips")}}));default:
|
||
throw new Error("Invalid popout type provided")}},children:function(e){return(0,r.jsx)(c.zxk,je(Ce({look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.NONE,className:a()(ge().attachButton,t),innerClassName:ge().attachButtonInner,"aria-label":m.Z.Messages.CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:ne?function(){var e;return null===(e=D.current)||void 0===e?void 0:e.activateUploadDialogue()}:void 0},e),{children:be?(0,r.jsx)(I.Z,{tutorialType:j.K.FILE_UPLOAD,text:m.Z.Messages.PREMIUM_TRIAL_TUTORIAL_FILE_UPLOAD_TOOLTIP,children:Oe}):Oe}))}});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:ge().uploadInput,children:(0,r.jsx)(s.Z,{ref:D,onChange:function(e){!function(e,t,r){null!=t&&"ETOOLARGE"===t.code?(0,L.G)(n,[]):(0,L.d)(e,n,i,{requireConfirm:!0,showLargeMessageDialog:r});M.S.dispatchToLastSubscribed(le.CkL.TEXTAREA_FOCUS)}(e.currentTarget.files,e.currentTarget.err);e.currentTarget.value=""},multiple:n.rateLimitPerUser<=0,tabIndex:-1,"aria-hidden":!0})}),(0,r.jsx)("div",{
|
||
className:ge().attachWrapper,children:Ee})]})}const _e=o.memo(Ie)},58495:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(503528),u=n(394352),c=n(470643),s=n(940581),f=n(686390),d=n.n(f);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n)
|
||
;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){var n=e.disabled,i=e.type,f=e.className,p=e.onClick,y=h((0,u.Iu)((function(e){return[e.activeView,e.activeViewType]}),l.Z),2),b=y[0],v=y[1],m=o.useCallback((function(){(0,u.j9)(i);null==p||p()}),[i,p]);return n?null:(0,r.jsx)("div",{className:a()(s.CT,d().buttonContainer),ref:t,children:(0,r.jsx)(c.Z,{className:a()(d().emojiButton,f),onClick:m,active:(b===s.X1.GIF||b===s.X1.EMOJI||b===s.X1.STICKER)&&v===i,tabIndex:0,focusProps:{offset:{top:4,bottom:4,left:-4,right:-4}}})})}const b=o.memo(o.forwardRef(y))},889025:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Pv})
|
||
;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(717187),u=n.n(l),c=n(441143),s=n.n(c),f=n(503528),d=n(940060),p=n(202351),h=n(707961),y=n(943469),b=n(316878),v=n(153686),m=n(19585),g=n(423427),O=n(496486),E=n.n(O),C=n(711003),j=n(73904),S=n(396043),I=n(38736),_=Object.freeze({id:null,activeDescendant:null}),w=(0,I.Z)((function(){return _}));function x(e,t,n){(0,o.useEffect)((function(){t?w.setState({id:e,activeDescendant:n}):w.setState({id:null,activeDescendant:null})}),[e,t,n])}var P=n(43566),N=n(604992),A=n(355557),T=n(457217),Z=n(272200),M=n(670327),R=n.n(M),L=function(e){var t=e.children,n=e.className;return(0,r.jsx)("div",{className:a()(R().autocompleteRowContent,n),children:t})},D=function(e){var t=e.children,n=e.className;return(0,r.jsx)("div",{className:a()(R().autocompleteRowContentPrimary,n),children:t})},k=function(e){var t=e.children,n=e.className;return(0,r.jsx)("div",{className:a()(R().autocompleteRowIcon,n),children:t})},U=function(e){var t=e.children,n=e.className
|
||
;return(0,r.jsx)(h.xvT,{className:a()(n,R().autocompleteRowHeading),color:"interactive-active",variant:"text-md/normal",children:t})},B=function(e){var t=e.children,n=e.className;return(0,r.jsx)(h.xvT,{className:a()(n,R().autocompleteRowSubheading),color:"interactive-normal",variant:"text-xs/normal",children:t})},F=function(e){var t=e.children,n=e.className;return(0,r.jsx)(h.xvT,{className:a()(n,R().autocompleteRowContentSecondary),color:"interactive-normal",variant:"text-xs/normal",children:t})},G=n(98265),H=n(560654),V=n.n(H);function W(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function z(e){var t,n=e.name,o=e.className,i=e.state,l=e.isInline,u=e.onClick,c=n+(l?":":""),s=null,f=G.Z.Colors.HEADER_PRIMARY;(null==i?void 0:i.isActive)&&!l?s=V().active:!1===(null==i||null===(t=i.lastValidationResult)||void 0===t?void 0:t.success)?s=V().error:(null==i?void 0:i.hasValue)&&!l&&(s=V().set);var d=(0,r.jsx)(G.Z,{
|
||
size:l?G.Z.Sizes.SIZE_16:G.Z.Sizes.SIZE_14,color:f,className:a()(V().option,W({},V().inline,l),s,o),children:c});return null==u?d:(0,r.jsx)(h.P3F,{className:V().clickable,onClick:function(){return u(n)},children:d})}var Y=n(242922),K=n(996051),q=n(473708),Q=n(191117),X=n.n(Q);function J(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function $(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ee(e,t,n){return(0,r.jsx)(z,{className:X().option,name:e.displayName,state:t,onClick:n},e.name)}function te(e){
|
||
var t=e.command,n=e.optionStates,i=e.onOptionClick,a=o.useMemo((function(){var e,r,o,i,a=null!==(o=null===(e=t.options)||void 0===e?void 0:e.filter((function(e){return e.required})))&&void 0!==o?o:[],l=null!==(i=null===(r=t.options)||void 0===r?void 0:r.filter((function(e){return!e.required})))&&void 0!==i?i:[],u=l.filter((function(e){var t;return null==n||null===(t=n[e.name])||void 0===t?void 0:t.hasValue})),c=l.filter((function(e){var t;return!(null==n||null===(t=n[e.name])||void 0===t?void 0:t.hasValue)}));return{requiredOptions:a,setOptionalOptions:u,unsetOptionalOptions:c}}),[t.options,n]),l=a.requiredOptions,u=a.setOptionalOptions,c=a.unsetOptionalOptions,s=(0,r.jsx)("div",{className:X().optionalNames,children:c.map((function(e){return(0,r.jsx)(h.xvT,{variant:"text-sm/normal",children:e.displayName},e.name)}))}),f=l.map((function(e){return ee(e,null==n?void 0:n[e.name],i)})),d=u.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.X6q,{className:X().optionalHeader,
|
||
variant:"heading-deprecated-12/semibold",children:q.Z.Messages.COMMANDS_OPTIONAL_HEADER}),u.map((function(e){return ee(e,null==n?void 0:n[e.name],i)}))]}):null,p=c.length>0?(0,r.jsx)(h.ua7,{text:s,"aria-label":!1,delay:200,children:function(e){return(0,r.jsx)(G.Z,$(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){J(e,t,n[t])}))}return e}({className:X().optionalCount,color:G.Z.Colors.MUTED},e),{children:0===u.length?q.Z.Messages.COMMANDS_OPTIONAL_COUNT.format({count:c.length}):q.Z.Messages.COMMANDS_OPTIONAL_COUNT_REMAINING.format({count:c.length})}))}}):null;return(0,r.jsxs)(r.Fragment,{children:[f,null!=d||null!=p?(0,r.jsxs)("div",{className:X().optionals,children:[d,p]}):null]})}function ne(e){
|
||
var t,n,i=e.command,l=e.activeOptionName,u=e.channel,c=e.showOptions,s=e.showImage,f=e.optionStates,d=e.onOptionClick,p=e.section,h=e.isSelectable,y=void 0===h||h,b=o.useMemo((function(){var e;return null==i||null===(e=i.options)||void 0===e?void 0:e.find((function(e){return e.name===l}))}),[l,i]),v=null!=l?null==f?void 0:f[l]:null;if(null!=v&&!1===(null===(t=v.lastValidationResult)||void 0===t?void 0:t.success)){var m;n=null!==(m=v.lastValidationResult.error)&&void 0!==m?m:""}else n=null;var g,O=s&&null!=p?(0,Y.ky)(p):null;return(0,r.jsxs)("div",{className:a()(X().wrapper,y?null:X().disabled),children:[null!=O?(0,r.jsx)(O,{className:X().image,channel:u,section:p,width:32,height:32}):null,(0,r.jsxs)("div",{className:X().infoWrapper,children:[(0,r.jsxs)("div",{className:X().usageWrapper,children:[(0,r.jsx)(U,{className:X().title,children:K.GI+i.displayName}),c?(0,r.jsx)(te,{command:i,optionStates:f,onOptionClick:d}):null]}),(0,r.jsx)(B,{
|
||
className:a()(X().description,null!=n?X().error:null),children:null!==(g=null!=n?n:null==b?void 0:b.displayDescription)&&void 0!==g?g:i.displayDescription})]}),(0,r.jsx)(F,{className:X().source,children:null==p?void 0:p.name})]})}var re=n(235120),oe=n.n(re);const ie=function(e){var t=e.showImage,n=o.useMemo((function(){return{usageWidth:E().random(60,120),descriptionWidth:E().random(200,600),sourceWidth:E().random(45,90)}}),[]),i=n.usageWidth,a=n.descriptionWidth,l=n.sourceWidth;return(0,r.jsxs)("div",{className:oe().wrapper,children:[t?(0,r.jsx)("div",{className:oe().image}):null,(0,r.jsxs)("div",{className:oe().infoWrapper,children:[(0,r.jsx)("div",{style:{maxWidth:(0,Y.Q1)(i)},className:oe().usageWrapper}),(0,r.jsx)("div",{style:{maxWidth:(0,Y.Q1)(a)},className:oe().description})]}),(0,r.jsx)("div",{style:{width:(0,Y.Q1)(l)},className:oe().source})]})};var ae=n(773011),le=n(239813),ue=n(211482),ce=n(652591),se=n(2590),fe=n(203600),de=n(565612),pe=n.n(de);const he=function(e){
|
||
var t=e.emojis,n=(0,m.Z)().analyticsLocations;o.useEffect((function(){ce.default.track(se.rMx.PREMIUM_UPSELL_VIEWED,{type:fe.cd.EMOJI_AUTOCOMPLETE_INLINE,location_stack:n})}),[n]);var i=(0,r.jsx)("div",{className:pe().emojis,children:t.slice(0,3).map((function(e,n){if(""===e.url)return null;var o=n===t.length-1,i=(0,r.jsx)("div",{className:pe().emojiBackground,children:(0,r.jsx)("img",{alt:e.name,className:pe().emoji,src:e.url})},e.id);return o?i:(0,r.jsx)(ue.ZP,{className:pe().emojiMask,mask:ue.ZP.Masks.AUTOCOMPLETE_EMOJI_UPSELL_EMOJI,children:i},e.id)}))});return(0,r.jsxs)(L,{className:pe().upsell,children:[(0,r.jsx)(D,{children:(0,r.jsx)(U,{children:q.Z.Messages.AUTOCOMPLETE_EMOJI_UPSELL.format({count:t.length})})}),(0,r.jsx)(F,{children:i})]})};var ye=n(78551),be=n(513586),ve=n(567403),me=n(840922),ge=n(473903),Oe=n(749565),Ee=n(551069),Ce=n(517451);function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ie(e){Ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Ie(e)}function _e(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Ae(e,t)}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Se(e,t,n[t])}))}return e}function xe(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){
|
||
var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Pe(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ne(e,t){return!t||"object"!==Te(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ae(e,t){Ae=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ae(e,t)}var Te=function(e){
|
||
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ie(e);if(t){var o=Ie(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ne(this,n)}}function Me(e){return null!=e?"autocomplete-".concat(e):null}function Re(e){return"autocomplete-".concat(e,"-title")}var Le=o.createContext(null),De=function(e){_e(n,e);var t=Ze(n);function n(e){je(this,n);var r;(r=t.call(this,e)).selectable=!0;r.layoutClass=R().autocompleteRowVertical;r.handleMouseEnter=function(){var e=r.props,t=e.onHover,n=e.index,o=e.selected;null!=t&&!o&&"number"==typeof n&&t(n)};r.handleClick=function(e){var t=r.props,n=t.onClick,o=t.index
|
||
;null!=n&&"number"==typeof o&&n(o,e)};r.state={hovered:!1};return r}var o=n.prototype;o.isSelectable=function(){return this.selectable};o.renderContent=function(){throw new Error("AutocompleteRow: renderContent must be extended")};o.renderClickable=function(e){var t,n=this,o=this.layoutClass,i=this.props,l=i.className,u=i.index,c=i.selected,s=this.isSelectable();return(0,r.jsx)(h.P3F,xe(we({},e),{className:a()(R().clickable,l,o),id:null!==(t=Me(u))&&void 0!==t?t:void 0,onClick:s?this.handleClick:void 0,onMouseMove:s?function(){n.setState({hovered:!0});n.handleMouseEnter()}:void 0,onMouseLeave:s?function(){return n.setState({hovered:!1})}:void 0,role:"option","aria-disabled":!s,"aria-selected":s&&c,children:(0,r.jsx)("div",{className:R().base,children:this.renderContent()})}))};o.render=function(){var e=this,t=this.props.index;return this.isSelectable()?(0,r.jsx)(T.mh,{id:"".concat(t),children:function(t){return e.renderClickable(t)}}):this.renderClickable()};return n
|
||
}(o.PureComponent),ke=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}n.prototype.renderContent=function(){var e=this.props,t=e.text,n=e.description;return(0,r.jsxs)(L,{children:[(0,r.jsx)(D,{children:(0,r.jsx)(U,{children:t})}),null!=n?(0,r.jsx)(F,{children:n}):null]})};return n}(De);var Ue=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);var e;(e=t.apply(this,arguments)).layoutClass=R().dividerContainer;e.selectable=!1;return e}n.prototype.renderContent=function(){var e=this.props.className;return(0,r.jsx)("div",{className:a()(e,R().divider)})};return n}(De),Be=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}n.prototype.renderContent=function(){var e=this.props,t=e.user,n=e.nick,o=e.status,i=e.hidePersonalInformation,a=e.guildId;return(0,r.jsxs)(L,{children:[(0,r.jsx)(k,{children:(0,r.jsx)(h.qEK,{size:h.EFr.SIZE_24,src:t.getAvatarURL(a,24),"aria-hidden":!0,status:o})}),(0,r.jsx)(D,{children:(0,
|
||
r.jsx)(U,{children:null!=n?n:Oe.ZP.getName(t)})}),(0,r.jsxs)(F,{children:[(0,r.jsx)("span",{className:R().descriptionUsername,children:Oe.ZP.getUserTag(t,{mode:"username",identifiable:i?"never":"always"})}),i||t.isPomelo()?null:(0,r.jsxs)("span",{className:R().descriptionDiscriminator,children:["#",t.discriminator]})]})]})};return n}(De),Fe=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}n.prototype.renderContent=function(){var e=this.props,t=e.role,n=e.hideDescription,o=t.colorString,i="dot"===b.Z.roleStyle,a="username"===b.Z.roleStyle&&null!=o?{color:o}:void 0;return(0,r.jsxs)(L,{children:[(0,r.jsx)(D,{children:(0,r.jsxs)(U,{children:[i&&(0,r.jsx)(h.FhE,{className:R().roleDot,color:o,tooltip:!1}),(0,r.jsxs)("span",{style:a,children:["@",t.name]})]})}),n?null:(0,r.jsx)(F,{children:q.Z.Messages.MENTION_USERS_WITH_ROLE})]})};return n}(De),Ge=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}
|
||
n.prototype.renderContent=function(){var e=this.props,t=e.channel,n=e.category,o=t.type===se.d4z.GUILD_CATEGORY?Ee.Z:(0,le.KS)(t);return(0,r.jsxs)(L,{children:[null!=o&&(0,r.jsx)(k,{children:(0,r.jsx)(o,{className:R().icon})}),(0,r.jsx)(D,{children:(0,r.jsx)(U,{children:(0,ae.F6)(t,ge.default,me.Z)})}),null!=n?(0,r.jsx)(F,{children:n.name}):null]})};return n}(De),He=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}n.prototype.renderContent=function(){var e=this.props.command;return(0,r.jsxs)(L,{children:[(0,r.jsx)(k,{children:(0,r.jsx)(Ce.Z,{className:R().icon,foreground:R().iconForeground})}),(0,r.jsx)(D,{children:(0,r.jsx)(U,{children:e.name})}),(0,r.jsx)(F,{children:e.description})]})};return n}(De),Ve=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}var o=n.prototype;o.isSelectable=function(){return this.props.command.inputType!==Z.iw.PLACEHOLDER};o.renderContent=function(){
|
||
var e=this.props,t=e.command,n=e.channel,o=e.showImage,i=e.section,a=e.selected,l=this.state.hovered,u=this.isSelectable();return t.inputType===Z.iw.PLACEHOLDER?(0,r.jsx)(ie,{}):(0,r.jsx)(ne,{command:t,channel:n,showImage:o,showOptions:l||u&&a,section:i,isSelectable:u})};return n}(De),We=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);var e;(e=t.apply(this,arguments)).layoutClass=a()(R().autocompleteRowVertical,R().autocompleteRowVerticalSmall);return e}n.prototype.renderContent=function(){var e=this.props,t=e.emoji,n=e.sentinel,o=e.guild,i=null!=t.url&&""!==t.url?(0,r.jsx)("img",{alt:"",className:R().emojiImage,src:t.url}):(0,r.jsx)("span",{className:R().emojiRaw,children:t.surrogates}),a=null!=o?(0,r.jsx)(F,{children:o.name}):null;return(0,r.jsxs)(L,{children:[(0,r.jsx)(k,{children:i}),(0,r.jsx)(D,{children:(0,r.jsxs)(U,{children:[n,t.name,n]})}),a]})};return n}(De),ze=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);var e
|
||
;(e=t.apply(this,arguments)).layoutClass=a()(R().autocompleteRowVertical,R().autocompleteRowVerticalSmall);return e}n.prototype.renderContent=function(){var e,t=this.props,n=t.queryMatch,o=t.renderSticker,i=t.selected,a=t.sticker,l=this.state.hovered;if((0,be.jl)(a)){var u;e=null===(u=ye.Z.getStickerPack(a.pack_id))||void 0===u?void 0:u.name}else if((0,be.J8)(a)){var c;e=null===(c=ve.Z.getGuild(a.guild_id))||void 0===c?void 0:c.name}return(0,r.jsxs)(L,{children:[(0,r.jsx)(k,{children:o(a,l||!0===i)}),(0,r.jsxs)(D,{children:[(0,r.jsx)(U,{className:R().stickerName,children:a.name}),null!=n&&(0,r.jsx)(B,{children:q.Z.Messages.AUTOCOMPLETE_STICKERS_QUERY_MATCH.format({queryMatch:n})})]}),null!=e&&(0,r.jsx)(F,{children:e})]})};return n}(De),Ye=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);var e;(e=t.apply(this,arguments)).layoutClass=R().autocompleteRowHorizontal;return e}n.prototype.renderContent=function(){var e=this.props,t=e.width,n=e.height,o=e.src;return(0,r.jsx)("img",{
|
||
alt:"",src:o,width:t,height:n})};return n}(De),Ke=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);var e;(e=t.apply(this,arguments)).selectable=!1;return e}n.prototype.renderContent=function(){return(0,r.jsx)(he,{emojis:this.props.emojis})};return n}(De),qe=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}n.prototype.render=function(){var e=this.props,t=e.children,n=e.className,i=e.innerClassName,l=e.id,u=Pe(e,["children","className","innerClassName","id"]);return o.Children.count(t)>0?(0,r.jsx)(Le.Provider,{value:{id:null!=l?l:""},children:(0,r.jsx)("div",{className:a()(R().autocomplete,n),children:(0,r.jsx)("div",xe(we({className:a()(R().autocompleteInner,i)},u),{children:t}))})}):null};return n}(o.PureComponent);qe.Generic=ke;qe.Loading=function(e){var t=o.useMemo((function(){return E().random(60,120)}),[]);return(0,r.jsx)("div",{className:R().base,"aria-busy":!0,children:(0,r.jsx)(L,{children:(0,r.jsx)(D,{children:(0,r.jsx)(U,{
|
||
children:(0,r.jsx)("div",{className:R().autocompletePlaceholder,style:{width:t}})})})})})};qe.Title=function(e){var t=e.title,n=e.className,i=o.useContext(Le);return(0,r.jsx)("div",{className:R().base,children:(0,r.jsx)(h.X6q,{id:Re(i.id),className:a()(R().contentTitle,n),variant:"heading-deprecated-12/semibold",children:t})})};qe.Divider=Ue;qe.User=Be;qe.Role=Fe;qe.Channel=Ge;qe.Command=He;qe.NewCommand=Ve;qe.Emoji=We;qe.GIFIntegration=Ye;qe.Sticker=ze;qe.EmojiUpsell=Ke;const Qe=qe;var Xe=n(483902),Je=n(443812),$e=n(49621),et=n(533404),tt=n(711795),nt=n(83993),rt=n.n(nt);function ot(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function it(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function at(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var lt=[16,12,8,12];function ut(e){var t=e.className,n=e.channel,i=e.sections,l=e.activeCategoryIndex,u=e.filteredSectionId,c=e.onSectionClick,s=e.applicationCommandListRef,f=o.useRef(null),d=o.useCallback((function(e,t){var n,r=8;(null===(n=i[t+1])||void 0===n?void 0:n.type)===Z.Qi.BUILT_IN&&(r+=8);return 32+r}),[i]),p=o.useCallback((function(e,t){var n
|
||
;return t?(null===(n=i[e+1])||void 0===n?void 0:n.type)===Z.Qi.BUILT_IN?0:8:0===e?0:8}),[i]),y=o.useCallback((function(e,t){var o=i[t];if(null!=o){var a=(0,Y.ky)(o),s=o.type===Z.Qi.BUILT_IN?4:0,f=32-2*s,d=(0,r.jsx)(a,{channel:n,section:o,isSelected:null!=u?o.id===u:l===t,padding:s,width:f,height:f,selectable:!0}),p=o.type!==Z.Qi.BUILT_IN&&t<i.length-1&&i[t+1].type===Z.Qi.BUILT_IN;return(0,r.jsxs)("div",{className:rt().section,children:[(0,r.jsx)(h.ua7,{text:o.name,position:"right",children:function(e){var t=e.onClick,n=at(e,["onClick"]);return(0,r.jsx)(h.P3F,it(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ot(e,t,n[t])}))}return e}({"aria-label":o.name,onClick:function(){c(o);null==t||t()}},n),{children:d}))}}),p?(0,r.jsx)("hr",{
|
||
className:rt().builtInSeparator}):null]},o.id)}}),[l,n,c,i,u]);return 0===i.length?null:(0,r.jsx)("div",{className:a()(t,rt().wrapper),children:(0,r.jsx)(tt.Z,{categoryListRef:f,expressionsListRef:s,store:P.Xn,categories:i,className:rt().list,renderCategoryListItem:y,rowCount:i.length,categoryHeight:d,listPadding:lt,getScrollOffsetForIndex:p})})}var ct=n(127624),st=n(626497),ft=n.n(st),dt=n(576884),pt=n.n(dt);function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()
|
||
}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ht(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ht(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var vt=[8,8,0,8],mt=E().debounce((function(){ce.default.track(se.rMx.APPLICATION_COMMAND_BROWSER_SCROLLED)}),300);const gt=o.forwardRef((function(e,t){var n=e.channel,i=e.canOnlyUseTextCommands,l=o.useRef(!1),u=o.useRef(0),c=bt(o.useState(0),2),s=c[0],f=c[1],d=o.useRef(null),p=bt(o.useState(!1),2),h=p[0],y=p[1],b=P.Xn.useStore((function(e){return e.activeCategoryIndex}));o.useEffect((function(){(0,S.yw)(se.rMx.APPLICATION_COMMAND_BROWSER_OPENED)}),[]);var v=(0,
|
||
et.JK)(n,j.yU.CHAT,7,ct.tn,{canOnlyUseTextCommands:i,canUseFrecency:!0}),m=v.sectionDescriptors,g=v.activeSections,O=v.commandsByActiveSection,E=v.hasMoreAfter,I=v.commands,T=v.filteredSectionId,M=v.scrollDown,R=v.filterSection,L=(0,N.Qs)({activeCategoryIndex:b,isScrolling:l,listRef:d,onActiveCategoryIndexChange:function(e){var t=g[e],n=m.findIndex((function(e){return e.id===t.id}));P.Xn.setActiveCategoryIndex(n)},scrollOffset:20,searchQuery:""}),D=function(e){var t=g.length,n=O.reduce((function(e,t){return e+t.data.length}),0)-(E?7:0);E&&e+420>48*t+56*n-512&&M();L(e);mt();u.current=e};o.useEffect((function(){D(u.current)}),[I]);var k=o.useCallback((function(e){return e===g.length-1&&!E?0:16}),[g.length,E]),U=O.map((function(e){return e.data.length}));o.useEffect((function(){null!=d.current&&h&&null!=s&&d.current.scrollRowIntoView(s)}),[h,s]);o.useLayoutEffect((function(){if(null!=T){var e;null===(e=d.current)||void 0===e||e.scrollToSectionTop(0)}}),[I,T])
|
||
;var B=o.useCallback((function(e){if(e.id===T||e.id===ct.bi.FRECENCY){var t;R(null);null===(t=d.current)||void 0===t||t.scrollToSectionTop(0)}else R(e.id)}),[R,T]),F=o.useCallback((function(e,t){$e.Po(n.id,e,t,Z.Vh.DISCOVERY)}),[n.id]);o.useImperativeHandle(t,(function(){return{onTabOrEnter:function(e){if(null==s){if(e)return!1;f(0);return!0}if(null==s)return!1;var t=0,n=0,r=!0,o=!1,i=void 0;try{for(var a,l=O[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value;t=n;n+=u.data.length;if(s<n){F(u.data[s-t],u.section);break}}}catch(e){o=!0;i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return!0},onMoveSelection:function(e){if(0===I.length)return!0;var t=E?7:0,n=I.length+t,r=null==s?0:s+e;r>=n?r=n-1:r<0&&(r=0);f(r);y(!0);return!0}}}),[I.length,O,E,F,s]);var G=o.useCallback((function(e){var t=g[e];if(null==t)return null;var o=(0,Y.ky)(t),i=(0,r.jsx)(o,{channel:n,section:t,width:16,height:16,padding:0});return(0,r.jsx)(A.Z,{className:ft().categoryHeader,icon:i,
|
||
children:t.name},e)}),[n,g]),H=o.useCallback((function(e,t){var n=e===g.length-1,o=g[e],i=O[e].data;return(0,r.jsxs)("ul",{role:"group","aria-label":o.name,className:a()(ft().categorySection,yt({},ft().categorySectionLast,n)),children:[t,0===i.length&&(0,r.jsx)(C.Z,{message:q.Z.Messages.APPLICATION_COMMAND_NO_PERMISSIONS.format({applicationName:o.name}),noResultsImageURL:pt(),className:ft().noSearchResults})]},e)}),[g,O]),V=o.useCallback((function(e,t){var o,i=O[t.sectionIndex],a=i.data[t.sectionRowIndex],l="".concat(i.section.id,":").concat(null!==(o=null==a?void 0:a.id)&&void 0!==o?o:e);if(null==a||i.section.id!==a.applicationId&&i.section.id!==ct.bi.FRECENCY||a.inputType===Z.iw.PLACEHOLDER)return(0,r.jsx)(ie,{},l);var u=m.find((function(e){return e.id===a.applicationId}));return(0,r.jsx)(Qe.NewCommand,{index:e,command:a,channel:n,className:ft().itemWrapper,selected:s===e,showImage:i.section.id!==a.applicationId,section:u,onClick:function(){return F(a,u)},onHover:function(){f(null)
|
||
;y(!1)}},l)}),[n,O,F,m,s]),W=(0,Je.Dt)();x(W,!0,Me(s));o.useEffect((function(){return function(){w.setState((function(){return _}))}}),[]);return(0,r.jsxs)(Qe,{id:W,className:ft().outerWrapper,innerClassName:ft().wrapper,onMouseDown:Ot,children:[(0,r.jsx)(ut,{className:ft().rail,channel:n,sections:m,filteredSectionId:T,activeCategoryIndex:b,onSectionClick:B,applicationCommandListRef:d}),(0,r.jsx)(Xe.Z,{role:"listbox",className:ft().list,listPadding:vt,onScroll:D,renderRow:V,renderSection:H,renderSectionHeader:G,rowCount:g.length,rowCountBySection:U,rowHeight:56,sectionHeaderHeight:32,sectionMarginBottom:k,ref:d,stickyHeaders:!0})]})}));function Ot(e){e.preventDefault()}var Et=n(744564),Ct=n(61209),jt=n(21372),St=n(715107),It=n(127661),_t=n(334359),wt=n.n(_t);function xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nt(e){
|
||
Nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Nt(e)}function At(e,t){return!t||"object"!==Mt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tt(e,t){Tt=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Tt(e,t)}function Zt(e){return function(e){if(Array.isArray(e))return xt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return xt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xt(e,t)}(e)||function(){
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Mt=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Nt(e);if(t){var o=Nt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return At(this,n)}}var Lt=new Set,Dt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Tt(e,t)}(n,e);var t=Rt(n);function n(){Pt(this,n)
|
||
;return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){null!=e&&(Lt=new Set(e))};r.hasId=function(e){return Lt.has(e)};r.getState=function(){return Zt(Lt)};r.__getLocalVars=function(){return{storeState:Lt,Store:kt}};return n}(p.ZP.PersistedStore);Dt.displayName="PTOStore";Dt.persistKey="PTOStore";var kt=new Dt(Et.Z,{}),Ut=function(e){return(0,p.e7)([jt.ZP,ge.default,kt],(function(){var t=ge.default.getCurrentUser();if(null==t||!t.isStaff()||!e.isDM())return!1;var n=ge.default.getUser(e.getRecipientId());if(!(null==n?void 0:n.isStaff()))return!1;var r=jt.ZP.getNicknames(n.id).some((function(e){return e.endsWith("[PTO]")||e.endsWith("[OOO]")}));if(!r){Lt.delete(n.id)&&kt.emitChange();return!1}return!kt.hasId(n.id)&&r}))},Bt=function(){return(0,r.jsxs)("div",{className:wt().bar,children:[q.Z.Messages.STAFF_PTO_NOTICE,(0,r.jsx)(h.P3F,{className:wt().closeButton,onClick:function(){var e=St.Z.getChannelId();if(null!=e){var t=Ct.Z.getChannel(e)
|
||
;if(null!=t&&t.isPrivate()&&!Lt.has(t.getRecipientId())){Lt.add(t.getRecipientId());kt.emitChange()}}},children:(0,r.jsx)(It.Z,{className:wt().closeIcon})})]})},Ft=n(329543),Gt=n(841804),Ht=n(260561);const Vt=(0,Ht.B)({kind:"user",id:"2021-07_popout_autocomplete",label:"Popout Autocomplete experiment",defaultConfig:{usePopoutAutocomplete:!1},treatments:[{id:1,label:"New autocomplete style",config:{usePopoutAutocomplete:!0}}]});var Wt,zt,Yt,Kt,qt,Qt,Xt,Jt,$t,en;!function(e){e[e.DENY=0]="DENY";e[e.ALLOW_EVERYONE=1]="ALLOW_EVERYONE";e[e.ALLOW_EVERYONE_OR_HERE=2]="ALLOW_EVERYONE_OR_HERE"}(Wt||(Wt={}));!function(e){e[e.DENY=0]="DENY";e[e.ALLOW_CHANNEL=1]="ALLOW_CHANNEL";e[e.ALLOW_GUILD=2]="ALLOW_GUILD"}(zt||(zt={}));!function(e){e[e.DENY=0]="DENY";e[e.ALLOW_MENTIONABLE=1]="ALLOW_MENTIONABLE";e[e.ALLOW_ALL=2]="ALLOW_ALL"}(Yt||(Yt={}));!function(e){e[e.DENY=0]="DENY";e[e.ALLOW_SELECTABLE=1]="ALLOW_SELECTABLE"}(Kt||(Kt={}));!function(e){e[e.DENY=0]="DENY";e[e.ALLOW=1]="ALLOW"}(qt||(qt={}))
|
||
;!function(e){e[e.DISABLED=0]="DISABLED";e[e.OLD_BUILT_INS=1]="OLD_BUILT_INS";e[e.NEW_TEXT_ONLY=2]="NEW_TEXT_ONLY";e[e.NEW=3]="NEW"}(Qt||(Qt={}));!function(e){e[e.INSERT=0]="INSERT";e[e.SEND=1]="SEND"}(Xt||(Xt={}));!function(e){e.MENTIONS="MENTIONS";e.CHANNELS="CHANNELS";e.EMOJIS_AND_STICKERS="EMOJIS_AND_STICKERS";e.REACTIONS="REACTIONS";e.GIFS="GIFS";e.LEGACY_COMMANDS="LEGACY_COMMANDS";e.COMMANDS="COMMANDS";e.COMMAND_OPTIONS="COMMAND_OPTIONS";e.CHOICES="CHOICES"}(Jt||(Jt={}));!function(e){e.MENTION="MENTION";e.CHANNEL="CHANNEL";e.EMOJI="EMOJI";e.STICKER="STICKER";e.REACTION="REACTION";e.GIF="GIF";e.COMMAND="COMMAND";e.COMMAND_OPTION="COMMAND_OPTION";e.COMMAND_SUGGESTION="COMMAND_SUGGESTION";e.CHOICE="CHOICE";e.EMOJI_UPSELL="EMOJI_UPSELL"}($t||($t={}));!function(e){e[e.AUTO=0]="AUTO";e[e.AUTO_WHEN_FILTERED=1]="AUTO_WHEN_FILTERED";e[e.MANUAL=2]="MANUAL"}(en||(en={}));var tn=n(26468);function nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n]
|
||
;return r}function rn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function on(e){
|
||
var t=e.editorHeight,n=e.type,r=e.state,i=e.isInPopoutExperiment,a=void 0!==i&&i,l=rn(o.useState(void 0),2),u=l[0],c=l[1],s=null==r?void 0:r.query,f=null==r?void 0:r.isVisible,d=o.useContext(tn.ZP).renderWindow,p=o.useCallback((function(){var e;if(null==r||null!=s&&f)if((null==s?void 0:s.type)!==Jt.GIFS&&(null==n||a||(null===(e=n.autocomplete)||void 0===e?void 0:e.alwaysUseLayer))){var t=d.document.getSelection(),o=null!=t&&t.rangeCount>0?t.getRangeAt(0):null;if(null!=o){for(var i=o.startContainer,l=o.startOffset;null!=i;){var u,p,h;if(i.nodeType!==Node.TEXT_NODE||null==i.nodeValue){c(null);return}if(0!==(null===(u=i.nodeValue)||void 0===u?void 0:u.length)){null!=s&&(l>=s.queryText.length?l-=s.queryText.length:l=0);break}l=null!==(h=null==(i=i.previousSibling)||null===(p=i.nodeValue)||void 0===p?void 0:p.length)&&void 0!==h?h:0}if(null!=i){var y=d.document.createRange();y.setStart(i,l);y.setEnd(i,l);var b=y.getBoundingClientRect();0!==(null==b?void 0:b.height)&&c(null!=b?b:null)}}
|
||
}else c(null);else c(void 0)}),[a,d.document,r,f,s,n]);o.useEffect((function(){d.document.addEventListener("selectionchange",p);return function(){return d.document.removeEventListener("selectionchange",p)}}),[d.document,p]);o.useEffect((function(){p()}),[p,t]);return u}var an,ln=n(283151),un=n(385231),cn=n(281808),sn=n(24230),fn=n(682776),dn=n(793461),pn=n(514351);function hn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function yn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){hn(e,t,n[t])}))}return e}function bn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function vn(e,t,n){var r,o;ce.default.track(se.rMx.CHANNEL_AUTOCOMPLETE_OPEN,bn(yn({},(0,S.v_)(t),(0,S.hH)(t.guild_id)),{autocomplete_type:e,num_emoji_results:null!==(r=null==n?void 0:n.numEmojiResults)&&void 0!==r?r:0,num_sticker_results:null!==(o=null==n?void 0:n.numStickerResults)&&void 0!==o?o:0}))}!function(e){e.AUTOCOMPLETE="autocomplete";e.AUTOSUGGEST="autosuggest";e.STICKER_PICKER="picker"}(an||(an={}));function mn(e){switch(e){case pn.V0.AUTOCOMPLETE:return an.AUTOCOMPLETE;case pn.V0.EXPRESSION_SUGGESTIONS:return an.AUTOSUGGEST;case pn.V0.STICKER_PICKER:return an.STICKER_PICKER;default:return null}}
|
||
var gn=n(248046),On=n(855483),En=n(210595),Cn=n(728197),jn=n(5544),Sn=n(504275),In=n(600277);function _n(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function wn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function xn(e,t,n,o,i){var a=n.length>0?e.format({prefix:o(n)}):t;return(0,r.jsx)(Qe.Title,{className:i,title:a},"autocomplete-title-".concat(a))}function Pn(e){
|
||
var t=e.query,n=e.selectedIndex,i=e.autocompletes,a=e.onHover,l=e.onClick,u=e.titleWithQuery,c=e.titleWithoutQuery,s=e.Component,f=e.getProps,d=e.getQuery,p=e.key,h=e.indexOffset,y=void 0===h?0:h,b=e.headerClassName,v=e.footer;if(null==v&&(null==i||0===i.length))return null;var m=null==i?void 0:i.map((function(e,t){var r=t+y,i=f(e,r);return(0,o.createElement)(s,wn(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){_n(e,t,n[t])}))}return e}({onClick:l,onHover:a,selected:n===r,index:r},i),{key:i.key}))}));return(0,r.jsxs)(o.Fragment,{children:[null!=u&&null!=c?xn(u,c,t,d,b):null,m,v]},p)}var Nn=n(897196);function An(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tn(e){
|
||
return function(e){if(Array.isArray(e))return An(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return An(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return An(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Zn=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({sentinel:K.zy,matches:function(e,t,n,r,o){return o.mentions.channel!==Kt.DENY&&!e.isPrivate()},queryResults:function(e,t,n,r,o){var i,a,l=jn.sH;if(n.charAt(0)===Cn.xQ.VOICE_CHANNEL){l=jn.Zb;n=n.substring(1)}
|
||
if(r.forNonStringCommandOption)i=Sn.ZP.queryApplicationCommandChannelResults({query:n,channel:e,channelTypes:r.allowedChannelTypes});else{i=Sn.ZP.queryChannelResults({query:n,channel:e,type:l});if(null!=t){var u;a=Sn.ZP.queryStaticRouteChannels({query:n,guild:t});(u=i.channels).unshift.apply(u,Tn(a))}}return{results:i,staticRouteChannels:a}},renderResults:function(e){var t,n,r=e.results.channels,o=e.selectedIndex,i=e.query,a=e.options,l=e.onHover,u=e.onClick,c=i.charAt(0)===Cn.xQ.VOICE_CHANNEL;if(c){t=q.Z.Messages.VOICE_CHANNELS_MATCHING;n=q.Z.Messages.VOICE_CHANNELS;i=i.substring(1)}else if(a.forNonStringCommandOption){t=q.Z.Messages.CHANNELS_MATCHING;n=q.Z.Messages.CHANNELS}else{t=q.Z.Messages.TEXT_CHANNELS_MATCHING;n=q.Z.Messages.TEXT_CHANNELS}return Pn({query:i,selectedIndex:o,autocompletes:r,onHover:l,onClick:u,titleWithQuery:t,titleWithoutQuery:n,Component:Qe.Channel,getProps:function(e){return{channel:e,key:e.id,category:Ct.Z.getChannel(e.parent_id)}},getQuery:function(e){
|
||
return c?"".concat(K.zy).concat(Cn.xQ.VOICE_CHANNEL).concat(e):"".concat(K.zy).concat(e)},key:"channels"})}},"onSelect",(function(e){var t=e.results.channels,n=e.index,r=e.options,o=t[n];r.insertText(function(e){switch(e.type){case En.d.PUBLIC_THREAD:case En.d.PRIVATE_THREAD:case En.d.ANNOUNCEMENT_THREAD:case En.d.GUILD_VOICE:case En.d.GUILD_STAGE_VOICE:case En.d.GUILD_CATEGORY:return'#"'.concat((0,ae.le)(e.name),'"');default:var t=jn.ZP.getTextChannelNameDisambiguations(e.guild_id)[e.id];return"#".concat(null!=t?t.name:e.name)}}(o),function(e){if(Nn.EC.has(e.id))return"<id:".concat(e.id,">");return"<#".concat(e.id,">")}(o));return{type:$t.CHANNEL}}));const Mn=Zn;var Rn=n(169898),Ln=n(871339);function Dn(e){var t=e.query,n=e.onHover,i=e.onClick,a=e.channel,l=e.selectedIndex,u=o.useRef(null),c=(0,et.v1)(a,j.yU.CHAT,t,{}),s=c.commands,f=c.sections,d=c.scrollDown,p=o.useCallback((function(e){if(null==s)return null;var t,o=s[e],u=null!==(t=null==o?void 0:o.id)&&void 0!==t?t:e
|
||
;if(null==o||o.inputType===Z.iw.PLACEHOLDER)return(0,r.jsx)(ie,{},u);var c=f.find((function(e){return e.id===o.applicationId}));return(0,r.jsx)(Qe.NewCommand,{index:e,command:o,channel:a,className:ft().itemWrapper,selected:l===e,showImage:!0,section:c,onClick:i,onHover:n},u)}),[a,s,f,i,n,l]);return null==s||0===s.length?null:(0,r.jsxs)(r.Fragment,{children:[xn(q.Z.Messages.COMMANDS_MATCHING,q.Z.Messages.COMMANDS,t,(function(e){return"".concat(K.GI).concat(e)})),(0,r.jsx)(Xe.Z,{ref:u,role:"listbox",className:ft().list,listPadding:[0,8,0,8],onScroll:function(e){if(null!=s){56*s.length-e-u.current.getListDimensions().height<504&&d()}},renderRow:p,rowCount:s.length,rowHeight:56})]})}var kn=n(968696);var Un={results:{commands:[]}};function Bn(){(0,et.nM)();return null}const Fn=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({sentinel:K.GI,stores:[g.Z,et.ZP,fn.Z],matches:function(e,t,n,r,o){
|
||
return o.commands!==Qt.DISABLED&&null==g.Z.getActiveCommand(e.id)},queryResults:function(e,t,n,r,o){if(0===n.length&&r.commands!==Qt.OLD_BUILT_INS)return Un;var i={channel:e,guild:t};if(r.commands===Qt.OLD_BUILT_INS){var a=(0,Rn.Kh)(j.yU.CHAT,!1,!1),l=new RegExp("^".concat(kn.Z.escape(n)),"i"),u=(0,gn.Dd)(a,l,i,7);return 0===u.length?Un:{results:{commands:u}}}var c=(0,Y.hV)(e,n);o&&$e.YU(i,c.text,7,j.yU.CHAT);var s=et.ZP.getQueryCommands(e.id,j.yU.CHAT,c.text);if(null==s)return Un;if(s.length>0){if(c.hasSpaceTerminator){var f=c.text.trim(),d=f+" ";s=s.filter((function(e){return e.name===f||e.name.startsWith(d)}))}return{results:{commands:s}}}return Un},renderResults:function(e){var t=e.results.commands,n=e.selectedIndex,o=e.channel,i=e.query,a=e.options,l=e.onHover,u=e.onClick,c=(0,Y.hV)(o,i);Ln.Z.trackExposure({});if(a.commands!==Qt.OLD_BUILT_INS&&Ln.Z.getCurrentConfig({}).enabled)return(0,r.jsx)(Dn,{channel:o,query:c.text,selectedIndex:n,onHover:l,onClick:u})
|
||
;var s=et.ZP.getApplicationSections(o.id,j.yU.CHAT);return Pn({query:c.text,selectedIndex:n,autocompletes:t,onHover:l,onClick:u,titleWithQuery:q.Z.Messages.COMMANDS_MATCHING,titleWithoutQuery:q.Z.Messages.COMMANDS,getQuery:function(e){return"".concat(K.GI).concat(e)},Component:a.commands===Qt.OLD_BUILT_INS?Qe.Command:Qe.NewCommand,getProps:function(e){return{key:e.id,command:e,channel:o,guildId:o.guild_id,showImage:!0,section:null==s?void 0:s.find((function(t){return t.id===e.applicationId}))}},key:"commands",footer:(0,r.jsx)(Bn,{})})}},"onSelect",(function(e){var t=e.results.commands,n=e.index,r=e.options,o=e.channel,i=e.location,a=t[n];if(a.inputType===Z.iw.PLACEHOLDER)return null;if(r.commands===Qt.OLD_BUILT_INS)r.insertText(function(e){return"".concat(K.GI).concat(e.name)}(a));else{var l,u,c=null!==(u=null===(l=et.ZP.getApplicationSections(o.id,j.yU.CHAT))||void 0===l?void 0:l.find((function(e){return e.id===a.applicationId})))&&void 0!==u?u:null;$e.Po(o.id,a,c,i)}return{
|
||
type:$t.COMMAND}}));var Gn=n(849172),Hn=n(698847),Vn=n(378734),Wn=n.n(Vn);var zn={results:{choices:[]}},Yn={results:{choices:[],isLoading:!0}},Kn=Array.from({length:5},(function(){return{name:"",displayName:"",value:""}})),qn={results:{choices:[],isError:!0}},Qn=E().debounce(Hn.Z,500,{leading:!0,trailing:!0}),Xn=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({stores:[g.Z,Gn.Z],showEmpty:!0,matches:function(e,t,n,r,o){var i=g.Z.getActiveOption(e.id);return o.commands!==Qt.DISABLED&&null!=i&&(i.type===j.jw.BOOLEAN||!!(null==i?void 0:i.autocomplete)||null!=(null==i?void 0:i.choices)&&i.choices.length>0)},queryResults:function(e,t,n,r,o){var i,a=g.Z.getActiveOption(e.id);if(null==a)return zn;if(a.autocomplete){if(o){var l=g.Z.getActiveCommand(e.id),u=r.getCommandOptionValues();Qn(l,u,{channel:e,guild:t,autocomplete:{name:a.name,query:n}})}if(Gn.Z.getLastErrored(e.id))return qn
|
||
;var c=Gn.Z.getAutocompleteChoices(e.id,a.name,n);return null==c?Yn:{results:{choices:c}}}return{results:Sn.ZP.queryChoiceResults({query:n,choices:a.type===j.jw.BOOLEAN?ct.ak:null!==(i=a.choices)&&void 0!==i?i:[]})}},renderResults:function(e){var t=e.results,n=t.choices,o=t.isLoading,i=t.isError,a=e.selectedIndex,l=e.query,u=e.onHover,c=e.onClick;return i?(0,r.jsx)(C.Z,{message:q.Z.Messages.APPLICATION_COMMAND_AUTOCOMPLETE_FAILED,noResultsImageURL:pt(),className:Wn().noAutocompleteResults}):0!==n.length||o?Pn({query:l,selectedIndex:a,autocompletes:o?Kn:n,onHover:u,onClick:c,titleWithQuery:q.Z.Messages.OPTIONS_MATCHING,titleWithoutQuery:q.Z.Messages.OPTIONS,Component:o?Qe.Loading:Qe.Generic,getProps:function(e,t){return{key:t.toString(),text:e.displayName}},getQuery:function(e){return e},key:"choice"}):(0,r.jsx)(C.Z,{message:q.Z.Messages.APPLICATION_COMMAND_AUTOCOMPLETE_NO_OPTIONS,noResultsImageURL:pt(),className:Wn().noAutocompleteResults})}},"onSelect",(function(e){
|
||
var t=e.results.choices,n=e.index,r=e.options,o=t[n];r.insertText(function(e){return e.displayName}(o));return{type:$t.CHOICE}}));const Jn=Xn;var $n={results:{commandOptions:[]}};const er=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({stores:[g.Z],focusMode:en.AUTO_WHEN_FILTERED,matches:function(e,t,n,r,o){return!(r||null==g.Z.getActiveCommand(e.id)||null!=g.Z.getActiveOption(e.id))},queryResults:function(e,t,n,r,o){var i=g.Z.getActiveCommand(e.id);if(null==(null==i?void 0:i.options))return $n;var a=g.Z.getOptionStates(e.id),l=i.options.filter((function(e){var t;return e.displayName.startsWith(n)&&!(null===(t=a[e.name])||void 0===t?void 0:t.hasValue)}));return 0===l.length?$n:{results:{commandOptions:l}}},renderResults:function(e){var t=e.results.commandOptions,n=e.selectedIndex,o=e.query,i=e.onHover,a=e.onClick,l=[],u=[];t.forEach((function(e){(e.required?l:u).push(e)}));var c=l.length>0?Pn({query:o,
|
||
selectedIndex:n,autocompletes:l,onHover:i,onClick:a,titleWithQuery:q.Z.Messages.REQUIRED_OPTIONS_MATCHING,titleWithoutQuery:q.Z.Messages.REQUIRED_OPTIONS,Component:Qe.Generic,getProps:function(e,t){return{key:t.toString(),text:e.displayName,description:e.displayDescription}},getQuery:function(e){return e},key:"required-options"}):null,s=u.length>0?Pn({query:o,selectedIndex:n,autocompletes:u,onHover:i,onClick:a,titleWithQuery:q.Z.Messages.OPTIONS_MATCHING,titleWithoutQuery:l.length>0?q.Z.Messages.OTHER_OPTIONS:q.Z.Messages.OPTIONS,Component:Qe.Generic,getProps:function(e,t){return{key:t.toString(),text:e.displayName,description:e.displayDescription}},getQuery:function(e){return e},key:"optional-options",indexOffset:l.length}):null;return(0,r.jsxs)(r.Fragment,{children:[c,s]})}},"onSelect",(function(e){var t=e.results.commandOptions,n=e.index,r=e.options,o=t[n];r.insertText("".concat(o.displayName,":"));return{type:$t.COMMAND_OPTION}}));var tr=n(748755),nr=n(840598),rr=(0,Ht.B)({
|
||
kind:"user",id:"2021-03_nitro_emoji_autocomplete_upsell",label:"Emoji Autocomplete Upsell",defaultConfig:{emojiAutocompleteUpsellEnabled:!1},treatments:[{id:1,label:"Show emoji autocomplete upsell",config:{emojiAutocompleteUpsellEnabled:!0}}]});const or=rr;(0,Ht.B)({kind:"user",id:"2021-04_nitro_emoji_autocomplete_upsell_ios",label:"Emoji Autocomplete Upsell iOS",defaultConfig:{emojiAutocompleteUpsellEnabled:!1},treatments:[{id:1,label:"Show emoji autocomplete upsell",config:{emojiAutocompleteUpsellEnabled:!0}}]});var ir=n(481554),ar=n.n(ir);function lr(e,t){return(0,r.jsx)(In.ZP,{sticker:e,isInteracting:t,size:40})}const ur=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({sentinel:K.Iv,stores:[ye.Z],matches:function(e,t,n,r,o){return n.length>1},queryResults:function(e,t,n,r,o){var i=or.getCurrentConfig({}).emojiAutocompleteUpsellEnabled,a=Sn.ZP.queryEmojiResults({query:n,channel:e,intention:r.emojiIntention
|
||
}).emojis,l=a.locked,u=a.unlocked;if("-"===n[0]){var c=function(e){var t;return null===(t=e.names)||void 0===t?void 0:t.includes(n)};l=l.filter(c);u=u.filter(c)}var s=[];if(r.allowStickers){(0,nr.$p)();var f=Sn.ZP.queryStickers([n],!0,[e,function(e,t){return t===tr.eb.SENDABLE}]),d=Math.max(4,8-u.length);s=f.slice(0,d);"-"===n[0]&&(s=f.filter((function(e){return e.sticker.name===n})))}var p=u.slice(0,se.rnv-s.length),h=p.length+s.length<se.rnv&&l.length>0?[{emojis:l}]:[];h.length>0&&or.trackExposure({});return{results:{emojis:p,emojisLocked:i?h:[],stickers:s},metadata:{numEmojiResults:p.length,numStickerResults:s.length}}},renderResults:function(e){var t=e.results,n=t.emojis,o=t.stickers,i=t.emojisLocked,a=e.selectedIndex,l=e.query,u=e.onHover,c=e.onClick;return(0,r.jsxs)(r.Fragment,{children:[Pn({query:l,selectedIndex:a,autocompletes:n,onHover:u,onClick:c,titleWithQuery:q.Z.Messages.EMOJI_MATCHING,titleWithoutQuery:q.Z.Messages.EMOJI,Component:Qe.Emoji,getProps:function(e){return{
|
||
emoji:e,key:e.id||e.uniqueName||e.name,sentinel:K.Iv,guild:null!=e.guildId?ve.Z.getGuild(e.guildId):null}},getQuery:function(e){return"".concat(K.Iv).concat(e)},key:"emoji"}),i.length>0?Pn({query:l,selectedIndex:a,autocompletes:i,onHover:u,onClick:c,titleWithQuery:0===n.length?q.Z.Messages.EMOJI_MATCHING:null,titleWithoutQuery:0===n.length?q.Z.Messages.EMOJI:null,Component:Qe.EmojiUpsell,getProps:function(e){return{key:"emoji-upsell",emojis:e.emojis}},getQuery:function(e){return"".concat(K.Iv).concat(e)},key:"emoji-upsell",indexOffset:n.length}):null,(n.length>0||i.length>0)&&o.length>0&&(0,r.jsx)(Qe.Divider,{className:ar().emojiStickersDivider}),Pn({query:l,selectedIndex:a,autocompletes:o,onHover:u,onClick:c,titleWithQuery:q.Z.Messages.STICKERS_MATCHING,titleWithoutQuery:q.Z.Messages.STICKER,Component:Qe.Sticker,getProps:function(e){var t=e.comparator,n=e.sticker;return{renderSticker:lr,queryMatch:t!==n.name.toLocaleLowerCase()?t:void 0,sticker:n,key:n.id}},getQuery:function(e){
|
||
return e},key:"stickers",indexOffset:n.length+i.length,headerClassName:n.length>0?ar().stickersHeaderWithEmojiResults:void 0})]})}},"onSelect",(function(e){var t=e.results,n=t.emojis,r=t.emojisLocked,o=t.stickers,i=e.index,a=e.options;if(i<n.length){var l=n[i];a.insertText(function(e){return"".concat(K.Iv).concat(e.name).concat(K.Iv)}(l),function(e){var t,n=e.animated?"a":"";return e.managed||null==e.id?"".concat(K.Iv).concat(e.name).concat(K.Iv):"<".concat(n,":").concat(null!==(t=e.originalName)&&void 0!==t?t:e.name,":").concat(e.id,">")}(l));return{type:$t.EMOJI,metadata:{emojiId:l.id,numEmojiResults:n.length,numStickerResults:o.length,expressionName:l.name,isCustom:null!=l.id,isAnimated:l.animated}}}if((i-=n.length)<r.length)return{type:null};if((i-=r.length)<o.length){var u=o[i];a.insertText("");a.sendSticker(u.sticker,pn.V0.AUTOCOMPLETE);return{type:$t.STICKER,metadata:{numEmojiResults:n.length,numStickerResults:o.length,stickerId:u.sticker.id}}}return{type:null}}))
|
||
;var cr=n(281110);function sr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fr(e){fr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return fr(e)}function dr(e,t){return!t||"object"!==hr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pr(e,t){pr=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return pr(e,t)}var hr=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function yr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=fr(e);if(t){var o=fr(this).constructor
|
||
;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return dr(this,n)}}var br={},vr={integration:"",query:""};var mr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&pr(e,t)}(n,e);var t=yr(n);function n(){sr(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getResults=function(e,t){if(null==e||null==t)return null;var n=br[e];return null!=n&&null!=n[t]?n[t]:null};r.getQuery=function(){return vr};r.__getLocalVars=function(){return{results:br,lastQuery:vr}};return n}(p.ZP.Store);mr.displayName="IntegrationQueryStore";const gr=new mr(Et.Z,{INTEGRATION_QUERY:function(e){var t,n=e.integration,r=e.query;br[n]=null!==(t=br[n])&&void 0!==t?t:{};br[n][r]={loading:!0,results:[]}},INTEGRATION_QUERY_SUCCESS:function(e){var t=e.integration,n=e.query,r=e.results;br[t][n]={loading:!1,
|
||
results:r.map((function(e){return{type:se.nkL[t].type,meta:e}}))};vr={query:n,integration:t}},INTEGRATION_QUERY_FAILURE:function(e){var t=e.integration,n=e.query;delete br[t][n]}}),Or=function(e,t){if(null==gr.getResults(e,t)){Et.Z.dispatch({type:"INTEGRATION_QUERY",integration:e,query:t});cr.Z.get({url:se.ANM.INTEGRATION_SEARCH(se.nkL[e].command),query:{q:t},oldFormErrors:!0}).then((function(n){Et.Z.dispatch({type:"INTEGRATION_QUERY_SUCCESS",integration:e,query:t,results:n.body})}),(function(){return Et.Z.dispatch({type:"INTEGRATION_QUERY_FAILURE",integration:e,query:t})}))}};var Er=n(107364),Cr=n(810498),jr=n.n(Cr);function Sr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var Ir,_r={results:{command:null,integrations:[],isLoading:!1}};function wr(e,t,n){var r;if(n.commands===Qt.OLD_BUILT_INS){r=t.split(" ")[0].substring(K.GI.length);var o;t=t.substring((null!==(o=r.length)&&void 0!==o?o:0)+K.GI.length)}else{var i
|
||
;r=null===(i=g.Z.getActiveCommand(e.id))||void 0===i?void 0:i.name}return{command:r,query:t.trim()}}function xr(e){return e.meta.url}const Pr=(Sr(Ir={stores:[g.Z,gr],matches:function(e,t,n,r,o){var i;return o.commands!==Qt.DISABLED&&(o.commands===Qt.OLD_BUILT_INS?n.startsWith(K.GI+"giphy")||n.startsWith(K.GI+"tenor"):(null===(i=g.Z.getActiveCommand(e.id))||void 0===i?void 0:i.integrationType)===se.q9n.GIF&&g.Z.getOptionStates(e.id).query.hasValue)},queryResults:function(e,t,n,r,o){var i=wr(e,n,r),a=i.command,l=i.query;if(null==a)return _r;var u=E().findKey(se.nkL,(function(e){return e.command===a}));o&&null!=u&&l.length>0&&Or(u,l);var c=gr.getResults(u,l);return null==c?_r:{results:{command:a,integrations:c.results,isLoading:c.loading}}}},"renderResults",(function(e){var t=e.results,n=t.integrations,i=t.isLoading,a=e.selectedIndex,l=e.channel,u=e.query,c=e.options,s=e.onHover,f=e.onClick,d=wr(l,u,c),p=d.command,y=d.query;if(null==p||0===y.length)return null;if(i)return(0,r.jsx)(h.$jN,{
|
||
className:jr().spinner,type:h.$jN.Type.SPINNING_CIRCLE});if(null!=n){var b,v,m=!1,O=n.map((function(e,t){if(e.type===se.q9n.GIF){m=!0;var n,o,i;return(0,r.jsx)(Qe.GIFIntegration,{className:jr().horizontalAutocomplete,onClick:f,onHover:s,selected:a===t,index:t,width:null!==(n=e.meta.width)&&void 0!==n?n:0,height:null!==(o=e.meta.height)&&void 0!==o?o:0,src:null!==(i=e.meta.src)&&void 0!==i?i:"",url:e.meta.url},"".concat(e.meta.url).concat(e.meta.src))}})),E=c.commands===Qt.OLD_BUILT_INS?p:null!==(v=null===(b=g.Z.getActiveCommand(l.id))||void 0===b?void 0:b.integrationTitle)&&void 0!==v?v:p,C=y.length>0&&null!=E?q.Z.Messages.CONTENT_MATCHING.format({query:y,command:E}):null!=E?E:p;return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(Qe.Title,{title:C}),m?(0,r.jsx)(Er.Z,{className:jr().horizontalAutocompletes,children:O}):O]},"gifs")}})),Sr(Ir,"onSelect",(function(e){var t=e.results,n=t.command,r=t.integrations,o=e.index,i=e.type,a=e.options,l=e.channel;if(null==n)return{type:null};var u=r[o]
|
||
;i===Xt.INSERT?a.replaceText(xr(u)):a.sendMessage(xr(u));S.ZP.trackWithMetadata(se.rMx.SEARCH_RESULT_SELECTED,{search_type:se.aib.GIF,index_num:o,source_object:"/".concat(n)});if(a.commands!==Qt.OLD_BUILT_INS){var c=g.Z.getActiveCommand(l.id);(null==c?void 0:c.inputType)===Z.iw.BUILT_IN_INTEGRATION&&S.ZP.trackWithMetadata(se.rMx.APPLICATION_COMMAND_USED,{command_id:c.id,application_id:c.applicationId,command_type:c.type})}return{type:$t.GIF}})),Ir);var Nr=n(260211),Ar=n(769321),Tr=n(773148),Zr=RegExp("^(?:(?:(?:[A-Za-z!$%?;+.=\\-~]{1,2})[@#>]{1,3})|(?:(?:[A-Za-z]{1,2})?(?:~|[!$%?;+.=-]{1,3})))[A-Za-z]","u"),Mr=RegExp("^<@!?(\\d+)>","u");function Rr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Lr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Rr(e,t,n[t])}))}return e}function Dr(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function kr(e){var t=Zr.exec(e);if(null!=t)return{type:"prefix",cleanedQuery:e.substring(t[0].length).trim()};var n=Mr.exec(e);if(null!=n){var r=n[1],o=ge.default.getUser(r);return null!=o&&o.bot?{type:"mention",cleanedQuery:e.substring(n[0].length).trim(),user:o}:null}return null}function Ur(){(0,et.nM)();return null}var Br={results:{commands:[]}},Fr=Dr(Lr({},Fn),{sentinel:void 0,focusMode:en.MANUAL,matches:function(e,t,n,r,o){
|
||
if(o.commands===Qt.DISABLED||o.commands===Qt.OLD_BUILT_INS||n.length<2)return!1;var i=kr(n);return null!=i&&i.cleanedQuery.length>0},queryResults:function(e,t,n,r,o){var i=kr(n);if(null==i)return Br;var a={channel:e,guild:t},l=(0,Y.hV)(e,i.cleanedQuery);o&&$e.YU(a,l.text,7,j.yU.CHAT,"mention"===i.type?i.user.id:void 0);var u=et.ZP.getQueryCommands(e.id,j.yU.CHAT,l.text);if(null==u)return Br;if(u.length>0&&l.hasSpaceTerminator){var c=l.text.trim(),s=c+" ";u=u.filter((function(e){return e.name===c||e.name.startsWith(s)}))}return 0===(u=u.filter((function(e){return e.inputType===Z.iw.BOT}))).length?Br:Nr.Z.getCurrentConfig({},{autoTrackExposure:!0}).showApplicationCommandSuggestions&&Ar.Xk.getSetting()?{results:{commands:u}}:Br},renderResults:function(e){var t=e.results.commands,n=e.selectedIndex,o=e.guild,i=e.channel,a=e.query,l=e.options,u=e.onHover,c=e.onClick,s=et.ZP.getApplicationSections(i.id,j.yU.CHAT);return Pn({query:a,selectedIndex:n,autocompletes:t,onHover:u,onClick:c,
|
||
titleWithQuery:q.Z.Messages.COMMANDS_MATCHING,titleWithoutQuery:q.Z.Messages.COMMANDS,Component:l.commands===Qt.OLD_BUILT_INS?Qe.Command:Qe.NewCommand,getProps:function(e){return{key:e.id,command:e,channel:i,guildId:i.guild_id,showImage:!0,section:null==s?void 0:s.find((function(t){return t.id===e.applicationId}))}},getQuery:function(e){var t=kr(e);if("mention"!==t.type)return e;var n=Tr.Z.getName(null==o?void 0:o.id,i.id,t.user);return e.replace(Mr,"@".concat(n))},key:"commands",footer:(0,r.jsx)(Ur,{})})},onSelect:function(e){var t=e.results,n=e.index,r=e.type,o=e.options,i=e.channel,a=Fn.onSelect({results:t,index:n,type:r,options:o,channel:i,location:Z.Vh.SUGGESTION});return null==a?null:Dr(Lr({},a),{type:$t.COMMAND_SUGGESTION})}});const Gr=Fr;const Hr=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({sentinel:K.ME,stores:[jt.ZP],matches:function(e,t,n,r,o){
|
||
return o.mentions.user!==zt.DENY||o.mentions.role!==Yt.DENY||o.mentions.global!==Wt.DENY},queryResults:function(e,t,n,r,o){var i=r.mentions.global===Wt.ALLOW_EVERYONE||r.mentions.global===Wt.ALLOW_EVERYONE_OR_HERE,a=r.mentions.global===Wt.ALLOW_EVERYONE_OR_HERE,l=r.mentions.user!==zt.DENY,u=r.mentions.role!==Yt.DENY,c=r.mentions.clyde!==qt.DENY,s=r.mentions.user===zt.ALLOW_GUILD,f=r.mentions.role===Yt.ALLOW_ALL;return{results:Sn.ZP.queryMentionResults({query:n,channel:e,canMentionEveryone:i,canMentionHere:a,canMentionUsers:l,canMentionRoles:u,canMentionClyde:c,includeAllGuildUsers:s,includeNonMentionableRoles:f,request:o})}},renderResults:function(e){var t,n,i=e.results,a=i.users,l=i.globals,u=i.roles,c=e.selectedIndex,s=e.channel,f=e.query,d=e.options,p=e.onHover,h=e.onClick,y=a.map((function(e,t){return(0,r.jsx)(Qe.User,{guildId:s.guild_id,onClick:h,onHover:p,selected:c===t,index:t,user:e.user,nick:e.nick,status:e.status,hidePersonalInformation:d.hidePersonalInformation},e.user.id)
|
||
})),b=l.map((function(e,t){return(0,r.jsx)(Qe.Generic,{onClick:h,onHover:p,selected:c===t+a.length,index:a.length+t,text:e.text,description:d.hideMentionDescription?null:e.description,"aria-label":e.text},e.text)})),v=u.map((function(e,t){return(0,r.jsx)(Qe.Role,{onClick:h,onHover:p,selected:c===t+a.length+l.length,index:a.length+l.length+t,role:e,hideDescription:d.hideMentionDescription},e.id)}));if(d.mentions.user===zt.DENY){t=q.Z.Messages.ROLES_MATCHING;n=q.Z.Messages.ROLES}else{t=q.Z.Messages.MEMBERS_MATCHING;n=q.Z.Messages.MEMBERS}return(0,r.jsxs)(o.Fragment,{children:[xn(t,n,f,(function(e){return"".concat(K.ME).concat(e)})),y,a.length>0&&l.length>0?(0,r.jsx)(Qe.Divider,{}):null,b,a.length>0&&u.length>0||l.length>0&&u.length>0?(0,r.jsx)(Qe.Divider,{}):null,v]},"mentions")}},"onSelect",(function(e){var t=e.results,n=t.users,r=t.globals,o=t.roles,i=e.index,a=e.options,l=n[i],u=r[i-n.length],c=o[i-n.length-r.length];null!=l?a.insertText(function(e,t){
|
||
return"".concat(K.ME).concat(Oe.ZP.getUserTag(e,{mode:"username",decoration:"never",identifiable:t?"never":"always"}))}(l.user,a.hidePersonalInformation),function(e){return"<@".concat(e.id,">")}(l.user)):null!=u?a.insertText(function(e){return e.text}(u)):null!=c&&a.insertText(function(e){return"".concat(K.ME).concat(e.name)}(c),function(e){return"<@&".concat(e.id,">")}(c));return{type:$t.MENTION}}));const Vr=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({sentinel:K.a4,matches:function(e,t,n,r,o){var i,a;return r&&null!==(a=null===(i=o.chatInputType.autocomplete)||void 0===i?void 0:i.addReactionShortcut)&&void 0!==a&&a&&(fn.Z.can(se.Plq.ADD_REACTIONS,e)||e.isPrivate())},queryResults:function(e,t,n,r,o){return{results:{emojis:Sn.ZP.queryEmojiResults({query:n,channel:e,intention:se.HzX.REACTION}).emojis.unlocked}}},renderResults:function(e){var t=e.results.emojis,n=e.selectedIndex;return Pn({query:e.query,
|
||
selectedIndex:n,autocompletes:t,onHover:e.onHover,onClick:e.onClick,titleWithQuery:q.Z.Messages.REACTIONS_MATCHING,titleWithoutQuery:q.Z.Messages.EMOJI,Component:Qe.Emoji,getProps:function(e){return{emoji:e,key:e.id||e.uniqueName||e.name,sentinel:K.Iv}},getQuery:function(e){return"".concat(K.a4).concat(e)},key:"reactions"})}},"onSelect",(function(e){var t=e.results.emojis,n=e.index,r=e.options,o=t[n];r.sendMessage(function(e){return"".concat(K.a4).concat(e.name).concat(K.jp)}(o));return{type:$t.REACTION}}));function Wr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var zr,Yr=[Jt.CHOICES,Jt.GIFS,Jt.COMMAND_OPTIONS,Jt.EMOJIS_AND_STICKERS,Jt.REACTIONS,Jt.CHANNELS,Jt.MENTIONS,Jt.COMMANDS,Jt.LEGACY_COMMANDS],Kr=(Wr(zr={},Jt.CHANNELS,Mn),Wr(zr,Jt.COMMANDS,Fn),Wr(zr,Jt.COMMAND_OPTIONS,er),Wr(zr,Jt.CHOICES,Jn),Wr(zr,Jt.EMOJIS_AND_STICKERS,ur),Wr(zr,Jt.GIFS,Pr),Wr(zr,Jt.LEGACY_COMMANDS,Gr),Wr(zr,Jt.MENTIONS,Hr),
|
||
Wr(zr,Jt.REACTIONS,Vr),zr);function qr(e){var t,n=e.activeCommandOption,r=e.canMentionUsers,o=void 0===r||r,i=e.canMentionRoles,a=void 0===i||i,l=e.canMentionChannels,u=void 0===l||l,c=e.canMentionEveryone,s=e.canMentionClyde,f=void 0!==s&&s,d=e.useNewSlashCommands,p=e.canOnlyUseTextCommands,h=e.canSendStickers,y=e.hideMentionDescription,b=e.hidePersonalInformation,v=e.type,m=e.emojiIntention,g=e.editorRef,O=e.onSendMessage,E=e.onSendSticker,C=e.setValue,S={mentions:{channel:Kt.DENY,global:Wt.DENY,role:Yt.DENY,user:zt.DENY,clyde:qt.DENY},commands:Qt.DISABLED,allowStickers:!0===h,forNonStringCommandOption:null!=n&&n.type!==j.jw.STRING,hideMentionDescription:!0===y,hidePersonalInformation:!0===b,chatInputType:v,emojiIntention:m,sendMessage:O,sendSticker:E,insertText:function(e,t){var n;null===(n=g.current)||void 0===n||n.insertAutocomplete(e,null!=t?t:e)},replaceText:function(e,t){C(e,null!=t?t:(0,On.JM)(e))},getCommandOptionValues:function(){var e
|
||
;return null===(e=g.current)||void 0===e?void 0:e.getCommandOptionValues()}};if(null!=n){var I=(0,gn.$z)(n);I.canMentionChannels&&(S.mentions.channel=Kt.ALLOW_SELECTABLE);I.canMentionEveryone&&(S.mentions.global=I.canMentionHere?Wt.ALLOW_EVERYONE_OR_HERE:Wt.ALLOW_EVERYONE);I.canMentionRoles&&(S.mentions.role=I.canMentionNonMentionableRoles?Yt.ALLOW_ALL:Yt.ALLOW_MENTIONABLE);I.canMentionUsers&&(S.mentions.user=I.canMentionAnyGuildUser?zt.ALLOW_GUILD:zt.ALLOW_CHANNEL);S.hideMentionDescription=!0}else{u&&(S.mentions.channel=Kt.ALLOW_SELECTABLE);a&&(S.mentions.role=Yt.ALLOW_MENTIONABLE);o&&(S.mentions.user=zt.ALLOW_CHANNEL);c&&(S.mentions.global=Wt.ALLOW_EVERYONE_OR_HERE);f&&(S.mentions.clyde=qt.ALLOW)}(null===(t=v.commands)||void 0===t?void 0:t.enabled)&&(S.commands=d?p?Qt.NEW_TEXT_ONLY:Qt.NEW:Qt.OLD_BUILT_INS);null!=n&&null!=n.channelTypes&&(S.allowedChannelTypes=n.channelTypes);return S}function Qr(e){var t=e.type,n=e.channel,r=e.guild,o=e.query,i=e.isAtStart,a=e.options,l=Kr[t]
|
||
;if(null!=l.sentinel){if(!o.startsWith(l.sentinel))return!1;o=o.substring(l.sentinel.length)}return!(null!=l.matches&&!l.matches(n,r,o,i,a))}function Xr(e){var t=e.channel,n=e.guild,r=e.options,o=e.currentWord,i=e.currentWordIsAtStart,a=e.textValue,l=e.optionText,u=null,c=!0,s=!1,f=void 0;try{for(var d,p=Yr[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var h=d.value,y=Kr[h];if(h===Jt.GIFS||h===Jt.CHOICES){if(r.commands===Qt.OLD_BUILT_INS){if(Qr({type:h,channel:t,guild:n,query:a,isAtStart:!1,options:r})){u={type:h,typeInfo:y,query:a};break}}else if(Qr({type:h,channel:t,guild:n,query:l,isAtStart:!1,options:r})){u={type:h,typeInfo:y,query:l};break}}else if(h===Jt.COMMANDS&&r.commands!==Qt.OLD_BUILT_INS){if(Qr({type:h,channel:t,guild:n,query:a,isAtStart:!0,options:r})){var b,v;u={type:h,typeInfo:y,query:a.substring(null!==(v=null===(b=y.sentinel)||void 0===b?void 0:b.length)&&void 0!==v?v:0)};break}}else if(h===Jt.LEGACY_COMMANDS){if(Qr({type:h,channel:t,guild:n,query:a,isAtStart:i,
|
||
options:r})){u={type:h,typeInfo:y,query:a};break}}else if(null!=o&&Qr({type:h,channel:t,guild:n,query:o,isAtStart:i,options:r})){var m,g;u={type:h,typeInfo:y,query:o.substring(null!==(g=null===(m=y.sentinel)||void 0===m?void 0:m.length)&&void 0!==g?g:0)};break}}}catch(e){s=!0;f=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw f}}if(null==u)return null;u.query=u.query.toLocaleLowerCase();return u}function Jr(e,t){if(null==t||null==e)return null;var n;if(null!=e.choices||e.autocomplete)n=Jt.CHOICES;else switch(e.type){case j.jw.BOOLEAN:n=Jt.CHOICES;break;case j.jw.CHANNEL:n=Jt.CHANNELS;break;case j.jw.ROLE:case j.jw.USER:case j.jw.MENTIONABLE:n=Jt.MENTIONS;break;default:return null}return{type:n,typeInfo:Kr[n],query:t}}function $r(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function eo(e){eo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return eo(e)}
|
||
function to(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){$r(e,t,n[t])}))}return e}function no(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ro(e,t){return!t||"object"!==io(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oo(e,t){
|
||
oo=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return oo(e,t)}var io=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function ao(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=eo(e);if(t){var o=eo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ro(this,n)}}var lo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&oo(e,t)}(n,e);var t=ao(n);function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r
|
||
;(r=t.call(this)).props=e;r.state={query:null,selectedIndex:null,isVisible:!1,didInitialQuery:!1};return r}var r=n.prototype;r.updateProps=function(e){var t=this.props.focused!==e.focused,n=this.props.channel.id!==e.channel.id||this.props.activeCommandOption!==e.activeCommandOption,r=!this.state.didInitialQuery||this.props.currentWord!==e.currentWord||this.props.currentWordIsAtStart!==e.currentWordIsAtStart||this.props.textValue!==e.textValue||this.props.optionText!==e.optionText;this.props=e;if(n||r){this.updateResults(r,n);this.state.didInitialQuery||(this.state=no(to({},this.state),{didInitialQuery:!0}))}else if(t){var o=this.state.query;this.setState({isVisible:null!=o&&this.shouldShow(o.resultCount,o.isLoading,o.typeInfo)})}};r.setSelectedIndex=function(e){this.setState({selectedIndex:e})};r.onTabOrEnter=function(e){if(!this.state.isVisible)return!1;if(null==this.state.selectedIndex){var t,n=null===(t=this.state.query)||void 0===t?void 0:t.typeInfo.focusMode
|
||
;if(!e&&(n===en.MANUAL||n===en.AUTO_WHEN_FILTERED)){this.setSelectedIndex(0);return!0}return!1}return this.selectResult(this.state.selectedIndex,e)};r.onMoveSelection=function(e){var t;if(!this.state.isVisible)return!1;e<0?this.props.navigator.focusPreviousItem():e>0&&this.props.navigator.focusNextItem();if(null!=this.state.selectedIndex&&(null===(t=this.state.query)||void 0===t?void 0:t.type)===Jt.COMMANDS){var n,r=null===(n=this.state.query.results.commands)||void 0===n?void 0:n[this.state.selectedIndex];null!=r&&$e.Sg(this.props.channel.id,r.id)}return!0};r.onMaybeShowAutocomplete=function(){this.emit("update")};r.onHideAutocomplete=function(){null!=this.state.query&&this.setState({isVisible:!1})};r.onResultHover=function(e){this.props.navigator.setFocus(null);this.setSelectedIndex(null)};r.onResultClick=function(e){this.selectResult(e,!0)};r.clearQuery=function(){this.setState({query:null,isVisible:!1,selectedIndex:null})};r.queryResults=function(){this.updateResults()}
|
||
;r.isVisible=function(){return this.state.isVisible};r.updateResults=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=this.props.editorRef.current){var o=qr(this.props),i=Xr({channel:this.props.channel,guild:this.props.guild,options:o,currentWord:this.props.currentWord,currentWordIsAtStart:this.props.currentWordIsAtStart,textValue:this.props.textValue,optionText:this.props.optionText}),a=o.commands!==Qt.DISABLED?Jr(this.props.activeCommandOption,this.props.currentWord):null;if(null==i&&null!=a)i=a;else if(null==i||null!=a&&i.type!==a.type){this.clearQuery();return}var l=i.type,u=i.typeInfo,c=i.query,s=r||n&&((null===(e=this.state.query)||void 0===e?void 0:e.queryText)!==c||(null===(t=this.state.query)||void 0===t?void 0:t.typeInfo)!==u),f=u.queryResults(this.props.channel,this.props.guild,c,o,s),d=f.results,p=f.metadata,h=0,y=!0,b=!1,v=void 0;try{
|
||
for(var m,g=Object.values(d)[Symbol.iterator]();!(y=(m=g.next()).done);y=!0){var O=m.value;Array.isArray(O)&&(h+=O.length)}}catch(e){b=!0;v=e}finally{try{y||null==g.return||g.return()}finally{if(b)throw v}}var E=!0===d.isLoading,C=this.shouldShow(h,E,u),j=this.state.selectedIndex;!C||E?j=null:null!=j&&j>=h&&(j=h-1);C&&!this.state.isVisible&&vn(l,this.props.channel,p);this.setState({query:{type:l,typeInfo:u,queryText:c,results:d,resultCount:h,options:o,isLoading:E},isVisible:C,selectedIndex:j})}};r.shouldShow=function(e,t,n){return this.props.focused&&null==this.props.expressionPickerView&&(e>0||t||n.showEmpty)};r.selectResult=function(e,t){var n;if(!this.state.isVisible)return!1;var r=this.state.query,o=r.type,i=r.typeInfo,a=r.results,l=r.resultCount,u=r.options;if(e>=l)return!1;var c=null===(n=i.onSelect)||void 0===n?void 0:n.call(i,{results:a,index:e,type:t?Xt.SEND:Xt.INSERT,options:u,channel:this.props.channel});if(null!=c){var s;!function(e,t,n,r){var o,i,a,l,u
|
||
;ce.default.track(se.rMx.CHANNEL_AUTOCOMPLETE_SELECTED,bn(yn({},(0,S.v_)(n),(0,S.hH)(n.guild_id)),{autocomplete_type:e,selection_type:t,emoji_id:null==r?void 0:r.emojiId,sticker_id:null==r?void 0:r.stickerId,num_emoji_results:null!==(o=null==r?void 0:r.numEmojiResults)&&void 0!==o?o:0,num_sticker_results:null!==(i=null==r?void 0:r.numStickerResults)&&void 0!==i?i:0,emoji_name:null!==(a=null==r?void 0:r.expressionName)&&void 0!==a?a:"",is_custom:null!==(l=null==r?void 0:r.isCustom)&&void 0!==l&&l,is_animated:null!==(u=null==r?void 0:r.isAnimated)&&void 0!==u&&u}))}(o,null!==(s=c.type)&&void 0!==s?s:null,this.props.channel,c.metadata)}return!0};r.setState=function(e){for(var t in e)if(e[t]!==this.state[t]){this.state=to({},this.state,e);this.emit("change",this.state);return}};return n}(u()),uo=n(798159),co=n(247346);function so(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,
|
||
enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function po(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ho(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return so(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return so(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yo(e,t,n){var r,i,a,l,u,c=e.channel,s=e.type,f=ho(o.useState((function(){return{query:null,selectedIndex:null,isVisible:!1,didInitialQuery:!1}})),2),d=f[0],h=f[1],y=(0,ln.Z)(),b=(0,sn.Ib)(e.guild),v=(0,p.e7)([jt.ZP,ge.default],(function(){var e,t,n=ge.default.getCurrentUser();return null!==(t=null!=c.guild_id&&null!=n?null===(e=jt.ZP.getMember(c.guild_id,n.id))||void 0===e?void 0:e.isPending:null)&&void 0!==t&&t})),m=(0,p.cj)([fn.Z,dn.Z],(function(){return{canMentionEveryone:c.isPrivate()||v||s===cn.I.RULES_INPUT||fn.Z.can(se.Plq.MENTION_EVERYONE,c),
|
||
hidePersonalInformation:dn.Z.hidePersonalInformation}}),[c,s,v]),O=m.canMentionEveryone,E=m.hidePersonalInformation,C=(0,p.cj)([g.Z],(function(){return{activeCommand:g.Z.getActiveCommand(c.id),activeCommandOption:g.Z.getActiveOption(c.id)}})),j=C.activeCommand,S=C.activeCommandOption,I=function(e){var t,n,r,i=e.navId,a=e.scrollerRef,l=e.state,u=e.onFocus,c=o.useContext(tn.ZP).renderWindow,s=function(e,t){var n;null===(n=a.current)||void 0===n||n.scrollToTop();if(e&&null!=l.query){var r=l.query.typeInfo.focusMode,o=!(r===en.MANUAL||r===en.AUTO_WHEN_FILTERED&&0===l.query.queryText.length);if(!l.isVisible||!0===t&&!1===o){d.setFocus(null);null==u||u(null)}else{d.setFocus("0");null==u||u(0)}}},f=function(e){var t;null===(t=a.current)||void 0===t||t.scrollToBottom();if(e&&null!=l.query&&l.query.resultCount>0){var n=l.query.resultCount-1;d.setFocus(n.toString());null==u||u(n)}},d=(0,uo.ZP)({id:i,isEnabled:l.isVisible,orientation:co.hy.VERTICAL,useVirtualFocus:!0,setFocus:function(e,t){
|
||
var n=c.document.querySelector(e);if(null!=n){var r;null===(r=a.current)||void 0===r||r.scrollIntoViewNode({node:n})}null==u||u(+t)},onNavigateNextAtEnd:function(){return s(!0)},onNavigatePreviousAtStart:function(){return f(!0)},scrollToStart:function(){s(!1,!1);return Promise.resolve()},scrollToEnd:function(){f(!1);return Promise.resolve()}});o.useEffect((function(){s(!0,!0)}),[null===(t=l.query)||void 0===t?void 0:t.type,null===(n=l.query)||void 0===n?void 0:n.queryText,null===(r=l.query)||void 0===r?void 0:r.isLoading,l.isVisible]);return d}({navId:"channel-autocomplete",scrollerRef:n,state:d,onFocus:function(e){return x.setSelectedIndex(e)}}),_=null===(r=e.editorRef.current)||void 0===r?void 0:r.getCurrentWord(),w=po(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){fo(e,t,n[t])}))}return e}({},e),{navigator:I,activeCommand:j,activeCommandOption:S,canMentionUsers:s!==cn.I.RULES_INPUT,canMentionEveryone:O,canMentionClyde:b,hidePersonalInformation:E,hideMentionDescription:s===cn.I.RULES_INPUT,emojiIntention:s===cn.I.RULES_INPUT?se.HzX.COMMUNITY_CONTENT:se.HzX.CHAT,currentWord:null!==(l=null==_?void 0:_.word)&&void 0!==l?l:"",currentWordIsAtStart:!0===(null==_?void 0:_.isAtStart),optionText:null!=S?(0,un.KF)(fo({},S.name,null!==(u=null===(i=e.editorRef.current)||void 0===i?void 0:i.getCurrentCommandOptionValue())&&void 0!==u?u:[]),S.name):""}),x=ho(o.useState((function(){return new lo(w)})),1)[0];o.useEffect((function(){x.updateProps(w)}));o.useImperativeHandle(t,(function(){return x}),[x]);o.useEffect((function(){var e=function(e){return h(e)};x.on("change",e);x.on("update",y);return function(){x.off("change",e);x.off("update",y)}}),[y,x]);o.useEffect((function(){
|
||
var e,t=null===(e=d.query)||void 0===e?void 0:e.typeInfo.stores;if(null!=t){var n=function(){return x.queryResults()},r=!0,o=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){a.value.addChangeListener(n)}}catch(e){o=!0;i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return function(){var e=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){i.value.removeChangeListener(n)}}catch(e){r=!0;o=e}finally{try{e||null==a.return||a.return()}finally{if(r)throw o}}}}}),[x,null===(a=d.query)||void 0===a?void 0:a.typeInfo]);return[d,x,I]}var bo=n(143636),vo=n.n(bo);function mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function go(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Oo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){go(e,t,n[t])}))}return e}function Eo(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Co(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function jo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const So=o.forwardRef((function(e,t){
|
||
var n,i,l=e.channel,u=e.type,c=e.editorHeight,s=e.onVisibilityChange,f=(0,Je.Dt)(),d=(0,p.e7)([ve.Z],(function(){return null!==(i=ve.Z.getGuild(l.guild_id))&&void 0!==i?i:null}),[l.guild_id]),y=o.useRef(),b=jo(yo(Eo(Oo({},e),{guild:d}),t,y),3),v=b[0],m=b[1],g=b[2],O=(null===(n=u.autocomplete)||void 0===n?void 0:n.forceChatLayer)?Gt.ZP:Ft.ZP,E=Me(v.selectedIndex);x(f,v.isVisible,E);Vt.trackExposure({});var C,j=Vt.useExperiment({}).usePopoutAutocomplete,S=on({editorHeight:c,type:u,state:v,isInPopoutExperiment:j}),I=o.useMemo((function(){return null==S?"":String(Date.now())}),[null==S?void 0:S.top,null==S?void 0:S.left,null==S?void 0:S.bottom,null==S?void 0:S.right]);o.useEffect((function(){s(v.isVisible)}),[s,v.isVisible]);if(!v.isVisible||null==v.query||void 0===S)return null;var _,w=null!==(C=v.query.typeInfo.renderResults({results:v.query.results,selectedIndex:v.selectedIndex,channel:l,guild:d,query:v.query.queryText,options:v.query.options,onHover:function(e){
|
||
return m.onResultHover(e)},onClick:function(e){return m.onResultClick(e)}}))&&void 0!==C?C:null;if(null==w)return null;var P=(go(_={},vo().autocompleteAttached,null==S),go(_,vo().autocompletePopout,null!=S),go(_,vo().bottom,null==S&&"bottom"===e.position),_),N=490;if(null!=S){var A,Z;N=(null===(A=u.autocomplete)||void 0===A?void 0:A.small)?200:(null===(Z=v.query)||void 0===Z?void 0:Z.type)===Jt.EMOJIS_AND_STICKERS?490:245}var M=(0,r.jsx)(Qe,{id:f,className:a()(vo().autocomplete,P),innerClassName:vo().autocompleteInner,onMouseDown:function(e){return e.preventDefault()},children:(0,r.jsx)(T.bG,{navigator:g,children:(0,r.jsx)(T.SJ,{children:function(e){var t=e.ref,n=Co(e,["ref"]);return(0,r.jsx)(h.h21,Eo(Oo({id:f,ref:function(e){var n;t.current=null!==(n=null==e?void 0:e.getScrollerNode())&&void 0!==n?n:null;y.current=e}},n),{className:vo().scroller,style:{maxHeight:N},role:"listbox","aria-labelledby":Re(f),children:w}))}})})});if(null!=S){var R;return(0,r.jsx)(O,{children:(0,
|
||
r.jsx)(h.jRF,{reference:function(){return S},positionKey:I,position:null!==(R=e.position)&&void 0!==R?R:"top",align:"left",spacing:8,autoInvert:!0,nudgeAlignIntoViewport:!0,children:function(){return M}})})}return M}));function Io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _o(e){_o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return _o(e)}function wo(e,t){return!t||"object"!==Po(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xo(e,t){xo=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return xo(e,t)}var Po=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function No(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0
|
||
;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=_o(e);if(t){var o=_o(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wo(this,n)}}var Ao=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&xo(e,t)}(n,e);var t=No(n);function n(){Io(this,n);return t.apply(this,arguments)}var r=n.prototype;r.on=function(){0;return this};r.once=function(){0;return this};r.addListener=function(){0;return this};r.removeListener=function(){0;return this};r.emit=function(){0;return!1};return n}(u()),To=o.createContext(new Ao),Zo=To.Provider;To.Consumer;const Mo=To
|
||
;var Ro=n(289283),Lo=n(809784),Do=n(944010),ko=n(213276),Uo=n(913549),Bo=n(77918),Fo=n(293862),Go=n(217544),Ho=n(23279),Vo=n.n(Ho),Wo=n(579581),zo=n(394352),Yo=n(593166),Ko=n(159895),qo=n(799066),Qo=n(421281),Xo=Object.freeze({showPremiumUpsell:!1}),Jo=(0,I.Z)((function(e){return Xo})),$o=function(e){Jo.setState({showPremiumUpsell:e})},ei=Jo,ti=n(798826),ni=n(254631),ri=n(879913),oi=n(761731),ii=n(449401),ai=n(95891),li=n(71236),ui=n(940581),ci=n(931353),si=n.n(ci),fi=n(419302),di=n.n(fi);function pi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function yi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable
|
||
}))));r.forEach((function(t){hi(e,t,n[t])}))}return e}function bi(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function vi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return pi(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var mi=(0,Qo.Mg)(di().stickerCategoryListPadding),gi=(0,Qo.Mg)(di().stickerCategoryIconSize),Oi=(0,Qo.Mg)(di().stickerCategoryIconMargin),Ei=(0,Qo.Mg)(di().stickerCategoryUnicodeIconSize),Ci=(0,Qo.Mg)(di().categorySeparatorSize),ji=(0,Qo.Mg)(di().categorySeparatorMarginVertical),Si=[mi,mi,mi,mi],Ii=2*(gi+Oi)+mi,_i=Ci+2*ji;const wi=function(e){var t=e.stickersListRef,n=e.channel,i=o.useRef(null),l=vi(o.useState(!0),2),u=l[0],c=l[1],s=P.ZN.useStore((function(e){return e.activeCategoryIndex})),f=(0,Go.Sd)(n),d=o.useMemo((function(){var e,t,n=f.filter((function(e){
|
||
return e.type===pn.Ih.GUILD})).length,r=n+((null===(e=f[0])||void 0===e?void 0:e.type)===pn.Ih.RECENT?1:0)+((null===(t=f[0])||void 0===t?void 0:t.type)===pn.Ih.FAVORITE?1:0);return{firstStandardStickerCategoryIndex:r+1,firstStandardStickerCategoryOffsetTop:r*(gi+Oi)-Oi+_i,guildCategoryCount:n,hasPremiumStickerPacks:null!=f.find((function(e){return e.type===pn.Ih.PACK}))}}),[f]),p=d.firstStandardStickerCategoryIndex,y=d.firstStandardStickerCategoryOffsetTop,b=d.guildCategoryCount,v=d.hasPremiumStickerPacks;o.useLayoutEffect((function(){c(b>=7)}),[b]);var m=function(e){var t=e.activeIndex,n=e.stickerPickerCategories,i=e.categoryListRef,l=e.firstStandardStickerCategoryOffsetTop,u=e.setShouldRenderShortcut,c=(0,Wo.O)(),s=(0,zo.Iu)((function(e){return""!==e.searchQuery})),f=o.useCallback((function(e,i,l){var u,f,d=(null===(u=n[0])||void 0===u?void 0:u.type)===pn.Ih.FAVORITE,p=d?1:0,y=(null===(f=n[p])||void 0===f?void 0:f.type)===pn.Ih.RECENT,b=n.length>0,v=n.length;if(0===i&&d){var m
|
||
;return(0,r.jsx)("div",{role:"listitem","aria-setsize":v,"aria-posinset":i,children:(0,r.jsx)(h.P3F,{"aria-label":q.Z.Messages.CATEGORY_FAVORITE,className:a()(si().stickerCategory,si().stickerCategoryGeneric,(m={},hi(m,si().stickerCategoryGenericDisabled,b&&!d),hi(m,si().stickerCategoryGenericSelected,!s&&d&&0===t),m)),onClick:l,children:(0,r.jsx)(li.Z,{className:si().stickerCategoryGenericIcon,height:Ei,width:Ei})})},"favorites")}if(i===p&&y){var g;return(0,r.jsx)("div",{role:"listitem","aria-setsize":v,"aria-posinset":i,children:(0,r.jsx)(h.P3F,{"aria-label":q.Z.Messages.STICKER_PICKER_CATEGORIES_RECENT,className:a()(si().stickerCategory,si().stickerCategoryGeneric,(g={},hi(g,si().stickerCategoryGenericDisabled,b&&!y),hi(g,si().stickerCategoryGenericSelected,!s&&y&&t===p),g)),onClick:l,children:(0,r.jsx)(ii.Z,{className:si().stickerCategoryGenericIcon,height:Ei,width:Ei})})},"recent")}
|
||
var O,E=t===i,C=n[i],j=n[i+1],S=null!=j&&C.type===pn.Ih.GUILD&&j.type!==pn.Ih.GUILD,I=C.type===pn.Ih.PACK,_="",w=null;if(C.type===pn.Ih.GUILD||C.type===pn.Ih.EMPTY_GUILD_UPSELL){var x=ve.Z.getGuild(C.id);if(null!=x){O=x.id;_=x.name;w=(0,r.jsx)(oi.Z,{guild:x,isSelected:E})}}else if(I){var P=ye.Z.getStickerPack(C.id);if(null!=P){_=P.name;w=(0,r.jsx)(In.ZP,{disableAnimation:!E||s,size:gi,sticker:(0,be.Zt)(P)})}}return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(h.ua7,{position:"right",text:_,tooltipContentClassName:si().tooltip,children:function(e){var t;return(0,r.jsx)("div",{role:"listitem","aria-setsize":v,"aria-posinset":i,children:(0,r.jsx)(h.P3F,bi(yi({},e),{"aria-label":_,className:a()(si().stickerCategory,(t={},hi(t,si().premiumCategory,I),hi(t,si().premiumCategorySelected,!s&&E&&I),t)),onClick:function(){C.type===pn.Ih.PACK&&ce.default.track(se.rMx.EXPRESSION_PICKER_CATEGORY_SELECTED,{location:null==c?void 0:c.location,tab:ui.X1.STICKER,sticker_pack_id:C.id,guild_id:O});l()},
|
||
children:w}))})}}),S?(0,r.jsx)("hr",{className:si().guildCategorySeparator},"separator"):null]},C.id)}),[t,c,s,n]);return{getScrollOffsetForIndex:o.useCallback((function(e,t){return t?Ii:0}),[]),renderCategoryListItem:f,rowHeight:o.useCallback((function(e,t){var r=n[t],o=n[t+1],i=null!=o&&r.type===pn.Ih.GUILD&&o.type!==pn.Ih.GUILD;return gi+(i?_i:Oi)}),[n]),onScroll:o.useCallback((function(e){var t,n=null===(t=i.current)||void 0===t?void 0:t.getListDimensions();if(null!=n){var r=e+n.height;u(r-Ci<l)}}),[l])}}({activeIndex:s,stickerPickerCategories:f,categoryListRef:i,firstStandardStickerCategoryOffsetTop:y,setShouldRenderShortcut:c}),g=m.renderCategoryListItem,O=m.rowHeight,E=m.onScroll,C=o.useCallback((function(e){var t;e(p);null===(t=i.current)||void 0===t||t.scrollTo(y)}),[p,y]);return(0,r.jsx)(tt.Z,{className:si().categoryList,categoryListRef:i,expressionsListRef:t,store:P.ZN,listPadding:Si,onScroll:E,renderCategoryListItem:g,rowCount:f.length,categories:f,categoryHeight:O,
|
||
children:function(e){return v&&u&&(0,r.jsx)(h.P3F,{className:a()(si().standardStickerShortcut,hi({},si().invisibleShortcut,!u)),onClick:function(){return C(e)},children:(0,r.jsx)(ai.Z,{height:24,width:24})})}})};var xi=n(4572),Pi=n(70535),Ni=n(709189),Ai=n(803961),Ti=n(716234),Zi=n.n(Ti);function Mi(e){var t=e.analyticsSection,n=e.buttonText;return(0,r.jsxs)(Ni.C,{className:Zi().premiumButton,innerClassName:Zi().premiumButtonInner,color:h.zxk.Colors.GREEN,size:h.zxk.Sizes.SMALL,onClick:function(){return(0,Ai.Z)({section:t})},children:[(0,r.jsx)(ai.Z,{className:Zi().premiumButtonNitroWheel}),null!=n?n:q.Z.Messages.STICKER_PICKER_PREMIUM_EMPTY_STATE_CTA]})}var Ri=n(719833),Li=n(872114),Di=n.n(Li);function ki(e){var t,n,i=e.className;(0,Go.fP)();var l=(0,m.Z)(v.Z.EMPTY_STATE).analyticsLocations,u=(0,p.Wu)([ye.Z],(function(){return Ri.Wt.map((function(e){return ye.Z.getStickerById(e)}))}));o.useEffect((function(){ce.default.track(se.rMx.PREMIUM_UPSELL_VIEWED,{
|
||
type:fe.cd.EMPTY_STICKER_PICKER_UPSELL,source:{section:se.jXE.EMPTY_STICKER_PICKER_UPSELL},location_stack:l})}),[l]);var c,s=(0,xi.Np)(),f=null!=s,d=(null==s||null===(t=s.subscription_trial)||void 0===t?void 0:t.sku_id)===fe.Si.TIER_0;return(0,r.jsxs)("div",{className:a()(Di().emptyState,i),children:[f?(0,r.jsx)(Pi.ZP,{type:Pi.As.STICKERS_IN_HOUSE,subscriptionTier:null!==(c=null==s||null===(n=s.subscription_trial)||void 0===n?void 0:n.sku_id)&&void 0!==c?c:fe.Si.TIER_2}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.X6q,{className:Di().header,variant:"heading-xl/semibold",children:q.Z.Messages.STICKER_PICKER_PREMIUM_EMPTY_STATE_TITLE}),(0,r.jsx)(h.xvT,{className:Di().subtitle,color:"header-secondary",variant:"text-md/normal",children:q.Z.Messages.STICKER_PICKER_PREMIUM_EMPTY_STATE_SUBTITLE}),(0,r.jsx)("div",{className:Di().stickersRow,children:u.filter((function(e){return null!=e})).map((function(e){return(0,r.jsx)(In.ZP,{sticker:e,className:Di().sticker,size:80},null==e?void 0:e.id)}))
|
||
})]}),(0,r.jsx)(Mi,{analyticsSection:se.jXE.EXPRESSION_PICKER,buttonText:f?d?q.Z.Messages.PREMIUM_TRIAL_TIER_0_CTA_BUTTON_VARIANT:q.Z.Messages.PREMIUM_TRIAL_CTA_BUTTON_VARIANT:void 0})]})}var Ui=n(596801),Bi=n(703790),Fi=n(104681),Gi=n(521798),Hi=n(930865),Vi=n(557877),Wi=n(33864),zi=n.n(Wi);const Yi=function(e){var t=e.className,n=e.guildId,i=e.channel,l=e.shouldTrackUpsellViewed,u=e.setTrackedUpsellViewed,c=(0,Wo.O)().location,s=(0,m.Z)().analyticsLocations,f=(0,p.e7)([ve.Z],(function(){return ve.Z.getGuild(n)})),d=null!=f&&0===(0,Hi.A3)(f.premiumTier)&&!f.hasFeature(se.oNc.MORE_STICKERS);o.useEffect((function(){if(fn.Z.can(se.Plq.MANAGE_GUILD_EXPRESSIONS,f)&&d&&l){(0,S.yw)(se.rMx.PREMIUM_GUILD_UPSELL_VIEWED,{location:c,guild_id:null==f?void 0:f.id,channel_id:null==i?void 0:i.id,type:"Expression Picker Inline Sticker Upsell",location_stack:s});u(!0)}}),[d,f,i,c,l,u,s]);if(null==f||!fn.Z.can(se.Plq.MANAGE_GUILD_EXPRESSIONS,f))return null;if(d){return(0,r.jsxs)("div",{
|
||
className:a()(zi().upsell,t),children:[(0,r.jsx)(Fi.Z,{className:zi().icon,width:24,height:24}),(0,r.jsx)(h.xvT,{color:"interactive-normal",className:zi().body,variant:"text-sm/normal",children:q.Z.Messages.STICKER_PICKER_EMPTY_GUILD_UPSELL_NO_PREMIUM_SUBSCRIPTIONS_DESCRIPTION.format({count:(0,Hi.A3)(se.Eu4.TIER_1)})}),(0,r.jsx)(h.zxk,{look:h.zxk.Looks.LINK,color:h.zxk.Colors.LINK,onClick:function(){(0,Ui.Z)({analyticsLocations:s,analyticsSourceLocation:c,guild:f,perks:(0,Vi.hC)()})},children:q.Z.Messages.STICKER_PICKER_EMPTY_GUILD_UPSELL_NO_PREMIUM_SUBSCRIPTIONS_CTA})]})}return(0,r.jsxs)("div",{className:a()(zi().upsell,t),children:[(0,r.jsx)(Gi.Z,{className:zi().icon,width:20,height:20}),(0,r.jsx)(h.xvT,{color:"interactive-normal",className:zi().body,variant:"text-sm/normal",children:q.Z.Messages.STICKER_PICKER_EMPTY_GUILD_UPSELL_NO_STICKERS_DESCRIPTION}),(0,r.jsx)(h.zxk,{look:h.zxk.Looks.LINK,color:h.zxk.Colors.LINK,onClick:function(){(0,zo._Q)();Bi.Z.open(n,se.pNK.STICKERS,c)},
|
||
children:q.Z.Messages.STICKER_PICKER_EMPTY_GUILD_UPSELL_NO_STICKERS_CTA})]})};var Ki=n(442460),qi=n(933850),Qi=n(483978),Xi=n.n(Qi),Ji=n(903609),$i=n.n(Ji),ea=(0,Qo.Mg)($i().expressionPickerInspectorBarGraphicPrimaryDimensions),ta=(0,Qo.Mg)($i().expressionPickerInspectorBarGraphicSecondaryDimensions);const na=o.memo((function(e){var t=e.stickersGrid,n=P.ZN.useStore((function(e){return e.inspectedExpressionPosition})),i=o.useMemo((function(){var e,r=n.rowIndex,o=n.columnIndex,i=null===(e=t[r])||void 0===e?void 0:e[o];return(null==i?void 0:i.type)===pn.al.CREATE_STICKER?{guild_id:i.guild_id,name:i.name}:(null==i?void 0:i.type)!==pn.al.STICKER?null:i.sticker}),[t,n]);if(null==i)return null;var a=function(e){var t=null,n=null;if(!(0,be.jl)(e)&&!(0,be.J8)(e)||(0,be.J8)(e)){var o=ve.Z.getGuild(e.guild_id);if(null!=o){t=q.Z.Messages.STICKER_FROM_SOURCE.format({source:o.name});n=(0,r.jsx)(oi.Z,{guild:o})}}else if((0,be.jl)(e)){var i=ye.Z.getStickerPack(e.pack_id);if(null!=i){
|
||
t=q.Z.Messages.STICKER_FROM_SOURCE.format({source:i.name});n=(0,r.jsx)(In.ZP,{size:ta,sticker:(0,be.Zt)(i),disableAnimation:!0})}}return{title:t,graphic:n}}(i),l=a.graphic,u=a.title,c=(0,be.jl)(i)||(0,be.J8)(i)?(0,r.jsx)(In.ZP,{isInteracting:!0,size:ea,sticker:i,disableAnimation:!0}):(0,r.jsx)("div",{className:Xi().iconWrapper,children:(0,r.jsx)(qi.Z,{className:Xi().icon})});return(0,r.jsx)(Ki.Z,{graphicPrimary:c,graphicSecondary:l,titlePrimary:i.name,titleSecondary:(0,be.jl)(i)||(0,be.J8)(i)?u:null})}));var ra=n(965196),oa=n(614349),ia=n(987690),aa=n.n(ia);function la(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ua(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ca(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){
|
||
var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function sa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||da(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fa(e){return function(e){if(Array.isArray(e))return la(e)}(e)||function(e){
|
||
if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||da(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function da(e,t){if(e){if("string"==typeof e)return la(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?la(e,t):void 0}}var pa=(0,Qo.Mg)(di().stickerPickerBreakpointSmall),ha=(0,Qo.Mg)(di().stickerPickerBreakpointMedium),ya=(0,Qo.Mg)(di().stickersListPaddingTop),ba=(0,Qo.Mg)(di().stickersListPaddingTopSearchResults),va=(0,Qo.Mg)(di().stickersListPaddingRight),ma=(0,Qo.Mg)(di().stickersListPaddingBottom),ga=(0,Qo.Mg)(di().stickersListPaddingLeft),Oa=(0,Qo.Mg)(di().stickersListDividerHeight),Ea=(0,
|
||
Qo.Mg)($i().expressionPickerListSectionHeadingHeight),Ca=(0,Qo.Mg)(di().stickerPickerPreviewDimensions),ja=(0,Qo.Mg)(di().stickerPickerPreviewDimensionsSmall),Sa=(0,Qo.Mg)(di().stickerPickerPreviewPadding),Ia=(0,Qo.Mg)(di().stickerPickerPreviewMargin),_a=Ca+2*Sa+Ia,wa=ja+2*Sa+Ia,xa=[ya,va,ma,ga],Pa=[ba,va,ma,ga],Na=(0,Qo.Mg)(di().stickersListEmptyGuildUpsellHeight),Aa=["laugh","wave","yes","dance","sad","no","hi","bye","cry","ok"],Ta=function(e){var t=e.onSuggestionClick;return(0,r.jsx)("div",{className:aa().searchSuggestions,children:Aa.map((function(e){return(0,r.jsx)(h.P3F,{className:aa().searchSuggestion,onClick:function(){return t(e)},children:(0,r.jsx)(h.xvT,{variant:"text-sm/normal",color:"text-normal",children:e})},e)}))})},Za=function(e){var t=e.onSelectSticker,n=e.channel,r=e.currentUser,i=(0,Wo.O)(),a=(0,m.Z)().analyticsLocations,l=(0,zo.Iu)((function(e){return e.searchQuery})),u=o.useCallback((function(e){var t=e.visibleRowIndex,n=e.columnIndex,r=e.gridSectionIndex
|
||
;P.ZN.setActiveCategoryIndex(r);P.ZN.setInspectedExpressionPosition(n,t,ri.u.MOUSE_EVENT);e.type===pn.al.STICKER&&(0,zo.$2)(e.sticker.name)}),[]),c=o.useCallback((function(e){if(e.type===pn.al.STICKER){var o=e.packId,u=e.sticker,c=e.type,s=ca(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ua(e,t,n[t])}))}return e}({},i.location),{object:""===l?se.qAy.STICKER_PICKER_VIEW_ALL:se.qAy.STICKER_SEARCH_VIEW_ALL});if(null==u||(0,tr.kl)(u,r,n))c===pn.al.STICKER&&null!=u&&t(e);else{var f=ye.Z.getStickerPack(o);if(null!=f){ce.default.track(se.rMx.STICKER_PACK_VIEW_ALL,{sticker_id:u.id,sticker_pack_id:o,location:s,location_stack:a});(0,oa.Z)({stickerPack:f,analyticsLocations:a})}var d=(0,be.J8)(u),p=(0,tr.cO)(u,r,n)
|
||
;p===tr.eb.SENDABLE_WITH_PREMIUM&&$o(!0);d&&tr.eb.SENDABLE_WITH_BOOSTED_GUILD}}}),[i.location,l,r,n,a,t]);return{handleStickerInspect:u,handleSelect:c}},Ma=o.forwardRef((function(e,t){var n=e.collapsedStickersCategories,i=e.gridWidth,a=e.filteredStickers,l=e.getStickerItemProps,u=e.getStickerRowProps,c=e.gutterWidth,s=e.isUsingKeyboardNavigation,d=e.onSelectSticker,y=e.rowCount,b=e.rowCountBySection,g=e.stickersCategories,O=e.stickersGrid,E=e.channel,j=o.useRef(!1),S=o.useRef(null),I=sa(P.ZN.useStore((function(e){return[e.activeCategoryIndex,e.inspectedExpressionPosition]}),f.Z),2),_=I[0],w=I[1],x=(0,m.Z)(v.Z.STICKER_PICKER).AnalyticsLocationProvider,T=(0,zo.Iu)((function(e){return e.searchQuery})),Z=(0,p.e7)([ye.Z],(function(){return ye.Z.getPremiumPacks()})),M=function(e){
|
||
var t=e.collapsedStickersCategories,n=e.gridWidth,i=e.onSelectSticker,a=e.getStickerItemProps,l=e.getStickerRowProps,u=e.gutterWidth,c=e.inspectedStickerPosition,s=e.isScrolling,f=e.isUsingKeyboardNavigation,d=e.stickersGrid,y=e.stickersCategories,b=e.filteredStickers,v=e.ownedStickerPacks,m=e.channel,g=(0,Wo.O)(),O=(0,p.e7)([ge.default],(function(){return ge.default.getCurrentUser()})),E=Za({onSelectSticker:i,channel:m,currentUser:O}),C=E.handleStickerInspect,j=E.handleSelect,S=sa(o.useState(!1),2),I=S[0],_=S[1],w=o.useCallback((function(e){Ar._O.updateSetting(Array.from(e))}),[]),x=o.useCallback((function(e){var t=d[e];return null!=t?(0,r.jsx)(ra.Z,{getStickerItemProps:a,getStickerRowProps:l,gutterWidth:u,inspectedStickerPosition:c,isScrolling:s,isUsingKeyboardNavigation:f,onInspect:C,onSelect:j,rowIndex:e,stickerClassName:aa().sticker,stickerDescriptors:t,stickerSize:n>pa?Ca:ja,preferAnimation:n<=ha,ownedStickerPacks:v,isDisplayingIndividualStickers:!0,channel:m,currentUser:O
|
||
},e):null}),[d,a,l,u,c,s,f,C,j,n,v,m,O]),P=o.useCallback((function(e,t){return(0,r.jsx)("div",{children:t},e)}),[]),N=o.useCallback((function(e){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isStickerPack,r=void 0===n||n,o=new Set(t),i=t.has(e);i?o.delete(e):o.add(e);ce.default.track(se.rMx.EXPRESSION_PICKER_CATEGORY_COLLAPSE_TOGGLED,{location:null==g?void 0:g.location,tab:ui.X1.STICKER,collapsed:!i,sticker_pack_id:r?e:null});w(o)}),[g,t,w]);return{renderRow:x,renderSection:P,renderSectionHeader:o.useCallback((function(e){var n=y[e];if(null!=b){var o=b.sendable,i=b.sendableWithPremium;if(0===e&&o.length>0)return null;var a=o.length>0&&i.length>0;return(0,r.jsxs)(r.Fragment,{children:[a?(0,r.jsx)("div",{className:aa().divider,children:(0,r.jsx)(h.$i$,{})}):null,(0,r.jsx)(A.Z,{className:aa().packHeader,"aria-label":q.Z.Messages.STICKERS_YOU_MIGHT_LIKE_A11Y,children:q.Z.Messages.STICKERS_YOU_MIGHT_LIKE},"stickers-you-might-like-header")]})}switch(n.type){
|
||
case pn.Ih.FAVORITE:return(0,r.jsx)(A.Z,{className:aa().packHeader,"aria-label":q.Z.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:n.name}),icon:(0,r.jsx)(li.Z,{height:16,width:16}),isCollapsed:t.has(n.id),onClick:function(){return N(n.id,{isStickerPack:!1})},children:n.name},"header-".concat(n.id));case pn.Ih.RECENT:return(0,r.jsx)(A.Z,{className:aa().packHeader,"aria-label":q.Z.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:n.name}),icon:(0,r.jsx)(ii.Z,{}),isCollapsed:t.has(n.id),onClick:function(){return N(n.id,{isStickerPack:!1})},children:n.name},"header-".concat(n.id));case pn.Ih.GUILD:case pn.Ih.EMPTY_GUILD_UPSELL:var l=ve.Z.getGuild(n.id);return null==l?null:(0,r.jsx)(A.Z,{className:aa().packHeader,"aria-label":q.Z.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:l.name}),icon:(0,r.jsx)(oi.Z,{guild:l,height:16,width:16}),isCollapsed:t.has(l.id),onClick:function(){return N(l.id)},children:l.name},"h".concat(l.id));case pn.Ih.PACK:
|
||
var u=ye.Z.getStickerPack(n.id);return null==u?null:(0,r.jsx)(A.Z,{className:aa().packHeader,"aria-label":q.Z.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:u.name}),icon:(0,r.jsx)(In.ZP,{disableAnimation:!0,size:12,sticker:(0,be.Zt)(u)}),isCollapsed:t.has(u.id),onClick:function(){return N(u.id)},children:u.name},"h".concat(u.id))}}),[t,y,N,b]),sectionHeaderHeight:o.useCallback((function(e){if(null!=b){var t=b.sendable,n=b.sendableWithPremium;if(0===e&&t.length>0)return 0;var r=t.length>0&&n.length>0?Oa:0;return Ea+r}return Ea}),[b]),renderSectionFooter:o.useCallback((function(e){var n=y[e],o=t.has(n.id);return n.type!==pn.Ih.EMPTY_GUILD_UPSELL||null!=b||o?null:(0,r.jsx)(Yi,{className:aa().emptyGuildUpsell,guildId:n.id,channel:m,shouldTrackUpsellViewed:!I,setTrackedUpsellViewed:_},"sticker-picker-empty-guild-inline-upsell-".concat(n.id))}),[y,t,b,m,I]),sectionFooterHeight:o.useCallback((function(e){var n=y[e],r=t.has(n.id);return n.type!==pn.Ih.EMPTY_GUILD_UPSELL||r?0:Na
|
||
}),[y,t])}}({collapsedStickersCategories:n,gridWidth:i,stickersCategories:g,stickersGrid:O,isScrolling:j,isUsingKeyboardNavigation:s,onSelectSticker:d,getStickerItemProps:l,getStickerRowProps:u,gutterWidth:c,inspectedStickerPosition:w,filteredStickers:a,ownedStickerPacks:o.useMemo((function(){return new Set(Z.map((function(e){return e.id})))}),[Z]),channel:E}),R=M.renderRow,L=M.renderSection,D=M.renderSectionFooter,k=M.sectionFooterHeight,U=M.renderSectionHeader,B=M.sectionHeaderHeight,F=(0,N.Qs)({activeCategoryIndex:_,isScrolling:j,listRef:S,onActiveCategoryIndexChange:P.ZN.setActiveCategoryIndex,scrollOffset:20,searchQuery:T});(0,N.Xs)({searchQuery:T,activeCategoryIndex:_,listRef:S});o.useImperativeHandle(t,(function(){var e,t,n;return{scrollTo:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o;return null===(o=S.current)||void 0===o?void 0:(r=o).scrollTo.apply(r,fa(t))},getRowDescriptors:function(){var t
|
||
;return null!==(e=null===(t=S.current)||void 0===t?void 0:t.getRowDescriptors())&&void 0!==e?e:[]},getSectionDescriptors:function(){var e;return null!==(t=null===(e=S.current)||void 0===e?void 0:e.getSectionDescriptors())&&void 0!==t?t:[]},scrollToSectionTop:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o;return null===(o=S.current)||void 0===o?void 0:(r=o).scrollToSectionTop.apply(r,fa(t))},scrollRowIntoView:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o;return null===(o=S.current)||void 0===o?void 0:(r=o).scrollRowIntoView.apply(r,fa(t))},getScrollerNode:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o;return null===(o=S.current)||void 0===o?void 0:(r=o).getScrollerNode.apply(r,fa(t))},scrollIntoViewNode:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o
|
||
;return null===(o=S.current)||void 0===o?void 0:(r=o).scrollIntoViewNode.apply(r,fa(t))},getListDimensions:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o,i;return null!==(n=null===(i=S.current)||void 0===i?void 0:(o=i).getListDimensions.apply(o,fa(t)))&&void 0!==n?n:{height:-1,totalHeight:-1}}}}),[]);return(0,r.jsx)(x,{children:(0,r.jsxs)("div",{className:aa().wrapper,children:[null!=a&&0===a.sendable.length&&0===a.sendableWithPremium.length?(0,r.jsx)(C.Z,{message:q.Z.Messages.NO_STICKER_SEARCH_RESULTS_WITH_SUGGESTIONS,className:aa().noSearchResultsContainer,noResultsImageURL:pt(),suggestions:(0,r.jsx)(Ta,{onSuggestionClick:function(e){return(0,zo.ql)(e,!0)}})}):(0,r.jsx)(Xe.Z,{role:"none presentation",listPadding:null!=a?Pa:xa,onScroll:F,renderRow:R,renderSection:null==a?L:void 0,renderSectionHeader:U,renderSectionFooter:D,rowCount:y,rowCountBySection:b,rowHeight:i>pa?_a:wa,sectionHeaderHeight:B,sectionFooterHeight:k,stickyHeaders:!0,ref:S
|
||
}),(0,r.jsx)(na,{stickersGrid:O})]})})}));const Ra=Ma;var La=n(707558),Da=n(650332),ka=n(606714),Ua=n.n(ka);const Ba=o.forwardRef((function(e,t){var n=e.onKeyDown,i=e.stickersListRef,a=e.channel,l=(0,Go.fQ)(a),u=o.useRef(null),c=(0,zo.Iu)((function(e){return{searchQuery:e.searchQuery,searchPlaceholder:e.searchPlaceholder,isSearchSuggestion:e.isSearchSuggestion}}),f.Z),s=c.searchQuery,d=c.searchPlaceholder,p=c.isSearchSuggestion,h=P.ZN.useStore((function(e){return e.inspectedExpressionPosition}),f.Z),y=o.useCallback((function(e){var t;P.ZN.setActiveCategoryIndex(""===e?0:Ri.c);P.ZN.setInspectedExpressionPosition(0,0);(0,zo.$2)(null);(0,zo.ql)(e);null===(t=i.current)||void 0===t||t.scrollTo(0)}),[i]),b=o.useCallback((function(){(0,zo.ql)("")}),[]);o.useImperativeHandle(t,(function(){return{focus:function(){var e;return null===(e=u.current)||void 0===e?void 0:e.focus()}}}));o.useLayoutEffect((function(){if(p){var e;null===(e=u.current)||void 0===e||e.focus()}}),[p]);return(0,
|
||
r.jsx)("div",{className:Ua().wrapper,children:(0,r.jsx)(Da.ZP,{autoFocus:l,disabled:!l,query:s,ref:u,size:Da.ZP.Sizes.MEDIUM,placeholder:null!=d?d:l?q.Z.Messages.SEARCH_FOR_STICKERS:q.Z.Messages.NO_STICKERS_TO_SEARCH_THROUGH,onClear:b,onKeyDown:n,onQueryChange:y,className:Ua().searchBar,preventEscapePropagation:!1,useKeyboardNavigation:!1,inputProps:{"aria-haspopup":"grid","aria-controls":Ri.Vr,"aria-expanded":!0,"aria-activedescendant":(0,La.NE)(Ri.Vr,h.columnIndex,h.rowIndex)}})})}));var Fa=n(189865),Ga=n(850841),Ha=n(96194),Va=n.n(Ha),Wa=n(5064),za=n.n(Wa);function Ya(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var Ka=function(){return $o(!1)},qa=function(e){var t,n,i=e.onLearnMore,l=(0,m.Z)(v.Z.PREMIUM_UPSELL).analyticsLocations;o.useEffect((function(){ce.default.track(se.rMx.PREMIUM_UPSELL_VIEWED,{location_section:se.jXE.STICKER_PICKER_UPSELL,type:fe.cd.STICKER_PICKER_UPSELL,location_stack:l})}),[l]);var u,c=(0,
|
||
xi.Np)(),s=(null==c||null===(t=c.subscription_trial)||void 0===t?void 0:t.sku_id)===fe.Si.TIER_0,f=null!=c;return(0,r.jsxs)("div",{className:Va().upsellWrapper,children:[(0,r.jsx)("div",{className:Va().upsellBackground}),(0,r.jsxs)("div",{className:Va().upsellContent,children:[(0,r.jsx)("img",{className:a()(Va().upsellImage,Ya({},Va().upsellImageSmaller,f)),src:za(),alt:q.Z.Messages.STICKER_PICKER_PREMIUM_UPSELL_ALT}),(0,r.jsx)("div",{className:Va().upsellBody,children:f?(0,r.jsx)(Pi.ZP,{type:Pi.As.STICKERS_CUSTOM,subscriptionTier:null!==(u=null==c||null===(n=c.subscription_trial)||void 0===n?void 0:n.sku_id)&&void 0!==u?u:fe.Si.TIER_2,children:s?q.Z.Messages.STICKER_PICKER_PREMIUM_TIER_UPSELL_DESCRIPTION.format({planName:(0,Ga.aq)(fe.Xh.PREMIUM_MONTH_TIER_0),onClick:i}):q.Z.Messages.STICKER_PICKER_PREMIUM_UPSELL_DESCRIPTION.format({onClick:i})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.xvT,{className:Va().upsellTitle,color:"header-primary",variant:"text-lg/semibold",
|
||
children:q.Z.Messages.STICKER_PICKER_PREMIUM_UPSELL_TITLE}),(0,r.jsx)(h.xvT,{className:Va().upsellDescription,variant:"text-md/normal",children:q.Z.Messages.STICKER_PICKER_PREMIUM_UPSELL_DESCRIPTION.format({onClick:i})})]})}),(0,r.jsx)(Mi,{analyticsSection:se.jXE.EXPRESSION_PICKER,buttonText:f?s?q.Z.Messages.PREMIUM_TRIAL_TIER_0_CTA_BUTTON_VARIANT:q.Z.Messages.PREMIUM_TRIAL_CTA_BUTTON_VARIANT:void 0})]}),(0,r.jsx)(h.P3F,{className:Va().upsellClose,onClick:Ka,children:(0,r.jsx)(Fa.Z,{})})]})},Qa=function(e,t,n){if(""===e)return null;var r=[],o=[];(function(e){return Sn.ZP.queryStickers([e],!0).map((function(e){return e.sticker}))})(e).forEach((function(e){var i=(0,tr.cO)(e,t,n);i===tr.eb.SENDABLE?r.push(e):i===tr.eb.SENDABLE_WITH_PREMIUM&&o.push(e)}));return{sendable:r,sendableWithPremium:o}},Xa=n(526306),Ja=n.n(Xa);function $a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function el(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){
|
||
n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function tl(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){el(i,r,o,a,l,"next",e)}function l(e){el(i,r,o,a,l,"throw",e)}a(void 0)}))}}function nl(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function rl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){nl(e,t,n[t])}))}return e}function ol(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function il(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||ll(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function al(e){return function(e){if(Array.isArray(e))return $a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ll(e)||function(){
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ll(e,t){if(e){if("string"==typeof e)return $a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$a(e,t):void 0}}var ul=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++
|
||
;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},cl=(0,Qo.Mg)(di().stickerPickerBreakpointSmall),sl=(0,Qo.Mg)(di().stickersListPaddingLeft),fl=(0,Qo.Mg)(di().stickersListPaddingRight),dl=(0,Qo.Mg)(di().stickerPickerPreviewMargin),pl=(0,Qo.Mg)(di().stickerPickerPreviewMarginSmall),hl=(0,Qo.Mg)(di().stickerPickerPreviewDimensions),yl=(0,Qo.Mg)(di().stickerPickerPreviewDimensionsSmall),bl=(0,Qo.Mg)(di().stickerPickerPreviewPadding),vl=hl+2*bl,ml=yl+2*bl,gl=Vo()(ti.Iw,200),Ol=Vo()(ti.m1,200),El=o.forwardRef((function(e,t){
|
||
var i=e.containerWidth,a=e.channel,l=e.onSelectSticker,u=e.closePopout,c=(0,Wo.O)().location,s=(0,m.Z)(v.Z.STICKER_PICKER).AnalyticsLocationProvider;(0,Ko.Z$)(qo.Z);var d=o.useRef(null),y=o.useRef(null),b=o.useRef(null),g=ei((function(e){return e.showPremiumUpsell})),O=il((0,zo.Iu)((function(e){return[e.searchQuery,e.isSearchSuggestion]}),f.Z),2),E=O[0],C=O[1],j=o.useRef("");o.useImperativeHandle(t,(function(){return{onPickerOpen:re}}));var S=(0,Go.Sd)(a),I=0===S.filter((function(e){return e.type!==pn.Ih.EMPTY_GUILD_UPSELL})).length,_=(0,N.ep)({gridWrapperRef:d,containerWidth:i,showingEmptyState:I,listPaddingLeft:sl,listScrollbarWidth:8}),w=Ar._O.useSetting(),x=o.useMemo((function(){return new Set(w)}),[w]),A=(0,p.e7)([ge.default],(function(){return ge.default.getCurrentUser()})),T=o.useMemo((function(){return Qa(E,A,a)}),[E,A,a]),Z=(0,Go.RJ)(),M=(0,Go.LZ)(),R=(0,p.cj)([ye.Z],(function(){return ye.Z.getAllGuildStickers()
|
||
})),L=null!=T?T:{},D=L.sendable,k=void 0===D?[]:D,U=L.sendableWithPremium,B=void 0===U?[]:U,F=k.length+B.length,G=o.useCallback((function(e){""===E?(0,ti.On)(e):(0,ti.Yk)(e,E,F);l(e.sticker,pn.V0.STICKER_PICKER)}),[l,E,F]),H=null!=_&&_>cl,V=(0,Go.el)({filteredStickers:T,stickersCategories:S,collapsedStickersCategories:x,listWidth:_,listPaddingRight:fl,stickerNodeMargin:H?dl:pl,stickerNodeWidth:H?vl:ml}),W=V.rowCount,z=V.rowCountBySection,Y=V.stickersGrid,K=V.gutterWidth,q=V.columnCounts,Q=o.useCallback((function(e,t){t.location;switch(e.type){case pn.al.CREATE_STICKER:ce.default.track(se.rMx.OPEN_MODAL,{type:se.jXE.CREATE_STICKER_MODAL,location:c});(0,h.ZDy)(tl((function(){var t,o;return ul(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(56729),n.e(11260)]).then(n.bind(n,856729))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,rl({guildId:e.guild_id},t))}]}}))})));break;case pn.al.STICKER:null!=e.sticker&&(0,
|
||
tr.kl)(e.sticker,A,a)&&G(e)}}),[c,A,a,G]),X=function(e){var t=e.columnCounts,n=e.stickersGrid,r=e.stickersListRef,i=e.store,a=e.gridNavigatorId,l=e.setInspectedStickerPosition,u=e.onGridItemSelect,c=(0,Wo.O)(),s=o.useCallback((function(e){u(e,c)}),[u,c]),f=o.useCallback((function(e,t){l(e,t,ri.u.GRID_NAVIGATOR_EVENT)}),[l]),d=(0,N.VO)({columnCounts:t,gridNavigatorId:a,itemGrid:n,itemList:r,onGridNavigatorItemSelect:s,onGridNavigatorPositionChange:f}),p=d.gridDispatch,h=d.getItemProps,y=d.getRowProps,b=d.gridContainerProps,v=d.handleGridContainerKeyDown,m=d.isUsingKeyboardNavigation;o.useEffect((function(){return i.useStore.subscribe((function(e){if(null!=e){var t=e.columnIndex,n=e.rowIndex;e.source!==ri.u.GRID_NAVIGATOR_EVENT&&p({type:ni.s.SET_FOCUSED_POSITION,x:t,y:n})}}),(function(e){return e.inspectedExpressionPosition}))}),[p,i]);return{getItemProps:h,getRowProps:y,gridContainerProps:b,handleGridContainerKeyDown:v,isUsingKeyboardNavigation:m}}({columnCounts:q,stickersListRef:y,
|
||
stickersGrid:Y,onGridItemSelect:Q,store:P.ZN,setInspectedStickerPosition:P.ZN.setInspectedExpressionPosition,gridNavigatorId:Ri.Vr}),J=X.getItemProps,$=X.getRowProps,ee=X.gridContainerProps,te=X.handleGridContainerKeyDown,ne=X.isUsingKeyboardNavigation;o.useEffect((function(){return P.ZN.resetStoreState}),[]);var re=function(){var e=a.getGuildId(),t=[];if(null!==e){var n;t=null!==(n=ye.Z.getStickersByGuildId(e))&&void 0!==n?n:[]}var r=0;null!=R&&al(R.values()).forEach((function(e){r+=e.length}));(0,ti.ev)({containerWidth:i,favoriteStickers:Z,frequentlyUsedStickers:M,guildStickers:t,stickersTotal:r})};o.useEffect((function(){""===j.current&&""!==E&&(0,ti.n8)();j.current=E}),[E]);o.useEffect((function(){0===F?gl(E):Ol(E,F,C)}),[E,F,C]);o.useLayoutEffect((function(){var e;null===(e=b.current)||void 0===e||e.focus()}),[]);var oe=o.useCallback((function(){u();ce.default.track(se.rMx.PREMIUM_PROMOTION_OPENED,{location_section:se.jXE.STICKER_PICKER_UPSELL});(0,Yo.z)()}),[u]);return(0,
|
||
r.jsxs)(s,{children:[(0,r.jsx)("div",{className:Ja().header,children:(0,r.jsx)(Ba,{ref:b,onKeyDown:te,stickersListRef:y,channel:a})}),I?(0,r.jsx)(ki,{className:Ja().emptyState}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",ol(rl({ref:d,className:Ja().listWrapper,id:Ri.Vr},ee),{children:null!=_?(0,r.jsx)(Ra,{ref:y,collapsedStickersCategories:x,filteredStickers:T,getStickerItemProps:J,getStickerRowProps:$,gridWidth:_,gutterWidth:K,isUsingKeyboardNavigation:ne,onSelectSticker:G,rowCount:W,rowCountBySection:z,stickersCategories:S,stickersGrid:Y,channel:a}):null})),(0,r.jsx)(wi,{stickersListRef:y,channel:a})]}),g&&(0,r.jsx)(qa,{onLearnMore:oe})]})})),Cl=function(e,t){(0,Go.fP)();return(0,r.jsx)("div",{className:Ja().wrapper,id:Ri.nZ,"aria-labelledby":Ri.ED,role:"tabpanel",children:e.isLoading?(0,r.jsx)(h.$jN,{className:Ja().loadingIndicator}):(0,r.jsx)(El,ol(rl({},e),{ref:t}))})};const jl=o.forwardRef(Cl);var Sl=n(379991),Il=n(930948),_l=n(763993),wl=n(936957),xl=n(448184),Pl=n.n(xl)
|
||
;function Nl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Al(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Tl(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Zl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ml(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nl(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
var Rl=ui.Om+wl.Su.MEDIUM,Ll=o.memo((function(e){var t=e.isActive,n=e.className,o=e.viewType,i=e.autoFocus,l=void 0!==i&&i,u=e["aria-controls"],c=Zl(e,["isActive","className","viewType","autoFocus","aria-controls"]);return(0,r.jsx)(h.zxk,Tl(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Al(e,t,n[t])}))}return e}({role:"tab",autoFocus:l,"aria-controls":t?u:void 0},c),{onClick:function(){S.ZP.trackWithMetadata(se.rMx.EXPRESSION_PICKER_TAB_CLICKED,{tab:o,badged:!1});(0,zo.hr)(o)},"aria-current":t?"page":void 0,className:a()(n,Pl().navButton,Pl().navItem,Al({},Pl().navButtonActive,t)),look:h.zxk.Looks.BLANK,size:h.zxk.Sizes.NONE}))}));function Dl(e){
|
||
var t,n,i,l=e.positionTargetRef,u=e.onSelectGIF,c=e.onSelectEmoji,s=e.onSelectSticker,f=e.channel,d=e.type,y=o.useRef(null),b=o.useRef(!1),v=o.useRef(),m=o.useRef(null),g=function(e){var t=e.positionContainerRef,n=e.drawerRef,r=(0,p.e7)([Sl.ZP],(function(){return Sl.ZP.expressionPickerWidth})),i=Ml(o.useState(window.innerWidth),2),a=i[0],l=i[1],u=Ml(o.useState(null!=r?r:ui._j.MIN),2),c=u[0],s=u[1],f=o.useMemo((function(){switch(c){case ui._j.MIN:return ui.Om;case ui._j.MAX:return null;default:return c}}),[c]),d=o.useCallback((function(e){var t=e>=a?ui._j.MAX:e<=ui.Om?ui._j.MIN:e;null==t&&null!=n.current&&(n.current.style.width="");Do.ZP.updatedUnsyncedSettings({expressionPickerWidth:t});s(t)}),[n,a]),h=(0,Uo.Z)({initialElementDimension:f,maxDimension:a,minDimension:ui.Om,resizableDomNodeRef:n,onElementResize:d,orientation:Uo.y.HORIZONTAL_LEFT});o.useEffect((function(){var e=E().debounce((function(){null!=t.current&&l(t.current.offsetWidth)}),500);window.addEventListener("resize",e)
|
||
;return function(){window.removeEventListener("resize",e)}}),[t]);o.useLayoutEffect((function(){null!=t.current&&l(t.current.offsetWidth)}),[t]);return{drawerWidth:f,handleDrawerResizeHandleMouseDown:o.useCallback((function(e){e.stopPropagation();null!=t.current&&l(t.current.offsetWidth);h(e)}),[t,h])}}({positionContainerRef:y,drawerRef:m}),O=g.drawerWidth,C=g.handleDrawerResizeHandleMouseDown,j=(0,zo.Iu)((function(e){return e.activeView})),I=(0,Go.fQ)(f),_=o.useContext(tn.ZP),w=_.renderWindow,x=_.windowDispatch,P=(0,p.e7)([ye.Z],(function(){return!ye.Z.hasLoadedStickerPacks})),N=o.useCallback((function(e){var t;if(!(0,h.$sL)()){var n=e.target;if(!(0,Lo.k)(n)||null==n.closest("."+ui.CT)){for(;(0,Lo.k)(n);){if(n===m.current)return;if("true"===n.getAttribute("data-menu-item"))return;if("true"===n.getAttribute("data-premium-tutorial-expression-picker-tooltip"))return;if("true"===n.getAttribute("data-premium-tutorial-persistent-coachmark-emoji-step"))return;n=n.parentNode}(0,zo._Q)()
|
||
;var r=null===(t=(0,_l.uB)(e))||void 0===t?void 0:t.activeElement;null!=r&&"BODY"!==r.tagName||Il.S.dispatchToLastSubscribed(se.CkL.TEXTAREA_FOCUS)}}}),[]),A=o.useCallback((function(){(0,zo._Q)()}),[]);o.useLayoutEffect((function(){var e=function(){j===ui.X1.GIF&&(0,zo._Q)()};w.addEventListener("mousedown",N);w.addEventListener("contextmenu",N);x.subscribe(se.CkL.POPOUT_CLOSE,A);Il.S.subscribe(se.CkL.CLOSE_GIF_PICKER,e);return function(){w.removeEventListener("mousedown",N);w.removeEventListener("contextmenu",N);x.unsubscribe(se.CkL.POPOUT_CLOSE,A);Il.S.unsubscribe(se.CkL.CLOSE_GIF_PICKER,e)}}),[j,A,N,w,x]);(0,h.Tbt)(y);o.useEffect((function(){(0,zo.ql)("")}),[]);o.useEffect((function(){if(null!=m.current&&!b.current)if(j===ui.X1.EMOJI){var e;if(null!=(null==v||null===(e=v.current)||void 0===e?void 0:e.onPickerOpen)){var t;null==v||null===(t=v.current)||void 0===t||t.onPickerOpen();b.current=!0}}else if(j===ui.X1.STICKER){var n
|
||
;if(null!=(null==v||null===(n=v.current)||void 0===n?void 0:n.onPickerOpen)&&!P){var r;null==v||null===(r=v.current)||void 0===r||r.onPickerOpen();b.current=!0}}else{S.ZP.trackWithMetadata(se.rMx.EXPRESSION_PICKER_OPENED,{width:m.current.offsetWidth,tab:j,badged:!1});b.current=!0}}));var T=(null===(t=d.gifs)||void 0===t?void 0:t.allowSending)&&!Ro.tq,Z=null===(n=d.stickers)||void 0===n?void 0:n.allowSending,M=!(null===(i=d.expressionPicker)||void 0===i?void 0:i.onlyEmojis)&&(T||Z);return(0,r.jsx)(ko.Z,{section:se.jXE.EXPRESSION_PICKER,children:(0,r.jsx)(Ft.W5,{className:Pl().positionLayer,reference:l,position:"top",align:"right",spacing:8,autoInvert:!0,children:function(e){var t=e.isPositioned;return(0,r.jsx)("section",{className:a()(Pl().positionContainer,Al({},Pl().positionContainerOnlyEmoji,!M)),ref:y,role:"dialog","aria-label":q.Z.Messages.EXPRESSION_PICKER,children:t?(0,r.jsxs)("div",{className:Pl().drawerSizingWrapper,style:{width:null==O?void 0:O},ref:m,children:[(0,
|
||
r.jsx)("div",{className:Pl().resizeHandle,onMouseDown:C}),(0,r.jsxs)("div",{className:Pl().contentWrapper,children:[M?(0,r.jsx)("nav",{className:Pl().nav,children:(0,r.jsxs)("div",{className:Pl().navList,role:"tablist","aria-label":q.Z.Messages.EXPRESSION_PICKER_CATEGORIES_A11Y_LABEL,children:[T&&(0,r.jsx)(Ll,{id:wl._3,"aria-controls":wl.vO,"aria-selected":j===ui.X1.GIF,isActive:j===ui.X1.GIF,viewType:ui.X1.GIF,children:q.Z.Messages.EXPRESSION_PICKER_GIF}),Z?(0,r.jsx)(Ll,{id:Ri.ED,"aria-controls":Ri.nZ,"aria-selected":j===ui.X1.STICKER,isActive:j===ui.X1.STICKER,autoFocus:!I,viewType:ui.X1.STICKER,children:(0,r.jsx)("div",{className:Pl().stickersNavItem,children:q.Z.Messages.EXPRESSION_PICKER_STICKER})}):null,(0,r.jsx)(Ll,{id:wl.td,"aria-controls":wl.cZ,"aria-selected":j===ui.X1.EMOJI,isActive:j===ui.X1.EMOJI,viewType:ui.X1.EMOJI,children:q.Z.Messages.EXPRESSION_PICKER_EMOJI})]})}):null,j===ui.X1.STICKER&&M?(0,r.jsx)(jl,{isLoading:P,channel:f,containerWidth:O,onSelectSticker:s,
|
||
closePopout:A,ref:function(e){v.current=e}}):null,j===ui.X1.GIF&&M?(0,r.jsx)(Fo.Z,{onSelectGIF:u,persistSearch:!0}):null,j===ui.X1.EMOJI?(0,r.jsx)(Bo.Z,{hasTabWrapper:!0,persistSearch:!0,channel:f,containerWidth:O,emojiSize:null!=O&&O<Rl?wl.Su.MEDIUM:wl.Su.LARGE,pickerIntention:se.HzX.CHAT,closePopout:A,onSelectEmoji:c,ref:function(e){v.current=e},disableEmojiTutorialFlow:d===cn.I.PROFILE_BIO_INPUT}):null]})]}):null})}})})}const kl=o.memo(Dl);var Ul=n(712861),Bl=n(461908),Fl=n(295652),Gl=n(179936),Hl=n(770960);function Vl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wl(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function zl(e){return function(e){if(Array.isArray(e))return Vl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Vl(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vl(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Yl=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:
|
||
a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Kl=(0,Fl.ad)(nr.$p,Hl.J7),ql=function(e){var t,n,r=e.setTextInputValue,i=e.setHasDismissed,a=e.setHasSelection,l=e.setFocusedSuggestionType,u=e.delayBeforeSuggestions,c=o.useRef(null),s=o.useRef(!1),f=o.useRef(!1),d=o.useMemo((function(){return Vo()(r,null!=u?u:Hl.gf)}),[r,u]),p=(n=(t=function(e){var t;return Yl(this,(function(n){switch(n.label){case 0:if(null!=e&&""!==e)return[3,1];d.cancel();null==r||r("");null==i||i(!1);null==a||a(!1);null==l||l(null);c.current=null;s.current=!1;return[3,4];case 1:
|
||
if(s.current||e.trim()===(null===(t=c.current)||void 0===t?void 0:t.trim()))return[3,4];c.current=e;if((0,Gl.wN)(e).length>Hl.t7){s.current=!0;d.cancel();r("");return[2]}if(!0===f.current)return[2];if(ye.Z.hasLoadedStickerPacks)return[3,3];f.current=!0;return[4,Kl()];case 2:n.sent();f.current=!1;n.label=3;case 3:d(c.current);n.label=4;case 4:return[2]}}))},function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){Wl(i,r,o,a,l,"next",e)}function l(e){Wl(i,r,o,a,l,"throw",e)}a(void 0)}))}),function(e){return n.apply(this,arguments)});return{handleTextChange:p,debouncedSetTextInputValue:d}},Ql=n(302901),Xl=n.n(Ql);function Jl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $l(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function eu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){$l(e,t,n[t])}))}return e}function tu(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function nu(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ru(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jl(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ou,iu=(0,
|
||
Ul.Mg)(Xl().containerPadding),au=(0,Ul.Mg)(Xl().stickerSuggestionSize),lu=(0,Ul.Mg)(Xl().stickerSuggestionMargin),uu=2*au+lu+2*iu,cu=function(){return Promise.resolve()};!function(e){e[e.STICKER=0]="STICKER"}(ou||(ou={}));function su(e){var t=e.isFocused,n=e.isHidden,o=e.sendability,i=e.listIndex,l=e.sticker,u=e.onMouseOver,c=e.onSelectSticker,s=(0,T.JA)("".concat(i)),f=s.tabIndex,d=nu(s,["tabIndex"]);return(0,r.jsxs)(h.P3F,tu(eu({},d),{tabIndex:n?-1:f,className:a()(Xl().suggestedExpression,$l({},Xl().suggestedExpressionFocused,t)),focusProps:{enabled:!1},onClick:function(){return c(l,o)},onMouseOver:u,children:[(0,r.jsx)(ue.ZP,{mask:ue.ZP.Masks.STICKER_ROUNDED_RECT,width:au+4,height:au+4,className:Xl().mask,children:(0,r.jsx)("div",{className:Xl().maskBackground})}),(0,r.jsx)(In.ZP,{maskAsset:!0,size:au,sticker:l,className:Xl().sticker}),o!==tr.eb.SENDABLE&&(0,r.jsx)(Bl.Z,{size:14})]}))}const fu=o.memo((function(e){
|
||
var t,n=e.editorRef,i=e.channel,l=e.isEditorFocused,u=e.onSelectSticker,c=e.stickerIconVisible,s=void 0!==c&&c,f=e.submitButtonVisible,d=void 0!==f&&f,y=o.useContext(Mo),b=ru(o.useState(null),2),g=b[0],O=b[1],E=ru(o.useState(!1),2),C=E[0],j=E[1],S=ru(o.useState(null),2),I=S[0],_=S[1],w=(0,zo.Iu)((function(e){return null!=e.activeView})),x=o.useRef(null),P=ru(o.useState(""),2),N=P[0],A=P[1],Z=ru(o.useState(""),2),M=Z[0],R=Z[1],L=ru(o.useState(!1),2),D=L[0],k=L[1],U=ru(o.useState(!1),2),B=U[0],F=U[1],G=function(e,t,n){var r=(0,Go.fQ)(n),i=(0,p.e7)([ge.default],(function(){return ge.default.getCurrentUser()}));return o.useMemo((function(){var o=(0,Gl.wN)(e);if(t||null==e||""===e||o.length>Hl.t7||!r)return[];var a=[],l=[],u=(0,Gl.kT)(e),c=u===o[0]?o:[u].concat(zl(o));Sn.ZP.queryStickers(c,!1).forEach((function(e){var t=e.sticker,r=(0,tr.cO)(t,i,n),o={sticker:t,sendability:r};r===tr.eb.SENDABLE?a.push(o):r===tr.eb.SENDABLE_WITH_PREMIUM&&l.push(o)}));var s=[];if(a.length>0){
|
||
s=a.slice(0,Hl.qm);if(0!==l.length){s.length===Hl.qm&&s.pop();s.push(l[0])}}return s}),[e,n,r,t,i])}(N,C,i),H=(0,m.Z)(v.Z.EXPRESSION_SUGGESTIONS),V=H.analyticsLocations,W=H.AnalyticsLocationProvider,z=ql({setTextInputValue:A,setHasDismissed:j,setHasSelection:F,setFocusedSuggestionType:O}),Y=z.handleTextChange,K=z.debouncedSetTextInputValue;o.useEffect((function(){var e=function(e){k(e)},t=function(e){var t=""!==e&&null!=e;F(t);if(t){var r;O(null);null===(r=n.current)||void 0===r||r.focus()}};y.addListener("text-changed",Y);y.addListener("autocomplete-visibility-change",e);y.addListener("selection-changed",t);return function(){y.removeListener("text-changed",Y);y.removeListener("autocomplete-visibility-change",e);y.removeListener("selection-changed",t)}}),[Y,n,y]);o.useLayoutEffect((function(){null==g&&_(null)}),[g]);var Q=ru(o.useState(!1),2),X=Q[0],J=Q[1];o.useLayoutEffect((function(){requestAnimationFrame((function(){var e=x.current
|
||
;J(l||!0===(null==e?void 0:e.contains(null==e?void 0:e.ownerDocument.activeElement)))}))}),[l]);var $=G.length>0,ee=X&&!w&&!D&&!C&&!B&&$,te=function(e){var t=e.editorRef,n=e.hasStickerResults,r=e.shouldRenderSuggestions,i=e.focusedSuggestionType,a=e.setFocusedStickerListItem,l=e.setFocusedSuggestionType,u=e.setHasDismissed,c=e.setTextInputValue,s=o.useCallback((function(e,t){a(t)}),[a]),f=(0,uo.ZP)({id:"expression-suggestions-stickers",isEnabled:!0,scrollToStart:cu,scrollToEnd:cu,orientation:co.hy.HORIZONTAL,setFocus:s,useVirtualFocus:!0});o.useEffect((function(){var e=function(e){if(!(!r||e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)){switch(e.key){case"ArrowUp":e.preventDefault();if(null==i&&n){f.focusFirstVisibleItem();l(ou.STICKER)}break;case"ArrowDown":var o;l(null);null===(o=t.current)||void 0===o||o.focus();break;case"Escape":var a;l(null);u(!0);c("");null===(a=t.current)||void 0===a||a.focus()}i===ou.STICKER&&f.containerProps.onKeyDown(e)}};window.addEventListener("keydown",e,{
|
||
capture:!0});return function(){return window.removeEventListener("keydown",e,{capture:!0})}}),[f,r,i,l,n,t,u,a,c]);return{stickersNavigator:f}}({editorRef:n,hasStickerResults:$,shouldRenderSuggestions:ee,focusedSuggestionType:g,setFocusedSuggestionType:O,setHasDismissed:j,setFocusedStickerListItem:_,setTextInputValue:A}).stickersNavigator,ne=function(e,t){if(ee){ce.default.track(se.rMx.AUTO_SUGGEST_EXPRESSION_SELECTED,{sticker_id:e.id,suggestion_trigger:M});if(t===tr.eb.SENDABLE){j(!0);u(e,pn.V0.EXPRESSION_SUGGESTIONS);K.cancel();A("")}else if((0,be.jl)(e)){var n=ye.Z.getStickerPack(e.pack_id);null!=n&&(0,oa.Z)({stickerPack:n,analyticsLocations:V})}y.emit("sticker-suggestions-hidden")}},re=o.useRef([]),oe=o.useRef(!1);o.useEffect((function(){ee&&(re.current=G);if(ee!==oe.current){y.emit(ee?"sticker-suggestions-shown":"sticker-suggestions-hidden");if(ee){(0,Gl.Tk)(N);R(N)}}oe.current=ee}),[y,ee,G,N]);var ie,ae=!ee,le=ee?G:re.current;return(0,r.jsx)(W,{children:(0,r.jsxs)(h.P3F,{
|
||
tabIndex:ae?-1:0,"aria-hidden":ae,className:a()(Xl().container,(ie={},$l(ie,Xl().hidden,ae),$l(ie,Xl().submitButtonOffset,d),$l(ie,Xl().stickerIconOffset,s),ie)),innerRef:x,style:{minWidth:uu},onClick:function(){var e;return null===(e=n.current)||void 0===e?void 0:e.focus()},children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.bG,{navigator:te,children:(0,r.jsx)(T.SJ,{children:function(e){var t=e.ref,n=e.tabIndex,o=nu(e,["ref","tabIndex"]);return(0,r.jsx)("div",tu(eu({className:Xl().stickerResults,ref:function(e){t.current=e},onMouseLeave:function(){null==g&&_(null)},tabIndex:ae?-1:n},o),{children:le.map((function(e,t){var n=e.sticker,o=e.sendability;return(0,r.jsx)(su,{isFocused:I==="".concat(t),isHidden:ae,sendability:o,listIndex:t,onMouseOver:function(){te.setFocus("".concat(t));_("".concat(t))},onSelectSticker:ne,sticker:n},n.id)}))}))}})}),(0,r.jsxs)("div",{className:Xl().bottomInformationTextContainer,children:[(0,r.jsx)("div",{className:Xl().textDivider}),(0,r.jsxs)("div",{
|
||
className:Xl().bottomInformationLayout,children:[(0,r.jsx)(h.xvT,{className:Xl().descriptionText,style:{maxWidth:uu},variant:"text-sm/normal",children:null!=I?q.Z.Messages.EXPRESSION_SUGGESTIONS_STICKER_NAME.format({stickerName:null===(t=G[+I])||void 0===t?void 0:t.sticker.name}):q.Z.Messages.EXPRESSION_SUGGESTIONS_STICKER_SHORT_NAV_PROMPT.format({upHook:function(e,t){return(0,r.jsx)(h.M2$,{shortcut:"up",className:Xl().keybind},t)}})}),(0,r.jsx)(h.P3F,{onClick:function(){ce.default.track(se.rMx.STICKER_SUGGESTIONS_ENABLED_TOGGLED,{enabled:!1,location:{section:se.jXE.EXPRESSION_PICKER}});Ar.up.updateSetting(!1)},children:(0,r.jsx)(h.ua7,{text:q.Z.Messages.EXPRESSION_SUGGESTIONS_STICKER_DISABLE,children:function(e){return(0,r.jsx)(Fa.Z,tu(eu({},e),{className:Xl().closeIcon}))}})})]})]})]}),(0,r.jsx)("div",{className:Xl().containerBackground})]})})}));var du=n(99440),pu=n(944522),hu=n(545758),yu=n(736818),bu=n(44616),vu=n(533293),mu=n(367299),gu=n(991789),Ou=n(69540);function Eu(e,t){
|
||
(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ju(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Cu(e,t,n[t])}))}return e}function Su(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Eu(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eu(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Iu(e){var t,n=e.editorHeight,i=e.textValue,a=o.useRef(i),l=on({editorHeight:n}),u=Su(o.useState(!1),2),c=u[0],s=u[1],f=(0,p.e7)([bu.ZP,yu.default,St.Z],(function(){var e;return bu.ZP.isComboing(yu.default.getId(),null!==(e=St.Z.getChannelId())&&void 0!==e?e:"")}));o.useEffect((function(){if(0!==i.length&&i!==a.current&&f){s(!0);a.current=i}else c&&setTimeout((function(){return s(!1)}),gu.z)}),[i,c,f]);var d,h=null!==(t=null==l?void 0:l.left)&&void 0!==t?t:0,y=(null!==(d=null==l?void 0:l.top)&&void 0!==d?d:0)-16;return(0,r.jsx)(vu.Z,{position:{x:h,y},firing:c})}
|
||
function _u(e){return(0,r.jsx)(mu.Z,{confettiLocation:Ou.Hn.CHAT_INPUT,children:(0,r.jsx)(Iu,ju({},e))})}var wu=n(852077),xu=n(225386),Pu=n(191677),Nu=n(255592),Au=n(194212),Tu=n(563135),Zu=n(120415),Mu=n(623934),Ru=n(168024),Lu=n(381186);function Du(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ku(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Du(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n)
|
||
;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Du(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Uu="@here";function Bu(e){return e.length>1||!(1===e.length&&"GROUP"===e[0].type&&"unknown"===e[0].id)}function Fu(e,t,n){var r=(0,hu.Z)(),i=ku(o.useState(!1),2),a=i[0],l=i[1],u=o.useMemo((function(){return E().debounce((function(e){(function(e,t,n,r){if(Bu(Lu.ZP.getProps(n,r).groups))return!0;if(e.length<Uu.length||e.length>t)return!1;if(-1===e.indexOf(Uu))return!1;(0,Mu.b8)(n,r,Ru.KV);return!0})(e,r,t,n)&&l(!0)}),200,{maxWait:500})}),[r,t,n]);o.useEffect((function(){var r=Lu.ZP.getProps(t,n).groups;if(null!=t&&!Bu(r)&&!a){e.addListener("text-changed",u);return function(){e.removeListener("text-changed",u);u.cancel()}}}),[a,u,e,t,n])}
|
||
var Gu=n(326470),Hu=n.n(Gu),Vu=n(608575),Wu=n(567867),zu=n(474717),Yu=n(296602),Ku=n(275374),qu=n(971402),Qu=n(495036);function Xu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ju(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function $u(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ju(i,r,o,a,l,"next",e)}function l(e){Ju(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ec(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tc(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function nc(e){nc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return nc(e)}function rc(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){tc(e,t,n[t])}))}return e}function oc(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ic(e,t){return!t||"object"!==lc(t)&&"function"!=typeof t?Xu(e):t}function ac(e,t){ac=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return ac(e,t)}var lc=function(e){
|
||
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function uc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=nc(e);if(t){var o=nc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ic(this,n)}}var cc=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,
|
||
o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},sc=/(\t|\s)/,fc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&ac(e,t)}(o,e);var t=uc(o);function o(){ec(this,o);var e;(e=t.apply(this,arguments)).state={nextSelection:-1};e.focus=function(){var t=Xu(e)._ref
|
||
;null!=t&&t.focus()};e.handleSetRef=function(t){e._ref=t};e.handleKeyPress=function(t){if(t.which===se.yXg.ENTER)if(!t.shiftKey&&!e.hasOpenCodeBlock()&&(!e.props.disableEnterToSubmit||t.ctrlKey)){t.preventDefault();return e.props.onSubmit(e.props.value)}};e.handleKeyDown=function(t){switch(t.which){case se.yXg.ARROW_DOWN:e.props.moveSelection(1)&&t.preventDefault();break;case se.yXg.N:t.ctrlKey&&e.props.moveSelection(1)&&t.preventDefault();break;case se.yXg.ARROW_UP:e.props.moveSelection(-1)&&t.preventDefault();break;case se.yXg.P:t.ctrlKey&&e.props.moveSelection(-1)&&t.preventDefault();break;case se.yXg.TAB:case se.yXg.ENTER:e.handleTabOrEnterDown(t)}var n=e.props.onKeyDown;null==n||n(t)};e.handleKeyUp=function(t){switch(t.which){case se.yXg.ARROW_RIGHT:case se.yXg.ARROW_LEFT:case se.yXg.HOME:case se.yXg.END:e.props.maybeShowAutocomplete()}var n=e.props.onKeyUp;null==n||n(t)};e.handleGlobalPaste=function(t){var n=t.event;e.handlePaste(n)||e.focus()};e.handlePaste=function(t){
|
||
var n=e.props.onPaste(t);n&&t.preventDefault();return n};e.handleClick=function(){e.props.maybeShowAutocomplete()};e.handleContextMenu=function(e){Zu.FB&&(0,qu.jW)(e,$u((function(){var e,t;return cc(this,(function(o){switch(o.label){case 0:return[4,n.e(38525).then(n.bind(n,638525))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,oc(rc({},e),{isChannelTextArea:!0,text:(0,Qu.getSelectionText)()}))}]}}))})),{align:"bottom",enableSpellCheck:!0})};e.handleOnChange=function(t){var n=e.props.onChange,r=t.currentTarget.value;null==n||n(t,r,(0,On.JM)(r))};return e}var i=o.prototype;i.componentDidMount=function(){var e=this;if(!this.props.disableAutoFocus){Promise.resolve().then((function(){var t,n=e.props.value;null===(t=e._ref)||void 0===t||t.setSelection(n.length,n.length)}));this.focus()}null!=g.Z.getActiveCommand(this.props.channel.id)&&$e.Po(this.props.channel.id,null,null)};i.componentDidUpdate=function(e,t){
|
||
this.state.nextSelection!==t.nextSelection&&null!=this._ref&&this._ref.setSelection(this.state.nextSelection,this.state.nextSelection)};i.getCurrentWord=function(){var e=this._ref;if(null==e)return{word:null,isAtStart:!1};var t=this.props.value;if(0===t.trim().length)return{word:null,isAtStart:!1};for(var n=e.selectionStart,r=e.selectionEnd;n>0;){if(sc.test(t[n-1]))break;n--}return{word:t.slice(n,r),isAtStart:0===n}};i.blur=function(){var e=this._ref;null!=e&&e.blur()};i.submit=function(e){e.preventDefault();return this.props.onSubmit(this.props.value)};i.insertAutocomplete=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.getCurrentWord().word;if(null==r)this.insertText(e,t,n);else{var o=this._ref;if(null==o)return;var i=o.value.slice(0,o.selectionStart-r.length),a=o.value.slice(o.selectionEnd);this._insertText(e,i,a,n)}};i.insertText=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this._ref;if(null!=r){
|
||
var o=r.value.slice(0,r.selectionStart),i=r.value.slice(r.selectionEnd);this._insertText(e,o,i,n)}};i._insertText=function(e,t,n,r){var o=this;if(null!=this._ref){r&&(e+=" ");var i=t+e+n,a=this.props.onChange;null==a||a(null,i,(0,On.JM)(i));var l=t.length+e.length;this.setState({nextSelection:l},(function(){o.props.maybeShowAutocomplete()}))}};i.hasOpenCodeBlock=function(){var e=this._ref;if(null==e)return!1;var t=this.props.value.slice(0,e.selectionStart).match(/```/g);return null!=t&&t.length>0&&t.length%2!=0};i.render=function(){var e=this.props,t=e.value,n=e.disabled,o=e.placeholder,i=e.onResize,l=e.className,u=e.submitting,c=e.textAreaPaddingClassName,s=e.spellcheckEnabled,f=e["aria-controls"],d=e["aria-expanded"],p=e["aria-activedescendant"];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Au.d9,{event:se.CkL.GLOBAL_CLIPBOARD_PASTE,handler:this.handleGlobalPaste}),(0,r.jsx)(h.lcI,{ref:this.handleSetRef,className:a()(l,c),rows:1,fontWidthEstimate:6,placeholder:o,disabled:n||u,
|
||
onChange:this.handleOnChange,onResize:i,onKeyPress:this.handleKeyPress,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onPaste:this.handlePaste,onClick:this.handleClick,onContextMenu:this.handleContextMenu,value:n?"":t,tabIndex:0,spellCheck:s,"aria-controls":f,"aria-expanded":d,"aria-activedescendant":p,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-multiline":!0})]})};i.handleTabOrEnterDown=function(e){if(e.which===se.yXg.TAB&&this.props.onTab()){e.preventDefault();e.stopPropagation()}else if(e.which===se.yXg.ENTER&&this.props.onEnter(e)){e.preventDefault();e.stopPropagation()}else if(e.which===se.yXg.ESCAPE){e.preventDefault();e.stopPropagation();this.props.hideAutocomplete()}else if(e.which===se.yXg.TAB&&this.hasOpenCodeBlock()){e.preventDefault();e.stopPropagation();this.insertText("\t",void 0,!1)}};i.insertEmoji=function(e,t){this.insertText("".concat(":").concat(e.name).concat(":"),void 0,t)}
|
||
;i.getFirstText=function(){return this.props.value};return o}(o.PureComponent);const dc=fc;var pc=n(893691),hc=n(556635),yc=new WeakMap,bc=new WeakMap,vc={isMerging:function(e){var t;return null===(t=bc.get(e))||void 0===t||t},isSaving:function(e){var t;return null===(t=yc.get(e))||void 0===t||t},withoutMerging:function(e,t){var n=this.isMerging(e);bc.set(e,!1);try{t()}finally{bc.set(e,n)}},withoutSaving:function(e,t){var n=this.isSaving(e);yc.set(e,!1);try{t()}finally{yc.set(e,n)}},withSingleEntry:function(e,t){return mc(e,"other",!1,t)},withMergedEntry:function(e,t){return mc(e,"other",!0,t)},currentEntry:function(e){return e.history.stack.length>0?e.history.stack[e.history.index]:null},insertOrMergeEntry:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=vc.currentEntry(e);vc.isMerging(e)&&(null==r?void 0:r.mergeable)?this.mergeEntry(e,n):this.insertEntry(e,t,n)},insertEntry:function(e,t){
|
||
var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;o=null!=o?o:e.selection;r=null!=r?r:hc.bN.richValue(e);var i=e.history,a=vc.currentEntry(e);null!=a&&(a.mergeable=!1);i.stack.length>0&&(i.stack.length=i.index+1);for(;i.stack.length>=250;)i.stack.shift();i.stack.push({type:t,mergeable:n,createdAt:Date.now(),value:r,selection:o});i.index=i.stack.length-1},mergeEntry:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.selection,r=hc.bN.richValue(e),o=vc.currentEntry(e);if(null!=o){o.value=r;o.selection=n;t||(o.mergeable=!1)}}};function mc(e,t,n,r){var o=e.children,i=e.selection,a=vc.isSaving(e);yc.set(e,!1);try{var l=r();a&&(n?vc.mergeEntry(e):e.children!==o?vc.insertEntry(e,t,!1):!vc.isMerging(e)||null==e.selection||null!=i&&hc.M8.equals(e.selection,i)||vc.mergeEntry(e));return l}finally{yc.set(e,a)}}var gc=n(380942),Oc=n(22176),Ec=n(73948);function Cc(e,t,n,r){
|
||
for(var o,i=0,a=0;a<n.length;a++){var l=n[a];if(null!=l){var u=i+l.length;if(r<=u){var c=hc.C0.child(t,a),s=hc.bN.node(e,c)[0];if(hc.LC.isText(s))return{path:c,offset:Math.min(Math.max(r-i,0),s.text.length)}}i=u}}var f,d=n.length-1;return{path:hc.C0.child(t,d),offset:null!==(f=null===(o=n[d])||void 0===o?void 0:o.length)&&void 0!==f?f:0}}function jc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
|
||
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jc(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ic(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function wc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){_c(e,t,n[t])}))}return e}function xc(e,t){return function(e){if(Array.isArray(e))return e
|
||
}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ic(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ic(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Pc=new Set(["line","blockQuote"]),Nc=[];var Ac=n(77413),Tc=n(385028),Zc=n(327930),Mc=n(201457),Rc=n(966935),Lc=n(176758),Dc=n(876986),kc=n(363193),Uc=n.n(kc),Bc=n(913198),Fc=n.n(Bc)
|
||
;function Gc(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Hc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Gc(e,t,n[t])}))}return e}function Vc(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Wc(e){var t=e.emoji;return(0,r.jsx)(h.ua7,{text:t.name,delay:750,position:"top",
|
||
children:function(e){return(0,r.jsx)(Ac.Z,Hc({src:t.src,emojiName:t.name,animated:!1},e))}})}function zc(e){var t=e.emoji;return(0,r.jsx)(h.ua7,{text:t.name,delay:750,position:"top",children:function(e){return(0,r.jsx)(Ac.Z,Hc({emojiId:t.emojiId,emojiName:t.name,animated:t.animated},e))}})}function Yc(e){var t=e.text,n=e.guildId,o=ve.Z.getGuild(n),i=(0,sn.Ib)(o)&&"@Clyde"===t?Dc.jM:null;return(0,r.jsx)(Rc.Z,{color:i,children:t})}function Kc(e){var t=e.id,n=e.guildId,o=e.channelId,i=(0,p.e7)([ge.default],(function(){return ge.default.getUser(t)})),a=(0,p.e7)([dn.Z],(function(){return dn.Z.hidePersonalInformation})),l=Tr.Z.useName(n,o,i),u=(0,r.jsx)(Rc.Z,{children:null==l?"<@".concat(t,">"):"@".concat(l)});if(null!=i){var c=a||i.isPomelo()?null:"#".concat(i.discriminator);return(0,r.jsx)(h.ua7,{text:(0,r.jsxs)("div",{className:Uc().userTooltip,children:[(0,r.jsx)(Tc.Z,{user:i,animate:!0,size:h.EFr.SIZE_16,className:Uc().avatar}),Oe.ZP.getUserTag(i,{mode:"username",
|
||
identifiable:a?"never":"always"}),(0,r.jsx)("span",{className:Uc().discriminator,children:c})]}),delay:750,position:"top","aria-label":Oe.ZP.getUserTag(i,{decoration:"never"}),children:function(e){return(0,r.jsx)(h.P3F,Vc(Hc({tag:"span"},e),{children:u}))}})}return u}function qc(e){var t=e.id,n=e.guildId,o=(0,p.e7)([ve.Z],(function(){var e=ve.Z.getGuild(n);return null==e?null:e.roles[t]})),i=(0,p.e7)([b.Z],(function(){return b.Z.roleStyle}));if(null==o)return(0,r.jsx)("span",{children:"@deleted-role"});var a=null!=o.color&&0!==o.color,l="dot"===i,u="username"===i&&a;return(0,r.jsxs)(Rc.Z,{color:u?o.color:null,children:[l&&(0,r.jsx)(h.FhE,{color:o.colorString,background:!1,tooltip:!1}),"@",o.name]})}function Qc(e){var t=e.id,n=(0,p.e7)([Ct.Z],(function(){return Ct.Z.getChannel(t)})),o=q.Z.Messages.UNKNOWN_CHANNEL,i="text",a=!0;if(null!=n){o=(0,Zc.YO)(n)?n.name:q.Z.Messages.NO_ACCESS;var l;i=(0,Zc.YO)(n)?null!==(l=(0,Lc.wl)(n))&&void 0!==l?l:"text":"locked";a=(0,Mc.B)(n.type)}
|
||
return a?(0,r.jsx)(Rc.Z,{iconType:i,children:o}):(0,r.jsx)("span",{children:"#"+o})}function Xc(e){var t=e.id,n={home:q.Z.Messages.GUILD_HOME,browse:q.Z.Messages.CHANNEL_BROWSER_TITLE,customize:q.Z.Messages.CUSTOMIZE_COMMUNITY_TITLE};return(0,r.jsx)(Rc.Z,{iconType:t,children:n[t]})}function Jc(e){var t=e.text,n=e.id;return(0,r.jsxs)(Rc.Z,{children:[t,"(",n,")"]})}function $c(e){var t=e.timestamp;return(0,r.jsx)("span",{className:Fc().timestamp,children:t.formatted})}var es=n(114774),ts=n.n(es),ns=n(873641),rs=n.n(ns);function os(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function is(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){os(e,t,n[t])}))}return e}function as(e,t){
|
||
t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var ls=function(e){var t=e.className,n=e.attributes,o=e.children,i=a()(rs().inlineElement,rs().inlineVoid,t);return(0,r.jsx)("span",as(is({},n),{className:i,contentEditable:!1,children:o}))},us=n(765980),cs=n.n(us);function ss(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fs(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ds(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ps(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ss(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name)
|
||
;if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ss(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var hs={strong:ts().bold,em:ts().italics,u:ts().underline,s:ts().strikethrough,inlineCode:ts().inlineCode,link:ts().fakeLink,url:ts().fakeLink,autolink:ts().fakeLink,spoiler:a()(cs().spoilerText,ts().spoiler),staticRouteLink:ts().fakeLink,syntaxBefore:ts().syntaxBefore,syntaxAfter:ts().syntaxAfter,codeBlockText:ts().codeBlockText,codeBlockSyntax:ts().codeBlockSyntax,codeBlockLang:ts().codeBlockLang};function ys(e,t){var n,o=t.attributes,i=t.children,l=t.leaf,u=t.text,c=!1,s=ps(hc.bN.node(e,hc.C0.parent(hc.bN.findPath(e,u))),1)[0];switch(hc.bN.isEditor(s)?"editor":s.type){case"line":case"blockQuote":c=void 0;var f=Object.entries(l).filter((function(e){return"text"!==ps(e,1)[0]
|
||
})).flatMap((function(e){var t=ps(e,2),n=t[0],r=t[1];if("hljsTypes"===n)return r;if(!0===r){"codeBlockLang"!==n&&"codeBlockSyntax"!==n||(c=!1);if(n.startsWith("before_")||n.startsWith("after_"))return[ts()[n]];if(n in hs)return[hs[n]];throw new Error("Slate: Unknown decoration attribute: ".concat(n))}})).filter((function(e){return null!=e})).join(" ");n=a()(f,fs({},ts().syntaxOverride,"||"===l.text||"\\"===l.text))}n=a()(n,fs({},rs().emptyText,""===u.text));return(0,r.jsx)("span",ds(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){fs(e,t,n[t])}))}return e}({},o),{className:n,spellCheck:c,children:i}))}var bs=n(784732),vs=n.n(bs);function ms(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
|
||
function gs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Os(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Es(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Os(i,r,o,a,l,"next",e)}function l(e){Os(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Cs(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function js(e){js=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return js(e)}function Ss(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){
|
||
Cs(e,t,n[t])}))}return e}function Is(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function _s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ws(e,t){return!t||"object"!==Ns(t)&&"function"!=typeof t?gs(e):t}function xs(e,t){xs=Object.setPrototypeOf||function(e,t){
|
||
e.__proto__=t;return e};return xs(e,t)}function Ps(e){return function(e){if(Array.isArray(e))return ms(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ms(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ms(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ns=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function As(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
|
||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=js(e);if(t){var o=js(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ws(this,n)}}var Ts=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0
|
||
;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Zs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&xs(e,t)}(i,e);var t=As(i);function i(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var n;(n=t.call(this,e)).containerRef=o.createRef();n.state={showPlaceholder:!0,initialValue:(0,On.H2)().richValue};n.decorate=n.decorate.bind(gs(n));n.renderElement=n.renderElement.bind(gs(n));n.renderLeaf=n.renderLeaf.bind(gs(n));n.handleOnChange=n.handleOnChange.bind(gs(n))
|
||
;n.handleKeyDown=n.handleKeyDown.bind(gs(n));n.handleKeyUp=n.handleKeyUp.bind(gs(n));n.handleBeforeInput=n.handleBeforeInput.bind(gs(n));n.handleCompositionStart=n.handleCompositionStart.bind(gs(n));n.handleCompositionEnd=n.handleCompositionEnd.bind(gs(n));n.handleFocusCapture=n.handleFocusCapture.bind(gs(n));n.handleBlurCapture=n.handleBlurCapture.bind(gs(n));n.handleContextMenu=n.handleContextMenu.bind(gs(n));return n}var l=i.prototype;l.componentDidCatch=function(e,t){Oc.Z.captureException(e,{extra:t});this.setState({initialValue:Ps(this.props.editor.children)})};l.decorate=function(e){var t,n=this.props,r=n.editor,o=n.guildId,i=n.decorateExtra;return Ps(function(e,t,n){if(hc.bN.areStylesDisabled(e))return[];var r=xc(t,2),o=r[0],i=r[1];if(1!==i.length||!hc.bN.isBlock(e,o)||!hc.aj.isInTypes(o,Pc))return Nc;for(var a=hc.q.markdown(o,n,!0),l=a.entries,u=a.serializedChildren,c=[],s=0;s<l.length;s++){var f=l[s];if(f.attributes.length>0&&f.text.length>0){var d=l[s-1],p=l[s+1],h={
|
||
anchor:Cc(e,i,u,f.start),focus:Cc(e,i,u,f.start+f.text.length)},y=hc.bN.nodes(e,{at:h,mode:"lowest",voids:!1}),b={},v=!0,m=!1,g=void 0;try{for(var O,E=f.attributes[Symbol.iterator]();!(v=(O=E.next()).done);v=!0){var C=O.value;b[C]=!0;if("syntaxBefore"===C&&null!=p){var j=!0,S=!1,I=void 0;try{for(var _,w=p.attributes[Symbol.iterator]();!(j=(_=w.next()).done);j=!0){var x=_.value;b["before_".concat(x)]=!0}}catch(e){S=!0;I=e}finally{try{j||null==w.return||w.return()}finally{if(S)throw I}}}else if("syntaxAfter"===C&&null!=d){var P=!0,N=!1,A=void 0;try{for(var T,Z=d.attributes[Symbol.iterator]();!(P=(T=Z.next()).done);P=!0){var M=T.value;b["after_".concat(M)]=!0}}catch(e){N=!0;A=e}finally{try{P||null==Z.return||Z.return()}finally{if(N)throw A}}}}}catch(e){m=!0;g=e}finally{try{v||null==E.return||E.return()}finally{if(m)throw g}}var R=!0,L=!1,D=void 0;try{for(var k,U=y[Symbol.iterator]();!(R=(k=U.next()).done);R=!0){var B=xc(k.value,2),F=B[0],G=B[1];if(!hc.bN.isVoid(e,F)){var H={
|
||
anchor:hc.bN.start(e,G),focus:hc.bN.end(e,G)};hc.Jz.isBefore(H.anchor,h.anchor)&&(H.anchor=h.anchor);hc.Jz.isAfter(H.focus,h.focus)&&(H.focus=h.focus);c.push(wc({},b,H))}}}catch(e){L=!0;D=e}finally{try{R||null==U.return||U.return()}finally{if(L)throw D}}}}return c}(r,e,o)).concat(Ps(function(e,t){if(hc.bN.areStylesDisabled(e))return[];var n=Sc(t,2),r=n[0],o=n[1],i=[];if(!hc.aj.isType(r,"line")||null==r.codeBlockState)return i;var a=r.codeBlockState,l=a.hljsTypes,u=a.isStyledCodeBlockLine;if(null==l||0===l.length||!u)return[];var c=!0,s=!1,f=void 0;try{for(var d,p=l[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var h=d.value,y=r.children.map((function(e){return hc.LC.isText(e)?e.text:null}));i.push({hljsTypes:h.types,anchor:Cc(e,o,y,h.start),focus:Cc(e,o,y,h.end)})}}catch(e){s=!0;f=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw f}}return i}(r,e)),Ps(null!==(t=null==i?void 0:i(r,e))&&void 0!==t?t:[]))};l.renderElement=function(e){
|
||
var t,n=this.props,o=n.guildId,i=n.channelId,l=n.renderExtraElement,u=e.attributes,c=e.children,s=null!==(t=null==l?void 0:l(e))&&void 0!==t?t:function(e,t,n){var o=e.attributes,i=e.children,l=e.element;switch(l.type){case"line":var u,c=l.children[l.children.length-1],s=hc.LC.isText(c)&&c.text.length>0;return(null===(u=l.codeBlockState)||void 0===u?void 0:u.isInCodeBlock)?(0,r.jsxs)("div",as(is({className:ts().codeLine,spellCheck:null==l.codeBlockState||null==l.codeBlockState.lang},o),{children:[i,s?(0,r.jsx)("br",{}):null]})):(0,r.jsxs)("div",as(is({},o),{children:[i,s?(0,r.jsx)("br",{}):null]}));case"blockQuote":var f=a()(Fc().blockquoteContainer,Fc().slateBlockquoteContainer);return(0,r.jsxs)("div",as(is({},o),{className:f,children:[(0,r.jsx)("span",{contentEditable:!1,className:Fc().blockquoteDivider}),(0,r.jsx)("blockquote",{children:i})]}));case"emoji":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Wc,{emoji:l.emoji}),i]});case"customEmoji":return(0,r.jsxs)(ls,{
|
||
attributes:o,children:[(0,r.jsx)(zc,{emoji:l.emoji}),i]});case"textMention":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Yc,{text:l.name,guildId:t}),i]});case"userMention":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Kc,{id:l.userId,channelId:n,guildId:t}),i]});case"roleMention":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(qc,{id:l.roleId,guildId:t}),i]});case"channelMention":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Qc,{id:l.channelId}),i]});case"staticRouteLink":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Xc,{id:l.channelId}),i]});case"commandMention":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Jc,{text:l.commandName,id:l.commandId}),i]});case"timestamp":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)($c,{timestamp:l.parsed}),i]});default:return null}}(e,o,i);return null!=s?s:(0,r.jsx)("div",Is(Ss({},u),{children:c}))};l.renderLeaf=function(e){
|
||
var t,n=this.props,o=n.editor,i=n.renderExtraLeaf,a=e.attributes,l=e.children,u=null!==(t=null==i?void 0:i(e))&&void 0!==t?t:ys(o,e);return null!=u?u:(0,r.jsx)("span",Is(Ss({},a),{children:l}))};l.handleOnChange=function(e){var t,n,r=this.props.editor,o=hc.bN.isEditorEmpty(r)&&null==r.composition;o!==this.state.showPlaceholder&&this.setState({showPlaceholder:o});null===(n=(t=this.props).onChange)||void 0===n||n.call(t,e)};l.handleKeyDown=function(e){var t,n;if(null==this.props.editor.composition)null===(n=(t=this.props).onKeyDown)||void 0===n||n.call(t,e);else{e.preventDefault();e.stopPropagation()}};l.handleKeyUp=function(e){var t,n;if(null==this.props.editor.composition)null===(n=(t=this.props).onKeyUp)||void 0===n||n.call(t,e);else{e.preventDefault();e.stopPropagation()}};l.handleBeforeInput=function(e){
|
||
var t,n=this.props.editor,r=gc.F3.findDocumentOrShadowRoot(n).getSelection(),o=(null!==(t=null==r?void 0:r.rangeCount)&&void 0!==t?t:0)>0?null==r?void 0:r.getRangeAt(0):null,i=null!=o?hc.bN.toSlateRange(n,o,{exactMatch:!0,suppressThrow:!0}):null,a=e.getTargetRanges()[0],l=null!=a?hc.bN.toSlateRange(n,a,{exactMatch:!0,suppressThrow:!0}):null;0;if(null==n.composition){if("insertText"===e.inputType&&null!=a&&null==l){var u=hc.bN.toSlatePoint(n,[a.startContainer,a.startOffset],{exactMatch:!0,suppressThrow:!0}),c=hc.bN.toSlatePoint(n,[a.endContainer,a.endOffset],{exactMatch:!0,suppressThrow:!0});if(null!=u&&null==c){var s={anchor:u,focus:c=hc.bN.end(n,u.path)};Ec.Q.select(n,s);hc.M8.isExpanded(s)&&n.deleteFragment();null!=e.data&&n.insertText(e.data)}e.preventDefault()}if(e.inputType.startsWith("deleteContent")&&null!=i&&hc.M8.isExpanded(i)){n.selection=i;n.deleteFragment(e.inputType.endsWith("Backward")?"backward":"forward");e.preventDefault()}}};l.handleCompositionStart=function(){
|
||
var e=this.props.editor;0;var t={insertedPrefix:!1,startedInsideInline:!1};this.state.showPlaceholder&&this.setState({showPlaceholder:!1});var n=null!=e.selection&&hc.M8.isCollapsed(e.selection)?hc.bN.leaf(e,e.selection.anchor.path):null;if(null!=n){null!=(null!=e.selection&&hc.M8.isCollapsed(e.selection)?hc.bN.above(e,{at:n[1],match:function(t){return hc.bN.isInline(e,t)},mode:"lowest"}):null)&&(t.startedInsideInline=!0);if(hc.bN.isEditorEmpty(e)){Ec.Q.insertNodes(e,{text:"\ufeff"},{select:!0});t.insertedPrefix=!0;e.composition=t}else{var r,o=gc.F3.findDocumentOrShadowRoot(this.props.editor).getSelection(),i=(null!==(r=null==o?void 0:o.rangeCount)&&void 0!==r?r:0)>0?null==o?void 0:o.getRangeAt(0):null;if(null==(null!=i?hc.bN.toSlateRange(e,i,{exactMatch:!0,suppressThrow:!0}):null)&&null!=i){var a=hc.bN.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!0});e.selection=null;if(null!=a)Ec.Q.select(e,a);else{var l;Ec.Q.select(e,null!==(l=e.selection)&&void 0!==l?l:hc.bN.end(e,[]))}}
|
||
e.composition=t}}else e.composition=t};l.handleCompositionEnd=function(e){var t=this.props.editor;0;if(null!=t.composition){if(t.composition.insertedPrefix&&null!=t.selection&&hc.M8.isCollapsed(t.selection)){var n=t.selection.anchor.path,r=hc.aj.leaf(t,n);hc.bN.withoutNormalizing(t,(function(){var e=r.text.replace(/^\uFEFF/,"");Ec.Q.delete(t,{unit:"offset",distance:r.text.length,reverse:!0});hc.bN.insertText(t,e)}))}t.composition=null}};l.handleFocusCapture=function(e){var t=this.props.onFocus;null==t||t(e)};l.handleBlurCapture=function(e){var t=this.props,n=t.editor,r=t.onBlur,o=e.relatedTarget,i=gc.F3.findDocumentOrShadowRoot(this.props.editor),a=i.getElementById("textarea-context"),l=i.getElementById("slate-toolbar");if(null!=o&&!Ms(o,a)&&!Ms(o,l)){var u=gc.F3.findDocumentOrShadowRoot(n).getSelection();if(null!=u){for(var c=!1,s=u.rangeCount-1;s>=0;s--){var f=u.getRangeAt(s);if(null!=this.containerRef.current&&Ms(f.commonAncestorContainer,this.containerRef.current)){c=!0;break}}
|
||
c&&u.removeAllRanges()}}null==r||r(e)};l.handleContextMenu=function(e){var t=this.props.editor,o=e.pageY,i=window.innerHeight,a=null!=o&&null!=i&&o<i/2?"top":"bottom";Zu.FB?(0,qu.jW)(e,Es((function(){var e,o;return Ts(this,(function(i){switch(i.label){case 0:return[4,n.e(67068).then(n.bind(n,567068))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,Is(Ss({},e),{editor:t,text:hc.bN.getSelectedText(t,!0)}))}]}}))})),{align:a,enableSpellCheck:!0}):blur()};l.render=function(){var e=this.props,t=e.editor,n=e.className,o=e.containerClassName,i=e.canFocus,l=e.autoFocus,u=e.placeholder,c=e.onPaste,s=(e.channelId,e.guildId,e.onChange,e.onFocus,e.onBlur,e.onKeyDown,e.onKeyUp,e.decorateExtra,e.renderExtraElement,e.renderExtraLeaf,_s(e,["editor","className","containerClassName","canFocus","autoFocus","placeholder","onPaste","channelId","guildId","onChange","onFocus","onBlur","onKeyDown","onKeyUp","decorateExtra","renderExtraElement","renderExtraLeaf"]));return(0,
|
||
r.jsxs)("div",{ref:this.containerRef,className:o,children:[this.state.showPlaceholder?(0,r.jsx)("div",{className:a()(vs().placeholder,n),"aria-hidden":!0,children:u}):null,(0,r.jsx)(gc.mH,{editor:t,value:this.state.initialValue,onChange:this.handleOnChange,children:(0,r.jsx)(gc.CX,Is(Ss({},s),{className:a()(Fc().markup,vs().editor,n),decorate:this.decorate,renderElement:this.renderElement,renderLeaf:this.renderLeaf,onFocusCapture:this.handleFocusCapture,onBlurCapture:this.handleBlurCapture,onContextMenu:this.handleContextMenu,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onDOMBeforeInput:this.handleBeforeInput,onCompositionStart:this.handleCompositionStart,onCompositionEnd:this.handleCompositionEnd,onPasteCapture:c,autoFocus:l&&!1!==i,autoCorrect:"off","data-can-focus":!1!==i,"aria-label":u,"aria-multiline":!0}))})]})};return i}(o.PureComponent);function Ms(e,t){if(null==t)return!1;for(;null!=e;){if(e===t)return!0;e=e.parentNode}return!1}const Rs=Zs;var Ls=n(651700)
|
||
;function Ds(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ks(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ds(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ds(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
var Us=n(104182),Bs=n(623313),Fs=n(836296),Gs=n(1131);function Hs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hs(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ws=new Set(["applicationCommandOption"]),zs=new Set([j.jw.ATTACHMENT]),Ys=new Set(["line","applicationCommand"]);function Ks(e,t,n,r){var o=e.insertData,i=e.isInline,a=e.isVoid,l=e.onChange,u=e.deleteBackward,c=e.deleteForward,s=e.deleteFragment;e.insertData=function(n){if(null!=t&&hc.bN.isEditorEmpty(e)&&n.types.includes("application/x-discord-interaction-data")){var r=JSON.parse(n.getData("application/x-discord-interaction-data")),i=Bs.Z.getCommandFromInteractionData(r),a=Bs.Z.getApplication(null==i?void 0:i.applicationId);if(null!=i){var l,u,c=null!=a?{type:Z.Qi.APPLICATION,id:a.id,icon:a.icon,name:null!==(u=null===(l=a.bot)||void 0===l?void 0:l.username)&&void 0!==u?u:a.name,application:a}:null;$e.Po(t.id,i,c,Z.Vh.PASTE,(0,un.Fi)(i,r));return null}}return o(n)};e.isInline=function(e){return!!Ws.has(e.type)||i(e)}
|
||
;e.isVoid=function(e){return!("applicationCommandOption"!==e.type||!zs.has(e.optionType))||a(e)};e.deleteBackward=function(t){$s(e,(function(){return u(t)}))};e.deleteForward=function(t){$s(e,(function(){return c(t)}))};e.deleteFragment=function(t){$s(e,(function(){return s(t)}))};var f=null,d=null,p=null,h=null,y=null;e.onChange=function(){if(null!=t){var o,i,a=g.Z.getState(t.id),u=hc.bN.getFirstText(e),c=(0,Y.hV)(t,null!==(o=null==u?void 0:u.text)&&void 0!==o?o:""),s=null!==(i=et.ZP.getQueryCommands(t.id,j.yU.CHAT,c.text))&&void 0!==i?i:null;if(hc.bN.richValue(e)!==f||!hc.Ew.equals(e.selection,d)||a.activeCommand!==p||s!==h){var b=vc.withMergedEntry(e,(function(){var o;return function(e){var t=e.editor,n=e.storeCommandState,r=e.channel,o=e.canUseCommands,i=e.canOnlyUseTextCommands,a=e.commandChanged,l=e.previousOptionValues,u=Js(t),c=u.command,s=u.commandText,f=n.activeCommand
|
||
;if(!o||i&&(null==f?void 0:f.inputType)!==Z.iw.BUILT_IN_TEXT&&(null==f?void 0:f.inputType)!==Z.iw.BUILT_IN_INTEGRATION){null!=c&&qs(t,r.id,f,!0);return null}if(null!=c){if(hc.bN.isEditorEmpty(t)){qs(t,r.id,f,!1);return null}if(null==f){qs(t,r.id,f,!1);return null}var d="".concat(K.GI).concat(c.displayName);if(null==s||!s.startsWith(d)||0===pc.cu(t).length&&(s.length<d.length+1||" "!==s[d.length])){qs(t,r.id,f,!0);return null}}else{if(null!=f&&a){var p=function(e,t,n){var r,o,i,a=n.initialValues,l=n.activeCommand;if(null==l)return null;var u,c=(null!==(i=null===(r=l.options)||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0?pc.zb(e,l):null,s=(0,Ls.sk)(hc.bN.richValue(e),{mode:"raw",range:{anchor:hc.bN.start(e,[]),focus:null!==(u=null==c||null===(o=c[0])||void 0===o?void 0:o.keyRange.anchor)&&void 0!==u?u:hc.bN.end(e,[])}}),f="",d=s.toLocaleLowerCase();if(Nr.Z.getCurrentConfig({}).showApplicationCommandSuggestions){var p=Zr.exec(d);null!=p&&(d=K.GI+d.substring(p.length))}
|
||
var h="".concat(K.GI).concat(l.displayName).toLocaleLowerCase(),y="".concat(K.GI).concat(l.name).toLocaleLowerCase();d.startsWith(h)&&d.length>h.length?f=s.substring(h.length).trim():d.startsWith(y)&&d.length>y.length&&(f=s.substring(y.length).trim());var b,v=[],m=null,g=null;if(null!=l.options){var O=new Set;if(null!=c){var E=!0,C=!1,j=void 0;try{for(var S,I=c[Symbol.iterator]();!(E=(S=I.next()).done);E=!0){var _,w=S.value;O.add(w.name);var x=null!==(_=ef(n,t,w.name))&&void 0!==_?_:w.text,P={type:"applicationCommandOption",optionName:w.name,optionDisplayName:w.displayName,optionType:w.type,children:[{text:x}]};v.push(P);0===w.text.length&&null==m&&(m=P)}}catch(e){C=!0;j=e}finally{try{E||null==I.return||I.return()}finally{if(C)throw j}}}var N=!0,A=!1,T=void 0;try{for(var Z,M=l.options[Symbol.iterator]();!(N=(Z=M.next()).done);N=!0){var R=Z.value;if(!O.has(R.name)&&(R.required||null!=a[R.name])){var L=void 0,D=void 0;if(f.length>0&&!zs.has(R.type)){L=f;f=""
|
||
}else L=null!=(D=ef(n,t,R.name))?D:"";var k={type:"applicationCommandOption",optionName:R.name,optionDisplayName:R.displayName,optionType:R.type,children:[{text:L}]};v.push(k);0===L.length&&null==m&&(m=k);null==D&&(g=k)}}}catch(e){A=!0;T=e}finally{try{N||null==M.return||M.return()}finally{if(A)throw T}}}b=f.length>0?"".concat(K.GI).concat(l.displayName," ").concat(f.replace(/\r|\n/g," ")):0===v.length?"".concat(K.GI).concat(l.displayName," "):"".concat(K.GI).concat(l.displayName);v.unshift({text:b});var U={type:"applicationCommand",children:v,command:{id:l.id,name:l.name,displayName:l.displayName}};hc.bN.withoutNormalizing(e,(function(){Ec.Q.insertNodes(e,[U],{at:Gs.YD});var t=!0,n=!1,r=void 0;try{for(var o,i=hc.bN.blocks(e).reverse()[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=Vs(o.value,2)[1];hc.C0.isAfter(a,Gs.YD)&&Ec.Q.removeNodes(e,{at:a,voids:!0})}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}));var B=null;if(null!=m){
|
||
Ec.Q.selectCommandOption(e,m.optionName);B=m.optionName}else if(null!=g){Ec.Q.selectCommandOption(e,g.optionName,!1);B=g.optionName}else Ec.Q.resetSelectionToEnd(e);null==g&&Qs(e,l);return B}(t,r,n),h=pc.tM(t,f);Xs({guildId:r.guild_id,channelId:r.id,command:f,activeOption:p,currentOptionValues:h,previousOptionValues:null,validateAll:!0,allowEmpty:!0});return{commandId:f.id,optionValues:h}}if(null!=f&&!a){$e.Po(r.id,null,null);return null}var y=hc.bN.richValue(t)[0],b=y.children[0];if(Ys.has(y.type)&&hc.LC.isText(b)){var v=function(e,t){if(!e.startsWith("/"))return null;var n=(0,Y.hV)(t,e.substring(1));if(!n.hasSpaceTerminator)return null;var r=et.ZP.getQueryCommands(t.id,j.yU.CHAT,n.text);if(null==r)return null;var o=n.text.trim(),i=o+" ";r=r.filter((function(e){return e.inputType!==Z.iw.PLACEHOLDER&&(e.displayName===o||e.displayName.startsWith(i))}));if(1===r.length&&r[0].displayName===o){
|
||
var a,l=r[0],u=null===(a=et.ZP.getApplicationSections(t.id,j.yU.CHAT))||void 0===a?void 0:a.find((function(e){return e.id===l.applicationId}));return{command:l,section:u}}return null}(b.text,r);if(null!=v){$e.Po(r.id,v.command,v.section);return null}}}if(null!=f&&null!=c){(function(e,t){if(null==t.options||0===t.options.length)return!1;var n=pc.zb(e,t);if(0===n.length)return!1;hc.bN.withoutNormalizing(e,(function(){for(var t=n.length-1;t>=0;t--){var r=n[t];Ec.Q.textToInline(e,{type:"applicationCommandOption",optionName:r.name,optionDisplayName:r.displayName,optionType:r.type,children:[{text:r.text}]},{anchor:r.keyRange.anchor,focus:r.valueRange.focus})}var o=hc.bN.getFirstText(e);if(null==o)return!1;var i=o.text.trim();o.text!==i&&Ec.Q.textToText(e,i,{anchor:{path:Gs.u9,offset:0},focus:{path:Gs.u9,offset:o.text.length}})}));return!0})(t,f)||Qs(t,f);var m,g=pc.tM(t,f),O=hc.bN.above(t,{match:function(e){return hc.bN.isInline(t,e)&&"applicationCommandOption"===e.type},mode:"lowest"
|
||
}),E=null!==(m=null==O?void 0:O[0].optionName)&&void 0!==m?m:null;Xs({guildId:r.guild_id,channelId:r.id,command:f,activeOption:E,currentOptionValues:g,previousOptionValues:l,validateAll:!1,allowEmpty:!1});return{commandId:c.id,optionValues:g}}return null}({editor:e,storeCommandState:a,channel:t,canUseCommands:n,canOnlyUseTextCommands:r,commandChanged:(null===(o=a.activeCommand)||void 0===o?void 0:o.id)!==(null==p?void 0:p.id),previousOptionValues:y})}));if(null!=b){var v=vc.currentEntry(e);null!=v&&(v.commandId=b.commandId);y=b.optionValues}else y=null;f=hc.bN.richValue(e);d=e.selection;p=a.activeCommand;h=s}}l()};return e}function qs(e,t,n,r){var o=Vs(hc.bN.blocks(e)[0],1)[0],i=(r?(0,Ls.sg)(o,{mode:"plain"}).trimEnd():"").split("\n").map((function(e){return{type:"line",children:[{text:e}]}})),a=[i.length-1];Ec.Q.insertNodes(e,i,{at:Gs.YD});var l=!0,u=!1,c=void 0;try{for(var s,f=hc.bN.blocks(e).reverse()[Symbol.iterator]();!(l=(s=f.next()).done);l=!0){var d=Vs(s.value,2)[1]
|
||
;hc.C0.isAfter(d,a)&&Ec.Q.removeNodes(e,{at:d,voids:!0})}}catch(e){u=!0;c=e}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}null!=n&&$e.Po(t,null,null)}function Qs(e,t){if(null==t.options||1!==t.options.length||!0===t.options[0].required||zs.has(t.options[0].type)||pc.cu(e).length>0)return!1;if(null==pc.cr(e))return!1;var n=hc.bN.getFirstText(e);if(null==n)return!1;var r=t.options[0],o={path:Gs.u9,offset:t.displayName.length+2},i={path:Gs.u9,offset:n.text.length};if(!n.text.startsWith("".concat(K.GI).concat(t.displayName," ").toLocaleLowerCase())||hc.Jz.equals(o,i))return!1;Ec.Q.textToInline(e,{type:"applicationCommandOption",optionName:r.name,optionDisplayName:r.displayName,optionType:r.type,children:[{text:n.text.substring(t.displayName.length+2)}]},{anchor:o,focus:i});return!0}function Xs(e){var t=e.guildId,n=e.channelId,r=e.command,o=e.activeOption,i=e.currentOptionValues,a=e.previousOptionValues,l=e.validateAll,u=e.allowEmpty;if(null==r.options)return!1
|
||
;var c=l?null:g.Z.getActiveOptionName(n),s={},f=g.Z.getOptionStates(n),d=!1,p=!0,h=!1,y=void 0;try{for(var b,v=r.options[Symbol.iterator]();!(p=(b=v.next()).done);p=!0){var m,O,E,C=b.value,j=f[C.name],S=l||C.name===c&&c!==o||!1===(null==j||null===(m=j.lastValidationResult)||void 0===m?void 0:m.success)&&(null==i?void 0:i[C.name])!==(null==a?void 0:a[C.name]),I={hasValue:null!=i&&C.name in i,isActive:C.name===o,lastValidationResult:S?(0,Fs.f)(C,null!==(E=null==i?void 0:i[C.name])&&void 0!==E?E:null,t,n,u):null==j?void 0:j.lastValidationResult};if(null==j||j.hasValue!==I.hasValue||j.isActive!==I.isActive||S&&!1===(null===(O=j.lastValidationResult)||void 0===O?void 0:O.success)){s[C.name]=I;d=!0}}}catch(e){h=!0;y=e}finally{try{p||null==v.return||v.return()}finally{if(h)throw y}}d&&$e.g7(n,s)}function Js(e){var t=pc.cr(e);if(null==t)return{command:null,commandText:null};var n=Vs(t,1)[0],r=n.children[0];return hc.LC.isText(r)?{command:n.command,commandText:r.text}:{command:n.command,
|
||
commandText:null}}function $s(e,t){var n=pc.cu(e)[0];t();var r=hc.M8.toPoint(e.selection);if(null!=r&&n!==pc.cu(e)[0]){var o=Js(e),i=o.command,a=o.commandText;null!=i&&null!=a&&!a.endsWith(" ")&&hc.Jz.equals(r,{path:Gs.u9,offset:i.displayName.length+1})&&Ec.Q.insertText(e," ")}}function ef(e,t,n){var r,o,i,a,l=null===(r=e.activeCommand)||void 0===r||null===(o=r.options)||void 0===o?void 0:o.find((function(e){return e.name===n})),u=e.initialValues[n];if(null==l||null==u)return null;if(null!=l.choices){var c;return null===(c=l.choices.find((function(e){return e.value===u.value})))||void 0===c?void 0:c.displayName}var s=null===(i=u.value)||void 0===i?void 0:i.toString()
|
||
;return l.type===j.jw.CHANNEL||l.type===j.jw.MENTIONABLE&&null!=Ct.Z.getChannel(s)?"<#".concat(s,">\t"):l.type===j.jw.USER||l.type===j.jw.MENTIONABLE&&null!=ge.default.getUser(s)?"<@".concat(s,">"):l.type===j.jw.ROLE||l.type===j.jw.MENTIONABLE&&null!=(null===(a=ve.Z.getGuild(t.guild_id))||void 0===a?void 0:a.getRole(null!=s?s:""))?"<@&".concat(s,">"):s}var tf=n(120637),nf=n(5387),rf=n.n(nf),of=n(455049);function af(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||cf(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uf(e){return function(e){if(Array.isArray(e))return af(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||cf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cf(e,t){if(e){if("string"==typeof e)return af(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?af(e,t):void 0}}var sf=new Set(["line"]),ff=tf.Z.listLanguages(),df={},pf=!0,hf=!1,yf=void 0;try{for(var bf,vf=ff[Symbol.iterator]();!(pf=(bf=vf.next()).done);pf=!0){var mf=bf.value
|
||
;mf=mf.toLowerCase();var gf=tf.Z.getLanguage(mf);if(null!=gf){var Of=gf.aliases;df[mf]=mf;if(null!=Of){var Ef=!0,Cf=!1,jf=void 0;try{for(var Sf,If=Of[Symbol.iterator]();!(Ef=(Sf=If.next()).done);Ef=!0){var _f=Sf.value;df[_f.toLowerCase()]=mf}}catch(e){Cf=!0;jf=e}finally{try{Ef||null==If.return||If.return()}finally{if(Cf)throw jf}}}}}}catch(e){hf=!0;yf=e}finally{try{pf||null==vf.return||vf.return()}finally{if(hf)throw yf}}var wf=/^[a-z0-9_+\-.#]+$/,xf=/^[a-z0-9_+\-.#]+$/i;for(var Pf in df)if(null==Pf.match(wf))throw new Error("Language name does not match regex: ".concat(Pf));function Nf(e){var t=e.onChange,n=null;e.onChange=function(){if(hc.bN.richValue(e)!==n){vc.withMergedEntry(e,(function(){hc.bN.withoutNormalizing(e,(function(){return function(e){var t=function(e){var t=[],n=null,r=!0,o=!1,i=void 0;try{for(var a,l=hc.bN.blocks(e)[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){
|
||
n=Tf(e,a.value,null!=n&&(n.isInCodeBlock||n.opensCodeBlock),null!=n&&(n.isStyledCodeBlockLine||n.opensCodeBlockOnOwnLine),null==n||!n.opensCodeBlock&&n.closesCodeBlock?null:n.lang);t.push(n)}}catch(e){o=!0;i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}!function(e){var t=[],n=!1,r=!0,o=!1,i=void 0;try{for(var a,l=function(){var r=a.value,o=r===e[e.length-1];if(r.closesCodeBlock||o){n&&o&&!r.closesCodeBlock&&t.push(r);n=!1;if(t.length>0){var i=t.map((function(e){return(0,Ls.sg)(e.blockEntry[0])})).join("\n"),l=t[0].lang;if(null!=l&&null!=tf.Z.getLanguage(l)){var u=function(e,t){var n="".concat(e,"-").concat(t),r=Rf.get(n);if(null!=r)return r;var o=of.default.highlight(t,e);if(null==o)return null;var i=o.value.split("\n");Rf.set(n,i);return i}(i,l);if(null!=u)for(var c=[],s=0;s<t.length;s++){for(var f=u[s].replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'"),d=[],p=void 0,h=0,y=0;null!=(p=Af.exec(f));){
|
||
var b=p.index+p[0].length,v=p.index-y;if(p.index>y){c.length>0&&d.push({types:uf(c),start:h,end:h+v});h+=v}"</span>"===p[0]?c.pop():c.push(p[1]);y=b}if(c.length>0){var m=f.length-y;d.push({types:uf(c),start:h,end:h+m})}t[s].hljsTypes=d}}t=[]}}n&&t.push(r);r.opensCodeBlock&&(n=!0)},u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)l()}catch(e){o=!0;i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}(t);return t}(e);!function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value,u=lf(l.blockEntry,2),c=u[0],s=u[1],f=Zf(l);(null==c?void 0:c.codeBlockState)!=f&&Ec.Q.setNodes(e,{codeBlockState:f},{at:s})}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(e,t)}(e)}))}));n=hc.bN.richValue(e)}t()};return e}var Af=/(?:<span class="([^"]*)">)|(?:<\/span>)/g;function Tf(e,t,n,r,o){var i=function(e){var t=lf(e,2),n=t[0],r=t[1];if(!sf.has(n.type))return[]
|
||
;for(var o,i=[],a=/\\|```/g,l=0;l<n.children.length;l++){var u=n.children[l];if(hc.LC.isText(u)){a.lastIndex=0;for(;null!=(o=a.exec(u.text));)"\\"!==o[0]?i.push({path:hc.C0.child(r,l),offset:o.index}):a.lastIndex+=1}}return i}(t),a=i[0],l=i[i.length-1],u=null;if(null!=l){u=lf(hc.bN.node(e,l.path),1)[0].text.substring(l.offset+3)}var c,s=n&&null!=a,f=n&&0===i.length,d=r&&0===i.length,p=(s?i.slice(1):i).length%2==1,h=p&&(null==u||""===u||null!=u.match(xf)),y=h&&null!=u&&null!==(c=df[u.toLowerCase()])&&void 0!==c?c:null;return{blockEntry:t,wasInCodeBlock:n,isInCodeBlock:f,isStyledCodeBlockLine:d,lang:p||s?y:o,hljsTypes:null,closesCodeBlock:s,opensCodeBlock:p,opensCodeBlockOnOwnLine:h}}function Zf(e){return e.isStyledCodeBlockLine||e.wasInCodeBlock?{lang:e.lang,wasInCodeBlock:e.wasInCodeBlock,isInCodeBlock:e.isInCodeBlock,isStyledCodeBlockLine:e.isStyledCodeBlockLine,hljsTypes:e.hljsTypes}:null}var Mf={max:1/0,maxAge:6e4,updateAgeOnGet:!0},Rf=new(rf())(Mf);function Lf(e,t){
|
||
var n=0,r=!0,o=!1,i=void 0;try{for(var a,l=hc.bN.nodes(e,{at:{anchor:{path:Gs.u9,offset:0},focus:t},mode:"lowest",match:function(e){return hc.LC.isText(e)}})[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value,c=u[0].text;hc.C0.equals(u[1],t.path)&&(c=c.substring(0,t.offset));var s,f=c.match(/```/g);n+=null!==(s=null==f?void 0:f.length)&&void 0!==s?s:0}}catch(e){o=!0;i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n%2!=0}function Df(e){return null!=e.selection&&Lf(e,hc.M8.start(e.selection))}function kf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()
|
||
}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return kf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kf(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Bf=new Set(["line","blockQuote"]);function Ff(e){var t=e.deleteBackward,n=e.deleteFragment,r=e.insertBreak,o=e.onChange;e.deleteBackward=function(n){var r=hc.bN.getCurrentBlock(e);if("blockQuote"===(null==r?void 0:r[0].type)){var o=hc.M8.toPoint(e.selection);if(null!=o&&hc.C0.isFirstChild(r[1],o.path)&&0===o.offset){Ec.Q.setNodes(e,{type:"line"},{at:r[1]});return}}t(n)};e.deleteFragment=function(t){if(null==e.selection)n(t);else{
|
||
var r=Uf(hc.M8.edges(e.selection),2),o=r[0],i=r[1],a=[o.path[0]],l=hc.bN.node(e,a),u=[i.path[0]],c=hc.C0.equals(a,u)?null:hc.bN.node(e,u);vc.withSingleEntry(e,(function(){"blockQuote"===(null==l?void 0:l[0].type)&&hc.Jz.isAtStart(o,l)&&Ec.Q.setNodes(e,{type:"line"},{at:a});"blockQuote"===(null==c?void 0:c[0].type)&&hc.Jz.isAtEnd(i,c)&&Ec.Q.setNodes(e,{type:"line"},{at:u});n(t)}))}};e.insertBreak=function(){var t=hc.bN.getCurrentBlock(e);if("blockQuote"!==(null==t?void 0:t[0].type))r();else{var n=hc.M8.toPoint(e.selection);if(null==n)return;(function(e,t,n){if(!hc.bN.isEmpty(e,t[0]))return!1;var r=hc.bN.previous(e,{at:t[1]});if(null==r||!hc.bN.isBlock(e,r[0])||"blockQuote"!==r[0].type||!hc.bN.isEmpty(e,r[0]))return!1;if(!hc.Jz.isAtStart(n,t))return!1;Ec.Q.setNodes(e,{type:"line"},{at:t[1]});Ec.Q.removeNodes(e,{at:r[1]});return!0})(e,t,n)||Ec.Q.splitNodes(e,{at:n,always:!0})}};var i=null,a=!0;e.onChange=function(){var t=hc.bN.richValue(e);if(t!==i||e.previewMarkdown!==a){
|
||
vc.withMergedEntry(e,(function(){hc.bN.withoutNormalizing(e,(function(){return function(e){var t=!1,n=!0,r=!1,o=void 0;try{for(var i,a=hc.bN.blocks(e)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=Uf(i.value,2),u=l[0],c=l[1];if(Bf.has(u.type)){var s={path:hc.C0.child(c,0),offset:0};if(Lf(e,s)){if("blockQuote"===u.type){Ec.Q.setNodes(e,{type:"line"},{at:c});Ec.Q.insertText(e,"> ",{at:s})}}else if("blockQuote"!==u.type&&!hc.bN.areStylesDisabled(e)){var f=u.children[0];if(hc.LC.isText(f)){var d=f.text.match(/^\s*>>> /),p=f.text.match(/^\s*> /);if(null!=p||null!=d||t){Ec.Q.setNodes(e,{type:"blockQuote"},{at:c});if(!t){var h,y,b=null!==(y=null!==(h=null==p?void 0:p[0].length)&&void 0!==h?h:null==d?void 0:d[0].length)&&void 0!==y?y:0,v=hc.C0.child(c,0);Ec.Q.delete(e,{at:{anchor:{path:v,offset:0},focus:{path:v,offset:b}}});t=null!=d}}}}}}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(e)}))}));i=t;a=e.previewMarkdown}o()};return e}function Gf(e,t){
|
||
var n=function(n){var r=vc.currentEntry(e);null!=r&&(r.mergeable=!1);if(!(n>=e.history.stack.length)){e.history.index=n;var o=vc.currentEntry(e);t({newValue:o.value,newSelection:o.selection})}},r=e.apply,o=e.deleteBackward,i=e.deleteForward,a=e.deleteFragment,l=e.insertData,u=e.insertText,c=e.onChange;e.history={index:0,stack:[]};e.onChange=function(){var t=e.history;if(0===t.stack.length){t.stack=[Hf(e)];t.index=0}null!=e.selection&&(vc.currentEntry(e).selection=e.selection);f=null;c()};e.undo=function(){e.history.index>0&&n(e.history.index-1)};e.redo=function(){e.history.index<e.history.stack.length-1&&n(e.history.index+1)};var s=null,f=null,d=null;e.apply=function(t){var n=e.history;r(t);var o=hc.bN.richValue(e);if(o!==d){if(0===n.stack.length){n.stack=[Hf(e)];n.index=0}if(vc.isSaving(e)){!function(e,t,n){var r,o=e.selection,i=vc.currentEntry(e),a=!0,l=!0;if("insert_text"===t.type&&1===t.text.length){r="insert"
|
||
;l=!((""===t.text||t.text.endsWith(" "))&&"insert_text"===(null==n?void 0:n.type)&&(""!==n.text||!n.text.endsWith(" ")))}else if("split_node"===t.type)r="insert";else if("remove_text"===t.type&&1===t.text.length)r="delete";else{r="other";a=!1;l=!1}if("set_selection"===t.type&&null!=i){i.selection=o;return}!a||(u=i,c=r,(null==u?void 0:u.type)!==c||Date.now()-u.createdAt>=4e3)?vc.insertEntry(e,r,l):vc.insertOrMergeEntry(e,r,l);var u,c}(e,t,s);s=t}f=t;d=o}};e.deleteBackward=function(t){vc.withSingleEntry(e,(function(){return o(t)}))};e.deleteForward=function(t){vc.withSingleEntry(e,(function(){return i(t)}))};e.deleteFragment=function(t){vc.withSingleEntry(e,(function(){return a(t)}))};e.insertText=function(t){1===t.length&&"remove_text"===(null==f?void 0:f.type)?vc.withMergedEntry(e,(function(){return u(t)})):null!=e.selection&&hc.M8.isExpanded(e.selection)?vc.withSingleEntry(e,(function(){return u(t)})):u(t)};e.insertData=function(t){
|
||
"remove_text"===(null==f?void 0:f.type)?vc.withMergedEntry(e,(function(){return l(t)})):vc.withSingleEntry(e,(function(){return l(t)}))};return e}function Hf(e){return{type:"other",mergeable:!1,createdAt:Date.now(),value:hc.bN.richValue(e),selection:e.selection}}var Vf=n(99885);function Wf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||Kf(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yf(e){return function(e){
|
||
if(Array.isArray(e))return Wf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Kf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kf(e,t){if(e){if("string"==typeof e)return Wf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wf(e,t):void 0}}var qf=/(@[^@#]+(?:#\d{4}))|(@[^\s\t@#]+)(?=[\s\t@#:])|(:[a-zA-Z0-9_~]+:)|(#"(?:\ |\\\\|\\"|(?!")\w)+")|(#[^\s\t@#:]+(?=[\s\t@#:]))/g,Qf=new Set(["emoji","customEmoji","textMention","userMention","roleMention","channelMention","staticRouteLink","timestamp"]),Xf=new Set(["line","blockQuote"]),Jf=new Set(["applicationCommandOption"]);function $f(e,t,n){
|
||
var r=hc.bN.areStylesDisabled(e),o=hc.bN.blocks(e),i=!0,a=!1,l=void 0;try{for(var u,c=o[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var s=u.value;if(Xf.has(s[0].type))r?td(e,s,!0,null):ed(e,s,t,n);else for(var f=zf(s,2),d=f[0],p=f[1],h=d.children.length-1;h>=0;h--){var y=d.children[h];if(Jf.has(y.type)){var b=[y,hc.C0.child(p,h)];r?td(e,b,!0,null):ed(e,b,t,n)}}}}catch(e){a=!0;l=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw l}}}function ed(e,t,n,r){var o,i="line"===t[0].type&&!0===(null===(o=t[0].codeBlockState)||void 0===o?void 0:o.isInCodeBlock),a=hc.q.markdown(t[0],n);if(td(e,t,i,a)){t=hc.q.updateElement(e,t);a=hc.q.markdown(t[0],n)}if(!i){if(nd(e,t,r,a)){t=hc.q.updateElement(e,t);a=hc.q.markdown(t[0],n)}!function(e,t,n,r,o){for(var i=zf(t,2),a=i[0],l=i[1],u=!1,c=a.children.length-1;c>=0;c--){var s=a.children[c];if(hc.LC.isText(s)){var f=hc.C0.child(l,c),d=[];qf.lastIndex=0
|
||
;for(var p=void 0;null!=(p=qf.exec(s.text));)if(0===p.index||null!=s.text.charAt(p.index-1).match(/(\t|\s)/)){if(!od(e,l,{path:f,offset:p.index},o)){var h=(0,Vf.i)(p[0],n,r);null!=h&&id(r,t[0],h)?d.push({index:p.index,length:p[0].length,node:h}):qf.lastIndex=p.index+1}}else qf.lastIndex=p.index+1;var y=!0,b=!1,v=void 0;try{for(var m,g=d.reverse()[Symbol.iterator]();!(y=(m=g.next()).done);y=!0){var O=m.value;rd(e,[s,hc.C0.child(l,c)],O.index,O.length,O.node);u=!0}}catch(e){b=!0;v=e}finally{try{y||null==g.return||g.return()}finally{if(b)throw v}}}}}(e,t,n,r,a)}}function td(e,t,n,r){for(var o=zf(t,2),i=o[0],a=o[1],l=!1,u=i.children.length-1;u>=0;u--){var c=i.children[u],s=u<i.children.length-1?i.children[u+1]:null;if(hc.LC.isText(c)&&!n){if(null==s||!e.isVoid(s))continue;for(var f=!1,d=0;;){var p=c.text.indexOf("\\",d);if(-1===p)break;if(p===c.text.length-1){f=!0;break}d=p+2}if(f){var h=hc.C0.child(a,u+1);Ec.Q.voidToText(e,(0,Ls.sg)(s,{mode:"plain",preventEmojiSurrogates:!0}),h);l=!0}
|
||
}else if(e.isVoid(c)){var y=hc.C0.child(a,u),b={path:hc.C0.child(y,0),offset:0};if(n||null!=r&&od(e,a,b,r)){Ec.Q.voidToText(e,(0,Ls.sg)(c,{mode:"plain",preventEmojiSurrogates:!0}),y);l=!0}}}return l}function nd(e,t,n,r){var o=t[1],i=!1,a=Yf(r.entries).reverse(),l=!0,u=!1,c=void 0;try{for(var s,f=a[Symbol.iterator]();!(l=(s=f.next()).done);l=!0){var d=s.value,p=void 0;switch(d.attributes[0]){case"emoji":p={type:"emoji",emoji:{name:d.data.name,src:d.data.src,surrogate:d.data.surrogate,jumboable:!0===d.data.jumboable},children:[{text:""}]};break;case"customEmoji":p={type:"customEmoji",emoji:{emojiId:d.data.emojiId,name:d.data.name,animated:d.data.animated,jumboable:!0===d.data.jumboable},children:[{text:""}]};break;case"textMention":p={type:"textMention",name:d.data.text,children:[{text:""}]};break;case"mention":p={type:"userMention",userId:d.data.id,children:[{text:""}]};break;case"roleMention":p={type:"roleMention",roleId:d.data.id,children:[{text:""}]};break;case"channelMention":p={
|
||
type:"channelMention",channelId:d.data.id,children:[{text:""}]};break;case"staticRouteLink":p={type:"staticRouteLink",channelId:d.data.id,children:[{text:""}]};break;case"timestamp":p={type:"timestamp",parsed:d.data,children:[{text:""}]};break;default:continue}if(id(n,t[0],p)){var h=Cc(e,o,r.serializedChildren,d.start),y=Cc(e,o,r.serializedChildren,d.start+d.text.length);Ec.Q.textToVoid(e,p,{anchor:h,focus:y});i=!0}}}catch(e){u=!0;c=e}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}return i}function rd(e,t,n,r,o){var i=zf(t,2),a=i[0],l=i[1],u={path:l,offset:n},c={path:l,offset:n+r};s()(u.offset>=0&&u.offset<=a.text.length,"Failed to find valid start position for raw mention replace");s()(c.offset>=0&&c.offset<=a.text.length,"Failed to find valid end position for raw mention replace");Ec.Q.textToVoid(e,o,{anchor:u,focus:c})}function od(e,t,n,r){var o=0,i=!0,a=!1,l=void 0;try{for(var u,c=hc.bN.nodes(e,{at:{anchor:hc.bN.start(e,t),focus:n},mode:"lowest"
|
||
})[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var s=zf(u.value,2),f=s[0],d=s[1];hc.LC.isText(f)?hc.C0.equals(d,n.path)?o+=n.offset:o+=f.text.length:o+=1}}catch(e){a=!0;l=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw l}}var p=!0,h=!1,y=void 0;try{for(var b,v=r.entries[Symbol.iterator]();!(p=(b=v.next()).done);p=!0){var m=b.value;if(m.attributes.includes("codeBlockText")||m.attributes.includes("inlineCode")){var g=m.start,O=m.start+m.text.length;if(g<=o&&O>=o)return!0}}}catch(e){h=!0;y=e}finally{try{p||null==v.return||v.return()}finally{if(h)throw y}}return!1}function id(e,t,n){if("applicationCommandOption"!==t.type)return!0;switch(t.optionType){case j.jw.CHANNEL:return"channelMention"===n.type;case j.jw.ROLE:return"roleMention"===n.type||"textMention"===n.type&&"@everyone"===n.name;case j.jw.USER:return"userMention"===n.type;case j.jw.MENTIONABLE:return"roleMention"===n.type||"userMention"===n.type||"textMention"===n.type&&"@everyone"===n.name;case j.jw.STRING:
|
||
var r=null!=e?g.Z.getOption(e,t.optionName):null;return null==(null==r?void 0:r.choices)&&!0!==(null==r?void 0:r.autocomplete);default:return!1}}function ad(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ld(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ud(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ld(e,t,n[t])}))}return e}function cd(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function sd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ad(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ad(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var fd=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){
|
||
a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function dd(e,t,n){var r=hc.bN.getCurrentInline(e),o=hc.bN.getCurrentBlock(e),i=hc.M8.toPoint(e.selection);if(null==i||null==o)return!0;if("block"===t)return!0;if("line"===t&&null==r)return!1;var a=r;if(null==a){var l=(n?hc.bN.before:hc.bN.after)(e,i);null!=l&&null!=(a=hc.bN.getParentInline(e,l))&&(i=l)}if(null!=a){var u=sd(a,2),c=u[0],s=u[1];if(hc.bN.isEmpty(e,c)||hc.bN.isVoid(e,c))Ec.Q.removeInline(e,s);else{var f=sd(hc.bN.edges(e,s),2),d=f[0],p=f[1];Ec.Q.delete(e,{at:i,unit:t,reverse:n,select:!0,bounds:{anchor:d,focus:p}})}return!0}var h=!1;if(null!=o){var y=sd(o,2)[1],b=sd(hc.bN.edges(e,y),2),v=b[0],m=b[1];h=n&&hc.Jz.equals(i,v)||!n&&hc.Jz.equals(i,m)}if("word"===t&&!h){var g=hc.bN.getCurrentText(e);if(null!=g){
|
||
var O=sd(g,2)[1],E=sd(hc.bN.edges(e,O),2),C=E[0],j=E[1];Ec.Q.delete(e,{at:i,unit:t,reverse:n,select:!0,bounds:{anchor:C,focus:j}});return!0}}Ec.Q.delete(e,{at:i,unit:t,reverse:n,select:!0});return!0}var pd=Us.ML.positions;function hd(e){var t,n,r,o,i,a,l,u,c,s,f,d,p,h,y,b,v,m,g,O,E,C,j,S,I,_,w,x,P,N,A,T,Z,M,R,L,D,k,U,B,F,G,H,V,W,z,Y,K,q,Q,X,J=arguments;return fd(this,(function($){switch($.label){case 0:t=J.length>1&&void 0!==J[1]?J[1]:{};i=(o=null!=t?t:{}).at,a=void 0===i?e.selection:i,l=o.unit,u=void 0===l?"offset":l,c=o.reverse,s=void 0!==c&&c,f=o.voids,d=void 0!==f&&f;if("word"===u)return[3,9];p=!0,h=!1,y=void 0;$.label=1;case 1:$.trys.push([1,6,7,8]);b=pd(e,cd(ud({},t),{voids:d||"block"===u}))[Symbol.iterator]();$.label=2;case 2:return(p=(v=b.next()).done)?[3,5]:[4,v.value];case 3:$.sent();$.label=4;case 4:p=!0;return[3,2];case 5:return[3,8];case 6:X=$.sent();h=!0;y=X;return[3,8];case 7:try{p||null==b.return||b.return()}finally{if(h)throw y}return[7];case 8:return[2];case 9:
|
||
if(null==a)return[2];m=hc.bN.range(e,a);g=sd(hc.M8.edges(m),2),O=g[0],E=g[1];C=hc.bN.richValue(e);j=s?-1:1;I=null!==(S=null===(n=O.path)||void 0===n?void 0:n[0])&&void 0!==S?S:0;w=null!==(_=null===(r=E.path)||void 0===r?void 0:r[0])&&void 0!==_?_:C.length-1;x=s?I:w;P=s?w:I;$.label=10;case 10:0;T=C[P];M=null!==(Z=P===I?null===(N=O.path)||void 0===N?void 0:N[1]:null)&&void 0!==Z?Z:0;L=null!==(R=P===w?null===(A=E.path)||void 0===A?void 0:A[1]:null)&&void 0!==R?R:T.children.length-1;D=s?M:L;k=s?L:M;$.label=11;case 11:0;U=T.children[k];B=[P,k];F=hc.C0.equals(B,O.path)||hc.C0.isAncestor(B,O.path)?!s&&hc.bN.isEnd(e,O,B)?null:O:hc.bN.start(e,B);G=hc.C0.equals(B,E.path)||hc.C0.isAncestor(B,E.path)?s&&hc.bN.isStart(e,E,B)?null:E:hc.bN.end(e,B);return null==F||null==G?[3,25]:hc.LC.isText(U)&&0===U.text.length?[4,H={path:B,offset:0}]:[3,14];case 12:$.sent();return[4,H];case 13:$.sent();return[3,25];case 14:
|
||
return hc.bN.isInline(e,U)&&hc.LC.isText(U.children[0])&&0===U.children[0].text.length?[4,V={path:hc.C0.child(B,0),offset:0}]:[3,17];case 15:$.sent();return[4,V];case 16:$.sent();return[3,25];case 17:W={anchor:F,focus:G};z=!0,Y=!1,K=void 0;$.label=18;case 18:$.trys.push([18,23,24,25]);q=pd(e,cd(ud({},t),{at:W}))[Symbol.iterator]();$.label=19;case 19:return(z=(Q=q.next()).done)?[3,22]:[4,Q.value];case 20:$.sent();$.label=21;case 21:z=!0;return[3,19];case 22:return[3,25];case 23:X=$.sent();Y=!0;K=X;return[3,25];case 24:try{z||null==q.return||q.return()}finally{if(Y)throw K}return[7];case 25:if(k===D)return[3,26];k+=j;return[3,11];case 26:if(P===x)return[3,27];P+=j;return[3,10];case 27:return[2]}}))}var yd,bd=["applicationCommand"];!function(e){e[e.None=0]="None";e[e.Character=1]="Character";e[e.Split=2]="Split"}(yd||(yd={}));function vd(e){var t=hc.bN.getCurrentBlock(e);return null==t||bd.includes(t[0].type)?yd.None:yd.Split}function md(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return md(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return md(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Od(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ed(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Cd(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function jd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{
|
||
if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Od(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Od(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sd(e){var t=o.useContext(tn.ZP),n=Ar.R$.useSetting(),r=jd(o.useState((function(){var r=(0,Us.Jh)();!function(e){var t,n,r,o=e.editor,i=e.chatInputType,a=e.channel,l=e.canUseCommands,u=e.canOnlyUseTextCommands,c=e.windowContext,s=e.previewMarkdown,f=e.forTests,d=e.onChangeStart,p=e.onChangeEnd,h=e.updateState,y=o;y.chatInputType=i;y.windowContext=c;y.previewMarkdown=s;y.composition=null;f||(y=function(e){e.deleteBackward=function(t){if("line"===t){
|
||
var n=hc.lP.getLineActionRange(e,!0);null!=n&&Ec.Q.delete(e,{at:n})}else e.deleteBackward(t)};e.deleteForward=function(t){if("line"===t){var n=hc.lP.getLineActionRange(e,!1);null!=n&&Ec.Q.delete(e,{at:n})}else e.deleteForward(t)};return e}(y=(0,gc.BU)(y)));y=function(e){var t=e.insertText;e.setFragmentData=function(t){if(null!=e.selection){var n=(0,Ls.sk)(hc.bN.richValue(e),{mode:"plain",range:e.selection,preventEmojiSurrogates:!0});t.setData("text/plain",n)}};e.insertData=function(n){var r=n.getData("text/plain");if(0!==r.length){null!=e.selection&&hc.M8.isExpanded(e.selection)&&Ec.Q.delete(e,{at:e.selection});t(r)}};return e}(y=function(e){var t=e.insertBreak,n=e.insertText;e.insertBreak=function(){switch(vd(e)){case yd.None:break;case yd.Split:t()}};e.insertSoftBreak=function(){e.insertBreak()};e.insertText=function(t){if(t.indexOf("\r")<0&&t.indexOf("\n")<0)n(t);else{var r=t.split(/\r\n|\r|\n/);switch(vd(e)){case yd.None:n(r.join(" "));break;case yd.Split:
|
||
vc.withSingleEntry(e,(function(){var t=!1,o=!0,i=!1,a=void 0;try{for(var l,u=r[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value;t&&Ec.Q.splitNodes(e,{always:!0});n(c);t=!0}}catch(e){i=!0;a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}))}}};return e}(y=function(e){var t=e.apply,n=e.deleteBackward,r=e.deleteForward,o=e.deleteFragment,i=e.insertText;e.apply=function(n){var r;if("set_selection"===n.type&&(null===(r=e.composition)||void 0===r?void 0:r.startedInsideInline)&&hc.M8.isRange(n.properties)&&hc.M8.isRange(n.newProperties)&&hc.M8.isCollapsed(n.newProperties)){var o=hc.bN.getParentInline(e,n.properties),i=hc.bN.getParentInline(e,n.newProperties);if(null!=o&&(null==i||!hc.C0.equals(o[1],i[1])))return}t(n)};e.insertText=function(t){null==e.selection||null==hc.bN.getCurrentInline(e)?i(t):Ec.Q.insertText(e,t)};e.deleteBackward=function(t){dd(e,t,!0)||n(t)};e.deleteForward=function(t){dd(e,t,!1)||r(t)};e.deleteFragment=function(t){
|
||
if(null!=e.selection&&hc.M8.isExpanded(e.selection)){var n=e.selection.anchor,r=e.selection.focus,i=hc.bN.getParentInline(e,n),a=hc.bN.getParentInline(e,r);if(null!=i&&null!=a&&hc.C0.equals(i[1],a[1])){o(t);return}var l=hc.M8.isForward(e.selection);if(null!=i){var u=sd(i,2)[1],c=sd(hc.bN.edges(e,u),2),s=c[0],f=c[1];if(l&&hc.Jz.equals(n,s)){var d;n=null!==(d=hc.bN.before(e,s))&&void 0!==d?d:hc.bN.start(e,[])}else if(!l&&hc.Jz.equals(n,f)){var p;n=null!==(p=hc.bN.after(e,f))&&void 0!==p?p:hc.bN.end(e,[])}}if(null!=a){var h=sd(a,2)[1],y=sd(hc.bN.edges(e,h),2),b=y[0],v=y[1];if(!l&&hc.Jz.equals(r,b)){var m;r=null!==(m=hc.bN.before(e,b))&&void 0!==m?m:hc.bN.start(e,[])}else if(l&&hc.Jz.equals(r,v)){var g;r=null!==(g=hc.bN.after(e,v))&&void 0!==g?g:hc.bN.end(e,[])}}Ec.Q.delete(e,{at:{anchor:n,focus:r},reverse:"backward"===t,select:!0})}else o(t)};Us.ML.positions=hd;return e}(y)));(null===(t=i.commands)||void 0===t?void 0:t.enabled)&&(y=Ks(y,a,!0===l,!0===u));y=function(e,t,n){
|
||
var r=e.isInline,o=e.isVoid,i=e.onChange;e.isVoid=function(e){return!!Qf.has(e.type)||o(e)};e.isInline=function(e){return!!Qf.has(e.type)||r(e)};var a=null,l=!0;e.onChange=function(){var r=hc.bN.richValue(e);if(r!==a||e.previewMarkdown!==l){vc.withMergedEntry(e,(function(){hc.bN.withoutNormalizing(e,(function(){return $f(e,t,n)}))}));a=r;l=e.previewMarkdown}i()};return e}(y,a.guild_id,a.id);(null===(n=i.markdown)||void 0===n?void 0:n.disableBlockQuotes)||(y=Ff(y));(null===(r=i.markdown)||void 0===r?void 0:r.disableCodeBlocks)||(y=Nf(y));f&&(y=function(e){var t=e.isInline,n=e.isVoid;e.isInline=function(e){return"testInline"===e.type||"testInlineVoid"===e.type||t(e)};e.isVoid=function(e){return"testInlineVoid"===e.type||n(e)};return e}(y));y=Gf(y=function(e,t,n){var r=e.onChange,o=!1,i=!1;e.onChange=function(){if(o)i=!0;else{o=!0;try{var e=0;do{i=!1;if(e++>=5)break;null==t||t();try{r()}finally{null==n||n()}}while(i)}finally{o=!1}}};return e}(y=function(e){var t=e.apply,n=e.onChange
|
||
;e.apply=function(n){t(n);hc.Ew.isValid(e,e.selection)&&(e.lastGoodSelection=e.selection)};e.onChange=function(){if(!hc.Ew.isValid(e,e.selection)){var t;if(hc.Ew.isValid(e,e.lastGoodSelection))t=e.lastGoodSelection;else{var r=hc.bN.end(e,[]);t={anchor:r,focus:r}}e.selection=t}if(null!=e.selection){for(var o,i,a=gd(hc.M8.edges(e.selection),2),l=a[0],u=a[1],c=!1;null!=l&&null!=(o=hc.bN.getParentVoid(e,l))&&!Gs.On.includes(o[0].type);){l=hc.bN.before(e,l,{unit:"offset"});c=!0}for(;null!=u&&null!=(i=hc.bN.getParentVoid(e,u))&&!Gs.On.includes(i[0].type);){u=hc.bN.after(e,u,{unit:"offset"});c=!0}c&&null!=l&&null!=u&&(hc.M8.isForward(e.selection)?Ec.Q.select(e,{anchor:l,focus:u}):Ec.Q.select(e,{anchor:u,focus:l}))}n()};return e}(y),d,p),(function(e){var t=e.newValue,n=e.newSelection;return h(y,"undo",{value:t,selection:n})}));0}(Cd(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ed(e,t,n[t])}))}return e}({},e),{editor:r,windowContext:t,previewMarkdown:n}));return r})),1),i=r[0];o.useEffect((function(){var e=function(){return i.onChange()};g.Z.addChangeListener(e);et.ZP.addChangeListener(e);return function(){g.Z.removeChangeListener(e);et.ZP.removeChangeListener(e)}}),[i]);o.useEffect((function(){if(i.previewMarkdown!==n){i.previewMarkdown=n;i.onChange()}}),[i,n]);return i}function Id(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}
|
||
}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Id(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Id(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wd(e,t){var n,r=g.Z.getActiveCommand(e.id),o=null==r||null===(n=r.options)||void 0===n?void 0:n.find((function(e){return e.name===t.optionName}));return null!=o&&(o.type!==j.jw.STRING||null!=(null==o?void 0:o.choices)||(null==o?void 0:o.autocomplete))}function xd(e,t,n,r){var o=hc.bN.areStylesDisabled(e)||null==n?t:n;vc.withSingleEntry(e,(function(){Ec.Q.insertText(e,r?o+" ":o)}))}function Pd(e,t,n,r){
|
||
o.useImperativeHandle(e,(function(){return function(e,t,n){return{getSlateEditor:function(){return e},submit:function(e){e.preventDefault();n()},focus:function(){hc.bN.focus(e)},blur:function(){gc.F3.blur(e)},getCurrentWord:function(){var t=e.selection;if(null==t||!hc.Ew.isValid(e,t)||hc.M8.isExpanded(t))return{word:null,isAtStart:!1};if(Df(e))return{word:null,isAtStart:!1};var n=_d(hc.bN.node(e,hc.C0.parent(t.anchor.path)),2),r=n[0],o=n[1],i=_d(hc.bN.node(e,t.anchor.path),2),a=i[0],l=i[1],u=t.anchor.offset;if(!hc.C0.hasPrevious(l)&&hc.LC.isText(a)){var c=a.text.substring(0,u);if(hc.bN.isBlock(e,r)&&"applicationCommand"===r.type&&u<r.command.displayName.length+2)return{word:c,isAtStart:!0}}for(var s="",f=!1;;){if(--u<0){if(!hc.C0.hasPrevious(l)){f=!0;break}var d;a=(d=_d(hc.bN.node(e,hc.C0.previous(l)),2))[0],l=d[1]}if(!hc.LC.isText(a))break;var p=a.text[u];if(Gs.i$.test(p))break;s=p+s}return{word:s,isAtStart:f&&hc.C0.isFirstEditorBlock(o)}},getFirstText:function(){var t,n
|
||
;return null!==(n=null===(t=hc.bN.getFirstText(e))||void 0===t?void 0:t.text)&&void 0!==n?n:""},getCurrentCommandOption:function(){var t=pc.HZ(e);return null==t?null:t[0].optionName},getCurrentCommandOptionValue:function(){var n,r=pc.HZ(e);if(null==r)return[];var o=g.Z.getActiveCommand(t.id),i=null==o||null===(n=o.options)||void 0===n?void 0:n.find((function(e){return e.name===r[0].optionName}));return null==i?[]:pc.IB(e,i,r[0])},getCommandOptionValues:function(){var n=g.Z.getActiveCommand(t.id);return null==n?{}:pc.tM(e,n)},insertText:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];vc.withSingleEntry(e,(function(){var i=pc.HZ(e),a=null!=i&&wd(t,i[0]);if(null!=r&&a){Ec.Q.removeInlineChildren(e,i);o=!1}xd(e,n,r,o);if(null!=r&&a){var l=pc.cr(e);i=hc.q.updateElement(e,i);if(null!=l){var u=hc.q.markdown(l[0],t.id);nd(e,i,t.id,u)&&(i=hc.q.updateElement(e,i))}
|
||
pc.xi(e,t.guild_id,t.id,hc.q.updateElement(e,i),!1);Ec.Q.selectNextCommandOption(e)}}))},insertAutocomplete:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this;vc.withSingleEntry(e,(function(){var a=pc.HZ(e),l=null!=a&&wd(t,a[0]);if(l){Ec.Q.removeInlineChildren(e,a);o=!1}else{var u=i.getCurrentWord().word;null!=u&&u.length>0&&Ec.Q.delete(e,{distance:u.length,unit:"character",reverse:!0})}xd(e,n,r,o);l&&Ec.Q.selectNextCommandOption(e)}))},insertEmoji:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];vc.withSingleEntry(e,(function(){var r,o,i=t.animated?"a":"",a=null!==(o=null!==(r=t.originalName)&&void 0!==r?r:t.name)&&void 0!==o?o:"",l=":".concat(t.name,":"),u=null!=t.id?"<".concat(i,":").concat(a.replace(/:/g,""),":").concat(t.id,">"):null;xd(e,l,u,n)}))}}}(t,n,r)}),[t,n,r])}var Nd=n(506907),Ad=n.n(Nd);function Td(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Td(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Td(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Md=new Set(["*","_","~","`","|"]),Rd={bold:"**",italics:"*",
|
||
underline:"__",strikethrough:"~~",inlineCode:"`",spoiler:"||"};function Ld(e,t,n){if(null==e.selection)return{before:{},after:{}};var r=Dd(e,t),o=Dd(e,n);for(var i in r)i in o||delete r[i];for(var a in o)a in r||delete o[a];return{before:r,after:o}}function Dd(e,t){var n=Zd(hc.bN.node(e,t.path),1)[0];if(!hc.LC.isText(n))return{};for(var r=n.text,o=t.offset,i=o-1;i>=0&&Md.has(r.charAt(i));i--)o--;for(var a=t.offset,l=a;l<r.length&&Md.has(r.charAt(l));l++)a++;var u=r.substring(o,a),c={};Ud({result:c,text:u,startIndex:o,syntax:"***",type1:"italics",type2:"bold"});Ud({result:c,text:u,startIndex:o,syntax:"___",type1:"italics",type2:"underline"});kd(c,u,o,"**","bold");kd(c,u,o,"*","italics");kd(c,u,o,"_","italics");kd(c,u,o,"__","underline");kd(c,u,o,"`","inlineCode");kd(c,u,o,"~~","strikethrough");kd(c,u,o,"||","spoiler");return c}function kd(e,t,n,r,o){var i=Bd(t,r);i>=0&&(e[o]={chars:r,location:n+i})}function Ud(e){
|
||
var t=e.result,n=e.text,r=e.startIndex,o=e.syntax,i=e.type1,a=e.type2,l=Bd(n,o);if(l>=0){t[i]={chars:o.substring(0,1),location:l+r};t[a]={chars:o.substring(1),location:l+r+1}}}function Bd(e,t){var n=e.indexOf(t);if(n>=0){var r=t.charAt(0);if(n>0&&e.charAt(n-1)===r)return-1;if(n<e.length-1&&e.charAt(n+t.length)===r)return-1}return n}function Fd(e,t){vc.withSingleEntry(e,(function(){hc.bN.withoutNormalizing(e,(function(){s()(null!=e.selection,"Editor has no selection");var n=Zd(hc.M8.edges(e.selection),2),r=n[0],o=n[1],i=Ld(e,r,o),a=i.before[t],l=i.after[t],u=hc.bN.node(e,r.path),c=hc.bN.node(e,o.path);if(null!=u&&null!=c&&hc.LC.isText(u[0])&&hc.LC.isText(c[0])){var f=hc.C0.equals(u[1],c[1]);if(null!=a&&null!=l){var d={path:r.path,offset:a.location},p={path:o.path,offset:l.location};Ec.Q.delete(e,{at:p,distance:l.chars.length});Ec.Q.delete(e,{at:d,distance:a.chars.length});var h=r.offset,y=o.offset;hc.Jz.isBefore(r,d)||(h-=a.chars.length);f&&!hc.Jz.isBefore(o,d)&&(y-=a.chars.length)
|
||
;hc.Jz.isAfter(o,p)&&(y-=l.chars.length);Ec.Q.select(e,{anchor:{path:r.path,offset:Math.max(0,h)},focus:{path:o.path,offset:Math.max(0,y)}})}else{var b=Rd[t];Ec.Q.insertText(e,b,{at:o});Ec.Q.insertText(e,b,{at:r});var v=u[0].text.length+b.length,m=c[0].text.length+(f?2*b.length:b.length);Ec.Q.select(e,{anchor:{path:r.path,offset:Math.min(v,r.offset+b.length)},focus:{path:o.path,offset:Math.min(m,o.offset+(f?b.length:0))}})}}}))}));hc.bN.focus(e)}function Gd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return Gd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gd(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vd(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Wd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Vd(e,t,n[t])}))}return e}function zd(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var Yd=function(e){var t,n,i=e.channelId,l=e.element,u=e.attributes,c=e.children,s=(0,gc.vt)(),f=(0,gc.UE)(),d=(0,gc._7)(),h=(0,p.cj)([g.Z],(function(){var e,t,n;return{optionType:null===(e=g.Z.getOption(i,l.optionName))||void 0===e?void 0:e.type,errored:!0!==(null===(t=g.Z.getOptionState(i,l.optionName))||void 0===t||null===(n=t.lastValidationResult)||void 0===n?void 0:n.success)}}),[i,l.optionName]),y=h.optionType,b=h.errored,v=(0,p.e7)([Nu.Z],(function(){return Nu.Z.getUpload(i,l.optionName,d.chatInputType.drafts.type)
|
||
}),[i,d.chatInputType.drafts.type,l.optionName]),m=l.children[l.children.length-1],O=null!=m&&hc.LC.isText(m)&&m.text.endsWith("\n"),E=a()(rs().inlineElement,rs().optionPill,(Vd(t={},rs().selectedPill,f&&s),Vd(t,rs().erroredPill,(!f||!s)&&b),t)),C=o.useCallback((function(){hc.bN.isVoid(d,l)||Ec.Q.selectCommandOption(d,l.optionName,!0)}),[d,l]);n=y===j.jw.ATTACHMENT?null!=(null==v?void 0:v.filename)?(0,r.jsxs)("span",{className:a()(rs().optionPillValue,rs().attachmentFilename),contentEditable:!1,children:[v.filename,c]}):(0,r.jsxs)("span",{className:a()(rs().optionPillValue,rs().readonlyPillValue),contentEditable:!1,children:[q.Z.Messages.APPLICATION_COMMAND_FILE_ATTACHMENT,c]}):(0,r.jsxs)("span",{className:rs().optionPillValue,children:[c,O?(0,r.jsx)("span",{className:rs().newLine,contentEditable:!1}):null]});return(0,r.jsxs)("span",zd(Wd({},u),{className:E,children:[(0,r.jsxs)("span",{className:rs().optionPillKey,contentEditable:!1,onClick:C,children:[l.optionDisplayName,""]}),n,(0,
|
||
r.jsx)("span",{contentEditable:!1,children:""})]}))};function Kd(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function qd(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Qd(e){var t=e.attributes,n=e.children,o=e.leaf,i=e.text;if(o.commandName){var l=a()(rs().commandName,Kd({},rs().emptyText,""===i.text));return(0,r.jsx)("span",qd(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Kd(e,t,n[t])}))}return e}({},t),{className:l,spellCheck:!1,children:n}))}return null}var Xd=n(461778),Jd=n.n(Xd);const $d=o.forwardRef((function(e,t){
|
||
var n=e.value,i=e.type,l=e.channel,u=e.className,c=e.disabled,f=e.submitting,d=e.placeholder,p=e.textAreaPaddingClassName,h=e.onChange,y=e.onPaste,b=e.onResize,v=e.onFocus,m=e.onBlur,O=e.onKeyDown,E=e.onKeyUp,C=e.onTab,S=e.onEnter,I=e.onSubmit,_=e.maybeShowAutocomplete,w=e.hideAutocomplete,x=e.moveSelection,P=e.spellcheckEnabled,N=e.canUseCommands,A=e.canOnlyUseTextCommands,T=e.disableAutoFocus,Z=e.disableEnterToSubmit,M=e["aria-owns"],R=e["aria-expanded"],L=e["aria-haspopup"],D=e["aria-activedescendant"],k=e["aria-controls"],U=e["aria-invalid"],B=e["aria-describedby"],F=e["aria-labelledby"],G=e["aria-autocomplete"],H=o.useRef(null),V=o.useRef(null),W=o.useRef(!0),z=o.useRef(!0),Y=c||f,K=o.useCallback((function(e,t,n){var r,o=n.value,i=n.selection,a=hc.bN.richValue(e),u=e.selection,c=!1;if(void 0!==o&&o!==a){e.children=o;if("parent"===t&&!e.previewMarkdown){try{e.previewMarkdown=!0;$f(e,l.guild_id,l.id)}finally{e.previewMarkdown=!1}$f(e,l.guild_id,l.id);i=void 0}
|
||
"undo"!==t&&void 0!==o&&o!==a&&vc.insertEntry(e,"other",!1,a,u);c=!0}null==i||hc.Ew.isValid(e,i)||(i=void 0);if((c||!hc.Ew.isValid(e,u))&&void 0===i){var s=hc.bN.end(e,[]);i={anchor:s,focus:s}}if(null!=i&&!hc.Ew.equals(i,u)){e.selection=i;var f=vc.currentEntry(e);null!=f&&(f.selection=i);c=!0}var d=pc.cr(e);null!=d&&d[0].command.id!==(null===(r=g.Z.getActiveCommand(l.id))||void 0===r?void 0:r.id)&&vc.withMergedEntry(e,(function(){qs(e,l.id,null,!0)}));if(c){T||hc.bN.focus(e);if("parent"===t)try{z.current=!1;e.onChange()}finally{z.current=!0}else e.onChange()}}),[l.id,l.guild_id,T]),Q=o.useCallback((function(){W.current=!1}),[]),X=o.useCallback((function(){W.current=!0}),[]),J=Sd({channel:l,chatInputType:i,canUseCommands:N,canOnlyUseTextCommands:A,onChangeStart:Q,onChangeEnd:X,updateState:K}),$=o.useCallback((function(e,t){var n=pc.tM(J,e);return{values:n,results:pc.lk(e,l.guild_id,l.id,n,t)}}),[l.guild_id,l.id,J]),ee=o.useCallback((function(){var e,t=N?g.Z.getActiveCommand(l.id):null
|
||
;if(null!=t&&null!=t.options){var n=$(t,!1);e=n.values;var r,o=pc.cu(J).filter((function(e){return!n.results[e].success})).map((function(e){return(null!==(r=t.options)&&void 0!==r?r:[]).find((function(t){return t.name===e}))})),i=!0,a=!1,u=void 0;try{for(var c,s=t.options[Symbol.iterator]();!(i=(c=s.next()).done);i=!0){var f=c.value;if(f.required&&!(f.name in n.values)){Ec.Q.insertCommandOption(J,f);o.push(f)}}}catch(e){a=!0;u=e}finally{try{i||null==s.return||s.return()}finally{if(a)throw u}}if(o.length>0){var d,p,h=o[0];Ec.Q.selectCommandOption(J,h.name);Il.S.dispatch(se.CkL.SHAKE_APP,{duration:200,intensity:2});ce.default.track(se.rMx.APPLICATION_COMMAND_VALIDATION_FAILED,{application_id:null==t?void 0:t.applicationId,command_id:null==t||null===(d=t.rootCommand)||void 0===d?void 0:d.id,argument_type:j.jw[null!==(p=null==h?void 0:h.type)&&void 0!==p?p:3],is_required:null==h?void 0:h.required});return}}null==I||I((0,Ls.sk)(hc.bN.richValue(J),{mode:"raw",ignoreTrailingEmptyNodes:!0
|
||
}),t,e)}),[l.id,J,I,$,N]);Pd(t,J,l,ee);!function(e,t,n){o.useEffect((function(){var r=gc.F3.findDocumentOrShadowRoot(e).defaultView;if(null!=(null==r?void 0:r.ResizeObserver)){var o=hc.bN.toDOMNode(e,e),i=o.offsetHeight,a=new r.ResizeObserver((function(){var r=hc.bN.toDOMNode(e,e).offsetHeight;if(i!==r){null!=t.current&&(t.current.style.height="".concat(r,"px"));i=r;null==n||n(r)}}));a.observe(o);return function(){return a.disconnect()}}}),[t,e,n])}(J,H,b);var te=function(e){var t=e.editor,n=e.channel,r=e.disableEnterToSubmit,i=e.onKeyDown,a=e.onKeyUp,l=e.onTab,u=e.onEnter,c=e.submit,f=e.hideAutocomplete,d=e.moveSelection,p=o.useCallback((function(e){if(e.shiftKey||!(null==u?void 0:u(e))){if(!e.altKey&&!e.shiftKey&&(!r||e.ctrlKey)&&!Df(t)){e.preventDefault();e.stopPropagation();c()}}else{e.preventDefault();e.stopPropagation()}}),[t,r,u,c]),h=o.useCallback((function(e){if(e.shiftKey||!(null==l?void 0:l())){var r;if(null!=(null!==(r=g.Z.getActiveCommand(n.id))&&void 0!==r?r:null)){
|
||
e.preventDefault();e.stopPropagation();e.shiftKey?Ec.Q.selectPreviousCommandOption(t):Ec.Q.selectNextCommandOption(t)}if(Df(t)){e.preventDefault();e.stopPropagation();Ec.Q.insertText(t," ")}}else{e.preventDefault();e.stopPropagation()}}),[n,t,l]);return{handleKeyDown:o.useCallback((function(e){var n="MacIntel"===navigator.platform,r=n?e.metaKey:e.ctrlKey;switch(e.which){case se.yXg.ARROW_LEFT:case se.yXg.ARROW_RIGHT:var o,a,l,u=t.children[null!==(l=null===(o=t.selection)||void 0===o||null===(a=o.focus)||void 0===a?void 0:a.path[0])&&void 0!==l?l:0],c="rtl"===Ad()(hc.aj.string(u)),y=e.which===se.yXg.ARROW_LEFT==!c,b=e.shiftKey?"focus":void 0,v="offset";if(n){if(e.altKey)v="word";else if(e.metaKey)return}else e.ctrlKey&&(v="word");e.preventDefault();Ec.Q.keyboardMove(t,{reverse:y,unit:v,edge:b});break;case se.yXg.ARROW_UP:d(-1)&&e.preventDefault();break;case se.yXg.ARROW_DOWN:d(1)&&e.preventDefault();break;case se.yXg.P:e.ctrlKey&&!e.altKey&&d(-1)&&e.preventDefault();break
|
||
;case se.yXg.N:e.ctrlKey&&!e.altKey&&d(1)&&e.preventDefault();break;case se.yXg.TAB:h(e);break;case se.yXg.ENTER:p(e);break;case se.yXg.ESCAPE:null==f||f();break;case se.yXg.BACKSPACE:case se.yXg.DELETE:case se.yXg.K:var m=e.which===se.yXg.BACKSPACE;if(!n&&e.ctrlKey&&!e.altKey&&e.shiftKey&&e.which!==se.yXg.K||n&&e.metaKey&&e.which!==se.yXg.K||n&&e.ctrlKey&&!e.altKey&&e.which===se.yXg.K){e.preventDefault();if(null!=t.selection){var g=Hd(hc.M8.edges(t.selection),2),O=g[0],E=g[1],C=Hd(hc.bN.node(t,[m?O.path[0]:E.path[0]]),2),j=C[0],S=C[1];s()(hc.bN.isBlock(t,j),"Top-most node of selection is not a block");(m&&!hc.Jz.isAtStart(O,[j,S])||!m&&!hc.Jz.isAtEnd(E,[j,S]))&&(m?t.deleteBackward("line"):t.deleteForward("line"))}}break;case se.yXg.A:if(n&&e.ctrlKey&&!e.altKey){var I=hc.bN.getCurrentBlock(t);if(null!=I){var _=Hd(I,2)[1],w={path:hc.C0.child(_,0),offset:0};Ec.Q.select(t,{anchor:w,focus:w})}}break;case se.yXg.E:if(n&&e.ctrlKey&&!e.altKey){var x=hc.bN.getCurrentBlock(t);if(null!=x){
|
||
var P=Hd(x,2),N=P[0],A=P[1],T=hc.C0.child(A,N.children.length-1),Z={path:T,offset:Hd(hc.bN.node(t,T),1)[0].text.length};Ec.Q.select(t,{anchor:Z,focus:Z})}}break;case se.yXg.B:if(r&&!e.shiftKey&&!e.altKey&&!hc.bN.isEditorEmpty(t)){Fd(t,"bold");e.stopPropagation()}break;case se.yXg.I:if(r&&!e.shiftKey&&!e.altKey&&!hc.bN.isEditorEmpty(t)){Fd(t,"italics");e.stopPropagation()}break;case se.yXg.U:if(r&&!e.shiftKey&&!e.altKey&&!hc.bN.isEditorEmpty(t)){Fd(t,"underline");e.stopPropagation()}break;case se.yXg.S:if(r&&e.shiftKey&&!e.altKey&&!hc.bN.isEditorEmpty(t)){Fd(t,"strikethrough");e.stopPropagation()}}null==i||i(e)}),[t,p,h,f,d,i]),handleKeyUp:o.useCallback((function(e){null==a||a(e)}),[a])}}({editor:J,channel:l,disableEnterToSubmit:Z,onKeyDown:O,onKeyUp:E,onTab:C,onEnter:S,submit:ee,hideAutocomplete:w,moveSelection:x}),ne=te.handleKeyDown,re=te.handleKeyUp,oe=function(e,t,n){var r=o.useCallback((function(e){if(t)return!0;if(!0===e.defaultPrevented)return!1;var r=n(e);if(r){
|
||
e.preventDefault();e.stopPropagation()}return r}),[t,n]),i=o.useCallback((function(t){var n=t.event;if(!r(n)){n.preventDefault();n.stopPropagation();if(null!=n.clipboardData){e.insertData(n.clipboardData);hc.bN.focus(e)}}}),[e,r]);return{handlePaste:r,handleGlobalPaste:i}}(J,Y,y),ie=oe.handlePaste,ae=oe.handleGlobalPaste,le=o.useCallback((function(e){null==_||_()}),[_]),ue=o.useCallback((function(e){e!==V.current?z.current&&(null==h||h(null,(0,Ls.sk)(e,{mode:"raw"}),e)):z.current&&_()}),[_,h]);o.useLayoutEffect((function(){if(W.current){V.current=n;K(J,"parent",{value:n})}}),[J,n,K]);o.useEffect((function(){var e=function(){var e,t=null!==(e=g.Z.getActiveCommand(l.id))&&void 0!==e?e:null;null!==t&&null!=t.options&&$(t,!0)};Nu.Z.addChangeListener(e);return function(){return Nu.Z.removeChangeListener(e)}}),[l,J,$]);var fe=o.useCallback((function(e,t){return function(e,t){if(hc.bN.areStylesDisabled(e))return[];var n=ks(t,2),r=n[0],o=n[1],i=[];if(!hc.LC.isText(r))return i
|
||
;var a=ks(hc.bN.node(e,hc.C0.parent(o)),1)[0];if(!hc.aj.isType(a,"applicationCommand"))return i;r===a.children[0]&&i.push({anchor:{path:o,offset:0},focus:{path:o,offset:0+a.command.displayName.length+1},commandName:!0});return i}(e,t)}),[]),de=o.useCallback((function(e){return function(e,t,n){var o=t.attributes,i=t.children,a=t.element;switch(a.type){case"applicationCommand":var l=g.Z.getActiveCommand(n),u=0,c=0;if(null!=l&&l.id===a.command.id){var s,f=pc.cu(e),d=!0,p=!1,h=void 0;try{for(var y,b=(null!==(s=l.options)&&void 0!==s?s:[])[Symbol.iterator]();!(d=(y=b.next()).done);d=!0){var v=y.value;f.includes(v.name)?c++:u++}}catch(e){p=!0;h=e}finally{try{d||null==b.return||b.return()}finally{if(p)throw h}}}var m={};if(u>0){var O;O=c>0?q.Z.Messages.COMMANDS_OPTIONAL_COUNT_REMAINING.format({count:u}):q.Z.Messages.COMMANDS_OPTION_COUNT.format({count:u});m["data-trailing-placeholder"]=O}return(0,r.jsx)("div",zd(Wd({className:rs().applicationCommand},o,m),{children:i}))
|
||
;case"applicationCommandOption":return(0,r.jsx)(Yd,{attributes:o,channelId:n,element:a,children:i});default:return null}}(J,e,l.id)}),[l.id,J]),pe=o.useCallback((function(e){return Qd(e)}),[]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Au.d9,{event:se.CkL.GLOBAL_CLIPBOARD_PASTE,handler:ae}),(0,r.jsx)("div",{ref:H,className:a()(u,Jd().slateContainer),children:(0,r.jsx)(Rs,{editor:J,channelId:l.id,guildId:l.guild_id,className:a()(Jd().slateTextArea,p),placeholder:d,readOnly:Y,spellCheck:P,autoFocus:!T,canFocus:!c,onChange:ue,onFocus:v,onBlur:m,onClick:le,onPaste:ie,onKeyDown:ne,onKeyUp:re,decorateExtra:fe,renderExtraElement:de,renderExtraLeaf:pe,"aria-owns":M,"aria-haspopup":L,"aria-expanded":R,"aria-activedescendant":D,"aria-controls":k,"aria-labelledby":F,"aria-describedby":B,"aria-invalid":U,"aria-autocomplete":G})})]})}));var ep=n(686390),tp=n.n(ep);function np(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rp(e){
|
||
if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function op(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ip(e){ip=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return ip(e)}function ap(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){op(e,t,n[t])}))}return e}function lp(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function up(e,t){return!t||"object"!==fp(t)&&"function"!=typeof t?rp(e):t}function cp(e,t){cp=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return cp(e,t)}function sp(e){return function(e){if(Array.isArray(e))return np(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return np(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return np(e,t)}(e)||function(){
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var fp=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function dp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=ip(e);if(t){var o=ip(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return up(this,n)}}new Yu.Z("ChannelEditor.tsx");var pp=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]},hp={12:tp().fontSize12Padding,14:tp().fontSize14Padding,15:tp().fontSize15Padding,16:tp().fontSize16Padding,18:tp().fontSize18Padding,20:tp().fontSize20Padding,24:tp().fontSize24Padding
|
||
},yp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&cp(e,t)}(n,e);var t=dp(n);function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r;(r=t.call(this,e)).ref=o.createRef();r._focusBlurQueue=Promise.resolve();r.handleSelectionChange=function(){if(r.props.focused){var e,t;r.props.onSelectionChanged(null===(e=document.getSelection)||void 0===e||null===(t=e.call(document))||void 0===t?void 0:t.toString())}};r.focus=function(){var e;null===(e=r._focusBlurQueue)||void 0===e||e.then((function(){r.setState({focused:!0},(function(){var e=r.ref.current;null!=e&&e.focus()}))}))};r.saveCurrentText=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=r.props,n=t.type,o=t.channel;if(n.drafts.autoSave){
|
||
e&&r.saveCurrentTextThrottled.cancel();r.handleSaveCurrentText(o.id)}};r.handleBeforeUnload=function(){return r.saveCurrentText()};r.saveCurrentTextThrottled=E().throttle(r.saveCurrentText.bind(rp(r),!1),500);r.handleEnter=function(e){var t,n;return null===(n=(t=r.props).onEnter)||void 0===n?void 0:n.call(t,e)};r.handleTab=function(){var e,t;return null===(t=(e=r.props).onTab)||void 0===t?void 0:t.call(e)};r.handleMoveSelection=function(e){var t,n;return null===(n=(t=r.props).onMoveSelection)||void 0===n?void 0:n.call(t,e)};r.maybeShowAutocomplete=function(){var e,t;return null===(t=(e=r.props).onMaybeShowAutocomplete)||void 0===t?void 0:t.call(e)};r.hideAutocomplete=function(){var e,t;return null===(t=(e=r.props).onHideAutocomplete)||void 0===t?void 0:t.call(e)};r.handleSaveCurrentText=function(e){y.Z.saveDraft(e,r.props.textValue,r.props.type.drafts.type)};r.handleClearText=function(){var e,t;null===(t=(e=r.props).onChange)||void 0===t||t.call(e,null,"",(0,On.JM)(""))}
|
||
;r.handleInsertText=function(e){var t=e.plainText,n=e.rawText,o=e.addSpace,i=void 0!==o&&o;r.appendText(t,n,i);r.focus()};r.handleFocus=function(e){var t=r.props.onFocus,n=r.state.focused;null==t||t(e);n||r.setState({focused:!0})};r.handleBlur=function(e){var t=r.props.onBlur,n=r.state.focused;null==t||t(e);n&&r.setState({focused:!1})};r.handlePaste=function(e){var t=r.props,n=t.channel,o=t.canPasteFiles,i=t.uploadPromptCharacterCount,a=t.promptToUpload,l=t.maxCharacterCount,u=t.type;if(null==a||!n.isPrivate()&&!o||n.isPrivate()&&n.isManaged())return!1;var c=null!=i?i:l,s=function(e,t){var n=[],r=[],o=null,i=null,a=!0,l=!1,u=void 0;try{for(var c,s=e.items[Symbol.iterator]();!(a=(c=s.next()).done);a=!0){var f=c.value;if("file"===f.kind){var d=f.getAsFile();if(null==d)continue;null!=d.path&&d.path.length>0?n.push(d):r.push(d)}else"string"===f.kind&&("text/plain"===f.type&&null==o?o=f:"text/html"===f.type&&null==i&&(i=f))}}catch(e){l=!0;u=e}finally{try{a||null==s.return||s.return()
|
||
}finally{if(l)throw u}}if(n.length>0)return{files:n};if(r.length>0){if(1===r.length&&"image/png"===r[0].type&&null!=i){var p,h=r[0],y=null!==(p=function(e){var t=(new DOMParser).parseFromString(e,"text/html").querySelector("img");if(null!=t){var n;try{var r=Vu.parse(t.src).pathname;null!=r&&r.length>0&&(n=Hu().basename(r).split(".")[0])}catch(e){}if(null!=n&&n.length>0)return"".concat(n,".png")}return}(e.getData(i.type)))&&void 0!==p?p:h.name;return{files:[(0,Ku.dp)(h,y,h.type)]}}return{files:r}}if(null!=o&&null!=t){var b=e.getData(o.type);if(b.length>t){var v=new Blob([b],{type:"text/plain"});return{files:[(0,Ku.dp)(v,"message.txt")],convertedStringToFile:!0}}}return{files:[]}}(e.clipboardData,u.uploadLongMessages?c:null).files;pp("onPaste",sp(e.clipboardData.items).map((function(e){if("file"===e.kind){var t=e.getAsFile();return{kind:e.kind,type:e.type,name:null==t?void 0:t.name,path:null==t?void 0:t.path}}return{kind:e.kind,type:e.type}})));if(0===s.length)return!1;e.preventDefault()
|
||
;e.stopPropagation();r.saveCurrentText();!function(e,t){var r,o=g.Z.getActiveCommand(n.id);if(null==o)return a(e,n,u.drafts.type,{requireConfirm:!0,showLargeMessageDialog:t});var i=null===(r=o.options)||void 0===r?void 0:r.find((function(e){return e.type===j.jw.ATTACHMENT&&null==Nu.Z.getUpload(n.id,e.name,u.drafts.type)}));null!=i&&Wu.Z.setFile({channelId:n.id,id:i.name,draftType:u.drafts.type,file:{id:i.name,platform:zu.ow.WEB,file:e[0]}})}(s);r.focus();return!0};r._unsubscribe=w.subscribe((function(e){requestAnimationFrame((function(){r.setState({popup:e})}))}));r.state={focused:!1,submitting:!1,popup:w.getState()};return r}var i=n.prototype;i.componentDidMount=function(){var e=this;this.props.focused&&requestAnimationFrame((function(){return e.focus()}));document.addEventListener("selectionchange",this.handleSelectionChange);window.addEventListener("beforeunload",this.handleBeforeUnload)};i.componentDidUpdate=function(e){this.fixFocus(e);if(this.props.useSlate!==e.useSlate){
|
||
var t,n,r;r=this.props.useSlate?this.props.textValue:(0,Ls.sk)(this.props.richValue,{mode:"plain"});null===(n=(t=this.props).onChange)||void 0===n||n.call(t,null,r,(0,On.JM)(r))}else this.props.textValue!==e.textValue&&this.saveCurrentTextThrottled()};i.componentWillUnmount=function(){var e;this.saveCurrentText();null===(e=this._unsubscribe)||void 0===e||e.call(this);window.removeEventListener("beforeunload",this.handleBeforeUnload);document.removeEventListener("selectionchange",this.handleSelectionChange);this._focusBlurQueue=null;this._unsubscribe=null};i.blur=function(){var e=this.ref.current;null!=e&&e.blur()};i.submit=function(e){var t;null===(t=this.ref.current)||void 0===t||t.submit(e)};i.insertEmoji=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.props.textValue,o=this.ref.current;if(null!=e&&null!=o){n&&!r.endsWith(" ")&&o.insertText(" ",void 0,!1);o.insertEmoji(e,t);t&&this.focus()}};i.insertGIF=function(e){
|
||
var t=this.props.textValue,n=this.ref.current;if(null!=e&&null!=n){t.endsWith(" ")||n.insertText(" ",void 0,!1);n.insertText(e.url)}};i.handleOuterClick=function(){this.focus()};i.clearValue=function(){var e=this.props,t=e.channel,n=e.type;this.setState({focused:!0,submitting:!1});y.Z.saveDraft(t.id,"",n.drafts.type)};i.getCurrentWord=function(){var e,t=this.ref.current;return null!==(e=null==t?void 0:t.getCurrentWord())&&void 0!==e?e:{word:null,isAtStart:!1}};i.insertAutocomplete=function(e,t,n){var r=this.ref.current;return null==r?void 0:r.insertAutocomplete(e,t,n)};i.getCurrentCommandOption=function(){var e,t,n=this.ref.current;return null!==(t=null==n||null===(e=n.getCurrentCommandOption)||void 0===e?void 0:e.call(n))&&void 0!==t?t:null};i.getCurrentCommandOptionValue=function(){var e,t,n=this.ref.current;return null!==(t=null==n||null===(e=n.getCurrentCommandOptionValue)||void 0===e?void 0:e.call(n))&&void 0!==t?t:[]};i.getCommandOptionValues=function(){var e,t,n=this.ref.current
|
||
;return null!==(t=null==n||null===(e=n.getCommandOptionValues)||void 0===e?void 0:e.call(n))&&void 0!==t?t:{}};i.getFirstText=function(){var e,t=this.ref.current;return null!==(e=null==t?void 0:t.getFirstText())&&void 0!==e?e:null};i.getSlateEditor=function(){var e,t,n=this.ref.current;return null!==(t=null==n||null===(e=n.getSlateEditor)||void 0===e?void 0:e.call(n))&&void 0!==t?t:null};i.fixFocus=function(e){e.focused&&!this.props.focused?this.blur():!e.focused&&this.props.focused&&this.focus()};i.appendText=function(e,t){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];null===(n=this.ref.current)||void 0===n||n.insertText(e,t,r)};i.getPlaceholder=function(){var e=this.props,t=e.disabled,n=e.placeholder,r=e.isPreviewing;return t&&!r?q.Z.Messages.NO_SEND_MESSAGES_PERMISSION_PLACEHOLDER:n};i.render=function(){
|
||
var e,t,n,o,i,l,u,c,s=this.props,f=s.textValue,d=s.richValue,p=s.disabled,h=s.onChange,y=s.onKeyDown,b=s.onResize,v=s.onSubmit,m=s.channel,g=s.type,O=s.fontSize,E=s.useSlate,C=s.spellcheckEnabled,j=s.useNewSlashCommands,S=s.canOnlyUseTextCommands,I=s.className,_=s.maxCharacterCount,w=s["aria-describedby"],x=s["aria-labelledby"],P=s.accessibilityLabel,N=this.state,A=N.submitting,T=N.popup,Z={channel:m,className:a()(I,tp().textArea,(u={},op(u,tp().textAreaSlate,E),op(u,tp().textAreaDisabled,p||A),u)),placeholder:this.getPlaceholder(),accessibilityLabel:P,disabled:p||!1,submitting:A,isEdit:g===cn.I.EDIT,onFocus:this.handleFocus,onBlur:this.handleBlur,onPaste:this.handlePaste,onTab:this.handleTab,onEnter:this.handleEnter,moveSelection:this.handleMoveSelection,maybeShowAutocomplete:this.maybeShowAutocomplete,hideAutocomplete:this.hideAutocomplete,onChange:h,onResize:b,onKeyDown:y,onSubmit:v,textAreaPaddingClassName:a()(hp[O],(c={},
|
||
op(c,tp().textAreaWithoutAttachmentButton,g!==cn.I.NORMAL&&g!==cn.I.OVERLAY&&g!==cn.I.THREAD_CREATION&&g!==cn.I.SIDEBAR),op(c,tp().textAreaForPostCreation,g===cn.I.CREATE_FORUM_POST),c)),spellcheckEnabled:C,useNewSlashCommands:j,disableAutoFocus:Ro.tq||null!==(n=g.disableAutoFocus)&&void 0!==n&&n,disableEnterToSubmit:null!==(o=null===(e=g.submit)||void 0===e?void 0:e.disableEnterToSubmit)&&void 0!==o&&o,"aria-controls":null!==(i=T.id)&&void 0!==i?i:void 0,"aria-haspopup":"listbox","aria-expanded":null!==T.id||void 0,"aria-activedescendant":null!==(l=T.activeDescendant)&&void 0!==l?l:void 0,"aria-invalid":f.length>_,"aria-describedby":w,"aria-labelledby":x,"aria-autocomplete":"list"},M=E?(0,r.jsx)($d,lp(ap({ref:this.ref},Z),{type:g,value:p?(0,On.JM)(""):d,canUseCommands:null===(t=g.commands)||void 0===t?void 0:t.enabled,canOnlyUseTextCommands:S})):(0,r.jsx)(dc,lp(ap({ref:this.ref},Z),{value:p?"":f}));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Au.d9,{event:se.CkL.INSERT_TEXT,
|
||
handler:this.handleInsertText}),(0,r.jsx)(Au.d9,{event:se.CkL.CLEAR_TEXT,handler:this.handleClearText}),M]})};return n}(o.Component);var bp=n(34225),vp=n(927219),mp=n.n(vp);function gp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Op(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gp(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ep(e){var t,n=e.channelId,i=e.chatInputType,a=Op(o.useState(null),2),l=a[0],u=a[1],c=(0,p.e7)([wu.Z],(function(){return wu.Z.getStickerPreview(n,i.drafts.type)}));return(null===(t=i.stickers)||void 0===t?void 0:t.allowSending)&&null!=c&&0!==c.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:mp().stickerPreviews,children:c.map((function(e){return(0,r.jsxs)("div",{className:mp().stickerPreviewContainer,children:[(0,r.jsx)(h.P3F,{onFocus:function(){return u(e.id)},onBlur:function(){return u(null)},className:mp().closeButton,"aria-label":q.Z.Messages.GUILD_STICKER_A11Y_REMOVE_STICKER.format({name:e.name}),onClick:function(){return(0,nr.qB)(n,i.drafts.type)},children:(0,r.jsx)("div",{className:mp().closeIconContainer,children:(0,r.jsx)(It.Z,{className:mp().closeIcon})})}),(0,r.jsx)(In.ZP,{
|
||
isInteracting:l===e.id,className:mp().stickerPreview,size:48,sticker:e})]},e.id)}))}),(0,r.jsx)(bp.Z,{className:mp().stickerPreviewDivider})]}):null}const Cp=o.memo(Ep);var jp=n(270491),Sp=n.n(jp);function Ip(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function _p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ip(i,r,o,a,l,"next",e)}function l(e){Ip(i,r,o,a,l,"throw",e)}a(void 0)}))}}function wp(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function xp(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n
|
||
}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var Pp=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2]
|
||
;a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Np(e){var t,i,l,u,c=e.className,s=e.activeCommand,f=e.activeOption,d=e.optionStates,p=o.useCallback((function(e){var t,o=null==s||null===(t=s.rootCommand)||void 0===t?void 0:t.id;null!=o?(0,qu.jW)(e,_p((function(){var e,t;return Pp(this,(function(i){switch(i.label){case 0:return[4,n.e(75619).then(n.bind(n,464502))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,xp(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){wp(e,t,n[t])}))}return e}({},e),{id:o}))}]}}))}))):e.preventDefault()
|
||
}),[null==s||null===(t=s.rootCommand)||void 0===t?void 0:t.id]);if(null==s)return null;if(null!=f){var h=d[f.name].lastValidationResult;i=f.displayName;l=f.displayDescription;u=(null==h?void 0:h.success)?null:null==h?void 0:h.error}else{i="".concat(K.GI).concat(s.displayName);l=s.displayDescription;u=null}return(0,r.jsxs)("div",{className:a()(c,Sp().bar),onContextMenu:p,children:[(0,r.jsx)("span",{className:Sp().name,children:i}),null!=u?(0,r.jsx)("span",{className:Sp().error,children:u}):(0,r.jsx)("span",{className:Sp().description,children:l})]})}var Ap=n(818308);const Tp={dismiss:function(){Et.Z.dispatch({type:"MJ_CHAT_BAR_DISMISSED"})}};var Zp=(0,Ht.B)({kind:"user",id:"2023-03_mj_chat_bar_user",label:"MJ Chat Bar user experiment",defaultConfig:{enabled:!1},treatments:[{id:1,label:"Enabled",config:{enabled:!0}}]}),Mp=(0,Ht.B)({kind:"guild",id:"2023-03_mj_chat_bar_guild",label:"MJ Chat Bar enabled guilds",defaultConfig:{enabled:!1},treatments:[{id:1,label:"Enabled",config:{enabled:!0
|
||
}}]});function Rp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lp(e){Lp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Lp(e)}function Dp(e,t){return!t||"object"!==Up(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kp(e,t){kp=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return kp(e,t)}var Up=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Bp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Lp(e);if(t){var o=Lp(this).constructor;n=Reflect.construct(r,arguments,o)
|
||
}else n=r.apply(this,arguments);return Dp(this,n)}}var Fp={dismissed:!1};var Gp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&kp(e,t)}(n,e);var t=Bp(n);function n(){Rp(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){null!=e&&(Fp=e)};r.dismissed=function(){return Fp.dismissed};r.getState=function(){return Fp};r.__getLocalVars=function(){return{persistedState:Fp,instance:Hp}};return n}(p.ZP.PersistedStore);Gp.displayName="MJStore";Gp.persistKey="MJStore";var Hp=new Gp(Et.Z,{MJ_CHAT_BAR_DISMISSED:function(){Fp.dismissed=!0}});const Vp=Hp;var Wp=n(974802),zp=n.n(Wp),Yp="938956540159881230",Kp=function(e){var t=e.channel,n=Zp.useExperiment({},{autoTrackExposure:!0}).enabled,i=(0,p.Wu)([Bs.Z],(function(){return Bs.Z.getCommands([Yp],t.id)}));o.useEffect((function(){
|
||
n&&0===i.length&&$e.Bz(t.guild_id,t.id,[Yp])}),[t.guild_id,t.id,i.length,n]);o.useEffect((function(){n&&i.length>0&&ce.default.track(se.rMx.MJ_CHAT_BAR_VIEWED,{channel_id:t.id,guild_id:t.guild_id})}),[n,i.length,t.id,t.guild_id]);if(!n||0===i.length)return null;var a=function(){(0,Ap.tA)(t.id,"imagine",Yp,Z.Vh.MJ_CHAT_BAR);Tp.dismiss();ce.default.track(se.rMx.MJ_CHAT_BAR_CTA_CLICKED,{channel_id:t.id,guild_id:t.guild_id,cta_type:"command"})};return(0,r.jsxs)("div",{className:zp().bar,children:[(0,r.jsx)("div",{children:q.Z.Messages.MJ_CHATBAR_BODY.format({commandHook:function(){return(0,r.jsx)(h.eee,{onClick:a,children:"/imagine"})}})}),(0,r.jsx)(h.P3F,{className:zp().closeButton,onClick:Tp.dismiss,children:(0,r.jsx)(It.Z,{className:zp().closeIcon})})]})},qp=n(418705),Qp=n(896490),Xp=n(348592),Jp=n(602187),$p=n.n(Jp),eh=n(978193),th=n.n(eh),nh=function(){return(0,r.jsxs)("div",{className:$p().bar,children:[(0,r.jsx)("img",{src:th(),className:$p().clydeIcon,alt:""}),(0,r.jsx)("div",{
|
||
children:q.Z.Messages.CLYDE_CHAT_BAR_UPSELL.format()}),(0,r.jsx)("div",{className:$p().learnMore,children:q.Z.Messages.LEARN_MORE_LINK.format({helpdeskArticle:Xp.Z.getArticleURL(se.BhN.CLYDE_AI)})}),(0,r.jsx)("div",{className:$p().divider}),(0,r.jsx)(h.P3F,{className:$p().closeButton,onClick:function(){(0,Qp.EW)(qp.z$.CLYDE_CHAT_BAR_NUX)},children:(0,r.jsx)(It.Z,{className:$p().closeIcon})})]})},rh=n(550131),oh=n(28862),ih=n(784426),ah=n(367406),lh=n(598123),uh=n(749131),ch=n(816884),sh=n.n(ch);function fh(e){var t=e.channel,n=e.message,i=e.replyChainLength;o.useEffect((function(){(0,S.yw)(se.rMx.THREAD_NUDGE_SHOWN,{type:"Reply Chain (".concat(3,")"),reply_chain_length:i+1,channel_id:t.id,guild_id:t.guild_id})}),[t]);return(0,r.jsxs)(h.P3F,{onClick:function(){(0,oh.A6)(t.id);(0,ah.R6)(t,n,"Reply Chain Nudge")},className:sh().threadSuggestionBar,focusProps:{offset:{right:-4,left:-4}},children:[(0,r.jsx)(h.xvT,{color:"header-secondary",className:sh().text,variant:"text-sm/normal",
|
||
children:q.Z.Messages.THREAD_REPLY_SUGGESTION.format({count:Math.min(10,i+1)})}),(0,r.jsx)(h.xvT,{color:"text-link",className:sh().createThreadButton,variant:"text-sm/semibold",children:q.Z.Messages.CREATE_THREAD})]})}function dh(e){var t=e.reply,n=e.chatInputType,o=function(e){e.stopPropagation();(0,oh.qx)(i.id,!u)},i=t.channel,l=t.message,u=t.shouldMention,c=t.showMentionToggle,s=(0,rh.ZP)(l),f=s.nick,d=s.colorString,y=s.colorRoleName,b=function(e,t){var n=e.id,r=t.id;return(0,p.e7)([lh.Z],(function(){for(var e=r,t=0;t<10;t++){var o=lh.Z.getMessage(n,e);if((null==o?void 0:o.type)!==se.uaV.REPLY||null==o.messageReference)return t;e=o.messageReference.message_id}return 10}),[n,r])}(i,l),v=(0,xu.NE)(i,l),m=n.showThreadPromptOnReply&&b>=2&&v;return(0,r.jsx)("div",{className:sh().clipContainer,children:(0,r.jsxs)("div",{className:sh().container,children:[(0,r.jsxs)("div",{className:sh().replyBar,children:[(0,r.jsx)(h.P3F,{onClick:function(){return(0,
|
||
ih.uL)(se.Z5c.CHANNEL(i.getGuildId(),i.id,l.id))},focusProps:{offset:{top:-8,right:-4,bottom:-8,left:-4}},children:(0,r.jsx)(h.xvT,{color:"header-secondary",className:a()(sh().text,sh().replyLabel),variant:"text-sm/normal",children:q.Z.Messages.REPLYING_TO.format({userHook:function(e,t){return(0,r.jsx)(h.PUh,{className:sh().name,name:f,color:d,roleName:y},t)}})})}),(0,r.jsxs)("div",{className:sh().actions,children:[c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.ua7,{text:u?q.Z.Messages.REPLY_MENTION_ON_TOOLTIP:q.Z.Messages.REPLY_MENTION_OFF_TOOLTIP,children:function(e){var t=e.onMouseEnter,n=e.onMouseLeave,i=e.onFocus,a=e.onBlur;return(0,r.jsx)(h.P3F,{role:"switch","aria-checked":u,onClick:o,onMouseEnter:t,onMouseLeave:n,onFocus:i,onBlur:a,children:(0,r.jsxs)(h.xvT,{variant:"text-sm/bold",color:u?"text-link":"text-muted",className:sh().mentionButton,children:[(0,r.jsx)(uh.Z,{"aria-label":q.Z.Messages.MENTION,className:sh().mentionIcon
|
||
}),u?q.Z.Messages.REPLY_MENTION_ON:q.Z.Messages.REPLY_MENTION_OFF]})})}}),(0,r.jsx)("div",{className:sh().separator,"aria-hidden":!0})]}),(0,r.jsx)(h.P3F,{className:sh().closeButton,onClick:function(e){e.stopPropagation();(0,oh.A6)(i.id)},children:(0,r.jsx)(It.Z,{className:sh().closeIcon})})]})]}),m&&(0,r.jsx)(fh,{channel:i,message:l,replyChainLength:b})]})})}function ph(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var hh=function(e){var t=e.channel,n=e.type,o=e.activeCommand,i=e.pendingReply,l=(0,p.cj)([g.Z],(function(){return{activeCommandOption:g.Z.getActiveOption(t.id),activeCommandOptionStates:g.Z.getOptionStates(t.id)}})),u=l.activeCommandOption,c=l.activeCommandOptionStates,s=Ut(t),f=function(e){var t=e.getGuildId(),n=(0,p.e7)([ve.Z],(function(){return ve.Z.getGuild(t)})),r=(0,sn.Ib)(n),o=(0,Qp.wE)(qp.z$.CLYDE_CHAT_BAR_NUX);return r&&!o}(t),d=function(e){var t=(0,p.e7)([Vp],(function(){return!Vp.dismissed()}))
|
||
;return Mp.useExperiment({guildId:e.guild_id}).enabled&&t}(t),h=[];null!=o&&h.push((0,r.jsx)(Np,{activeCommand:o,activeOption:null!=u?u:null,optionStates:c}));null!=i&&h.push((0,r.jsx)(dh,{reply:i,chatInputType:n}));s&&h.push((0,r.jsx)(Bt,{}));f&&n===cn.I.NORMAL&&h.push((0,r.jsx)(nh,{}));!f&&d&&n===cn.I.NORMAL&&h.push((0,r.jsx)(Kp,{channel:t}));return 0===(h=h.map((function(e,t){var n=t===h.length-1;return(0,r.jsx)("div",{className:a()(ph({},tp().stackedAttachedBar,!n)),children:e},t)}))).length?null:(0,r.jsx)("div",{className:tp().attachedBars,children:h})};const yh=o.memo(hh);var bh=n(387099),vh=n(672798),mh=n(621270),gh=n(456741),Oh=n(398344),Eh=n(305082),Ch=n(645573),jh=n(964262),Sh=n(470643),Ih=n(399298),_h=n.n(Ih);function wh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return wh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wh(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ph(e,t){var n=e.disabled,i=e.type,l=xh((0,zo.Iu)((function(e){return[e.activeView,e.activeViewType,e.pickerId]}),f.Z),3),u=l[0],c=l[1],s=l[2],d=i===cn.I.NORMAL,p=(0,
|
||
Qp.wE)(qp.z$.PREMIUM_TUTORIAL_EMOJI_PICKER_COMPOSER_TOOLTIP),h=(0,Eh.AR)()&&d&&!p;o.useEffect((function(){u===ui.X1.EMOJI&&c===cn.I.NORMAL&&(0,jh.$u)(qp.z$.PREMIUM_TUTORIAL_EMOJI_PICKER_COMPOSER_TOOLTIP)}),[u,c]);var y=o.useCallback((function(){(0,zo.RO)(ui.X1.EMOJI,i)}),[i]);if(n)return null;var b=h?function(){return(0,r.jsx)(Ch.Z,{tutorialType:Oh.K.EMOJI_PICKER,text:q.Z.Messages.PREMIUM_TRIAL_TUTORIAL_EMOJI_TOOLTIP.format(),unformattedText:q.Z.Messages.PREMIUM_TRIAL_TUTORIAL_EMOJI_TOOLTIP_UNFORMATTED,children:(0,r.jsx)("img",{alt:"",src:_h(),className:tp().premiumTutorialEmojiImage})})}:null;return(0,r.jsx)("div",{className:a()(ui.CT,tp().buttonContainer),ref:t,children:(0,r.jsx)(Sh.Z,{className:tp().emojiButton,onClick:y,active:u===ui.X1.EMOJI&&c===i,"aria-controls":s,tabIndex:0,focusProps:{offset:{top:4,bottom:4,left:-4,right:-4}},renderButtonContents:b})})}const Nh=o.memo(o.forwardRef(Ph))
|
||
;var Ah,Th=n(58495),Zh=n(473419),Mh=n(248088),Rh=n(298182),Lh=n(509644),Dh=n(566786),kh=n.n(Dh);function Uh(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Bh(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}!function(e){e[e.UPDATE=0]="UPDATE";e[e.NEW=1]="NEW"}(Ah||(Ah={}));var Fh={config:{friction:26,tension:700,mass:1},initial:{scale:1,opacity:1},from:{scale:.6,opacity:0},enter:{scale:1,opacity:1},leave:{scale:.6,opacity:0}};function Gh(e){
|
||
var t=e.className,n=e.disabled,o=void 0!==n&&n,i=e.innerClassName,l=e.childClassName,u=e.iconClassName,c=e.icon,s=e.children,f=e.onClick,d=e.isActive,p=e.onMouseEnter,y=e.onMouseLeave,b=e.onFocus,v=e.onBlur,m=e.pulse,g=e.sparkle,O=e.notification,E=e["aria-label"],C=e["aria-expanded"],j=e["aria-haspopup"],S=e["aria-controls"],I=(0,Mh.useTransition)(null!=s,Bh(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Uh(e,t,n[t])}))}return e}({},Fh),{keys:function(e){return e?"children":"icon"}})),_=function(e){var t=e.component;return null!=O?(0,r.jsxs)("div",{className:kh().buttonContent,children:[(0,r.jsx)(ue.ZP,{className:kh().iconMask,mask:ue.QS.CHAT_INPUT_BUTTON_NOTIFICATION,width:24,height:24,children:t}),(0,r.jsx)("span",{
|
||
className:kh().notificationDot})]}):t};return(0,r.jsxs)(h.zxk,{look:h.zxk.Looks.BLANK,size:h.zxk.Sizes.NONE,"aria-label":E,"aria-expanded":C,"aria-haspopup":j,"aria-controls":S,disabled:o,className:a()(t,Uh({},kh().active,d)),innerClassName:a()(kh().button,i,Uh({},kh().pulseButton,m)),onClick:f,onMouseEnter:p,onMouseLeave:y,onFocus:b,onBlur:v,focusProps:{offset:{top:4,bottom:4}},children:[I((function(e,t,n){var o=n.key;return t?(0,r.jsx)(Mh.animated.div,{style:e,className:a()(kh().buttonWrapper,l),children:_({component:s})},o):null!=c?(0,r.jsx)(Mh.animated.div,{style:e,className:a()(kh().buttonWrapper,l),children:_({component:(0,r.jsx)(c,{className:a()(kh().icon,u,Uh({},kh().pulseIcon,m))})})},o):void 0})),g&&(0,r.jsxs)("div",{className:kh().sparkleContainer,children:[(0,r.jsx)(Lh.Z,{className:kh().sparkleStar}),(0,r.jsx)(Rh.Z,{className:kh().sparklePlus})]})]})}const Hh=o.memo(Gh);var Vh=n(312690);function Wh(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zh(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Yh(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Kh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{
|
||
if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Wh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wh(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qh(e,t){var n,i=e.disabled,l=e.type,u=Kh(o.useState(!1),2),c=u[0],s=u[1],d=(0,p.e7)([Zh.Z],(function(){var e;return c&&(null!==(n=null===(e=Zh.Z.frecencyWithoutFetchingLatest.favoriteGifs)||void 0===e?void 0:e.gifs)&&void 0!==n?n:[]).length<=2})),y=Kh((0,zo.Iu)((function(e){return[e.activeView,e.activeViewType,e.pickerId]}),f.Z),3),b=y[0],v=y[1],m=y[2],g=o.useRef(0),O=o.useCallback((function(){s(!0);clearTimeout(g.current);g.current=setTimeout((function(){s(!1)}),1500)
|
||
}),[]);o.useEffect((function(){return function(){clearTimeout(g.current)}}));(0,Au.yp)({event:se.CkL.FAVORITE_GIF,handler:O});var E=o.useCallback((function(){(0,zo.RO)(ui.X1.GIF,l)}),[l]);if(i)return null;var C=b===ui.X1.GIF&&v===l;return(0,r.jsx)(h.ua7,{text:d?q.Z.Messages.GIF_TOOLTIP_FAVORITED_PICKER_BUTTON:null,forceOpen:!0,children:function(e){return(0,r.jsx)("div",Yh(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){zh(e,t,n[t])}))}return e}({ref:t,className:a()(ui.CT,tp().buttonContainer)},e),{children:(0,r.jsx)(Hh,{innerClassName:tp().button,icon:Vh.Z,onClick:E,isActive:C,pulse:c,"aria-label":q.Z.Messages.GIF_BUTTON_LABEL,"aria-expanded":C,"aria-haspopup":"dialog","aria-controls":m})}))}})}const Qh=o.memo(o.forwardRef(qh))
|
||
;var Xh=n(604160),Jh=n(799043);function $h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ey(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ty(e){var t=e.disabled,n=e.channel,o=(0,m.Z)(v.Z.GIFT_BUTTON).analyticsLocations;if(t)return null;var i=function(){return(0,Xh.Z)({isGift:!0,initialPlanId:null,subscriptionTier:fe.Si.TIER_2,analyticsLocations:o,analyticsObject:{page:n.isPrivate()?se.ZY5.DM_CHANNEL:se.ZY5.GUILD_CHANNEL,section:se.jXE.CHANNEL_TEXT_AREA,object:se.qAy.BUTTON_ICON,objectType:se.Qqv.GIFT}})};return(0,
|
||
r.jsx)(h.ua7,{text:q.Z.Messages.PREMIUM_GIFT_BUTTON_TOOLTIP,children:function(e){return(0,r.jsx)(Hh,ey(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){$h(e,t,n[t])}))}return e}({},e),{innerClassName:tp().button,isActive:!1,"aria-label":q.Z.Messages.PREMIUM_GIFT_BUTTON_LABEL,"aria-haspopup":"dialog",onClick:i,children:(0,r.jsx)(Jh.Z,{})}))}})}const ny=o.memo(ty);var ry=n(22212),oy=n(249159),iy=n(541502),ay=n(735885),ly=n(176087),uy=n(501883),cy=n.n(uy),sy=n(72801),fy=n.n(sy),dy=n(956634),py=n.n(dy);function hy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yy(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function by(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function vy(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function my(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return hy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var gy,Oy,Ey=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break
|
||
;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Cy=(Oy=(gy=function(e,t,n,r){return Ey(this,(function(o){switch(o.label){case 0:r(!0);return[4,(0,ly.Eo)(e,t).then((function(){n();(0,ay.Ou)()})).finally((function(){r(!1)}))];case 1:o.sent();return[2]}}))},function(){var e=this,t=arguments;return new Promise((function(n,r){var o=gy.apply(e,t);function i(e){yy(o,n,r,i,a,"next",e)}function a(e){yy(o,n,r,i,a,"throw",e)}i(void 0)}))}),function(e,t,n,r){return Oy.apply(this,arguments)}),jy=function(e){
|
||
var t=e.onClose,n=e.referralsRemaining,i=e.channel,a=e.recipient,l=my(o.useState(!1),2),u=l[0],c=l[1],s=n-1;return(0,r.jsxs)("div",{className:cy().confirmationContainer,children:[(0,r.jsxs)("div",{className:cy().confirmationBody,children:[(0,r.jsx)(h.olH,{onClick:t,className:cy().closeButton}),(0,r.jsx)("img",{alt:"",src:fy(),className:cy().confirmationImage}),(0,r.jsx)(h.X6q,{variant:"heading-xl/bold",color:"interactive-active",className:cy().confirmationHeading,children:q.Z.Messages.SAHRE_NITRO_MODAL_CONFIRMATION_HEADER}),(0,r.jsx)(h.xvT,{className:cy().confirmationBodyCopy,variant:"text-md/medium",color:"header-primary",children:s>0?q.Z.Messages.SHARE_NITRO_MODAL_CONFIRMATION_GENERAL.format({count:s}):q.Z.Messages.SHARE_NITRO_MODAL_CONFIRMATION_GENERAL_LAST_REFERRAL}),(0,r.jsx)("hr",{className:cy().confirmationBodySeparator})]}),(0,r.jsxs)("div",{className:cy().confirmationButtonContainer,children:[(0,r.jsx)(h.zxk,{className:cy().confirmationShareButton,submitting:u,
|
||
onClick:function(){return Cy(a,i.id,t,c)},children:q.Z.Messages.SHAER_NITRO_CONFIRMATION_BUTTON_TEXT}),(0,r.jsx)("div",{className:cy().confirmationCancelButtonContainer,children:(0,r.jsx)(h.P3F,{onClick:t,children:(0,r.jsx)(h.xvT,{variant:"text-sm/medium",className:cy().confirmationCancelCopy,children:q.Z.Messages.CANCEL})})})]})]})};function Sy(e){var t=e.referralsRemaining,n=e.channel,i=e.onClose,a=e.isResending,l=my(o.useState(!1),2),u=l[0],c=l[1],s=my(o.useState(!1),2),f=s[0],d=s[1],p=n.isDM()&&void 0!==n.recipients?n.recipients[0]:null;return null==p?null:u?(0,r.jsx)(jy,{onClose:i,referralsRemaining:t,channel:n,recipient:p}):(0,r.jsxs)("div",{className:cy().generalContainer,children:[(0,r.jsxs)("div",{className:cy().generalBodyContainer,children:[(0,r.jsx)(h.olH,{onClick:i,className:cy().closeButton}),(0,r.jsx)("img",{alt:"",src:py(),className:cy().generalBodyImage}),(0,r.jsx)(h.X6q,{className:cy().generalHeading,variant:"heading-xl/bold",
|
||
children:a?q.Z.Messages.SHARE_NITRO_RESEND_TRIAL_HEADER:q.Z.Messages.SHARE_NITRO_MODAL_HEADER}),(0,r.jsx)(h.xvT,{className:cy().generalBodyCopy,variant:"text-md/bold",children:a?q.Z.Messages.SHARE_NITRO_RESEND_TRIAL_BODY:q.Z.Messages.SHARE_NITRO_MODAL_BODY_GENERAL.format({count:t})})]}),(0,r.jsx)("div",{className:cy().generalButtonContainer,children:(0,r.jsx)(h.zxk,{className:cy().generalShareButton,submitting:f,onClick:function(){a?Cy(p,n.id,i,d):c(!0)},children:a?q.Z.Messages.SHARE_NITRO_RESEND_BUTTON_TEXT:q.Z.Messages.SHARE_NITRO_BUTTON_TEXT})})]})}function Iy(e){var t=e.shouldShowPopout,n=e.referralsRemaining,o=e.channel,i=e.onClose,a=e.isResending;return t?(0,r.jsx)("div",{onMouseDown:function(e){return e.stopPropagation()},children:(0,r.jsx)(iy.y,{shouldShow:!0,position:"top",align:"center",renderPopout:function(e){return(0,r.jsx)(Sy,vy(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){by(e,t,n[t])}))}return e}({},e),{referralsRemaining:n,channel:o,onClose:i,isResending:a}))},onRequestClose:function(){},closeOnScroll:!1,ignoreModalClicks:!0,children:function(){return(0,r.jsx)("div",{className:cy().popoutTarget})}})}):null}var _y=n(336194),wy=n(633878);function xy(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Py(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ny(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var Ay=function(e){var t=e.referralsRemaining,n=e.fillColor;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M27.1899 15.6966C26.7297 16.7497 26.0852 17.7137 25.2855 18.5425C24.38 19.4811 23.2941 20.2272 22.0931 20.7358C19.704 21.7967 16.9967 21.8902 14.54 20.9969C12.0833 20.1036 10.0685 18.2928 8.91879 15.9452C8.46102 14.9636 8.16829 13.9132 8.05239 12.8363H6.06478C5.8034 12.8364 5.55253 12.7334 5.36652 12.5498C5.1805 12.3661 5.07432 12.1166 5.07097 11.8553C5.07263 11.7264 5.09966 11.5992 5.1505 11.4808C5.20135 11.3624 5.27502 11.2552 5.3673 11.1653C5.45959 11.0753 5.56868 11.0045 5.68836 10.9567C5.80803 10.909 5.93594 10.8853 6.06478 10.8869H8.91879C9.04763 10.8869 9.1752 10.8616 9.29423 10.8123C9.41326 10.763 9.52141 10.6907 9.61251 10.5996C9.70361 10.5085 9.77588 10.4003 9.82518 10.2813C9.87448 10.1623 9.89986 10.0347 9.89986 9.90587C9.89986 9.77704 9.87448 9.64946 9.82518 9.53043C9.77588 9.4114 9.70361 9.30325 9.61251 9.21215C9.52141 9.12105 9.41326 9.04879 9.29423 8.99948C9.1752 8.95018 9.04763 8.9248 8.91879 8.9248H4.34473C4.21589 8.92649 4.08798 8.90278 3.9683 8.85502C3.84863 8.80727 3.73954 8.73641 3.64725 8.64649C3.55496 8.55657 3.4813 8.44935 3.43045 8.33096C3.37961 8.21257 3.35258 8.08532 3.35092 7.95648C3.35427 7.69512 3.46045 7.4456 3.64646 7.26197C3.83248 7.07834 4.08334 6.97539 4.34473 6.97541H10.779C10.9164 6.99114 11.0555 6.97766 11.1873 6.93586C11.3191 6.89405 11.4405 6.82487 11.5437 6.73283C11.6469 6.6408 11.7294 6.528 11.7859 6.40183C11.8425 6.27566 11.8717 6.13897 11.8717 6.00071C11.8717 5.86246 11.8425 5.72577 11.7859 5.5996C11.7294 5.47342 11.6469 5.36063 11.5437 5.26859C11.4405 5.17656 11.3191 5.10738 11.1873 5.06557C11.0555 5.02377 10.9164 5.01029 10.779 5.02602H8.19255C7.98262 5.04532 7.77097 5.02064 7.57112 4.95354C7.37127 4.88644 7.1876 4.7784 7.03186 4.63632C6.87611 4.49424 6.75171 4.32124 6.66659 4.12838C6.58147 3.93551 6.53751 3.72701 6.53751 3.51619C6.53751 3.30538 6.58147 3.09688 6.66659 2.90401C6.75171 2.71115 6.87611 2.53815 7.03186 2.39607C7.1876 2.25399 7.37127 2.14595 7.57112 2.07885C7.77097 2.01175 7.98262 1.98707 8.19255 2.00637H18.3855C18.7845 2.02155 19.181 2.06039 19.573 2.12223C18.4001 3.20574 17.5522 4.63592 17.192 6.25005C16.658 6.32722 16.133 6.48003 15.6334 6.70785C14.9556 7.00255 14.3439 7.43011 13.8342 7.96527C13.3245 8.50042 12.9273 9.13232 12.666 9.82361C12.4047 10.5149 12.2846 11.2515 12.3128 11.99C12.341 12.7285 12.517 13.4539 12.8303 14.1232C13.4795 15.479 14.6341 16.5265 16.0465 17.041C17.4589 17.5554 19.0167 17.496 20.3858 16.8753C21.0624 16.5792 21.673 16.1508 22.1817 15.6154C22.2111 15.5845 22.2401 15.5532 22.2687 15.5216C23.121 15.8312 24.0408 16 25 16C25.7593 16 26.4939 15.8942 27.1899 15.6966ZM20.4791 14.601L20.1568 15.1419C20.1268 15.1966 20.0825 15.242 20.0286 15.2734C19.9748 15.3049 19.9134 15.3211 19.851 15.3203H16.1943C16.132 15.3211 16.0706 15.3049 16.0167 15.2734C15.9629 15.242 15.9185 15.1966 15.8885 15.1419L14.0156 12.0203C13.9844 11.9638 13.968 11.9002 13.968 11.8356C13.968 11.771 13.9844 11.7074 14.0156 11.6508L15.8885 8.59296C15.9211 8.54156 15.9664 8.49936 16.0199 8.47036C16.0734 8.44137 16.1335 8.42656 16.1943 8.42733H17.0112C17.1461 10.991 18.488 13.2347 20.4791 14.601ZM1.54168 8.9248C1.80309 8.92824 2.05533 8.82853 2.24374 8.64728C2.43215 8.46602 2.54155 8.21783 2.54823 7.95648C2.54165 7.69616 2.43445 7.44851 2.24913 7.26557C2.06381 7.08263 1.8148 6.97862 1.55442 6.97541H0.993808C0.733423 6.97862 0.484416 7.08263 0.299097 7.26557C0.113779 7.44851 0.00657271 7.69616 0 7.95648C0.0066466 8.21561 0.114278 8.46189 0.299938 8.64279C0.485597 8.82369 0.73459 8.92489 0.993808 8.9248H1.54168Z",
|
||
fill:n}),(0,r.jsx)("path",{d:"M31 8C31 11.3137 28.3137 14 25 14C21.6863 14 19 11.3137 19 8C19 4.68629 21.6863 2 25 2C28.3137 2 31 4.68629 31 8Z",fill:n,mask:"url(#mask)"}),(0,r.jsxs)("mask",{id:"mask",children:[(0,r.jsx)("path",{d:"M31 8C31 11.3137 28.3137 14 25 14C21.6863 14 19 11.3137 19 8C19 4.68629 21.6863 2 25 2C28.3137 2 31 4.68629 31 8Z",fill:"white"}),(0,r.jsx)("text",{fill:"black",fontFamily:"gg sans",fontSize:"12",fontWeight:"600",letterSpacing:"0em",children:(0,r.jsx)("tspan",{x:"21.6367",y:"12.212",children:t})})]})]})},Ty=function(e){var t=e.fillColor;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",
|
||
d:"M3.24374 8.64728C3.05533 8.82853 2.80309 8.92824 2.54168 8.9248H1.99381C1.73459 8.92489 1.4856 8.82369 1.29994 8.64279C1.11428 8.46189 1.00665 8.21561 1 7.95648C1.00657 7.69616 1.11378 7.44851 1.2991 7.26557C1.48442 7.08263 1.73342 6.97862 1.99381 6.97541H2.55442C2.8148 6.97862 3.06381 7.08263 3.24913 7.26557C3.43445 7.44851 3.54165 7.69616 3.54823 7.95648C3.54155 8.21783 3.43215 8.46602 3.24374 8.64728ZM26.2855 18.5425C25.38 19.4811 24.2941 20.2272 23.0931 20.7358C20.704 21.7967 17.9967 21.8902 15.54 20.9969C13.0833 20.1036 11.0685 18.2928 9.91879 15.9452C9.46102 14.9636 9.16829 13.9132 9.05239 12.8363H7.06478C6.8034 12.8364 6.55253 12.7334 6.36652 12.5498C6.1805 12.3661 6.07432 12.1166 6.07097 11.8553C6.07263 11.7264 6.09966 11.5992 6.1505 11.4808C6.20135 11.3624 6.27502 11.2552 6.3673 11.1653C6.45959 11.0753 6.56868 11.0045 6.68836 10.9567C6.80803 10.909 6.93594 10.8853 7.06478 10.8869H9.91879C10.0476 10.8869 10.1752 10.8616 10.2942 10.8123C10.4133 10.763 10.5214 10.6907 10.6125 10.5996C10.7036 10.5085 10.7759 10.4003 10.8252 10.2813C10.8745 10.1623 10.8999 10.0347 10.8999 9.90587C10.8999 9.77704 10.8745 9.64946 10.8252 9.53043C10.7759 9.4114 10.7036 9.30325 10.6125 9.21215C10.5214 9.12105 10.4133 9.04879 10.2942 8.99948C10.1752 8.95018 10.0476 8.9248 9.91879 8.9248H5.34473C5.21589 8.92649 5.08798 8.90278 4.9683 8.85502C4.84863 8.80727 4.73954 8.73641 4.64725 8.64649C4.55496 8.55657 4.4813 8.44935 4.43045 8.33096C4.37961 8.21257 4.35258 8.08532 4.35092 7.95648C4.35427 7.69512 4.46045 7.4456 4.64646 7.26197C4.83248 7.07834 5.08334 6.97539 5.34473 6.97541H11.779C11.9164 6.99114 12.0555 6.97766 12.1873 6.93586C12.3191 6.89405 12.4405 6.82487 12.5437 6.73283C12.6469 6.6408 12.7294 6.528 12.7859 6.40183C12.8425 6.27566 12.8717 6.13897 12.8717 6.00071C12.8717 5.86246 12.8425 5.72577 12.7859 5.5996C12.7294 5.47342 12.6469 5.36063 12.5437 5.26859C12.4405 5.17656 12.3191 5.10738 12.1873 5.06557C12.0555 5.02377 11.9164 5.01029 11.779 5.02602H9.19255C8.98262 5.04532 8.77097 5.02064 8.57112 4.95354C8.37127 4.88644 8.1876 4.7784 8.03186 4.63632C7.87611 4.49424 7.75171 4.32124 7.66659 4.12838C7.58147 3.93551 7.53751 3.72701 7.53751 3.51619C7.53751 3.30538 7.58147 3.09688 7.66659 2.90401C7.75171 2.71115 7.87611 2.53815 8.03186 2.39607C8.1876 2.25399 8.37127 2.14595 8.57112 2.07885C8.77097 2.01175 8.98262 1.98707 9.19255 2.00637H19.3855C21.2132 2.07591 22.9875 2.64152 24.5182 3.64258C26.049 4.64363 27.2785 6.04239 28.0749 7.68891C28.6312 8.86858 28.9435 10.1485 28.993 11.4518C29.0425 12.7551 28.8282 14.055 28.363 15.2735C27.8977 16.4919 27.1911 17.6039 26.2855 18.5425ZM13.3128 11.99C13.341 12.7285 13.517 13.4539 13.8303 14.1232C14.4795 15.479 15.6341 16.5265 17.0465 17.041C18.4589 17.5554 20.0167 17.496 21.3858 16.8753C22.0624 16.5792 22.673 16.1508 23.1817 15.6154C23.6904 15.08 24.0869 14.4484 24.3481 13.7576C24.6092 13.0667 24.7296 12.3307 24.7023 11.5927C24.6749 10.8547 24.5004 10.1295 24.1889 9.45993C23.5422 8.1018 22.3878 7.05217 20.9744 6.53736C19.5611 6.02254 18.002 6.08377 16.6334 6.70785C15.9556 7.00255 15.3439 7.43011 14.8342 7.96527C14.3245 8.50042 13.9273 9.13232 13.666 9.82361C13.4047 10.5149 13.2846 11.2515 13.3128 11.99ZM17.1943 8.42733H20.851C20.9185 8.43261 20.9831 8.45698 21.0372 8.49759C21.0914 8.5382 21.1328 8.59337 21.1568 8.65667L22.9788 11.7145C23.01 11.7711 23.0264 11.8347 23.0264 11.8993C23.0264 11.9639 23.01 12.0275 22.9788 12.084L21.1568 15.1419C21.1268 15.1966 21.0825 15.242 21.0286 15.2734C20.9748 15.3049 20.9134 15.3211 20.851 15.3203H17.1943C17.132 15.3211 17.0706 15.3049 17.0167 15.2734C16.9629 15.242 16.9185 15.1966 16.8885 15.1419L15.0156 12.0203C14.9844 11.9638 14.968 11.9002 14.968 11.8356C14.968 11.771 14.9844 11.7074 15.0156 11.6508L16.8885 8.59296C16.9211 8.54156 16.9664 8.49936 17.0199 8.47036C17.0734 8.44137 17.1335 8.42656 17.1943 8.42733Z",
|
||
fill:t})})};function Zy(e){var t=e.width,n=void 0===t?31:t,o=e.height,i=void 0===o?22:o,a=e.color,l=void 0===a?"currentColor":a,u=e.referralsRemaining,c=e.isResending,s=e.hovered,f=Ny(e,["width","height","color","referralsRemaining","isResending","hovered"]),d=s?"url(#nitro_hover)":l;return(0,r.jsxs)("svg",Py(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){xy(e,t,n[t])}))}return e}({width:n,height:i},(0,wy.Z)(f)),{xmlns:"http://www.w3.org/2000/svg",children:[c?(0,r.jsx)(Ty,{fillColor:d}):(0,r.jsx)(Ay,{referralsRemaining:u,fillColor:d}),(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:"nitro_hover",x1:"0",y1:"11.8026",x2:"27.1899",y2:"11.8026",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{
|
||
stopColor:_y.Z.unsafe_rawColors.PREMIUM_TIER_2_PURPLE.css}),(0,r.jsx)("stop",{offset:"1",stopColor:_y.Z.unsafe_rawColors.PREMIUM_TIER_2_PINK.css})]})})]}))}function My(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ry(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ly(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ry(e,t,n[t])}))}return e}function Dy(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ky(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return My(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return My(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uy(e){var t=e.disabled,n=e.referralsRemaining,i=e.channel,a=e.isResending,l=a?q.Z.Messages.SHARE_NITRO_RESEND_TOOLTIP:q.Z.Messages.SHARE_NITRO_TOOLTIP,u=ky(o.useState(!1),2),c=u[0],s=u[1],f=ky(o.useState(!1),2),d=f[0],p=f[1],h=(0,oy.Z)(null,(function(){return p(!1)}));return t?null:(0,r.jsxs)("div",{ref:h,className:tp().buttonContainer,children:[(0,r.jsx)(Iy,{shouldShowPopout:d,referralsRemaining:n,channel:i,onClose:function(){return p(!1)},isResending:a}),(0,r.jsx)(ry.u,{text:l,shouldShow:!d,children:function(e){return(0,r.jsx)("div",{onMouseEnter:function(){d||c||s(!0)},onMouseLeave:function(){s(!1)},children:(0,r.jsx)(Hh,Dy(Ly({},e),{innerClassName:tp().button,isActive:d,"aria-label":l,"aria-haspopup":"dialog",onClick:function(){p((function(e){return!e}))},children:(0,r.jsx)(Zy,{referralsRemaining:n,hovered:c,
|
||
isResending:a})}))})}})]})}const By=o.memo(Uy);var Fy=n(627342),Gy=n(50433),Hy=n(309809),Vy=n.n(Hy),Wy=n(772766),zy=n.n(Wy);function Yy(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ky(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function qy(e){var t=e.updatePosition,n=e.onComplete;o.useEffect((function(){ce.default.track(se.rMx.PREMIUM_GIFT_UPSELL_VIEWED,{type:"holiday_gifting_tip"})}),[]);return(0,r.jsxs)("div",{className:Vy().container,children:[(0,r.jsx)("img",{className:Vy().image,alt:"",src:zy(),onLoad:function(){
|
||
return t()}}),(0,r.jsxs)("div",{className:Vy().body,children:[(0,r.jsx)(h.X6q,{className:Vy().text,variant:"heading-sm/semibold",children:q.Z.Messages.SEASONAL_GIFTING_POPUP_HEADER}),(0,r.jsx)(h.xvT,{className:Vy().text,variant:"text-sm/normal",children:q.Z.Messages.SEASONAL_GIFTING_SPREAD_CHEER_TOOLTIP})]}),(0,r.jsx)(h.zxk,{className:Vy().button,look:h.zxk.Looks.INVERTED,color:h.zxk.Colors.BRAND,onClick:function(){return n()},children:q.Z.Messages.GOT_IT}),(0,r.jsx)("div",{className:Vy().pointer})]})}function Qy(e){var t=e.hovered,n=e.onComplete,o=(0,p.e7)([Gy.Z],(function(){return!(null===Gy.Z||void 0===Gy.Z?void 0:Gy.Z.hasLayers())}));return t&&o?(0,r.jsx)(Fy.Z,{contentTypes:[qp.z$.SEASONAL_GIFTING_COACHMARK_2022],children:function(e){var t=e.visibleContent,o=e.markAsDismissed;return t===qp.z$.SEASONAL_GIFTING_COACHMARK_2022?(0,r.jsx)(h.yRy,{spacing:0,shouldShow:!0,position:"top",align:"center",renderPopout:function(e){return(0,r.jsx)(qy,Ky(function(e){
|
||
for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Yy(e,t,n[t])}))}return e}({},e),{onComplete:function(){n();o()}}))},onRequestClose:function(){},closeOnScroll:!1,ignoreModalClicks:!0,children:function(){return(0,r.jsx)("div",{className:Vy().popoutTarget})}}):null}}):null}var Xy=n(74535),Jy=n(590070);var $y=n(26121),eb=n.n($y);function tb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{
|
||
a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var rb=[{box:"#FFD89E",ribbon:"#FF7476"},{box:"#17B5E2",ribbon:"#FFFFFF"},{box:"#EED169",ribbon:"#51A1EB"},{box:"#509C65",ribbon:"#FFC96E"},{box:"#E4578A",ribbon:"#BEC4FF"},{box:"#AFE0FC",ribbon:"#FF9356"},{box:"#DB6D6D",ribbon:"#67DA9C"}],ob=[{box:"#EABB75",ribbon:"#E4595C"},{box:"#2D7AA5",ribbon:"#64C7C2"},{box:"#ECBF21",ribbon:"#51A1EB"},{box:"#439359",ribbon:"#D5A24C"},{box:"#FC90C4",ribbon:"#777FCE"},{box:"#549DC6",ribbon:"#FF9356"},{
|
||
box:"#DB6F6F",ribbon:"#81C29F"}];var ib=(0,Mh.animated)((function(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.boxColor,l=e.ribbonColor,u=e.style;return(0,r.jsxs)("svg",{style:u,width:n,height:i,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M3 13.999V19.999C3 21.102 3.897 21.999 5 21.999H11V13.999H3Z",fill:a}),(0,r.jsx)("path",{d:"M13 13.999V21.999H19C20.104 21.999 21 21.102 21 19.999V13.999H13Z",fill:a}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M20 7.99882H16.886C17.337 7.76382 17.764 7.47682 18.121 7.12082C19.29 5.95182 19.29 4.04882 18.121 2.87682C16.986 1.74582 15.014 1.74482 13.879 2.87782C12.242 4.51482 12.022 7.59582 12.002 7.94182C12 7.96182 12.01 7.97882 12.01 7.99882H11.99C11.99 7.97882 12 7.96182 11.998 7.94082C11.979 7.59482 11.758 4.51382 10.121 2.87682C8.986 1.74582 7.012 1.74582 5.879 2.87882C4.709 4.04782 4.709 5.95082 5.879 7.12082C6.236 7.47682 6.663 7.76382 7.114 7.99882H4C2.897 7.99882 2 8.89582 2 9.99882V11.9988H22V9.99882C22 8.89582 21.104 7.99882 20 7.99882ZM7.293 4.29182C6.903 4.68182 6.903 5.31582 7.293 5.70682C7.879 6.29282 8.945 6.63882 9.825 6.82182C9.641 5.93982 9.297 4.88182 8.707 4.29182C8.519 4.10282 8.268 3.99982 8 3.99982C7.732 3.99982 7.481 4.10282 7.293 4.29182ZM15.293 4.29282C14.702 4.88282 14.359 5.94082 14.174 6.82382C15.057 6.64182 16.116 6.29782 16.707 5.70682C17.097 5.31582 17.096 4.68182 16.706 4.29082C16.519 4.10282 16.268 3.99982 16 3.99982C15.732 3.99982 15.481 4.10282 15.293 4.29282Z",
|
||
fill:a}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M16.8861 7.99882C17.3371 7.76382 17.7641 7.47682 18.1211 7.12082C19.2901 5.95182 19.2901 4.04882 18.1211 2.87682C16.9861 1.74582 15.0141 1.74482 13.8791 2.87782C12.2421 4.51482 12.0221 7.59582 12.0021 7.94182C12.0001 7.96182 12.0101 7.97882 12.0101 7.99882H11.9901C11.9901 7.97882 12.0001 7.96182 11.9981 7.94082C11.9791 7.59482 11.7581 4.51382 10.1211 2.87682C8.98606 1.74582 7.01206 1.74582 5.87906 2.87882C4.70906 4.04782 4.70906 5.95082 5.87906 7.12082C6.23606 7.47682 6.66306 7.76382 7.11406 7.99882C-3.67757 7.99882 23.9877 7.99882 16.8861 7.99882ZM7.29306 4.29182C6.90306 4.68182 6.90306 5.31582 7.29306 5.70682C7.87906 6.29282 8.94506 6.63882 9.82506 6.82182C9.64106 5.93982 9.29706 4.88182 8.70706 4.29182C8.51906 4.10282 8.26806 3.99982 8.00006 3.99982C7.73206 3.99982 7.48106 4.10282 7.29306 4.29182ZM15.2931 4.29282C14.7021 4.88282 14.3591 5.94082 14.1741 6.82382C15.0571 6.64182 16.1161 6.29782 16.7071 5.70682C17.0971 5.31582 17.0961 4.68182 16.7061 4.29082C16.5191 4.10282 16.2681 3.99982 16.0001 3.99982C15.7321 3.99982 15.4811 4.10282 15.2931 4.29282Z",
|
||
fill:l}),(0,r.jsx)("rect",{x:"3",y:"12",width:"18",height:"2",fill:l}),(0,r.jsx)("rect",{x:"11",y:"8",width:"2",height:"4",fill:l}),(0,r.jsx)("rect",{x:"11",y:"14",width:"2",height:"8",fill:l})]})})),ab=(0,Mh.animated)((function(e){var t=e.isDark,n=e.style;return t?(0,r.jsxs)("svg",{style:n,width:"24",height:"27",viewBox:"0 0 24 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M16.9565 5.2944L14.0303 6.35946C14.3737 5.98438 14.6768 5.56864 14.8905 5.11201C15.5892 3.61369 14.9383 1.82545 13.439 1.12395C11.9856 0.449355 10.1322 1.12288 9.45316 2.57574C8.47477 4.67391 9.3218 7.64434 9.42134 7.97632C9.4263 7.9958 9.44151 8.00835 9.44836 8.02715L9.42956 8.03399C9.42272 8.01519 9.4263 7.9958 9.41724 7.97675C9.28105 7.65811 8.01961 4.83851 5.92145 3.86012C4.46807 3.18552 2.61312 3.86066 1.93596 5.31284C1.23634 6.81151 1.8872 8.59974 3.38681 9.29902C3.84403 9.51145 4.34344 9.6351 4.84762 9.70168L1.92142 10.7667C0.884936 11.144 0.348823 12.2937 0.726071 13.3302L1.41011 15.2095L20.204 8.36913L19.5199 6.48975C19.1427 5.45327 17.9939 4.91681 16.9565 5.2944ZM3.74796 6.15701C3.51486 6.65688 3.7317 7.25265 4.23191 7.48668C4.983 7.83691 6.10305 7.79746 6.99257 7.66844C6.518 6.90256 5.83289 6.02602 5.07668 5.6734C4.83538 5.5601 4.56429 5.54915 4.31245 5.64082C4.06061 5.73248 3.85998 5.91511 3.74796 6.15701ZM11.2658 3.42179C10.9123 4.17834 10.9518 5.28985 11.08 6.18287C11.8475 5.70985 12.725 5.02439 13.0782 4.2669C13.3109 3.76609 13.0932 3.17067 12.5929 2.93664C12.3529 2.82393 12.0818 2.81299 11.83 2.90465C11.5782 2.99632 11.3775 3.17895 11.2658 3.42179Z",
|
||
fill:"url(#paint0_linear_2683_16702)"}),(0,r.jsx)("path",{d:"M21.9355 8.82275C21.3596 13.7273 19.056 16.7554 19.056 16.7554",stroke:"#5865F2",strokeWidth:"3",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M19.4857 12.5113L18.9294 12.5444C18.8015 12.552 18.6819 12.61 18.5968 12.7058C18.5118 12.8016 18.4682 12.9273 18.4758 13.0552L18.7061 16.9311C18.7099 16.996 18.7268 17.0595 18.7557 17.1177C18.7847 17.1759 18.8251 17.2277 18.8745 17.27C18.9239 17.3122 18.9814 17.344 19.0434 17.3636C19.1054 17.3831 19.1708 17.3898 19.2355 17.3835L19.7918 17.3504C20.0968 17.3323 20.382 17.1938 20.5848 16.9654C20.7877 16.7369 20.8914 16.4373 20.8733 16.1323L20.7224 13.5917C20.7042 13.2867 20.5657 13.0015 20.3373 12.7987C20.1089 12.5959 19.8092 12.4921 19.5043 12.5102L19.4857 12.5113Z",fill:"#7196FF"}),(0,r.jsx)("path",{
|
||
d:"M8.06376 10.3064L17.1137 9.76874C18.5271 9.68477 19.741 10.7625 19.825 12.1759L20.0622 16.1686C20.1461 17.582 19.0684 18.7959 17.655 18.8799L8.60506 19.4176C7.19165 19.5015 5.97779 18.4238 5.89381 17.0104L5.6566 13.0177C5.57263 11.6042 6.65035 10.3904 8.06376 10.3064Z",fill:"#7196FF"}),(0,r.jsx)("path",{d:"M18.1642 14.0981C17.7332 14.0981 17.3839 13.7488 17.3839 13.3179C17.3839 12.8869 17.7332 12.5376 18.1642 12.5376C18.5951 12.5376 18.9444 12.8869 18.9444 13.3179C18.9444 13.7488 18.5951 14.0981 18.1642 14.0981Z",fill:"black"}),(0,r.jsx)("path",{d:"M7.33246 13.2305L5.05143 13.366C4.7514 13.3838 4.47075 13.5201 4.2712 13.7448C4.07166 13.9696 3.96957 14.2644 3.98739 14.5644L4.14054 17.1422C4.15836 17.4422 4.29464 17.7229 4.5194 17.9224C4.74415 18.122 5.03897 18.224 5.33899 18.2062L7.62002 18.0707L7.33246 13.2305Z",fill:"#7196FF"}),(0,r.jsx)("path",{
|
||
d:"M6.12411 13.8623L5.47504 13.9009C5.33733 13.909 5.2085 13.9716 5.11691 14.0748C5.02531 14.1779 4.97845 14.3133 4.98663 14.451L5.10452 16.4353C5.1127 16.573 5.17526 16.7018 5.27842 16.7934C5.38159 16.885 5.51691 16.9319 5.65463 16.9237L6.3037 16.8851L6.12411 13.8623Z",fill:"#B8CDFF"}),(0,r.jsx)("path",{d:"M9.54422 14.6749C9.08252 14.6749 8.70823 14.3006 8.70823 13.8389C8.70823 13.3772 9.08252 13.0029 9.54422 13.0029C10.0059 13.0029 10.3802 13.3772 10.3802 13.8389C10.3802 14.3006 10.0059 14.6749 9.54422 14.6749Z",fill:"black"}),(0,r.jsx)("path",{
|
||
d:"M16.7178 11.9692L11.822 12.2601C11.7148 12.2665 11.6099 12.2939 11.5134 12.3408C11.4168 12.3877 11.3304 12.4531 11.2592 12.5334C11.1879 12.6137 11.1331 12.7072 11.098 12.8086C11.0629 12.9101 11.0481 13.0174 11.0545 13.1246L11.1734 15.1274C11.2053 15.6635 11.4488 16.165 11.8504 16.5216C12.252 16.8782 12.7788 17.0606 13.3149 17.0287L16.0781 16.8646C16.3095 16.8508 16.5359 16.7916 16.7444 16.6904C16.9529 16.5892 17.1394 16.4479 17.2932 16.2745C17.4471 16.1012 17.5654 15.8993 17.6412 15.6803C17.717 15.4613 17.749 15.2295 17.7352 14.9981L17.6019 12.7542C17.5979 12.6437 17.5715 12.5353 17.5244 12.4353C17.4773 12.3354 17.4104 12.246 17.3278 12.1726C17.2451 12.0993 17.1485 12.0434 17.0436 12.0084C16.9388 11.9735 16.828 11.9602 16.7178 11.9692Z",fill:"#B8CDFF"}),(0,r.jsx)("path",{
|
||
d:"M16.195 15.8076H16.548C16.5952 15.8079 16.6419 15.7982 16.6851 15.7791C16.7283 15.7601 16.767 15.732 16.7986 15.6969C16.8302 15.6618 16.854 15.6204 16.8684 15.5755C16.8829 15.5305 16.8876 15.483 16.8824 15.4361C16.8827 15.3889 16.8729 15.3421 16.8539 15.2989C16.8348 15.2557 16.8068 15.217 16.7717 15.1855C16.7366 15.1539 16.6952 15.1301 16.6502 15.1156C16.6052 15.1012 16.5577 15.0964 16.5108 15.1017H16.1578C16.1106 15.1014 16.0639 15.1111 16.0207 15.1302C15.9775 15.1493 15.9388 15.1773 15.9072 15.2124C15.8756 15.2475 15.8518 15.2889 15.8374 15.3338C15.8229 15.3788 15.8182 15.4263 15.8234 15.4732C15.8231 15.5205 15.8329 15.5672 15.8519 15.6104C15.871 15.6536 15.899 15.6923 15.9341 15.7239C15.9692 15.7555 16.0106 15.7793 16.0556 15.7937C16.1005 15.8081 16.1481 15.8129 16.195 15.8076Z",fill:"#7196FF"}),(0,r.jsx)("path",{
|
||
d:"M13.8913 15.9565L14.5601 15.9008C14.6073 15.9011 14.654 15.8914 14.6972 15.8723C14.7404 15.8532 14.7791 15.8252 14.8107 15.7901C14.8423 15.755 14.8661 15.7136 14.8805 15.6687C14.895 15.6237 14.8997 15.5762 14.8945 15.5292C14.8921 15.4829 14.8806 15.4374 14.8606 15.3955C14.8407 15.3536 14.8126 15.316 14.7781 15.2849C14.7436 15.2539 14.7033 15.2299 14.6595 15.2145C14.6157 15.199 14.5693 15.1923 14.5229 15.1948L13.8541 15.232C13.8078 15.2344 13.7623 15.2459 13.7204 15.2659C13.6785 15.2858 13.6409 15.3139 13.6098 15.3484C13.5788 15.3829 13.5548 15.4232 13.5394 15.467C13.5239 15.5108 13.5172 15.5572 13.5197 15.6036C13.5286 15.6973 13.5711 15.7847 13.6394 15.8496C13.7077 15.9145 13.7972 15.9525 13.8913 15.9565Z",fill:"#7196FF"}),(0,r.jsx)("path",{d:"M1.51869 10.0304L1.55585 9.95605L1.51869 10.0304Z",fill:"#C5ECFF"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M3 23.8394V17.8394H11V25.8394H5C3.897 25.8394 3 24.9424 3 23.8394ZM13 25.8394V17.8394H21V23.8394C21 24.9424 20.104 25.8394 19 25.8394H13Z",fill:"url(#paint1_linear_2683_16702)"}),(0,r.jsx)("rect",{x:"11",y:"17.8403",width:"2",height:"8",fill:"#40444B"}),(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"paint0_linear_2683_16702",x1:"-0.468018",y1:"10.0494",x2:"18.3258",y2:"3.20901",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#FF6D6D"}),(0,r.jsx)("stop",{offset:"0.177083",stopColor:"#FFB359"}),(0,r.jsx)("stop",{offset:"0.356007",stopColor:"#E6F820"}),(0,r.jsx)("stop",{offset:"0.578487",stopColor:"#42FE8D"}),(0,r.jsx)("stop",{offset:"0.769035",stopColor:"#3EA2FF"}),(0,r.jsx)("stop",{offset:"0.951531",stopColor:"#B66DFF"})]}),(0,r.jsxs)("linearGradient",{id:"paint1_linear_2683_16702",x1:"3",y1:"21.4333",x2:"21",y2:"21.4333",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#FF6D6D"}),(0,r.jsx)("stop",{offset:"0.177083",
|
||
stopColor:"#FFB359"}),(0,r.jsx)("stop",{offset:"0.356007",stopColor:"#E6F820"}),(0,r.jsx)("stop",{offset:"0.578487",stopColor:"#42FE8D"}),(0,r.jsx)("stop",{offset:"0.769035",stopColor:"#3EA2FF"}),(0,r.jsx)("stop",{offset:"0.951531",stopColor:"#B66DFF"})]})]})]}):(0,r.jsxs)("svg",{style:n,width:"24",height:"27",viewBox:"0 0 24 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M16.9565 5.2944L14.0303 6.35946C14.3737 5.98438 14.6768 5.56864 14.8905 5.11201C15.5892 3.61369 14.9383 1.82545 13.439 1.12395C11.9856 0.449355 10.1322 1.12288 9.45316 2.57574C8.47477 4.67391 9.3218 7.64434 9.42134 7.97632C9.4263 7.9958 9.44151 8.00835 9.44836 8.02715L9.42956 8.03399C9.42272 8.01519 9.4263 7.9958 9.41724 7.97675C9.28105 7.65811 8.01961 4.83851 5.92145 3.86012C4.46807 3.18552 2.61312 3.86066 1.93596 5.31284C1.23634 6.81151 1.8872 8.59974 3.38681 9.29902C3.84403 9.51145 4.34344 9.6351 4.84762 9.70168L1.92142 10.7667C0.884936 11.144 0.348823 12.2937 0.726071 13.3302L1.41011 15.2095L20.204 8.36913L19.5199 6.48975C19.1427 5.45327 17.9939 4.91681 16.9565 5.2944ZM3.74796 6.15701C3.51486 6.65688 3.7317 7.25265 4.23191 7.48668C4.983 7.83691 6.10305 7.79746 6.99257 7.66844C6.518 6.90256 5.83289 6.02602 5.07668 5.6734C4.83538 5.5601 4.56429 5.54915 4.31245 5.64082C4.06061 5.73248 3.85998 5.91511 3.74796 6.15701ZM11.2658 3.42179C10.9123 4.17834 10.9518 5.28985 11.08 6.18287C11.8475 5.70985 12.725 5.02439 13.0782 4.2669C13.3109 3.76609 13.0932 3.17067 12.5929 2.93664C12.3529 2.82393 12.0818 2.81299 11.83 2.90465C11.5782 2.99632 11.3775 3.17895 11.2658 3.42179Z",
|
||
fill:"url(#paint0_linear_2683_16682)"}),(0,r.jsx)("path",{d:"M21.9355 8.82275C21.3596 13.7273 19.056 16.7554 19.056 16.7554",stroke:"#5865F2",strokeWidth:"3",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M19.4857 12.5113L18.9294 12.5444C18.8015 12.552 18.6819 12.61 18.5968 12.7058C18.5118 12.8016 18.4682 12.9273 18.4758 13.0552L18.7061 16.9311C18.7099 16.996 18.7268 17.0595 18.7557 17.1177C18.7847 17.1759 18.8251 17.2277 18.8745 17.27C18.9239 17.3122 18.9814 17.344 19.0434 17.3636C19.1054 17.3831 19.1708 17.3898 19.2355 17.3835L19.7918 17.3504C20.0968 17.3323 20.382 17.1938 20.5848 16.9654C20.7877 16.7369 20.8914 16.4373 20.8733 16.1323L20.7224 13.5917C20.7042 13.2867 20.5657 13.0015 20.3373 12.7987C20.1089 12.5959 19.8092 12.4921 19.5043 12.5102L19.4857 12.5113Z",fill:"#7196FF"}),(0,r.jsx)("path",{
|
||
d:"M8.06376 10.3064L17.1137 9.76874C18.5271 9.68477 19.741 10.7625 19.825 12.1759L20.0622 16.1686C20.1461 17.582 19.0684 18.7959 17.655 18.8799L8.60506 19.4176C7.19165 19.5015 5.97779 18.4238 5.89381 17.0104L5.6566 13.0177C5.57263 11.6042 6.65035 10.3904 8.06376 10.3064Z",fill:"#7196FF"}),(0,r.jsx)("path",{d:"M18.1642 14.0981C17.7332 14.0981 17.3839 13.7488 17.3839 13.3179C17.3839 12.8869 17.7332 12.5376 18.1642 12.5376C18.5951 12.5376 18.9444 12.8869 18.9444 13.3179C18.9444 13.7488 18.5951 14.0981 18.1642 14.0981Z",fill:"black"}),(0,r.jsx)("path",{d:"M7.33246 13.2305L5.05143 13.366C4.7514 13.3838 4.47075 13.5201 4.2712 13.7448C4.07166 13.9696 3.96957 14.2644 3.98739 14.5644L4.14054 17.1422C4.15836 17.4422 4.29464 17.7229 4.5194 17.9224C4.74415 18.122 5.03897 18.224 5.33899 18.2062L7.62002 18.0707L7.33246 13.2305Z",fill:"#7196FF"}),(0,r.jsx)("path",{
|
||
d:"M6.12411 13.8623L5.47504 13.9009C5.33733 13.909 5.2085 13.9716 5.11691 14.0748C5.02531 14.1779 4.97845 14.3133 4.98663 14.451L5.10452 16.4353C5.1127 16.573 5.17526 16.7018 5.27842 16.7934C5.38159 16.885 5.51691 16.9319 5.65463 16.9237L6.3037 16.8851L6.12411 13.8623Z",fill:"#B8CDFF"}),(0,r.jsx)("path",{d:"M9.54422 14.6749C9.08252 14.6749 8.70823 14.3006 8.70823 13.8389C8.70823 13.3772 9.08252 13.0029 9.54422 13.0029C10.0059 13.0029 10.3802 13.3772 10.3802 13.8389C10.3802 14.3006 10.0059 14.6749 9.54422 14.6749Z",fill:"black"}),(0,r.jsx)("path",{
|
||
d:"M16.7178 11.9692L11.822 12.2601C11.7148 12.2665 11.6099 12.2939 11.5134 12.3408C11.4168 12.3877 11.3304 12.4531 11.2592 12.5334C11.1879 12.6137 11.1331 12.7072 11.098 12.8086C11.0629 12.9101 11.0481 13.0174 11.0545 13.1246L11.1734 15.1274C11.2053 15.6635 11.4488 16.165 11.8504 16.5216C12.252 16.8782 12.7788 17.0606 13.3149 17.0287L16.0781 16.8646C16.3095 16.8508 16.5359 16.7916 16.7444 16.6904C16.9529 16.5892 17.1394 16.4479 17.2932 16.2745C17.4471 16.1012 17.5654 15.8993 17.6412 15.6803C17.717 15.4613 17.749 15.2295 17.7352 14.9981L17.6019 12.7542C17.5979 12.6437 17.5715 12.5353 17.5244 12.4353C17.4773 12.3354 17.4104 12.246 17.3278 12.1726C17.2451 12.0993 17.1485 12.0434 17.0436 12.0084C16.9388 11.9735 16.828 11.9602 16.7178 11.9692Z",fill:"#B8CDFF"}),(0,r.jsx)("path",{
|
||
d:"M16.195 15.8076H16.548C16.5952 15.8079 16.6419 15.7982 16.6851 15.7791C16.7283 15.7601 16.767 15.732 16.7986 15.6969C16.8302 15.6618 16.854 15.6204 16.8684 15.5755C16.8829 15.5305 16.8876 15.483 16.8824 15.4361C16.8827 15.3889 16.8729 15.3421 16.8539 15.2989C16.8348 15.2557 16.8068 15.217 16.7717 15.1855C16.7366 15.1539 16.6952 15.1301 16.6502 15.1156C16.6052 15.1012 16.5577 15.0964 16.5108 15.1017H16.1578C16.1106 15.1014 16.0639 15.1111 16.0207 15.1302C15.9775 15.1493 15.9388 15.1773 15.9072 15.2124C15.8756 15.2475 15.8518 15.2889 15.8374 15.3338C15.8229 15.3788 15.8182 15.4263 15.8234 15.4732C15.8231 15.5205 15.8329 15.5672 15.8519 15.6104C15.871 15.6536 15.899 15.6923 15.9341 15.7239C15.9692 15.7555 16.0106 15.7793 16.0556 15.7937C16.1005 15.8081 16.1481 15.8129 16.195 15.8076Z",fill:"#7196FF"}),(0,r.jsx)("path",{
|
||
d:"M13.8913 15.9565L14.5601 15.9008C14.6073 15.9011 14.654 15.8914 14.6972 15.8723C14.7404 15.8532 14.7791 15.8252 14.8107 15.7901C14.8423 15.755 14.8661 15.7136 14.8805 15.6687C14.895 15.6237 14.8997 15.5762 14.8945 15.5292C14.8921 15.4829 14.8806 15.4374 14.8606 15.3955C14.8407 15.3536 14.8126 15.316 14.7781 15.2849C14.7436 15.2539 14.7033 15.2299 14.6595 15.2145C14.6157 15.199 14.5693 15.1923 14.5229 15.1948L13.8541 15.232C13.8078 15.2344 13.7623 15.2459 13.7204 15.2659C13.6785 15.2858 13.6409 15.3139 13.6098 15.3484C13.5788 15.3829 13.5548 15.4232 13.5394 15.467C13.5239 15.5108 13.5172 15.5572 13.5197 15.6036C13.5286 15.6973 13.5711 15.7847 13.6394 15.8496C13.7077 15.9145 13.7972 15.9525 13.8913 15.9565Z",fill:"#7196FF"}),(0,r.jsx)("path",{d:"M1.51869 10.0304L1.55585 9.95605L1.51869 10.0304Z",fill:"#C5ECFF"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M3 23.8394V17.8394H11V25.8394H5C3.897 25.8394 3 24.9424 3 23.8394ZM13 25.8394V17.8394H21V23.8394C21 24.9424 20.104 25.8394 19 25.8394H13Z",fill:"url(#paint1_linear_2683_16682)"}),(0,r.jsx)("rect",{x:"11",y:"17.8403",width:"2",height:"8",fill:"#EBEDEF"}),(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"paint0_linear_2683_16682",x1:"-0.468018",y1:"10.0494",x2:"18.3258",y2:"3.20901",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#D64949"}),(0,r.jsx)("stop",{offset:"0.177083",stopColor:"#F28300"}),(0,r.jsx)("stop",{offset:"0.364583",stopColor:"#B5C500"}),(0,r.jsx)("stop",{offset:"0.578487",stopColor:"#06CC55"}),(0,r.jsx)("stop",{offset:"0.769035",stopColor:"#2094FF"}),(0,r.jsx)("stop",{offset:"0.951531",stopColor:"#AC59FF"})]}),(0,r.jsxs)("linearGradient",{id:"paint1_linear_2683_16682",x1:"3",y1:"21.4333",x2:"21",y2:"21.4333",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#D64949"}),(0,r.jsx)("stop",{offset:"0.177083",
|
||
stopColor:"#F28300"}),(0,r.jsx)("stop",{offset:"0.364583",stopColor:"#B5C500"}),(0,r.jsx)("stop",{offset:"0.578487",stopColor:"#06CC55"}),(0,r.jsx)("stop",{offset:"0.769035",stopColor:"#2094FF"}),(0,r.jsx)("stop",{offset:"0.951531",stopColor:"#AC59FF"})]})]})]})})),lb=(0,Mh.animated)(Jh.Z);function ub(e){var t=e.hovered,n=(0,Xy.ZP)(),i=nb(function(e){var t=nb(o.useState(!1),2),n=t[0],r=t[1],i=nb(o.useState(Math.floor(7*Math.random())),2),a=i[0],l=i[1];o.useEffect((function(){if(!e){var t=Math.random()<=.0033333333333333335;r(t);if(!t){var n;do{n=Math.floor(7*Math.random())}while(n===a);l(n)}}}),[e]);return[n,a]}(t),2),a=i[0],l=i[1],u=(0,Jy.N)(qp.z$.SEASONAL_GIFTING_COACHMARK_2022),c=(0,Mh.useSpring)({reverse:!t,reset:!0,from:{scale:1},to:{scale:1.14},config:{tension:800,friction:24}}),s=!!u&&a,f=u?l:0,d=n===se.BRd.DARK?rb[f]:ob[f];return!t&&u?(0,r.jsx)(lb,{style:c}):s?(0,r.jsx)(ab,{isDark:n===se.BRd.DARK,style:c}):(0,r.jsx)(ib,{boxColor:d.box,ribbonColor:d.ribbon,style:c})}
|
||
function cb(e){var t=e.disabled,n=e.channel,i=(0,m.Z)(v.Z.GIFT_BUTTON).analyticsLocations,a=nb(o.useState(!1),2),l=a[0],u=a[1],c=(0,Jy.N)(qp.z$.SEASONAL_GIFTING_COACHMARK_2022);if(t)return null;var s=(0,r.jsxs)("div",{className:eb().container,onMouseEnter:function(){l||u(!0)},onMouseLeave:function(){u(!1)},children:[c?null:(0,r.jsx)(Qy,{hovered:l,onComplete:function(){return u(!1)}}),(0,r.jsx)(Hh,{innerClassName:tp().button,"aria-label":q.Z.Messages.PREMIUM_GIFT_BUTTON_LABEL,isActive:!1,onClick:function(){u(!1);(0,Qp.EW)(qp.z$.SEASONAL_GIFTING_COACHMARK_2022);(0,Xh.Z)({isGift:!0,initialPlanId:null,subscriptionTier:fe.Si.TIER_2,analyticsLocations:i,analyticsObject:{page:n.isPrivate()?se.ZY5.DM_CHANNEL:se.ZY5.GUILD_CHANNEL,section:se.jXE.CHANNEL_TEXT_AREA,object:se.qAy.SEASONAL_BUTTON_ICON,objectType:se.Qqv.GIFT}})},children:(0,r.jsx)(ub,{hovered:l})})]});return c?(0,r.jsx)(h.DY3,{className:eb().container,text:q.Z.Messages.SEASONAL_GIFTING_SPREAD_CHEER_TOOLTIP,children:s}):s}
|
||
const sb=o.memo(cb);function fb(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function db(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function pb(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function hb(e){
|
||
var t=e.width,n=void 0===t?16:t,o=e.height,i=void 0===o?16:o,a=e.className,l=e.fill,u=void 0===l?"currentColor":l,c=pb(e,["width","height","className","fill"]);return(0,r.jsx)("svg",db(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){fb(e,t,n[t])}))}return e}({},(0,wy.Z)(c)),{className:a,width:n,height:i,viewBox:"0 0 16 16",children:(0,r.jsx)("path",{
|
||
d:"M8.2738 8.49222L1.99997 9.09877L0.349029 14.3788C0.250591 14.691 0.347154 15.0322 0.595581 15.246C0.843069 15.4597 1.19464 15.5047 1.48903 15.3613L15.2384 8.7032C15.5075 8.57195 15.6781 8.29914 15.6781 8.00007C15.6781 7.70101 15.5074 7.4282 15.2384 7.29694L1.49839 0.634063C1.20401 0.490625 0.852453 0.535625 0.604941 0.749376C0.356493 0.963128 0.259941 1.30344 0.358389 1.61563L2.00932 6.89563L8.27093 7.50312C8.52405 7.52843 8.71718 7.74125 8.71718 7.99531C8.71718 8.24938 8.52406 8.46218 8.27093 8.4875L8.2738 8.49222Z",fill:u})}))}var yb=n(231163),bb=n.n(yb);function vb(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function mb(e){var t,n=e.onClick,o=e.disabled,i=void 0!==o&&o;return(0,r.jsx)("div",{className:bb().separator,children:(0,r.jsx)("div",{className:bb().buttonContainer,children:(0,r.jsx)(Hh,{className:bb().button,innerClassName:bb().innerButton,childClassName:a()(bb().buttonChild,(t={},vb(t,bb().disabled,i),
|
||
vb(t,bb().activeButtonChild,!i),t)),onClick:n,disabled:i,isActive:!1,"aria-label":q.Z.Messages.SEND_MESSAGE,children:(0,r.jsx)(hb,{className:bb().sendIcon})})})})}const gb=o.memo(mb);var Ob=n(366007);function Eb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cb(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function jb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Eb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name)
|
||
;if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sb(e,t){var n=e.disabled,i=e.type,l=jb((0,zo.Iu)((function(e){return[e.activeView,e.activeViewType,e.pickerId]}),f.Z),3),u=l[0],c=l[1],s=l[2],d=o.useContext(Mo),p=jb(o.useState(!1),2),h=p[0],y=p[1],b=u===ui.X1.STICKER,v=!1,m=i===cn.I.NORMAL,g=(0,Qp.wE)(qp.z$.PREMIUM_TUTORIAL_STICKER_PICKER_COMPOSER_TOOLTIP),O=(0,Eh.AR)()&&m&&!g;o.useEffect((function(){u===ui.X1.STICKER&&c===cn.I.NORMAL&&(0,jh.$u)(qp.z$.PREMIUM_TUTORIAL_STICKER_PICKER_COMPOSER_TOOLTIP)}),[u,c]);var E,C=o.useCallback((function(){(0,zo.RO)(ui.X1.STICKER,i)}),[i]);o.useEffect((function(){var e=function(){requestAnimationFrame((function(){y(!0)}))},t=function(){requestAnimationFrame((function(){y(!1)}))}
|
||
;d.addListener("sticker-suggestions-shown",e);d.addListener("sticker-suggestions-hidden",t);return function(){d.removeListener("sticker-suggestions-shown",e);d.removeListener("sticker-suggestions-hidden",t)}}),[d]);if(n)return null;var j,S=h;E=(0,r.jsx)(Gi.Z,{className:tp().stickerIcon,winking:S,color:O?Ob.JX.PREMIUM_TRIAL_TUTORIAL:"currentColor"});return(0,r.jsx)("div",{className:a()(ui.CT,tp().buttonContainer),ref:t,children:(0,r.jsx)(Hh,{innerClassName:a()(tp().button,tp().stickerButton,(j={},Cb(j,tp().stickerButtonWithNotification,v),Cb(j,tp().stickerButtonTilted,S&&!b),j)),onClick:C,isActive:b,"aria-label":q.Z.Messages.STICKER_BUTTON_LABEL,"aria-expanded":b,"aria-haspopup":"dialog","aria-controls":s,sparkle:!1,notification:null,children:O?(0,r.jsx)(Ch.Z,{tutorialType:Oh.K.STICKER_PICKER,text:q.Z.Messages.PREMIUM_TRIAL_TUTORIAL_STICKER_TOOLTIP.format(),unformattedText:q.Z.Messages.PREMIUM_TRIAL_TUTORIAL_STICKER_TOOLTIP_UNFORMATTED,children:E}):E})})}
|
||
const Ib=o.memo(o.forwardRef(Sb));function _b(e){var t=e.disabled,n=e.channel,i=mh.ZP.useExperiment({}).enabled,a=(0,mh.rK)();o.useEffect((function(){a&&mh.ZP.trackExposure({})}),[a]);return i&&a?(0,r.jsx)(sb,{disabled:t,channel:n}):(0,r.jsx)(ny,{disabled:t,channel:n})}function wb(e){var t,n,o,i,a,l,u,c=e.type,s=e.disabled,f=e.channel,d=e.handleSubmit,h=e.isEmpty,y=(0,p.e7)([b.Z],(function(){return b.Z.isSubmitButtonEnabled})),v=(0,p.e7)([wu.Z],(function(){return wu.Z.getStickerPreview(f.id,c.drafts.type)})),m=null!=v&&v.length>0,O=(0,p.e7)([Nu.Z],(function(){return Nu.Z.getUploads(f.id,c.drafts.type)})),E=(0,p.cj)([g.Z],(function(){return{activeCommand:g.Z.getActiveCommand(f.id),activeCommandOption:g.Z.getActiveOption(f.id)}})),C=E.activeCommand,S=E.activeCommandOption,I=bh.Z.useExperiment({}).paymentsBlocked,_=[],w=gh.Z.getCurrentConfig({}).enabled,x=ge.default.getCurrentUser(),P=null!==(u=(0,p.e7)([vh.Z],(function(){
|
||
return w&&Ga.ZP.isPremiumExactly(x,fe.p9.TIER_2)?vh.Z.getReferralsRemaining():0})))&&void 0!==u?u:0,N=(0,p.e7)([vh.Z],(function(){if(!f.isDM()||void 0===f.recipients||f.recipients.length>1||!w)return!1;var e=f.recipients[0];return vh.Z.getSentUserIds().includes(e)})),A=(0,p.e7)([vh.Z],(function(){if(!f.isDM()||void 0===f.recipients||f.recipients.length>1)return!1;var e=f.recipients[0];return!(!w||null==e||!(N||P>0)||vh.Z.isFetchingRecipientEligibility(e))&&vh.Z.getRecipientEligibility(e)}));if(!Ro.tq){var T,Z,M,R;if(f.isDM()&&null!=(null===(T=c.gifts)||void 0===T?void 0:T.button)&&null==C)if(w&&A){gh.Z.trackExposure({});_.push((0,r.jsx)(By,{disabled:s,referralsRemaining:P,channel:f,isResending:N},"referral"))}else w||gh.Z.trackExposure({});null==(null===(Z=c.gifts)||void 0===Z?void 0:Z.button)||null!=C||I||_.push((0,r.jsx)(_b,{disabled:s,channel:f},"gift"));null==(null===(M=c.gifs)||void 0===M?void 0:M.button)||c.consolidateGifsStickersEmojis||null!=C||_.push((0,r.jsx)(Qh,{disabled:s,
|
||
type:c},"gif"));null==(null===(R=c.stickers)||void 0===R?void 0:R.button)||c.consolidateGifsStickersEmojis||null!=C||_.push((0,r.jsx)(Ib,{disabled:s,type:c},"sticker"))}null==(null===(t=c.emojis)||void 0===t?void 0:t.button)||c.consolidateGifsStickersEmojis||null!=C&&(null==S||S.type===j.jw.ATTACHMENT)||_.push((0,r.jsx)(Nh,{disabled:s,type:c},"emoji"));!c.consolidateGifsStickersEmojis||null==(null===(n=c.gifs)||void 0===n?void 0:n.button)&&null==(null===(o=c.stickers)||void 0===o?void 0:o.button)&&null==(null===(i=c.emojis)||void 0===i?void 0:i.button)||null!=C||_.push((0,r.jsx)(Th.Z,{disabled:s,type:c},"expression"));null!=(null===(a=c.submit)||void 0===a?void 0:a.button)&&((null===(l=c.submit)||void 0===l?void 0:l.ignorePreference)||y)&&_.push((0,r.jsx)(gb,{onClick:d,disabled:s||0===O.length&&h&&!m},"submit"));return 0===_.length?null:(0,r.jsx)("div",{className:tp().buttons,children:_})}const xb=o.memo(wb);var Pb=n(573485),Nb=n(510472);function Ab(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Tb(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Zb(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Mb(e){
|
||
var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Zb(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",Tb(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ab(e,t,n[t])}))}return e}({},(0,wy.Z)(c)),{width:n,height:i,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{className:u,fill:l,
|
||
d:"M19.8401 5.39392C20.1229 4.73405 19.6389 4 18.921 4H17.1231C16.7417 4 16.3935 4.21695 16.2254 4.55933L13.3297 10.4581C13.195 10.7324 13.125 11.0339 13.125 11.3394V19C13.125 19.5523 13.5727 20 14.125 20H20C20.5523 20 21 19.5523 21 19V12.875C21 12.3227 20.5523 11.875 20 11.875H17.8208C17.4618 11.875 17.2198 11.508 17.3612 11.178L19.8401 5.39392ZM9.71511 5.39392C9.99791 4.73405 9.51388 4 8.79596 4H6.99809C6.61669 4 6.2685 4.21695 6.10042 4.55933L3.20466 10.4581C3.07001 10.7324 3 11.0339 3 11.3394V19C3 19.5523 3.44772 20 4 20H9.875C10.4273 20 10.875 19.5523 10.875 19V12.875C10.875 12.3227 10.4273 11.875 9.875 11.875H7.69577C7.33681 11.875 7.0948 11.508 7.2362 11.178L9.71511 5.39392Z"})}))}function Rb(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Lb(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Db(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function kb(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Db(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",Lb(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Rb(e,t,n[t])}))}return e}({viewBox:"0 0 24 24"},(0,wy.Z)(c)),{width:n,height:i,children:(0,r.jsx)("path",{fill:l,className:u,
|
||
d:"M5.13525 22.0002V1.99023H13.5743C15.1596 1.99023 16.4356 2.45423 17.4023 3.38224C18.3883 4.31024 18.8813 5.5379 18.8813 7.06523C18.8813 8.2639 18.6009 9.23057 18.0403 9.96524C17.4989 10.6806 16.7933 11.2026 15.9233 11.5312C18.4173 12.1306 19.6643 13.7739 19.6643 16.4612C19.6643 18.3366 19.1036 19.7286 17.9823 20.6372C16.8803 21.5459 15.3143 22.0002 13.2843 22.0002H5.13525ZM12.4143 10.2842C14.4829 10.2842 15.5173 9.3949 15.5173 7.61624C15.5173 6.70757 15.2466 6.0309 14.7053 5.58623C14.1639 5.14157 13.4003 4.91923 12.4143 4.91923H8.49925V10.2842H12.4143ZM12.8493 19.0712C13.8933 19.0712 14.7246 18.8392 15.3433 18.3752C15.9813 17.9112 16.3003 17.1669 16.3003 16.1422C16.3003 15.1176 15.9813 14.3732 15.3433 13.9092C14.7246 13.4452 13.8933 13.2132 12.8493 13.2132H8.49925V19.0712H12.8493Z"})}))}var Ub=n(293615);function Bb(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Fb(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Gb(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Hb(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Gb(e,["width","height","color","foreground"]);return(0,
|
||
r.jsx)("svg",Fb(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Bb(e,t,n[t])}))}return e}({viewBox:"0 0 24 24"},(0,wy.Z)(c)),{width:n,height:i,children:(0,r.jsx)("path",{fill:l,className:u,d:"M21 4V2H11V4H14.461L7.351 20H3V22H13V20H9.539L16.649 4H21Z"})}))}var Vb=n(413297);function Wb(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function zb(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n
|
||
}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Yb(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Kb(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Yb(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",zb(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){
|
||
Wb(e,t,n[t])}))}return e}({viewBox:"0 0 24 24"},(0,wy.Z)(c)),{width:n,height:i,children:[(0,r.jsx)("path",{fill:l,className:u,d:"M22.004 10.8906H2V13.1133H12.002C13.8401 13.1133 15.336 14.6091 15.336 16.4473C15.336 18.2854 13.8401 19.7813 12.002 19.7813H8.668V18.67H6.44533V20.8926C6.44533 21.5061 6.94321 22.004 7.55667 22.004H12.002C15.0659 22.004 17.5587 19.5112 17.5587 16.4473C17.5587 15.1915 17.1241 14.0446 16.4196 13.1133H22.004V10.8906Z"}),(0,r.jsx)("path",{fill:l,className:u,d:"M8.87358 8.668C8.748 8.31904 8.66798 7.94786 8.66798 7.55667C8.66798 5.71852 10.1638 4.22267 12.002 4.22267H14.2246V5.334H16.4473V3.11133C16.4473 2.49788 15.9494 2 15.336 2H12.002C8.93803 2 6.44531 4.49272 6.44531 7.55667C6.44531 7.93674 6.48421 8.30904 6.55756 8.668H8.87358Z"})]}))}var qb=n(971561),Qb=n(202990),Xb=n.n(Qb);function Jb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $b(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,
|
||
configurable:!0,writable:!0}):e[t]=n;return e}function ev(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function tv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jb(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nv(e,t){return"type"in e&&"timestamp"===e.type?(0,r.jsx)(rv,ev(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){$b(e,t,n[t])}))}return e}({},t),{timestamp:e.parsed})):null}function rv(e){var t,n=e.timestamp,o=e.replace,i=function(e){
|
||
var t=e.timestamp,r=e.format,i=null!=t?Math.floor(t.getTime()/1e3):n.timestamp,a=null!=r?r:n.format,l=(0,qb.He)(i,a);o(l)};return(0,r.jsxs)("div",{className:Xb().container,children:[(0,r.jsx)(h.Wrb,{value:n.parsed,onSelect:function(e){i({timestamp:e.toDate()})}}),(0,r.jsx)(h.MGJ,{value:n.parsed,onChange:function(e){i({timestamp:e.toDate()})}}),(0,r.jsx)(h.Eep,{options:Object.entries(qb.Qh).map((function(e){var t=tv(e,2),r=t[0];return{name:(0,t[1])(n.parsed),value:r}})),value:null!==(t=n.format)&&void 0!==t?t:qb.K_,size:h.Eep.Sizes.SMALL,onChange:function(e){var t=e.value;i({format:t})}})]})}var ov=n(392502),iv=n.n(ov);function av(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value)
|
||
;if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||cv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uv(e){return function(e){if(Array.isArray(e))return av(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||cv(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cv(e,t){if(e){if("string"==typeof e)return av(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?av(e,t):void 0}}function sv(e){
|
||
var t,n=e.editorRef,o=e.options,i=e.iconClassName,l=e.dividerClassName,u=null===(t=n.current)||void 0===t?void 0:t.getSlateEditor();return null==u?null:(0,r.jsxs)("div",{className:iv().buttons,children:[(0,r.jsx)(dv,{slateEditor:u,markdownSyntax:"bold",children:(0,r.jsx)(kb,{className:a()(iv().icon,i)})}),(0,r.jsx)(dv,{slateEditor:u,markdownSyntax:"italics",children:(0,r.jsx)(Hb,{className:a()(iv().icon,i)})}),(0,r.jsx)(dv,{slateEditor:u,markdownSyntax:"strikethrough",children:(0,r.jsx)(Kb,{className:a()(iv().icon,i)})}),(0,r.jsx)("div",{className:a()(iv().divider,l)}),!(null==o?void 0:o.disableBlockQuotes)&&(0,r.jsx)(pv,{slateEditor:u,blockType:"blockQuote",children:(0,r.jsx)(Mb,{className:a()(iv().icon,i)})}),(0,r.jsx)(dv,{slateEditor:u,markdownSyntax:"inlineCode",children:(0,r.jsx)(Ub.Z,{className:a()(iv().icon,i)})}),(0,r.jsx)(dv,{slateEditor:u,markdownSyntax:"spoiler",children:(0,r.jsx)(Vb.Z,{className:a()(iv().icon,i)})})]})}const fv=o.forwardRef((function(e,t){
|
||
var n,i=e.editorRef,a=e.containerRef,l=e.options,u=o.useRef(null),c=lv(o.useState(!1),2),s=c[0],f=c[1],d=o.useRef(),p=o.useContext(tn.ZP),h=o.useCallback((function(){f(!1);clearTimeout(d.current)}),[]),y=o.useCallback((function(e){var t,n=p.renderWindow;e.target instanceof n.Node&&(null===(t=u.current)||void 0===t?void 0:t.contains(e.target))||h()}),[p,h]),b=o.useCallback((function(e){var t=p.renderWindow;if(e.target instanceof t.Element)if(0!==e.button)h();else{var n,r=e.target instanceof t.Node&&(null===(n=u.current)||void 0===n?void 0:n.contains(e.target));clearTimeout(d.current);d.current=setTimeout((function(){var t,n=null===(t=(0,_l.uB)(e))||void 0===t?void 0:t.activeElement,o=a.current;f(r||null!=n&&null!=o&&o.contains(n))}),100)}else h()}),[p,a,h]);o.useImperativeHandle(t,(function(){return{hide:h}}),[h]);o.useEffect((function(){var e=p.renderWindow;e.document.addEventListener("keydown",h);e.document.addEventListener("mousedown",y);e.document.addEventListener("mouseup",b)
|
||
;e.addEventListener("focus",h);e.addEventListener("blur",h);return function(){e.document.removeEventListener("keydown",h);e.document.removeEventListener("mousedown",y);e.document.removeEventListener("mouseup",b);e.removeEventListener("focus",h);e.removeEventListener("blur",h);clearTimeout(d.current)}}),[p,h,y,b]);var v=o.useMemo((function(){var e,t,n,r=null===(e=i.current)||void 0===e?void 0:e.getSlateEditor();if(null==(null==r?void 0:r.selection)||hc.M8.isCollapsed(r.selection)||!s)return{x:null,y:null};var o=gc.F3.findDocumentOrShadowRoot(r),l=o.getSelection();if(null==l||null==l.focusNode||null==l.anchorNode||l.isCollapsed)return{x:null,y:null};var u=o.createRange();u.setStart(l.focusNode,l.focusOffset);u.setEnd(l.focusNode,l.focusOffset);var c=u.getBoundingClientRect(),f=o.createRange();f.setStart(l.anchorNode,l.anchorOffset);f.setEnd(l.anchorNode,l.anchorOffset);var d=f.getBoundingClientRect(),p=o.createRange();p.setStart(l.anchorNode,l.anchorOffset)
|
||
;p.setEnd(l.focusNode,l.focusOffset);var h,y=p.getBoundingClientRect(),b=c.x===d.x,v=b?y.x:Math.min(c.x,d.x),m=b?y.x+y.width:Math.max(c.x,d.x),g=null!==(h=null===(n=null===(t=a.current)||void 0===t?void 0:t.getBoundingClientRect())||void 0===n?void 0:n.y)&&void 0!==h?h:0;return{x:v+(m-v)/2,y:Math.max(g,Math.min(d.y,c.y))}}),[a,s,i]),m=v.x,g=v.y,O=lv(o.useState(0),2),E=O[0],C=O[1],j=lv(o.useState(0),2),S=j[0],I=j[1];o.useLayoutEffect((function(){if(null!=m&&null!=g&&null!=u.current){var e=u.current.getBoundingClientRect();I(e.width/2);C(e.height+12)}}),[m,g]);if(null==m||null==g)return null;var _=null===(n=i.current)||void 0===n?void 0:n.getSlateEditor();return null==_?null:(0,r.jsx)(Ft.ZP,{children:(0,r.jsxs)("div",{id:"slate-toolbar",ref:u,className:iv().toolbar,style:{top:g-E,left:m-S},onMouseDown:function(e){e.stopPropagation()},onMouseUp:function(e){e.stopPropagation()},children:[(0,r.jsx)(hv,{slateEditor:_}),(0,r.jsx)(sv,{editorRef:i,options:l})]})})}));function dv(e){
|
||
var t=e.slateEditor,n=e.markdownSyntax,o=e.children,i=!1;if(null!=(null==t?void 0:t.selection)){var a=lv(hc.M8.edges(t.selection),2),l=a[0],u=a[1];i=null!=Ld(t,l,u).before[n]}return(0,r.jsx)(h.zxk,{className:iv().button,innerClassName:iv().buttonInner,color:i?iv().active:iv().inactive,hover:iv().hover,look:h.zxk.Looks.FILLED,size:h.zxk.Sizes.NONE,onClick:function(){null!=t&&vc.withSingleEntry(t,(function(){return Fd(t,n)}))},children:o})}function pv(e){var t=e.blockType,n=e.slateEditor,o=e.children,i=null!=n?hc.bN.getCurrentBlock(n):null,a=null!=i&&hc.aj.isType(i[0],t);return(0,r.jsx)(h.zxk,{className:iv().button,innerClassName:iv().buttonInner,color:a?iv().active:iv().inactive,hover:iv().hover,look:h.zxk.Looks.FILLED,size:h.zxk.Sizes.NONE,onClick:function(){null!=n&&vc.withSingleEntry(n,(function(){return function(e,t){var n=e.selection;if(null!=n){var r=!0,o=!0,i=!1,a=void 0;try{for(var l,u=hc.bN.blocks(e)[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){
|
||
var c=Zd(l.value,2),s=c[0],f=c[1];"line"!==s.type&&s.type!==t||!hc.M8.includes(n,f)||(r=r&&s.type===t)}}catch(e){i=!0;a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}hc.bN.withoutNormalizing(e,(function(){var o=!0,i=!1,a=void 0;try{for(var l,u=hc.bN.blocks(e)[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=Zd(l.value,2),s=c[0],f=c[1];hc.M8.includes(n,f)&&(r||"line"!==s.type?r&&s.type===t&&Ec.Q.setNodes(e,{type:"line"},{at:f}):Ec.Q.setNodes(e,{type:t},{at:f}))}}catch(e){i=!0;a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}));hc.bN.focus(e)}}(n,t)}))},children:o})}function hv(e){var t=e.slateEditor,n=null,r=null;if(null!=(null==t?void 0:t.selection)){var i=uv(hc.bN.nodes(t,{at:t.selection,match:function(e){return hc.bN.isVoid(t,e)}}));if(i.length>0){var a;n=(a=lv(i[0],2))[0],r=a[1]}}var l=o.useCallback((function(e){null!=(null==t?void 0:t.selection)&&vc.withSingleEntry(t,(function(){Ec.Q.voidToText(t,e,r)}))}),[t,r])
|
||
;return null==n?null:nv(n,{replace:l})}function yv(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function bv(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function vv(e){var t,n=e.editorRef,i=e.options,a=e.channel,l=null===(t=n.current)||void 0===t?void 0:t.getSlateEditor(),u=o.useCallback((function(e,t){var r=n.current;null!=e&&null!=r&&r.insertEmoji(e,t,!1);t&&(0,zo._Q)()}),[n]);return null==l?null:(0,r.jsxs)("div",{id:"slate-toolbar",className:iv().staticToolbar,children:[(0,r.jsx)("div",{className:iv().staticButtons,children:(0,
|
||
r.jsx)(sv,{editorRef:n,options:i,iconClassName:iv().staticIcon,dividerClassName:iv().staticDivider})}),(0,r.jsx)(h.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(Bo.Z,{persistSearch:!0,channel:a,closePopout:t,onSelectEmoji:function(e,n){u(e,n);n&&t()},pickerIntention:se.HzX.COMMUNITY_CONTENT})},position:"bottom",animation:h.yRy.Animation.NONE,align:"left",children:function(e,t){var n=t.isShown;return(0,r.jsx)(Sh.Z,bv(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){yv(e,t,n[t])}))}return e}({},e),{active:n,className:iv().emojiButton,tabIndex:0}))}})]})}function mv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gv(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value
|
||
}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Ov(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){gv(i,r,o,a,l,"next",e)}function l(e){gv(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ev(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Cv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ev(e,t,n[t])}))}return e}function jv(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Sv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mv(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Iv=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){
|
||
a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function _v(e,t,i,a){var l=Sv(o.useState(!1),2),u=l[0],c=l[1],s=o.useCallback((function(o,l,f,d,p){var b;if(!u){c(!0);var v,m,g=null!==(v=null===(b=wu.Z.getStickerPreview(a,t.drafts.type))||void 0===b?void 0:b.map((function(e){return e.id})))&&void 0!==v?v:[],O=null!==(m=Nu.Z.getUploads(a,t.drafts.type))&&void 0!==m?m:[];if(null!=l||d||p||!(0,du.CB)(O,a))e({value:o,uploads:O,stickers:g,command:l,commandOptionValues:f,isGif:d}).then((function(e){var n=e.shouldClear,r=e.shouldRefocus,o=function(e,t){var n,r;return null!==(r=e&&(null===(n=t.submit)||void 0===n?void 0:n.clearOnSubmit))&&void 0!==r&&r}(n,t),l=null!=i.current;o&&(!function(e){return e!==St.Z.getChannelId()}(a)?l&&i.current.clearValue():y.Z.saveDraft(a,"",t.drafts.type));if(l){c(!1);(0,zo._Q)()
|
||
;r&&i.current.focus()}}));else{c(!1);(0,h.ZDy)(Ov((function(){var e,t;return Iv(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(17428)]).then(n.bind(n,117428))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,jv(Cv({},e),{threadId:a,attachments:O,sendMessage:function(){return s(o,void 0,void 0,void 0,!0)}}))}]}}))})))}}}),[i,e,u,t,a]),f=o.useCallback((function(e){var t;null==i||null===(t=i.current)||void 0===t||t.submit(e)}),[]);return{submitting:u,submit:s,handleSubmit:f}}function wv(e){var t=e.editorRef,n=e.disabled,r=e.textValue,i=e.channelId,a=e.chatInputType,l=e.submit,u=(0,m.Z)().analyticsLocations;return o.useCallback((function(e,o){var c;if(!n){if((0,be.Hc)(o,r,i,a.drafts.type)){!function(e){var t=e.sticker,n=e.stickerSelectLocation,r=e.isReplacement,o=e.analyticsLocations;ce.default.track(se.rMx.STICKER_ATTACHED,{replaced:r,source:mn(n),sticker_id:t.id,location_stack:o})}({sticker:e,stickerSelectLocation:o,
|
||
isReplacement:null!=wu.Z.getStickerPreview(i,a.drafts.type),analyticsLocations:u});(0,nr.eu)(i,e,a.drafts.type)}else{var s;l({value:"",uploads:void 0,stickers:[e.id]});null===(s=t.current)||void 0===s||s.clearValue()}(0,zo._Q)();null===(c=t.current)||void 0===c||c.focus()}}),[n,r,i,a.drafts.type,t,u,l])}function xv(e,t){var n,i,l,c,y,O,E=e.textValue,C=e.richValue,j=e.className,S=e.innerClassName,I=e.disabled,_=e.placeholder,w=e.accessibilityLabel,x=e.channel,P=e.type,N=e.focused,A=e.renderAttachButton,T=e.renderApplicationCommandIcon,Z=e.pendingReply,M=e.onChange,R=e.onResize,L=e.onBlur,D=e.onFocus,k=e.onKeyDown,U=e.onSubmit,B=e.promptToUpload,F=e.highlighted,G=e.canMentionRoles,H=e.canMentionChannels,V=e.maxCharacterCount,W=e.characterCountClassName,z=e["aria-describedby"],Y=e["aria-labelledby"],q=e.setEditorRef,Q=e.autoCompletePosition;s()(null!=P,"chat input type must be set");var X=(0,m.Z)(v.Z.CHANNEL_TEXT_AREA).AnalyticsLocationProvider,J=function(e){var t=o.useRef(null)
|
||
;if(null!=e&&"function"==typeof e)throw Error("Only Ref objects are supported");return null==e?t:e}(t),$=o.useRef(null),ee=o.useRef(null),te=o.useRef(null),ne=o.useRef(null);null==q||q(ee.current);var re=(0,p.cj)([g.Z],(function(){var e,t;return{activeCommand:(null===(e=P.commands)||void 0===e?void 0:e.enabled)?g.Z.getActiveCommand(x.id):null,activeCommandSection:(null===(t=P.commands)||void 0===t?void 0:t.enabled)?g.Z.getActiveCommandSection(x.id):null}}),[x.id,P]),oe=re.activeCommand,ie=re.activeCommandSection,ae=function(e,t,n,r){var o=e.getGuildId(),i=(0,p.e7)([pu.Z],(function(){return null!=o&&pu.Z.isLurking(o)}),[o]),a=(0,p.e7)([jt.ZP,ge.default],(function(){var e,t,n=ge.default.getCurrentUser();return null!==(t=null!=o&&null!=n?null===(e=jt.ZP.getMember(o,n.id))||void 0===e?void 0:e.isPending:null)&&void 0!==t&&t})),l=(0,p.cj)([fn.Z],(function(){
|
||
var o,i,l=e.isPrivate(),u=fn.Z.computePermissions(e),c=d.Z.has(u,se.Plq.CREATE_PUBLIC_THREADS)||d.Z.has(u,se.Plq.CREATE_PRIVATE_THREADS),s=(!(null===(o=t.permissions)||void 0===o?void 0:o.requireCreateTherads)||c)&&(!(null===(i=t.permissions)||void 0===i?void 0:i.requireSendMessages)||d.Z.has(u,se.Plq.SEND_MESSAGES)),f=s&&d.Z.has(u,se.Plq.ATTACH_FILES),p=null!=n,h=(0,xu.xl)(e);return{disabled:r||a||!l&&!s||h,canAttachFiles:!0===t.attachments&&(l||a||f||p),canCreateThreads:c,canEveryoneSendMessages:Tu.ZP.canEveryoneRole(se.Plq.SEND_MESSAGES,e)}}),[r,e,n]);return Cv({isLurking:i,isPendingMember:a},l)}(x,P,oe,I),le=ae.isLurking,ue=ae.isPendingMember,ce=ae.disabled,fe=ae.canAttachFiles,de=ae.canCreateThreads,pe=ae.canEveryoneSendMessages,he=P.toolbarType===cn.O.STATIC,ye=!Ar.dN.useSetting()&&!(0,Zu.eL)()&&null!=window.ResizeObserver,be=!ye||!(null===(n=P.commands)||void 0===n?void 0:n.enabled)||!N||E!==K.GI,ve=(0,hu.Z)(),me=(0,p.cj)([b.Z],(function(){return{fontSize:b.Z.fontSize,
|
||
isSubmitButtonEnabled:b.Z.isSubmitButtonEnabled}})),Oe=me.isSubmitButtonEnabled,Ee=me.fontSize,Ce=(0,p.e7)([Pu.Z],(function(){return Pu.Z.isEnabled()}));!function(e,t){var n=o.useCallback((function(){t||(0,zo.RO)(ui.X1.EMOJI,e)}),[t,e]),r=o.useCallback((function(){var n;!t&&(null===(n=e.gifs)||void 0===n?void 0:n.allowSending)&&(0,zo.RO)(ui.X1.GIF,e)}),[t,e]),i=o.useCallback((function(){var n;!t&&(null===(n=e.stickers)||void 0===n?void 0:n.allowSending)&&(0,zo.RO)(ui.X1.STICKER,e)}),[t,e]);(0,Au.yp)({event:se.CkL.TOGGLE_EMOJI_POPOUT,handler:n});(0,Au.yp)({event:se.CkL.TOGGLE_GIF_PICKER,handler:r});(0,Au.yp)({event:se.CkL.TOGGLE_STICKER_PICKER,handler:i})}(P,ce);var je=function(e,t,n){var r=Sv(o.useState((function(){return new(u())})),1)[0];o.useEffect((function(){r.emit("text-changed",t,n)}),[t,n,r]);return{eventEmitter:r,handleEditorSelectionChanged:function(t){null!=e.current&&r.emit("selection-changed",t)}}
|
||
}(ee,E,C),Se=je.eventEmitter,Ie=je.handleEditorSelectionChanged,_e=_v(U,P,ee,x.id),we=_e.submitting,xe=_e.submit,Pe=_e.handleSubmit,Ne=function(){var e=o.useRef(null),t=o.useCallback((function(){var t;null===(t=e.current)||void 0===t||t.onMaybeShowAutocomplete()}),[]),n=o.useCallback((function(){var t;null===(t=e.current)||void 0===t||t.onHideAutocomplete()}),[]);return{autocompleteRef:e,handleMaybeShowAutocomplete:t,handleHideAutocomplete:n}}(),Ae=Ne.autocompleteRef,Te=Ne.handleMaybeShowAutocomplete,Ze=Ne.handleHideAutocomplete,Me=function(e,t,n){return o.useCallback((function(r){var o;if(t===cn.I.CREATE_FORUM_POST){var i;null===(i=n.current)||void 0===i||i.insertGIF(r)}else e(r.url,void 0,void 0,!0);(0,zo._Q)();null===(o=n.current)||void 0===o||o.focus()}),[n,e,t])}(xe,P,ee),Re=function(e){return o.useCallback((function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e.current;null!=t&&null!=o&&o.insertEmoji(t,n,r);n&&(0,zo._Q)()}),[e])}(ee),Le=wv({editorRef:ee,
|
||
disabled:ce,textValue:E,channelId:x.id,chatInputType:P,submit:U}),De=o.useCallback((function(){var e;return null==ne||null===(e=ne.current)||void 0===e?void 0:e.hide()}),[]),ke=function(e){var t=Sv(o.useState(0),2),n=t[0],r=t[1];return{editorHeight:n,handleResize:o.useCallback((function(t){r(null!=t?t:0);null==e||e(t)}),[e])}}(R),Ue=ke.editorHeight,Be=ke.handleResize,Fe=function(e,t,n){var r=o.useCallback((function(){var r,o;return!(n||!(null===(r=t.current)||void 0===r?void 0:r.onTabOrEnter(!1)))||(null===(o=e.current)||void 0===o?void 0:o.onTabOrEnter(!1))||!1}),[n]),i=o.useCallback((function(){var r,o;return!(n||!(null===(r=t.current)||void 0===r?void 0:r.onTabOrEnter(!0)))||(null===(o=e.current)||void 0===o?void 0:o.onTabOrEnter(!0))||!1}),[n]),a=o.useCallback((function(r){var o,i;return!(n||!(null===(o=t.current)||void 0===o?void 0:o.onMoveSelection(r)))||(null===(i=e.current)||void 0===i?void 0:i.onMoveSelection(r))||!1}),[n]);return{handleTab:r,handleEnter:i,
|
||
handleMoveSelection:a}}(Ae,$,be),Ge=Fe.handleTab,He=Fe.handleEnter,Ve=Fe.handleMoveSelection,We=function(e,t,n){var r=Sv((0,zo.Iu)((function(e){return[e.activeView,e.activeViewType]}),f.Z),2),i=r[0],a=r[1];o.useEffect((function(){return function(){(0,zo._Q)(e)}}),[e]);var l=o.useCallback((function(e){t.emit("autocomplete-visibility-change",e);e&&(0,zo._Q)()}),[t]),u=o.useCallback((function(){var e;null==i&&(null===(e=n.current)||void 0===e||e.handleOuterClick())}),[i]);return{expressionPickerView:i,shouldHideExpressionPicker:null==i||null==a||a!==e,handleAutocompleteVisibilityChange:l,handleOuterClick:u}}(P,Se,ee),ze=We.expressionPickerView,Ye=We.shouldHideExpressionPicker,Ke=We.handleAutocompleteVisibilityChange,qe=We.handleOuterClick;Fu(Se,x.guild_id,x.id);var Qe=ce&&!((le||ue)&&pe)||we&&(null===(i=P.submit)||void 0===i?void 0:i.useDisabledStylesOnSubmit),Xe=null;null!=oe?Xe=null==T?void 0:T(oe,ie,tp().attachButton):ce&&!de||(Xe=null==A?void 0:A(P===cn.I.NORMAL,tp().attachButton))
|
||
;var Je,$e,et,tt,nt,rt,ot=null!=Z,it=ye&&null!=C&&!ce&&P.showCharacterCount&&null==oe,at=ye&&!__OVERLAY__&&null!=C&&null==oe,lt=function(e,t,n,r){var o,i,a=Ar.up.useSetting(),l=(0,p.e7)([wu.Z],(function(){return wu.Z.getStickerPreview(e.id,t.drafts.type)})),u=null!=l&&l.length>0;return a&&(null===(o=t.stickers)||void 0===o?void 0:o.autoSuggest)&&!u&&!0!==(null===(i=r.current)||void 0===i?void 0:i.isVisible())&&!__OVERLAY__&&null!=n}(x,P,C,Ae),ut=Ut(x),ct=null!=oe||null!=Z||ut;return(0,r.jsx)(Zo,{value:Se,children:(0,r.jsxs)(X,{children:[at&&he?(0,r.jsx)(vv,{editorRef:ee,options:P.markdown,channel:x}):at?(0,r.jsx)(fv,{ref:ne,editorRef:ee,containerRef:te,options:P.markdown}):null,(0,r.jsxs)("div",{ref:J,className:a()(j,(et={},Ev(et,tp().channelTextArea,!0),Ev(et,tp().channelTextAreaDisabled,Qe),Ev(et,tp().highlighted,F),et)),onMouseDown:qe,children:[(0,r.jsx)(yh,{type:P,channel:x,activeCommand:oe,pendingReply:Z}),(0,r.jsxs)("div",{ref:te,onScroll:De,className:a()(S,(tt={},
|
||
Ev(tt,tp().scrollableContainer,!0),Ev(tt,tp().webkit,"Blink"===platform.layout),Ev(tt,tp().hasConnectedBar,ct),tt)),children:[(0,r.jsx)(Cp,{channelId:x.id,chatInputType:P}),P.hideAttachmentArea?null:(0,r.jsx)(Pb.Z,{channelId:x.id,type:P,canAttachFiles:fe}),(0,r.jsxs)("div",{className:a()(tp().inner,(nt={},Ev(nt,tp().innerDisabled,Qe),Ev(nt,tp().sansAttachButton,P!==cn.I.FORM&&P!==cn.I.EDIT&&P!==cn.I.RULES_INPUT&&P!==cn.I.PROFILE_BIO_INPUT&&P!==cn.I.FORUM_CHANNEL_GUIDELINES),Ev(nt,tp().sansAttachButtonCreateThread,P===cn.I.THREAD_CREATION),Ev(nt,tp().sansAttachButtonCreatePost,P===cn.I.CREATE_FORUM_POST),nt)),children:[Xe,(0,r.jsx)(h.tEY,{ringTarget:J,ringClassName:tp().focusRing,children:(0,r.jsx)(yp,{ref:ee,focused:N,useSlate:ye,textValue:E,richValue:C,disabled:ce,placeholder:_,accessibilityLabel:w,isPreviewing:(le||ue)&&pe,channel:x,type:P,canPasteFiles:fe,uploadPromptCharacterCount:se.en1,maxCharacterCount:null!=V?V:ve,"aria-describedby":z,onChange:M,onResize:Be,onBlur:L,onFocus:D,
|
||
onKeyDown:k,onSubmit:xe,onTab:Ge,onEnter:He,onMoveSelection:Ve,onSelectionChanged:Ie,onMaybeShowAutocomplete:Te,onHideAutocomplete:Ze,promptToUpload:B,fontSize:Ee,spellcheckEnabled:Ce,canOnlyUseTextCommands:ot,className:a()((rt={},Ev(rt,tp().textAreaThreadCreation,P===cn.I.THREAD_CREATION),Ev(rt,tp().profileBioInput,P===cn.I.PROFILE_BIO_INPUT),rt)),"aria-labelledby":Y})}),(0,r.jsx)(xb,{type:P,disabled:ce,channel:x,handleSubmit:Pe,isEmpty:0===E.trim().length})]})]}),be?null:(0,r.jsx)(gt,{ref:$,channel:x,canOnlyUseTextCommands:ot}),(0,r.jsx)(So,{ref:Ae,channel:x,canMentionRoles:G,canMentionChannels:H,useNewSlashCommands:ye,canOnlyUseTextCommands:ot,canSendStickers:null===(l=P.stickers)||void 0===l?void 0:l.allowSending,textValue:E,focused:N,expressionPickerView:ze,type:P,editorRef:ee,onSendMessage:xe,onSendSticker:Le,onVisibilityChange:Ke,editorHeight:Ue,setValue:function(e,t){return null==M?void 0:M(null,e,t)},position:Q}),(0,r.jsx)(_u,{textValue:E,editorHeight:Ue}),it?(0,r.jsx)(Nb.Z,{
|
||
type:P,textValue:E,className:W,maxCharacterCount:V}):null,lt?(0,r.jsx)(fu,{editorRef:ee,channel:x,isEditorFocused:N,onSelectSticker:Le,submitButtonVisible:(null===(c=P.submit)||void 0===c?void 0:c.button)&&(null!==(Je=null===(y=P.submit)||void 0===y?void 0:y.ignorePreference)&&void 0!==Je?Je:Oe),stickerIconVisible:null!==($e=null===(O=P.stickers)||void 0===O?void 0:O.button)&&void 0!==$e&&$e}):null]}),Ye?null:(0,r.jsx)(kl,{positionTargetRef:J,type:P,onSelectGIF:Me,onSelectEmoji:Re,onSelectSticker:Le,channel:x})]})})}const Pv=o.memo(o.forwardRef(xv))},573485:(e,t,n)=>{"use strict";n.d(t,{Z:()=>z});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(457217),u=n(247346),c=n(202351),s=n(744564),f=n(567867),d=n(73904),p=n(316878),h=n(106200),y=n(423427),b=n(284610),v=n(255592),m=n(34225),g=n(194212),O=n(707961),E=n(557617),C=n(474717),j=n(873506),S=n(115549),I=n(2590),_=n(518017),w=n.n(_),x=n(712218),P=n.n(x);function N(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e){var t=e.channelId,n=e.option,i=e.keyboardModeEnabled,l=o.useRef(null),u=T(o.useState(!1),2),c=u[0],s=u[1],d=v.Z.getUpload(t,n.name,b.d.ChannelMessage),p=o.useRef(null),h=o.useCallback((function(){s(!0)}),[]),y=o.useCallback((function(){s(!1)}),[]),m=o.useCallback((function(e){var r;s(!1);var o={id:n.name,file:null===(r=e.dataTransfer)||void 0===r?void 0:r.files[0],platform:C.ow.WEB};f.Z.setFile({channelId:t,id:n.name,file:o,draftType:b.d.ChannelMessage})}),[t,n]);o.useEffect((function(){var e=p.current;if(null==d){null==e||e.addEventListener("dragover",h,!1);null==e||e.addEventListener("dragleave",y,!1);null==e||e.addEventListener("drop",m,!1)}return function(){null==e||e.removeEventListener("dragover",h,!1);null==e||e.removeEventListener("dragleave",y,!1);null==e||e.removeEventListener("drop",m,!1)}
|
||
}),[d,h,y,m]);return null!=d?(0,r.jsx)(S.Z,{channelId:t,upload:d,keyboardModeEnabled:i,draftType:b.d.ChannelMessage,label:(0,r.jsxs)(o.Fragment,{children:[(0,r.jsxs)(O.xvT,{tag:"span",variant:"text-md/normal",children:[n.name,": "]}),(0,r.jsx)(O.xvT,{tag:"span",variant:"text-md/normal",color:"text-brand",children:d.filename})]}),canEdit:!1}):(0,r.jsxs)(j.Z,{id:n.name,channelId:t,keyboardModeEnabled:i,onKeyDown:function(e){if(e.which===I.yXg.ENTER){var t;e.preventDefault();null===(t=l.current)||void 0===t||t.activateUploadDialogue()}},className:a()(w().emptyOption,A({},w().emptyOptionActive,c)),draftType:b.d.ChannelMessage,ref:p,children:[(0,r.jsx)("span",{className:a()(w().optionName,A({},w().optionNameActive,c)),children:n.name}),(0,r.jsx)(O.P3F,{className:w().clickContainer,onClick:function(){var e;return null===(e=l.current)||void 0===e?void 0:e.activateUploadDialogue()},children:(0,r.jsxs)("div",{className:w().commandOptionContainer,children:[(0,r.jsx)("img",{src:P(),
|
||
className:w().optionIcon,alt:""}),(0,r.jsx)(O.xvT,{className:w().optionHelp,variant:"text-sm/normal",children:"Drag and drop or click to upload file"}),(0,r.jsx)(E.Z,{ref:l,onChange:function(e){var r,o;if(null!=t&&null!=(null===(r=e.currentTarget)||void 0===r||null===(o=r.files)||void 0===o?void 0:o[0])){var i={id:n.name,file:e.currentTarget.files[0],platform:C.ow.WEB};f.Z.setFile({channelId:t,id:n.name,file:i,draftType:b.d.ChannelMessage});e.currentTarget.value=""}},multiple:!1,tabIndex:-1,"aria-hidden":!0,className:w().fileInput})]})})]})}var M=n(503302),R=n.n(M),L=n(333286),D=n.n(L);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function B(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function F(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function G(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{
|
||
a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var H=[];function V(e){var t=e.channelId,n=e.type,i=(0,c.e7)([p.Z],(function(){return p.Z.keyboardModeEnabled})),O=(0,h.Z)("attachments",u.hy.HORIZONTAL),E=(0,c.e7)([v.Z],(function(){return v.Z.getUploads(t,n.drafts.type)})),C=(0,c.cj)([y.Z],(function(){var e=y.Z.getActiveCommand(t);if(null==e)return{isApplicationCommand:!1,commandOptions:H,commandOptionStates:null};var n=y.Z.getOptionStates(t);return{isApplicationCommand:!0,
|
||
commandOptions:e.options,commandOptionStates:n}})),j=C.isApplicationCommand,_=C.commandOptions,w=C.commandOptionStates,x=o.useMemo((function(){var e;return null!==(e=null==_?void 0:_.filter((function(e){var t;return e.type===d.jw.ATTACHMENT&&(null==w||null===(t=w[e.name])||void 0===t?void 0:t.hasValue)})))&&void 0!==e?e:[]}),[_,w]),P=G(o.useState([]),2),N=P[0],A=P[1];o.useEffect((function(){var e=function(){f.Z.clearAll(t,n.drafts.type)};s.Z.subscribe("APPLICATION_COMMAND_SET_ACTIVE_COMMAND",e);return function(){return s.Z.unsubscribe("APPLICATION_COMMAND_SET_ACTIVE_COMMAND",e)}}),[t,n]);var T=o.useCallback((function(){O.focusFirstVisibleItem()}),[O]);(0,g.yp)({event:I.CkL.FOCUS_ATTACHMENT_AREA,handler:T});o.useEffect((function(){if(j){var e=[];N.forEach((function(t){x.some((function(e){return t.name===e.name}))||e.push(t)}));e.forEach((function(e){f.Z.remove(t,e.name,n.drafts.type)}));A(x)}}),[t,x.length,n]);return!j&&0===E.length||j&&0===x.length?null:(0,r.jsxs)(o.Fragment,{
|
||
children:[(0,r.jsx)(l.bG,{navigator:O,children:(0,r.jsx)(l.SJ,{children:function(e){var o=e.ref,l=F(e,["ref"]);return(0,r.jsx)("ul",B(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){U(e,t,n[t])}))}return e}({ref:o},l),{className:a()(R().channelAttachmentArea,D().scrollbarGhost),children:j?x.map((function(e){return(0,r.jsx)(Z,{channelId:t,keyboardModeEnabled:i,option:e},e.name)})):E.map((function(e){return(0,r.jsx)(S.Z,{channelId:t,draftType:n.drafts.type,upload:e,keyboardModeEnabled:i},e.id)}))}))}})}),n.drafts.type===b.d.FirstThreadMessage?null:(0,r.jsx)(m.Z,{})]})}function W(e){var t=e.channelId,n=e.type;return e.canAttachFiles?(0,r.jsx)(V,{channelId:t,type:n}):null}const z=o.memo(W)},893691:(e,t,n)=>{"use strict";n.d(t,{cr:()=>h,
|
||
HZ:()=>y,cu:()=>b,tM:()=>v,IB:()=>m,lk:()=>g,xi:()=>O,zb:()=>E});var r=n(73904),o=n(49621),i=n(423427),a=n(836296),l=n(855483),u=n(651700),c=n(556635),s=n(1131);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var p=RegExp("([\\p{L}\\p{N}\\p{sc=Deva}\\p{sc=Thai}_-]+):","gu");function h(e){var t=c.bN.richValue(e)[0];return null==t||"applicationCommand"!==t.type?null:[t,s.YD]}function y(e){if(null==e.selection)return null;var t,n,r=null!==(t=c.bN.above(e,{at:e.selection.focus,match:function(t){return c.bN.isInline(e,t)&&"applicationCommandOption"===t.type}}))&&void 0!==t?t:null;return null!=r||c.M8.isCollapsed(e.selection)?r:null!==(n=c.bN.above(e,{at:e.selection.anchor,match:function(t){return c.bN.isInline(e,t)&&"applicationCommandOption"===t.type}}))&&void 0!==n?n:null}function b(e){var t=h(e),n=[],r=null==t?void 0:t[0].children;if(null!=r){var o=!0,i=!1,a=void 0;try{for(var l,u=r[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var s=l.value;c.aj.isType(s,"applicationCommandOption")&&n.push(s.optionName)}}catch(e){i=!0;a=e
|
||
}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}return n}function v(e,t){var n={};if(null==t.options)return{};var r=h(e),o=Object.fromEntries(t.options.map((function(e){return[e.name,e]}))),i=null==r?void 0:r[0].children;if(null!=i){var a=!0,l=!1,u=void 0;try{for(var s,f=i[Symbol.iterator]();!(a=(s=f.next()).done);a=!0){var d=s.value;if(c.aj.isType(d,"applicationCommandOption")){var p=o[d.optionName];null!=p&&(n[d.optionName]=m(e,p,d))}}}catch(e){l=!0;u=e}finally{try{a||null==f.return||f.return()}finally{if(l)throw u}}}return n}function m(e,t,n){var o=n.children.map((function(t){if(c.LC.isText(t))return{type:"text",text:t.text};if(c.bN.isVoid(e,t)){var n=(0,l.VI)(t);if(null!=n)return n}return{type:"text",text:(0,u.sg)(t,{mode:"raw"})}}));if(t.type!==r.jw.STRING){for(;o.length>0&&"text"===o[0].type&&""===o[0].text.trim();)o.shift();for(;o.length>0&&"text"===o[o.length-1].type&&""===o[o.length-1].text.trim();)o.pop()}return o}function g(e,t,n,r,i){
|
||
if(null==e.options)return{};var l,u=Object.fromEntries(e.options.map((function(e){return[e.name,a.f(e,null!==(l=r[e.name])&&void 0!==l?l:null,t,n,i)]})));o.VP(n,u);return u}function O(e,t,n,r,l){var u,c=d(r,1)[0],s=i.Z.getActiveCommand(n),f=null==s||null===(u=s.options)||void 0===u?void 0:u.find((function(e){return e.name===c.optionName}));if(null!=f){var p=m(e,f,c),h=a.f(f,p,t,n,l);o.g7(n,function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({},c.optionName,{lastValidationResult:h}));return h}}function E(e,t){if(null==t.options||0===t.options.length)return[];var n=c.bN.richValue(e),r=[],o=new Set(b(e)),i={},a=new Set,l=!0,s=!1,f=void 0;try{for(var d,h=t.options[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var y=d.value;i[y.displayName]=y;o.has(y.name)||a.add(y.displayName)}}catch(e){s=!0;f=e}finally{try{l||null==h.return||h.return()}finally{if(s)throw f}}for(var v=null,m=0;m<n.length;m++){var g=n[m]
|
||
;if("line"===g.type||"applicationCommand"===g.type)for(var O=0;O<g.children.length;O++){var E=g.children[O],C=[m,O];if(c.aj.isType(E,"applicationCommandOption")){if(null!=v){var j;v.valueRange.focus=null!==(j=c.bN.before(e,C))&&void 0!==j?j:c.bN.start(e,[]);v.text=(0,u.sk)(n,{mode:"raw",range:v.valueRange}).trim();r.push(v);v=null}}else if(c.LC.isText(E)){p.lastIndex=0;for(var S=void 0;null!=(S=p.exec(E.text));)if(0===S.index||null!=E.text.charAt(S.index-1).match(/(\t|\s)/)){var I=S[1];if(a.has(I)){a.delete(I);var _=i[I];if(null!=_){var w={path:C,offset:S.index},x={path:C,offset:w.offset+S[0].length},P={path:C,offset:x.offset},N={name:_.name,displayName:_.displayName,type:_.type,keyRange:{anchor:w,focus:x},valueRange:{anchor:P,focus:P},text:""};if(null!=v){v.valueRange.focus=N.keyRange.anchor;v.text=(0,u.sk)(n,{mode:"raw",range:v.valueRange}).trim();r.push(v)}v=N}}}}}}if(null!=v){v.valueRange.focus=c.bN.end(e,[]);v.text=(0,u.sk)(n,{mode:"raw",range:v.valueRange}).trim();r.push(v)}
|
||
return r}},510472:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(153686),s=n(19585),f=n(545758),d=n(473903),p=n(95891),h=n(850841),y=n(61209),b=n(715107),v=n(366007),m=n(652591),g=n(2590),O=n(473708),E=n(761066),C=n.n(E);function j(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){j(i,r,o,a,l,"next",e)}function l(e){j(i,r,o,a,l,"throw",e)}a(void 0)}))}}function I(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable
|
||
}))));r.forEach((function(t){I(e,t,n[t])}))}return e}var w=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue
|
||
}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function x(){(0,u.ZDy)(S((function(){var e,t;return w(this,(function(o){switch(o.label){case 0:return[4,n.e(14449).then(n.bind(n,14449))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,_({channel:null},e))}]}}))})))}function P(e){var t=e.className,n=e.iconOnly,i=(0,l.e7)([b.Z,y.Z],(function(){var e=y.Z.getChannel(b.Z.getChannelId());return(null==e?void 0:e.isPrivate())?g.ZY5.DM_CHANNEL:g.ZY5.GUILD_CHANNEL})),f=(0,s.Z)(c.Z.PREMIUM_UPSELL).analyticsLocations;o.useEffect((function(){m.default.track(g.rMx.PREMIUM_UPSELL_VIEWED,{type:"longer messages inline",location:{location_page:i,location_section:g.jXE.CHANNEL_TEXT_AREA},location_stack:f})}),[i,f]);return n?(0,r.jsx)(u.P3F,{className:C().iconOnly,onClick:function(){return x()},children:(0,r.jsx)(u.ua7,{text:O.Z.Messages.PREMIUM_MESSAGE_LENGTH_UPSELL_TOOLTIP_WITHOUT_LINK,position:"top",
|
||
children:function(e){return(0,r.jsx)(p.Z,_({className:C().premium},e))}})}):(0,r.jsxs)("div",{className:a()(C().root,t),children:[(0,r.jsx)(p.Z,{className:C().premium,color:v.JX.PREMIUM_TIER_2}),(0,r.jsx)(u.xvT,{className:C().text,variant:"text-sm/normal",children:O.Z.Messages.PREMIUM_MESSAGE_LENGTH_UPSELL_TOOLTIP.format({onLearnMore:x})})]})}var N=n(186195),A=n.n(N);function T(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){T(e,t,n[t])}))}return e}function M(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function R(e){var t,n=e.type,o=e.textValue,i=e.maxCharacterCount,y=e.className,b=(0,l.e7)([d.default],(function(){return h.ZP.canUseIncreasedMessageLength(d.default.getCurrentUser())})),v=(0,f.Z)(),m=null!=i?i:v,E=null!=i?i:v/10,C=o.length,j=null!=n.upsellLongMessages&&(null!=C?C:0)>g.J6R&&b,S=null!=n.upsellLongMessages&&!b,I=m-C,_=I>E,w=0===I?O.Z.Messages.CHARACTER_COUNT_AT_LIMIT:I>0?O.Z.Messages.CHARACTER_COUNT_CLOSE_TO_LIMIT.format({count:I}):O.Z.Messages.CHARACTER_COUNT_OVER_LIMIT,x=(0,s.Z)(c.Z.CHARACTER_COUNT).AnalyticsLocationProvider;return j&&I>=0||!_||S&&!_?(0,r.jsx)(x,{children:(0,r.jsxs)("div",{className:a()(y,A().characterCount,T({},A().error,I<0)),children:[(0,r.jsxs)("div",{
|
||
className:A().flairContainer,children:[j&&I>=0?(0,r.jsx)(u.ua7,{text:O.Z.Messages.PREMIUM_MESSAGE_LENGTH_CHATBOX_FLAIR.format({maxLength:m}),position:"top",children:function(e){return(0,r.jsx)(p.Z,Z({className:A().premiumFlair},e))}}):null,_?null:(0,r.jsx)(u.ua7,{text:w,position:"top",children:function(e){return(0,r.jsx)("span",M(Z({"aria-hidden":!0},e),{children:I}))}})]}),(0,r.jsx)(u.nn4,{children:O.Z.Messages.CHARACTER_COUNT_CLOSE_TO_LIMIT.format({count:I})}),S&&!_?(0,r.jsx)(P,{className:A().upsell,iconOnly:(null===(t=n.upsellLongMessages)||void 0===t?void 0:t.iconOnly)||!1}):null]})}):null}},1131:(e,t,n)=>{"use strict";n.d(t,{YD:()=>r,u9:()=>o,i$:()=>i,On:()=>a});var r=[0],o=[0,0],i=/(\t|\s)/,a=["applicationCommandOption"]},651700:(e,t,n)=>{"use strict";n.d(t,{sk:()=>v,sg:()=>g});var r=n(441143),o=n.n(r),i=n(773011),a=n(971561),l=n(61209),u=n(567403),c=n(840922),s=n(464187),f=n(473903),d=n(556635);function p(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{
|
||
if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){var n=null!=t?t:{},r=n.mode,o=n.ignoreTrailingEmptyNodes,i=n.preventEmojiSurrogates,a=b(null!=(null==t?void 0:t.range)?d.M8.edges(t.range):[void 0,void 0],2);return m(e,{mode:r,start:a[0],end:a[1],ignoreTrailingEmptyNodes:o,preventEmojiSurrogates:i})}function m(e,t){var n,r=null!=t?t:{},o=r.mode,i=r.start,a=r.end,l=r.separator,u=r.ignoreEmptyNodes,c=r.ignoreTrailingEmptyNodes,s=r.preventEmojiSurrogates,f=e.length>0&&!d.LC.isText(e[0]);null==l&&(l=f?"\n":"")
|
||
;var p,h=null!==(n=null==i?void 0:i.path[0])&&void 0!==n?n:0,y=null!==(p=null==a?void 0:a.path[0])&&void 0!==p?p:e.length-1;if(c)for(var b=y;b>=h;b--){var v=e[b];if(d.LC.isText(v)){if(v.text.length>0){y=b;break}}else if(!d.q.isEmpty(v)){y=b;break}if(b===h)return""}for(var m=h>0&&d.aj.isType(e[h-1],"blockQuote"),O=d.aj.isType(e[h],"blockQuote"),E=d.aj.isType(e[y],"blockQuote"),C=[],j=h;j<=y;j++){var S=e[j];if(!u||!d.LC.isText(S)||0!==S.text.length){var I=g(S,{mode:o,start:null!=i&&j===h?{path:i.path.slice(1),offset:i.offset}:void 0,end:null!=a&&j===y?{path:a.path.slice(1),offset:a.offset}:void 0,allowBlockQuotePrefix:null==i||null==a||!m&&(!O||E),preventEmojiSurrogates:s});(!u||I.length>0)&&C.push(I)}}return C.join(l)}function g(e,t){var n=null!=t?t:{},r=n.mode,p=n.start,b=n.allowBlockQuotePrefix,v=void 0!==b&&b,g=n.preventEmojiSurrogates,O=void 0!==g&&g;if(d.LC.isText(e))return function(e,t){var n,r,i=null!=t?t:{},a=i.start,l=i.end
|
||
;o()(null==a||0===a.path.length,"Invalid start provided to serializeText");o()(null==l||0===l.path.length,"Invalid end provided to serializeText");return e.substring(null!==(n=null==a?void 0:a.offset)&&void 0!==n?n:0,null!==(r=null==l?void 0:l.offset)&&void 0!==r?r:e.length)}(e.text,t);switch(e.type){case"line":case"testInline":return m(e.children,t);case"testInlineVoid":return"";case"blockQuote":var E=m(e.children,t),C=null!=p&&1===p.path.length&&0===p.path[0]&&0===p.offset;return v&&(null==p||C)?"> ".concat(E):E;case"emoji":var j=e.emoji;return O||null==j.surrogate?j.name:j.surrogate;case"customEmoji":var S=e.emoji;if("raw"===r){var I=S.animated?"a":"",_=S.name.replace(/:/g,"").split("~")[0];return"<".concat(I,":").concat(_,":").concat(S.emojiId,">")}return S.name;case"textMention":return e.name;case"channelMention":var w="<#".concat(e.channelId,">");if("raw"===r)return w;var x=l.Z.getChannel(e.channelId);return null==x?w:(0,i.F6)(x,f.default,c.Z,!0,!0);case"staticRouteLink":
|
||
var P="<id:".concat(e.channelId,">");if("raw"===r)return P;var N=l.Z.getChannel(e.channelId);return null==N?P:(0,i.F6)(N,f.default,c.Z,!0,!0);case"roleMention":var A="<@&".concat(e.roleId,">");if("raw"===r)return A;var T=u.Z.getGuild(s.Z.getGuildId()),Z=null==T?void 0:T.roles[e.roleId];return null==Z?A:"@".concat(Z.name);case"userMention":var M="<@".concat(e.userId,">");if("raw"===r)return M;var R=f.default.getUser(e.userId);return null==R?M:"@".concat(R.username,"#").concat(R.discriminator);case"commandMention":return"</".concat(e.commandName,":").concat(e.commandId,">");case"timestamp":return(0,a.He)(e.parsed.timestamp,e.parsed.format);case"applicationCommand":return m(e.children,y(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){
|
||
h(e,t,n[t])}))}return e}({},t),{separator:" ",ignoreEmptyNodes:!0}));case"applicationCommandOption":var L=m(e.children,t);return null==p?"".concat(e.optionDisplayName,":").concat(L):L}}},73948:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s});var r=n(104182),o=n(893691),i=n(556635),a=n(1131);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var s=function(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){u(e,t,n[t])}))}return e}({},r.YR),{resetSelectionToStart:function(e){r.YR.select(e,i.bN.start(e,[]))},resetSelectionToEnd:function(e){r.YR.select(e,i.bN.end(e,[]))},delete:function(e,t){var n=t.at,o=t.distance,a=t.unit,l=t.reverse,u=void 0!==l&&l,s=t.select,f=void 0!==s&&s,d=t.bounds,p=t.voids;if(null==n){if(null==e.selection)return;n=e.selection}var h=c(i.M8.isRange(n)?i.M8.edges(n):i.bN.edges(e,n),2),y=h[0],b=h[1];if(null!=o||null!=a)if(u){var v;y=null!==(v=i.bN.before(e,y,{distance:o,unit:a}))&&void 0!==v?v:i.bN.start(e,[])}else{var m;b=null!==(m=i.bN.after(e,b,{distance:o,unit:a}))&&void 0!==m?m:i.bN.end(e,[])}if(null!=d){var g=c(i.M8.edges(d),2),O=g[0],E=g[1];i.Jz.isBefore(y,O)&&(y=O);i.Jz.isAfter(b,E)&&(b=E)}if(!i.Jz.equals(y,b)){r.YR.delete(e,{at:{anchor:y,focus:b},hanging:!0,voids:p})
|
||
;f&&i.bN.hasPath(e,y.path)&&r.YR.select(e,y)}},textToText:function(e,t,n){var o,a=i.bN.getSelectionOverlap(e,n),l=c(i.M8.edges(n),2),u=l[0],s=l[1],f=null!==(o=i.bN.before(e,u))&&void 0!==o?o:i.bN.start(e,[]),p=i.bN.after(e,s);r.YR.delete(e,{at:n,voids:!0});r.YR.insertText(e,t,{at:f});d(e,a,f=null!=f?f:i.bN.start(e,[]),p=null!=p?p:i.bN.end(e,[]),p)},textToVoid:function(e,t,n){var o=i.bN.getSelectionOverlap(e,n),a=i.M8.start(n),l=i.C0.next(a.path),u={path:i.C0.next(l),offset:0};r.YR.delete(e,{at:n,voids:!0});0===a.offset&&r.YR.insertNodes(e,[{text:""}],{at:a.path});r.YR.insertNodes(e,[t],{at:a});i.bN.hasPath(e,u.path)&&i.LC.isText(i.bN.node(e,u.path)[0])||r.YR.insertNodes(e,[{text:""}],{at:u.path});d(e,o,a,u,u)},textToInline:function(e,t,n){var o=i.bN.getSelectionOverlap(e,n),a=t.children[t.children.length-1],l=i.M8.start(n),u=i.C0.next(l.path),c={path:i.C0.child(u,t.children.length-1),offset:i.LC.isText(a)?a.text.length:0};r.YR.delete(e,{at:n,voids:!0})
|
||
;0===l.offset&&r.YR.insertNodes(e,[{text:""}],{at:l.path});r.YR.insertNodes(e,[t],{at:l});d(e,o,l,c,c)},voidToText:function(e,t,n){var o,a=i.bN.getSelectionOverlap(e,n),l=null!==(o=i.bN.before(e,n))&&void 0!==o?o:i.bN.start(e,[]),u={path:l.path,offset:l.offset+t.length};r.YR.delete(e,{at:n,voids:!0});r.YR.insertText(e,t,{at:l});d(e,a,l,l,u)},removeInline:function(e,t){var n,o=i.bN.getSelectionOverlap(e,t),a=null!==(n=i.bN.before(e,t))&&void 0!==n?n:i.bN.start(e,[]);r.YR.delete(e,{at:t,voids:!0});d(e,o,a,a,a)},removeInlineChildren:function(e,t){var n=c(t,2),o=n[0],a=n[1],l=i.bN.getSelectionOverlap(e,a),u={path:i.C0.child(a,0),offset:0};i.bN.withoutNormalizing(e,(function(){for(var t=o.children.length-1;t>=0;t--)r.YR.removeNodes(e,{at:i.C0.child(a,t),voids:!0})}));d(e,l,null,u,null)},selectCommandOption:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=o.cr(e);if(null!=a)for(var l=0;l<a[0].children.length;l++){var u=a[0].children[l]
|
||
;if(i.aj.isType(u,"applicationCommandOption")&&u.optionName===t){n?r.YR.select(e,[0,l]):r.YR.select(e,i.bN.end(e,[0,l]));return}}},selectPreviousCommandOption:function(e){if(null!=o.cr(e)){var t=null!=e.selection?e.selection.focus.path:i.bN.end(e,a.YD).path,n=o.HZ(e),l=i.bN.previous(e,{at:t,match:function(e){return e!==(null==n?void 0:n[0])&&i.aj.isType(e,"applicationCommandOption")}});null!=l?r.YR.select(e,l[1]):i.C0.isAfter(t,a.u9)&&r.YR.select(e,i.bN.end(e,a.u9))}},selectNextCommandOption:function(e){if(null!=o.cr(e)){var t=null!=e.selection?e.selection.focus.path:i.bN.start(e,a.YD).path,n=o.HZ(e),l=i.bN.next(e,{at:t,match:function(e){return e!==(null==n?void 0:n[0])&&i.aj.isType(e,"applicationCommandOption")}});null!=l?r.YR.select(e,l[1]):s.resetSelectionToEnd(e)}},insertCommandOption:function(e,t){s.resetSelectionToEnd(e);s.insertNodes(e,[{type:"applicationCommandOption",optionName:t.name,optionDisplayName:t.displayName,optionType:t.type,children:[{text:""}]}])},
|
||
keyboardMove:function(e,t){var n=null!=t?t:{},o=n.reverse,l=void 0!==o&&o,u=n.unit,s=void 0===u?"offset":u,f=n.edge,d=e.selection;if(null!=d)if(void 0===f&&i.M8.isExpanded(d))r.YR.collapse(e,{edge:l?"start":"end"});else{for(var p,h=l?i.bN.before:i.bN.after,y=h(e,d.focus,{unit:s});null!=y&&null!=(p=i.bN.getParentVoid(e,y))&&!a.On.includes(p[0].type);)y=h(e,y,{unit:"offset"});if(null!=y&&y.offset>0){var b=c(i.bN.node(e,y.path),1)[0];if(i.LC.isText(b)){var v=b.text.charCodeAt(y.offset);if(v>=56320&&v<=57343){var m=b.text.charCodeAt(y.offset-1);m>=55296&&m<=56319&&(l&&y.offset>0?y.offset-=1:!l&&y.offset<b.text.length&&(y.offset+=1))}}}null!=y&&("focus"===f?r.YR.setSelection(e,{focus:y}):r.YR.setSelection(e,{focus:y,anchor:y}))}}});function f(e,t,n,r,o){switch(t){case"start":return n;case"inside":return r;case"end":return o}return e}function d(e,t,n,r,o){var i,a;if(null!=t.anchor||null!=t.focus){
|
||
var l=f(null===(i=e.selection)||void 0===i?void 0:i.anchor,t.anchor,n,r,o),u=f(null===(a=e.selection)||void 0===a?void 0:a.focus,t.focus,n,r,o);if(null!=l&&null!=u){var c={anchor:l,focus:u};s.select(e,c)}}}},556635:(e,t,n)=>{"use strict";n.d(t,{lP:()=>we,bN:()=>be,q:()=>me,aj:()=>ve,C0:()=>Oe,Jz:()=>Ee,M8:()=>Ce,Ew:()=>je,LC:()=>ge});var r=n(441143),o=n.n(r),i=n(104182),a=n(380942),l=n(5387),u=n.n(l),c=n(120053),s=n(894012),f=n(296602),d=n(645842),p=n(757278),h=n(844494);const y=(0,n(260561).B)({id:"2022-12_timestamp_tooltip",label:"Timestamp Tooltip",kind:"user",defaultConfig:{enabled:!1},treatments:[{id:1,label:"Enabled",config:{enabled:!0}}]});var b=n(120637),v=(n(455049),b.Z.listLanguages()),m={},g=!0,O=!1,E=void 0;try{for(var C,j=v[Symbol.iterator]();!(g=(C=j.next()).done);g=!0){var S=C.value;S=S.toLowerCase();var I=b.Z.getLanguage(S);if(null!=I){var _=I.aliases;m[S]=S;if(null!=_){var w=!0,x=!1,P=void 0;try{for(var N,A=_[Symbol.iterator]();!(w=(N=A.next()).done);w=!0){
|
||
var T=N.value;m[T.toLowerCase()]=S}}catch(e){x=!0;P=e}finally{try{w||null==A.return||A.return()}finally{if(x)throw P}}}}}}catch(e){O=!0;E=e}finally{try{g||null==j.return||j.return()}finally{if(O)throw E}}var Z=/^[a-z0-9_+\-.#]+$/,M=/^[a-z0-9_+\-.#]+$/i;for(var R in m)if(null==R.match(Z))throw new Error("Language name does not match regex: ".concat(R));function L(e){for(var t,n=[],r=/\\|```/g;null!=(t=r.exec(e));)"\\"!==t[0]?n.push(t.index):r.lastIndex+=1;return n}function D(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){D(e,t,n[t])}))}return e}function U(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var B={link:{type:"skip"},highlight:{type:"skip"},blockQuote:{type:"skip"},codeBlock:{type:"skip"},list:{type:"skip"},heading:{type:"skip"},channelOrMessageUrl:{type:"skip"},newline:{type:"verbatim"},br:{type:"verbatim"},paragraph:{type:"verbatim"},text:{type:"verbatim"},emoticon:{type:"verbatim"},mention:{type:"inlineObject"},roleMention:{type:"inlineObject"},commandMention:{type:"inlineObject"},channelMention:{type:"inlineObject"},emoji:{type:"inlineObject"},customEmoji:{type:"inlineObject"},em:{type:"inlineStyle",before:"*",after:"*"},looseEm:{type:"inlineStyle",
|
||
before:"*",after:" *"},autolink:{type:"inlineStyle",before:"<",after:">"},strong:{type:"inlineStyle",before:"**",after:"**"},u:{type:"inlineStyle",before:"__",after:"__"},s:{type:"inlineStyle",before:"~~",after:"~~"},escape:{type:"inlineStyle",before:"\\",after:""},inlineCode:{type:"inlineStyle",before:"`",after:"`"},staticRouteLink:{type:"inlineStyle",before:"<id:",after:">"},spoiler:{type:"inlineStyle",before:"||",after:"||"},url:{type:"inlineStyle",before:"",after:""},codeBlockText:{type:"inlineStyle",before:"",after:""},codeBlockSyntax:{type:"inlineStyle",before:"",after:""},codeBlockLang:{type:"inlineStyle",before:"",after:""},timestamp:{type:"inlineObject"}},F=new Set(["*","_","\\"]),G={},H={};for(var V in d.Z.RULES){if(!(V in B))throw new Error("Slate: Unknown markdown rule: ".concat(V,". If you have just added a new markdown rule ")+"then you probably need to add it to this file so that the rich chat box understands it.");var W=B[V];"skip"!==W.type&&(G[V]=z(d.Z.RULES[V]))
|
||
;"skip"!==W.type&&"inlineObject"!==W.type&&(H[V]=z("text"===V?p.ZP:d.Z.RULES[V]))}function z(e){o()(null!=e.parse,"Slate: rule must have a parse function");var t=e.parse;return U(k({},e),{parse:function(e,n,r){var o=t.call(this,e,n,r);o instanceof Array||(o.originalMatch=e);return o}})}var Y={url:{parse:function(e){return{type:"link",content:e[1],originalMatch:e}}},autolink:{parse:function(e){return{type:"autolink",content:e[1],originalMatch:e}}},codeBlockSyntax:{order:c.defaultRules.inlineCode.order-.1,match:function(e){return/^(```)([a-z0-9_+\-.]+$)?/.exec(e)},parse:function(e){return null!=e[2]&&""!==e[2]&&e[2].toLowerCase()in m?[{type:"codeBlockSyntax",content:e[1],originalMatch:e},{type:"codeBlockLang",content:e[2],originalMatch:e}]:{type:"codeBlockSyntax",content:e[0],originalMatch:e}}}},K=(0,h.Z)([G,Y]),q=(0,h.Z)([H,Y]),Q=s._p(K),X=s._p(q),J={max:1/0,maxAge:6e4,updateAgeOnGet:!0},$=new(u())(J),ee=new(u())(J);function te(e,t,n){var r=[],o={returnMentionIds:!0,
|
||
disableAutoBlockNewlines:!0,guildId:t},i=n?X:Q,a=n?ee:$,l=a.get(e);if(null!=l)return l;var u=e.replace(/\r\n/g," \n").replace(/[\r\f]/g," ").replace(/\t/g," ")+"\n\n";ne(r,u,{originalMatch:{index:0,0:""},type:"paragraph",content:i(u,!1,o)},0,[]);var c=function(e){e=e.filter((function(e){return e.text.length>0}));if(0===e.length)return e;for(var t=[e[0]],n=1;n<e.length;n++){var r=t[t.length-1],o=r.start+r.text.length,i=e[n];i.start===o&&null==r.data&&null==i.data&&r.attributes.join("-")===i.attributes.join("-")?r.text+=i.text:t.push(i)}return t}(r);a.set(e,c);return c}function ne(e,t,n,r,i){var a=n.content,l=n.type,u=n.originalMatch;o()(null!=u,"Slate: originalMatch must be set "+JSON.stringify(n,void 0,2));switch(l){case"newline":case"br":case"paragraph":case"text":case"emoticon":return re(e,t,a||"",r,i);case"emoji":case"customEmoji":var c=t.substring(r);if(!c.startsWith(u[0])){r=le(e,t,r,t.length);c=t.substring(r)}if(c.startsWith(u[0]))return ie({result:e,sourceText:t,text:u[0],
|
||
originalStart:r,attributes:[l],data:n});throw new Error("Slate: Unable to find emoji: ".concat(u[0]," in ").concat(t," at ").concat(r));case"mention":case"roleMention":case"channelMention":case"commandMention":case"staticRouteLink":case"channel":var s=n.text,f=n.id;if(null!=s){o()(s===u[0],"Slate: text mentions must exactly match the regex match");return ie({result:e,sourceText:t,text:s,originalStart:r,attributes:["textMention"],data:{text:s}})}return ie({result:e,sourceText:t,text:u[0],originalStart:r,attributes:[l],data:{id:f}});case"timestamp":return y.getCurrentConfig({}).enabled?ie({result:e,sourceText:t,text:u[0],originalStart:r,attributes:[l],data:n}):re(e,t,u[0],r,i);case"em":case"autolink":case"strong":case"u":case"s":case"escape":case"inlineCode":case"codeBlockSyntax":case"codeBlockLang":case"spoiler":case"url":case"link":var d=function(e,t,n,r){if("inlineCode"===t)return{before:r[1],after:r[1]};if("em"===t&&"_"===e.substring(n,n+1))return{before:"_",after:"_"}
|
||
;var o=B["link"===t?"url":t];if("inlineStyle"===o.type)return o;throw new Error("Slate: rule must be an inlineStyle")}(t,l,r=ae(t,r),u),p=d.before,h=d.after;r=oe(e,t,p,r,"syntaxBefore");i.push(l);r=re(e,t,null!=a?a:"",r,i);i.pop();return ae(t,r=oe(e,t,h,r,"syntaxAfter"));default:throw new Error("Slate: Unknown rule type: ".concat(l))}}function re(e,t,n,r,o){if("string"==typeof n)r=ie({result:e,sourceText:t,text:n,originalStart:r,attributes:o,data:null});else{n instanceof Array||(n=[n]);n.forEach((function(n){r=ne(e,t,n,r,o)}))}return ae(t,r)}function oe(e,t,n,r,i){if(n.length>0){var a=t.indexOf(n,r),l=t.substring(r,a+n.length);o()(a>=0,"Slate: Unable to find syntax characters");e.push({text:l,attributes:[i],start:r,data:null});r=a+n.length}return r}function ie(e){for(var t=e.result,n=e.sourceText,r=e.text,o=e.originalStart,i=e.attributes,a=e.data,l=ae(n,o);"\n"===r.charAt(0)||" "===r.charAt(0);)r=r.substring(1);var u=n.indexOf(r,l)
|
||
;if(u!==l)l=o=le(t,n,l,u);else if("\\"===r&&"\\"===n.charAt(u+1)){u++;o=++l}if(u!==l){new f.Z("MarkdownToSlate").error(JSON.stringify({sourceText:n,searchText:r,searchStartsAt:n.substring(l),startPos:l}));throw Error("Slate: Unable to find content in source text!")}var c=l+r.length,s=n.substring(o,c);t.push({text:s,attributes:i.slice(),start:o,data:a});return c}function ae(e,t){for(;"\n"===e.charAt(t)||" "===e.charAt(t);)t++;return t}function le(e,t,n,r){for(;n<r&&F.has(t[n]);)n=ae(t,n=oe(e,t,t[n],n,"syntaxBefore"));return n}var ue=n(1131);function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function se(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){se(e,t,n[t])}))}return e}function de(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||ye(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(e){return function(e){if(Array.isArray(e))return ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ye(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(e,t){if(e){if("string"==typeof e)return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,t):void 0}}var be=de(fe({},i.ML,a.F3),{richValue:function(e){return e.children},blocks:function(e){return be.richValue(e).map((function(e,t){return[e,[t]]}))},isInline:function(e,t){
|
||
return i.ML.isInline(e,t)},isVoid:function(e,t){return i.ML.isVoid(e,t)},isEditorEmpty:function(e){var t=be.richValue(e);return!(t.length>1)&&(0===t.length||"line"===t[0].type&&me.isEmpty(t[0]))},getFirstText:function(e){var t=be.node(e,ue.u9);return ge.isText(t[0])?t[0]:null},getCurrentBlock:function(e){return null==e.selection?null:this.getParentBlock(e,e.selection)},getCurrentElement:function(e){return null==e.selection?null:this.getParentElement(e,e.selection)},getCurrentInline:function(e){return null==e.selection?null:this.getParentInline(e,e.selection)},getCurrentVoid:function(e){return null==e.selection?null:this.getParentVoid(e,e.selection)},getCurrentText:function(e){var t=null!=e.selection?Ce.toPoint(e.selection):null;return null==t?null:be.node(e,t.path)},getParentBlock:function(e,t){var n;return null!==(n=be.above(e,{at:t,match:function(t){return be.isBlock(e,t)},mode:"lowest"}))&&void 0!==n?n:null},getParentElement:function(e,t){var n;return null!==(n=be.above(e,{at:t,
|
||
match:function(e){return me.isElement(e)},mode:"lowest"}))&&void 0!==n?n:null},getParentInline:function(e,t){var n;return null!==(n=be.above(e,{at:t,match:function(t){return be.isInline(e,t)},mode:"lowest"}))&&void 0!==n?n:null},getParentVoid:function(e,t){var n;return null!==(n=be.above(e,{at:t,match:function(t){return be.isVoid(e,t)},mode:"lowest"}))&&void 0!==n?n:null},getSelectedText:function(e,t){var n=null;if(t){var r=a.F3.findDocumentOrShadowRoot(e),o=r.getSelection();if(null!=o&&o.rangeCount>0){var i,l=null===(i=r.getSelection())||void 0===i?void 0:i.getRangeAt(0);null!=l&&(n=a.F3.toSlateRange(e,l,{exactMatch:!0,suppressThrow:!0}))}}else n=e.selection;return null==n?"":this.getTextFromRange(e,n)},getTextFromRange:function(e,t){var n=pe(Ce.edges(t),2),r=n[0],o=n[1],i=be.nodes(e,{at:t,mode:"lowest",match:function(e){return ge.isText(e)}}),a="",l=!0,u=!1,c=void 0;try{for(var s,f=i[Symbol.iterator]();!(l=(s=f.next()).done);l=!0){
|
||
var d=pe(s.value,2),p=d[0],h=d[1],y=Oe.equals(h,r.path)?r.offset:0,b=Oe.equals(h,o.path)?o.offset:0;a+=p.text.substring(y,b)}}catch(e){u=!0;c=e}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}return a},withoutNormalizing:function(e,t){var n=be.isNormalizing(e);be.setNormalizing(e,!1);try{t()}finally{be.setNormalizing(e,n)}!1!==n&&be.normalize(e)},areStylesDisabled:function(e){var t;if(!e.previewMarkdown)return!0;var n=be.richValue(e),r=n[0],o="line"===(null==r?void 0:r.type)?r.children[0]:null;if(null==o||!ge.isText(o))return!1;var i=e.chatInputType,a=o.text;return 1===n.length&&1===r.children.length&&(!0===i.sedReplace&&a.startsWith("s/")||!0===(null===(t=i.autocomplete)||void 0===t?void 0:t.reactions)&&a.startsWith("+"))},focus:function(e){if(!a.F3.isFocused(e)){a.F3.focus(e);a.F3.deselect(e)}},getSelectionOverlap:function(e,t){if(null==e.selection)return{anchor:null,focus:null};if(Oe.isPath(t)){var n=be.range(e,t),r=pe(be.node(e,t),1)[0];if(me.isElement(r)){
|
||
var o=be.before(e,t),i=be.after(e,t);t={anchor:null!=o?o:n.anchor,focus:null!=i?i:n.focus}}else t=n}var a=pe(Ce.edges(t),2),l=a[0],u=a[1],c=null,s=null;Ee.equals(e.selection.anchor,l)?c="start":Ee.equals(e.selection.anchor,u)?c="end":Ce.includes(t,e.selection.anchor)&&(c="inside");Ee.equals(e.selection.focus,l)?s="start":Ee.equals(e.selection.focus,u)?s="end":Ce.includes(t,e.selection.focus)&&(s="inside");return{anchor:c,focus:s}}}),ve=de(fe({},i.NB),{isType:function(e,t){return i.W_.isElement(e)&&e.type===t},isInTypes:function(e,t){return i.W_.isElement(e)&&t.has(e.type)}}),me=de(fe({},i.W_),{updateElement:function(e,t){var n=be.node(e,t[1]);o()(!be.isEditor(t[0]),"Element is the root node");o()(null!=n,"Failed to find element");o()(me.isElement(n[0]),"Node at this path is no longer an element");o()(n[0].type===t[0].type,"Node at this path is a different type");return n},markdown:function(e,t,n){
|
||
var r,o="line"===e.type&&!0===(null===(r=e.codeBlockState)||void 0===r?void 0:r.wasInCodeBlock),i=e.children.map((function(e){return ge.isText(e)?e.text:" "})),a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=L(e);o.push(e.length);if(1===o.length&&n)return[];var i=0,a=n,l=[],u=!0,c=!1,s=void 0;try{for(var f,d=o[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value;if(a)l.push({text:e.substring(i,p),start:i,attributes:["codeBlockText"],data:void 0});else{var h=p===o[o.length-2]?e.substring(p+3):"";p+=3+(null!=h.match(M)?h:"").length;var y=e.substring(i,p);if(""!==y){te(y,t,r).forEach((function(e){l.push(U(k({},e),{start:e.start+i}))}))}}a=!a;i=p}}catch(e){c=!0;s=e}finally{try{u||null==d.return||d.return()}finally{if(c)throw s}}return l}(i.join(""),null!=t?t:null,o,n);return{entries:a,serializedChildren:i}},isEmpty:function(e){if(e.children.length>1)return!1;if(0===e.children.length)return!0
|
||
;var t=e.children[0];return ge.isText(t)&&0===t.text.length}}),ge=fe({},i.xv),Oe=de(fe({},i.y$),{isFirstEditorBlock:function(e){return Oe.equals(e,ue.YD)},isFirstEditorText:function(e){return Oe.equals(e,ue.u9)},isFirstChild:function(e,t){return Oe.equals(t,Oe.child(e,0))},child:function(e,t){return he(e).concat([t])}}),Ee=de(fe({},i.E9),{start:function(e){var t=pe(e,2)[1];return{path:Oe.child(t,0),offset:0}},end:function(e){var t=pe(e,2),n=t[0],r=t[1],o=n.children[n.children.length-1];return{path:Oe.child(r,n.children.length-1),offset:ge.isText(o)?o.text.length:0}},isAtStart:function(e,t){return Ee.equals(e,this.start(t))},isAtEnd:function(e,t){return Ee.equals(e,this.end(t))},clamp:function(e,t){var n=pe(Ce.edges(t),2),r=n[0],o=n[1];Ee.isBefore(e,r)&&(e=r);Ee.isAfter(e,o)&&(e=o);return e}}),Ce=de(fe({},i.e6),{toPoint:function(e){return null==e||Ce.isExpanded(e)?null:e.anchor},children:function(e){var t=pe(e,2),n=t[0],r=t[1],o=n.children[n.children.length-1];return{anchor:{
|
||
path:Oe.child(r,0),offset:0},focus:{path:Oe.child(r,n.children.length-1),offset:ge.isText(o)?o.text.length:0}}},clamp:function(e,t){var n=pe(Ce.edges(e),2),r=n[0],o=n[1],i=pe(Ce.edges(t),2),a=i[0],l=i[1];Ee.isBefore(r,a)&&(r=a);Ee.isAfter(o,l)&&(o=l);return Ce.isForward(e)?{anchor:r,focus:o}:{anchor:o,focus:r}}}),je={equals:function(e,t){return null==e&&null==t||null!=e&&null!=t&&Ce.equals(e,t)},isValid:function(e,t){if(null==t)return!1;var n=t.anchor,r=t.focus;if(!be.hasPath(e,n.path)||!be.hasPath(e,r.path))return!1;var o=pe(be.node(e,n.path),1)[0],i=pe(be.node(e,r.path),1)[0];return ge.isText(o)&&ge.isText(i)&&n.offset<=o.text.length&&r.offset<=i.text.length}},Se=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Ie=function(e,t,n){var r=be.toDOMRange(e,t).getBoundingClientRect(),o=be.toDOMRange(e,n).getBoundingClientRect();return Se(r,o)&&Se(o,r)},_e=function(e,t,n,r){for(var o={anchor:t,focus:t},i=0,a=n.length,l=Math.floor((i+a)/2);l!==i;){var u={anchor:n[l],
|
||
focus:n[l]};Ie(e,u,o)?r?a=l:i=l:r?i=l:a=l;l=Math.floor((i+a)/2);if(!r&&l===n.length-2&&a===n.length-1){var c=n[n.length-1];Ie(e,{anchor:c,focus:c},o)&&(l=a)}}return n[l]},we={getLineStart:function(e,t,n){var r,o=be.getParentElement(e,t);if(null==o)return null;var i=be.previous(e,{at:t,match:function(t){return be.isInline(e,t)&&!be.isVoid(e,t)&&t!==o[0]}});null!=i&&(r=be.after(e,i[1]));null==r&&(r=be.start(e,o[1]));var a={anchor:r,focus:t},l=Array.from(be.positions(e,{at:a})),u=_e(e,t,l,!0);if(n&&Ee.equals(t,u)&&!Ee.isAtEnd(t,o)){var c=be.after(e,t);if(null==c)return u;u=_e(e,c,l,!0)}return u},getLineEnd:function(e,t,n){var r,o=be.getParentElement(e,t);if(null==o)return null;var i=be.next(e,{at:t,match:function(t){return be.isInline(e,t)&&!be.isVoid(e,t)&&t!==o[0]}});null!=i&&(r=be.before(e,i[1]));null==r&&(r=be.end(e,o[1]));var a={anchor:t,focus:r},l=Array.from(be.positions(e,{at:a})),u=_e(e,t,l,!1);if(n&&Ee.equals(t,u)&&!Ee.isAtEnd(t,o)){var c=be.after(e,t);if(null==c)return u
|
||
;u=_e(e,c,l,!1)}return u},getLineActionRange:function(e,t){var n=Ce.toPoint(e.selection);if(null==n)return null;if(t){var r=we.getLineStart(e,n,!1);return null==r?null:{anchor:r,focus:n}}var o=we.getLineEnd(e,n,!0);return null==o?null:{anchor:n,focus:o}}},xe=a.F3.findDocumentOrShadowRoot;a.F3.findDocumentOrShadowRoot=function(e){var t,n;return null!==(n=null===(t=e.windowContext)||void 0===t?void 0:t.renderWindow.document)&&void 0!==n?n:xe(e)}},468235:(e,t,n)=>{"use strict";n.d(t,{eL:()=>P,h6:()=>N,sS:()=>Z,jv:()=>A,C1:()=>x,em:()=>E,eU:()=>I,yi:()=>S,T1:()=>j,yl:()=>_,QM:()=>w});var r=n(744564),o=n(306472),i=n(120415),a=n(716118),l=n(335072);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}var s=function(e,t){var n,r,o,i,a={
|
||
label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{
|
||
value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},f=null;function d(e){return null!=f?f:f=e.object().required().keys({id:e.string().required(),name:e.string().required(),gameName:e.string().required(),users:e.array().items(e.string()).required(),filepath:e.string().required(),length:e.number().required(),thumbnail:e.string().required(),editMetadata:e.object().keys({start:e.number(),end:e.number(),applicationAudio:e.boolean(),voiceAudio:e.boolean()}),clipMethod:e.string().allow("auto","manual").required()})}function p(e){return h.apply(this,arguments)}function h(){h=c((function(e){var t,r;return s(this,(function(o){switch(o.label){case 0:return[4,n.e(54533).then(n.t.bind(n,197683,23))];case 1:t=o.sent().default;r=d(t);try{t.assert(e,r);return[2,e]}catch(e){return[2,null]}return[2]}}))}));return h.apply(this,arguments)}function y(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments
|
||
;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,l,"next",e)}function l(e){y(i,r,o,a,l,"throw",e)}a(void 0)}))}}function v(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){v(e,t,n[t])}))}return e}function g(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var O=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}
|
||
o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function E(e){return C.apply(this,arguments)}function C(){return(C=b((function(e){return O(this,(function(t){switch(t.label){case 0:return[4,r.Z.dispatch({type:"CLIPS_SETTINGS_UPDATE",settings:{clipsEnabled:e}})];case 1:t.sent();return[2]}}))}))).apply(this,arguments)}function j(e){r.Z.dispatch({type:"CLIPS_SETTINGS_UPDATE",settings:{storageLocation:e}})}function S(e){r.Z.dispatch({type:"CLIPS_SETTINGS_UPDATE",settings:{clipsQuality:e}})}function I(e){r.Z.dispatch({type:"CLIPS_SETTINGS_UPDATE",settings:{clipsLength:e}})}function _(e){r.Z.dispatch({type:"CLIPS_SETTINGS_UPDATE",settings:{viewerClipsEnabled:e}})}function w(e){r.Z.dispatch({type:"CLIPS_SETTINGS_UPDATE",settings:{viewerConnectivity:e}})}function x(){if(l.Z.getSettings().clipsEnabled){(0,a.GN)("chaos_message",1);r.Z.dispatch({type:"CLIPS_SAVE_CLIP"})}}function P(){
|
||
r.Z.dispatch({type:"CLIPS_CLEAR_CLIPS_SESSION"})}function N(){r.Z.dispatch({type:"CLIPS_CLEAR_NEW_CLIPS_COUNT"})}function A(e){return T.apply(this,arguments)}function T(){return(T=b((function(e){var t,n,a,l,u,c,s,f,d,h,y;return O(this,(function(b){switch(b.label){case 0:return(0,i.nI)()&&null!=(null===(t=o.Z.clips)||void 0===t?void 0:t.loadClipsDirectory)?[4,o.Z.clips.loadClipsDirectory(e)]:[2];case 1:n=b.sent();a=[];l=!0,u=!1,c=void 0;b.label=2;case 2:b.trys.push([2,7,8,9]);s=n[Symbol.iterator]();b.label=3;case 3:return(l=(f=s.next()).done)?[3,6]:[4,p(g(m({},(d=f.value).metadata),{filepath:d.filepath}))];case 4:null!=(h=b.sent())&&a.push(h);b.label=5;case 5:l=!0;return[3,3];case 6:return[3,9];case 7:y=b.sent();u=!0;c=y;return[3,9];case 8:try{l||null==s.return||s.return()}finally{if(u)throw c}return[7];case 9:r.Z.dispatch({type:"CLIPS_LOAD_DIRECTORY_SUCCESS",clips:a});return[2]}}))}))).apply(this,arguments)}function Z(e){return M.apply(this,arguments)}function M(){
|
||
return(M=b((function(e){var t;return O(this,(function(n){switch(n.label){case 0:return(0,i.nI)()&&null!=(null===(t=o.Z.clips)||void 0===t?void 0:t.deleteClip)?[4,o.Z.clips.deleteClip(e)]:[2];case 1:n.sent();r.Z.dispatch({type:"CLIPS_DELETE_CLIP",filepath:e});return[2]}}))}))).apply(this,arguments)}},541421:(e,t,n)=>{"use strict";n.d(t,{Z:()=>H});var r=n(785893),o=n(667294),i=n(824390),a=n.n(i),l=n(202351),u=n(707961),c=n(306472),s=n(102921),f=n(468235),d=n(335072),p=n(294184),h=n.n(p),y=n(730381),b=n.n(y),v=n(940405),m=n(473903),g=n(993137),O=n(472034),E=n(813749),C=n(72580),j=n(15649),S=n.n(j);function I(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _(e){var t=e.clip,n=e.onDelete,o=e.onClick,i=(0,l.Wu)([m.default],(function(){return t.users.map((function(e){return m.default.getUser(e)})).filter(C.lm)})),a=b().duration(t.length),c="".concat(a.seconds()).padStart(2,"0");return(0,r.jsxs)(u.P3F,{onClick:function(){
|
||
return null==o?void 0:o(t)},className:h()(S().clipItem,I({},S().clickable,null!=o)),children:[(0,r.jsxs)(g.Z,{aspectRatio:16/9,className:S().clipThumbContainer,children:[(0,r.jsx)("img",{alt:"",src:t.thumbnail,className:S().clipThumb}),(0,r.jsx)(u.xvT,{className:S().clipDuration,variant:"text-xs/normal",color:"always-white",children:"".concat(a.minutes(),":").concat(c)}),(0,r.jsx)("div",{className:S().editContainer,children:(0,r.jsx)(O.Z,{className:S().editIcon})})]}),(0,r.jsxs)("div",{className:S().clipFooter,children:[(0,r.jsx)(u.X6q,{color:"text-normal",variant:"heading-deprecated-12/normal",children:t.gameName}),(0,r.jsx)(u.X6q,{className:S().clipName,color:"header-primary",variant:"heading-deprecated-12/medium",children:t.name}),(0,r.jsxs)("div",{className:S().usersAndDelete,children:[(0,r.jsx)(v.Z,{maxUsers:4,users:i}),null!=n&&(0,r.jsx)(u.zxk,{color:u.zxk.Colors.PRIMARY,onClick:function(e){e.stopPropagation();n(t)},className:S().deleteButton,size:u.zxk.Sizes.NONE,
|
||
look:u.zxk.Looks.BLANK,children:(0,r.jsx)(E.Z,{className:S().deleteIcon})})]})]})]})}var w=n(190186),x=n(189865),P=n(473708),N=n(819731),A=n.n(N);function T(e){var t=e.filterQuery,n=e.setFilterQuery,o=e.onClose,i=e.sortOrder,a=e.setSortOrder;return(0,r.jsxs)("div",{className:A().root,children:[(0,r.jsx)(w.Z,{autoFocus:!0,size:w.Z.Sizes.LARGE,placeholder:P.Z.Messages.SEARCH,className:A().queryInput,query:t,onChange:n,onClear:function(){return n("")}}),(0,r.jsx)(u.PhF,{placeholder:P.Z.Messages.CLIPS_SORT_PLACEHOLDER,className:A().sortInput,options:[{value:"descending",label:P.Z.Messages.CLIPS_SORT_RECENT},{value:"ascending",label:P.Z.Messages.CLIPS_SORT_OLDEST}],isSelected:function(e){return e===i},select:a,serialize:function(e){return e}}),(0,r.jsx)(u.zxk,{size:u.zxk.Sizes.NONE,className:A().buttonReset,look:u.zxk.Looks.BLANK,onClick:o,children:(0,r.jsx)(x.Z,{className:A().closeIcon})})]})}var Z=n(997800),M=n.n(Z);function R(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function D(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){L(i,r,o,a,l,"next",e)}function l(e){L(i,r,o,a,l,"throw",e)}a(void 0)}))}}function k(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){k(e,t,n[t])}))}return e}function B(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)
|
||
}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var G=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}
|
||
if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function H(e){var t=e.closePopout,i=function(e){var t;if(null==(null===(t=c.Z.clips)||void 0===t?void 0:t.loadClip))return window.open("https://www.youtube.com/watch?v=blpe_sGnnP4");(0,u.ZDy)(D((function(){var t,o;return G(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(23344)]).then(n.bind(n,223344))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,B(U({},t),{clip:e}))}]}}))})))},p=F(o.useState(""),2),h=p[0],y=p[1],b=F(o.useState("descending"),2),v=b[0],m=b[1],g=F(o.useState(!1),2),O=g[0],E=g[1],C=o.useDeferredValue(h),j=(0,l.e7)([d.Z],(function(){return d.Z.getClips()})),S=(0,l.e7)([d.Z],(function(){return d.Z.getSettings().storageLocation}));o.useEffect((function(){(0,
|
||
f.h6)()}),[]);var I=o.useMemo((function(){return j.filter((function(e){if(""===C.trim())return!0;var t=C.toLowerCase();return a()(t,e.name.toLowerCase())||a()(t,e.gameName.toLowerCase())})).sort((function(e,t){return"ascending"===v?s.Z.compare(e.id,t.id):"descending"===v?s.Z.compare(t.id,e.id):0}))}),[j,C,v]);o.useEffect((function(){function e(){return(e=D((function(){return G(this,(function(e){switch(e.label){case 0:E(!0);e.label=1;case 1:e.trys.push([1,,3,4]);return[4,f.jv(S)];case 2:e.sent();return[3,4];case 3:E(!1);return[7];case 4:return[2]}}))}))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[S]);return(0,r.jsxs)("div",{className:M().root,children:[(0,r.jsx)(T,{onClose:t,filterQuery:h,setFilterQuery:y,sortOrder:v,setSortOrder:m}),(0,r.jsx)(u.Ttm,{className:M().clipGrid,children:O?(0,r.jsx)(u.$jN,{}):I.map((function(e){return(0,r.jsx)(_,{onClick:i,clip:e,onDelete:function(){return function(e){(0,u.ZDy)(D((function(){var t,o;return G(this,(function(i){
|
||
switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(18079)]).then(n.bind(n,718079))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,U({clip:e},t))}]}}))})))}(e)}},e.id)}))})]})}},921603:(e,t,n)=>{"use strict";n.d(t,{c$:()=>b,YZ:()=>v,bF:()=>m,kx:()=>O,Rq:()=>E,So:()=>C,Dr:()=>j,Su:()=>S,_Q:()=>I});var r=n(23279),o=n.n(r),i=n(999357),a=n(281110),l=n(744564),u=n(801809),c=n(878033),s=n(612831),f=n(2590);function d(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,l,"next",e)}function l(e){d(i,r,o,a,l,"throw",e)}a(void 0)}))}}var h,y=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){
|
||
return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},b=o()((h=p((function(e,t){var n;return y(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);l.Z.dispatch({type:"GUILD_DIRECTORY_FETCH_START"});return[4,a.Z.get({
|
||
url:f.ANM.DIRECTORY_CHANNEL_ENTRIES(e),query:{category_id:t}})];case 1:n=r.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_FETCH_SUCCESS",channelId:e,entries:n.body});return[3,3];case 2:r.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_FETCH_FAILURE"});return[3,3];case 3:return[2]}}))})),function(e,t){return h.apply(this,arguments)}),200),v=o()(function(){var e=p((function(e){var t;return y(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,a.Z.get({url:f.ANM.DIRECTORY_CHANNEL_CATEGORY_COUNTS(e)})];case 1:t=n.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_COUNTS_FETCH_SUCCESS",channelId:e,counts:t.body});return[3,3];case 2:n.sent();return[3,3];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),200);function m(e,t,n){return g.apply(this,arguments)}function g(){g=p((function(e,t,n){var r,o,a=arguments;return y(this,(function(c){switch(c.label){case 0:r=a.length>3&&void 0!==a[3]?a[3]:s.AR.UNCATEGORIZED;return[4,u.Z.post({
|
||
url:f.ANM.DIRECTORY_CHANNEL_ENTRY(e,t),body:{description:n,primary_category_id:r},trackedActionData:{event:i.a9.DIRECTORY_GUILD_ENTRY_CREATE,properties:{directory_channel_id:e,guild_id:t,primary_category_id:r}}})];case 1:o=c.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_ENTRY_CREATE",channelId:e,entry:o.body});return[2]}}))}));return g.apply(this,arguments)}function O(e,t){u.Z.delete({url:f.ANM.DIRECTORY_CHANNEL_ENTRY(e,t),trackedActionData:{event:i.a9.DIRECTORY_GUILD_ENTRY_DELETE,properties:{directory_channel_id:e,guild_id:t}}});l.Z.dispatch({type:"GUILD_DIRECTORY_ENTRY_DELETE",channelId:e,guildId:t})}var E=o()(function(){var e=p((function(e,t){var n;return y(this,(function(r){switch(r.label){case 0:if(!c.Z.shouldFetch(e,t)){l.Z.dispatch({type:"GUILD_DIRECTORY_CACHED_SEARCH",channelId:e,query:t});return[2]}r.label=1;case 1:r.trys.push([1,3,,4]);l.Z.dispatch({type:"GUILD_DIRECTORY_SEARCH_START",channelId:e,query:t});return[4,a.Z.get({url:f.ANM.DIRECTORY_ENTRIES_SEARCH(e),query:{query:t}
|
||
})];case 2:n=r.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_SEARCH_SUCCESS",channelId:e,query:t,results:n.body});return[3,4];case 3:r.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_FETCH_FAILURE"});return[3,4];case 4:return[2]}}))}));return function(t,n){return e.apply(this,arguments)}}(),200),C=function(e){l.Z.dispatch({type:"GUILD_DIRECTORY_SEARCH_CLEAR",channelId:e})},j=function(){var e=p((function(e,t,n){var r,o,i=arguments;return y(this,(function(u){switch(u.label){case 0:r=i.length>3&&void 0!==i[3]?i[3]:s.AR.UNCATEGORIZED;return[4,a.Z.patch({url:f.ANM.DIRECTORY_CHANNEL_ENTRY(e,t),body:{description:n,primary_category_id:r}})];case 1:o=u.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_ENTRY_UPDATE",channelId:e,entry:o.body});return[2]}}))}));return function(t,n,r){return e.apply(this,arguments)}}(),S=function(e,t){l.Z.dispatch({type:"GUILD_DIRECTORY_CATEGORY_SELECT",channelId:e,categoryId:t})},I=function(){var e=p((function(e,t){var n;return y(this,(function(r){switch(r.label){case 0:
|
||
r.trys.push([0,2,,3]);return[4,a.Z.get({url:f.ANM.DIRECTORY_CHANNEL_LIST_BY_ID(e),query:{entity_ids:t}})];case 1:n=r.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_ADMIN_ENTRIES_FETCH_SUCCESS",channelId:e,entries:n.body});return[3,3];case 2:r.sent();return[3,3];case 3:return[2]}}))}));return function(t,n){return e.apply(this,arguments)}}()},878033:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(202351),o=n(744564),i=n(549331);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function u(e){u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return u(e)}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){l(e,t,n[t])}))}return e}function s(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function f(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e,t){d=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return d(e,t)}var p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function h(e){var t=function(){
|
||
if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}var y=12e4,b={},v={};var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&d(e,t)}(n,e);var t=h(n);function n(){a(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getSearchState=function(e){var t;return null!==(t=b[e])&&void 0!==t?t:{mostRecentQuery:"",fetching:!1}};r.getSearchResults=function(e,t){var n,r,o
|
||
;return null!==(o=null===(n=v[e])||void 0===n||null===(r=n[t])||void 0===r?void 0:r.results)&&void 0!==o?o:[]};r.shouldFetch=function(e,t){var n,r,o=null===(n=v[e])||void 0===n||null===(r=n[t])||void 0===r?void 0:r.lastSearchedAt;return null==o||Date.now()-o>y};r.__getLocalVars=function(){return{CACHE_TIME:y,directorySearchState:b,directorySearchResults:v}};return n}(r.ZP.Store);m.displayName="GuildDirectorySearchStore";const g=new m(o.Z,{GUILD_DIRECTORY_SEARCH_START:function(e){var t=e.channelId,n=e.query;b[t]={fetching:!0,mostRecentQuery:n}},GUILD_DIRECTORY_SEARCH_SUCCESS:function(e){var t=e.channelId,n=e.query,r=e.results;b[t]=s(c({},b[t]),{fetching:!1});var o=[];r.forEach((function(e){var t=(0,i.MQ)(e);o.push(t)}));v[t]=s(c({},v[t]),l({},n,{results:(0,i.Th)(o),lastSearchedAt:Date.now()}))},GUILD_DIRECTORY_SEARCH_FAILURE:function(e){var t=e.channelId;b[t]=s(c({},b[t]),{fetching:!1})},GUILD_DIRECTORY_SEARCH_CLEAR:function(e){var t=e.channelId;b[t]={fetching:!1,mostRecentQuery:""}},
|
||
GUILD_DIRECTORY_CACHED_SEARCH:function(e){var t=e.channelId,n=e.query;b[t]={fetching:!1,mostRecentQuery:n}},GUILD_DIRECTORY_ENTRY_DELETE:function(e){var t,n=e.channelId,r=e.guildId,o=null===(t=b[n])||void 0===t?void 0:t.mostRecentQuery;if(null!=o){var i=v[n][o];if(null!=i){var a=i.results.filter((function(e){return e.guildId!==r}));v[n]=s(c({},v[n]),l({},b[n].mostRecentQuery,s(c({},i),{results:a})))}}}})},876186:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(202351),o=n(744564),i=n(549331),a=n(612831);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function c(e){c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return c(e)}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){u(e,t,n[t])}))}return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e,t){p=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return p(e,t)}var h=function(e){
|
||
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var b=!1,v={},m={},g={},O={},E={};var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&p(e,t)}(n,e);var t=y(n);function n(){l(this,n);return t.apply(this,arguments)}var r=n.prototype;r.isFetching=function(){return b};r.getCurrentCategoryId=function(e){var t;return null!==(t=m[e])&&void 0!==t?t:a.AR.ALL}
|
||
;r.getDirectoryEntries=function(e,t){var n;return null!=t?null===(n=g[e])||void 0===n?void 0:n[t]:v[e]};r.getDirectoryEntry=function(e,t){var n;return null===(n=v[e])||void 0===n?void 0:n[t]};r.getDirectoryAllEntriesCount=function(e){var t;return Object.keys(null!==(t=v[e])&&void 0!==t?t:{}).length};r.getDirectoryCategoryCounts=function(e){var t;return null!==(t=O[e])&&void 0!==t?t:{}};r.getAdminGuildEntryIds=function(e){return E[e]};r.__getLocalVars=function(){return{fetching:b,guildDirectoryEntries:v,currentCategoryId:m,channelCategoryDirectoryEntries:g,categoryEntryCounts:O,adminGuildEntryIds:E}};return n}(r.ZP.Store);C.displayName="GuildDirectoryStore";const j=new C(o.Z,{GUILD_DIRECTORY_FETCH_START:function(){b=!0},GUILD_DIRECTORY_FETCH_SUCCESS:function(e){var t=e.channelId,n=e.entries;b=!1;var r={},o={};n.forEach((function(e){var t=(0,i.MQ)(e);r[t.guildId]=t;null!=o[t.primaryCategoryId]?o[t.primaryCategoryId][t.guildId]=t:o[t.primaryCategoryId]=u({},t.guildId,t)}));v[t]=r;g[t]=o},
|
||
GUILD_DIRECTORY_FETCH_FAILURE:function(){b=!1},GUILD_DIRECTORY_ENTRY_CREATE:function(e){var t,n,r=e.channelId,o=e.entry,l=(0,i.MQ)(o);if(null!=l&&null==(null===(t=v[r])||void 0===t?void 0:t[l.guildId])){v[r]=f(s({},v[r]),u({},l.guildId,l));var c,d=null!==(c=l.primaryCategoryId)&&void 0!==c?c:a.AR.UNCATEGORIZED;g[r]=f(s({},g[r]),u({},d,f(s({},null===(n=g[r])||void 0===n?void 0:n[d]),u({},l.guildId,l))));if(null!=O[r]){var p,h,y=null!==(h=null===(p=O[r])||void 0===p?void 0:p[d])&&void 0!==h?h:0;O[r]=f(s({},O[r]),u({},d,y+1))}}},GUILD_DIRECTORY_ENTRY_DELETE:function(e){var t,n,r=e.channelId,o=e.guildId,i=null===(t=v[r])||void 0===t?void 0:t[o];if(null!=i){var a=i.primaryCategoryId,l=Object.assign({},v[r]);delete l[o];null===(n=E[r])||void 0===n||n.delete(o);E[r]=new Set(E[r]);v[r]=l;var c=Object.assign({},g[r][a]);delete c[o];g[r]=f(s({},g[r]),u({},a,c));if(null!=O[r]){var d=O[r][a]-1;O[r]=f(s({},O[r]),u({},a,d>=0?d:0))}}},GUILD_DIRECTORY_ENTRY_UPDATE:function(e){
|
||
var t,n,r,o,l=e.channelId,c=e.entry,d=(0,i.MQ)(c),p=null===(t=v[l])||void 0===t?void 0:t[d.guildId];v[l]=f(s({},v[l]),u({},d.guildId,s({},p,d)));var h,y,b=null!==(o=null==p?void 0:p.primaryCategoryId)&&void 0!==o?o:a.AR.UNCATEGORIZED,m=null!==(h=d.primaryCategoryId)&&void 0!==h?h:a.AR.UNCATEGORIZED,E=Object.assign({},null===(n=g[l])||void 0===n?void 0:n[b]);null!=p&&b!==m&&delete E[d.guildId];g[l]=f(s({},g[l]),(u(y={},b,E),u(y,m,f(s({},null===(r=g[l])||void 0===r?void 0:r[m]),u({},d.guildId,s({},p,d)))),y));if(m!==b&&null!=O[l]){var C,j,S,I,_;O[l]=f(s({},O[l]),(u(_={},b,(null===(C=O[l])||void 0===C?void 0:C[b])>0?(null===(j=O[l])||void 0===j?void 0:j[b])-1:0),u(_,m,(null!==(I=null===(S=O[l])||void 0===S?void 0:S[m])&&void 0!==I?I:0)+1),_))}},GUILD_DIRECTORY_CATEGORY_SELECT:function(e){var t=e.channelId,n=e.categoryId;m[t]=n},GUILD_DIRECTORY_COUNTS_FETCH_SUCCESS:function(e){var t=e.channelId,n=e.counts;O[t]=n},GUILD_DIRECTORY_ADMIN_ENTRIES_FETCH_SUCCESS:function(e){
|
||
var t=e.channelId,n=e.entries,r=new Set;n.forEach((function(e){var t=(0,i.MQ)(e);r.add(t.guildId)}));E[t]=r}})},549331:(e,t,n)=>{"use strict";n.d(t,{MQ:()=>u,_N:()=>c,Th:()=>s,Lz:()=>f,TR:()=>d,gX:()=>p});var r=n(441143),o=n.n(r),i=n(496486),a=n.n(i),l=n(612831);function u(e){var t,n,r,i,a,u,c;o()(e.type===l.C2.GUILD,"Directory entries must be connected to a guild!");return{channelId:e.directory_channel_id,guildId:e.entity_id,type:e.type,authorId:e.author_id,createdAt:e.created_at,description:e.description,primaryCategoryId:e.primary_category_id,name:null===(t=e.guild)||void 0===t?void 0:t.name,icon:null===(n=e.guild)||void 0===n?void 0:n.icon,splash:null===(r=e.guild)||void 0===r?void 0:r.splash,features:new Set(null===(i=e.guild)||void 0===i?void 0:i.features),approximateMemberCount:null===(a=e.guild)||void 0===a?void 0:a.approximate_member_count,approximatePresenceCount:null===(u=e.guild)||void 0===u?void 0:u.approximate_presence_count,
|
||
featurableInDirectory:null===(c=e.guild)||void 0===c?void 0:c.featurable_in_directory}}var c=5;function s(e){return a().orderBy(e,[function(e){return e.approximateMemberCount}],["desc"])}function f(e){return function(e){return a().orderBy(e,[function(e){return e.createdAt}],["desc"])}(e.filter((function(e){return e.featurableInDirectory&&p(e)}))).slice(0,c)}function d(e){return s(e)}function p(e){var t;return(null!==(t=e.approximateMemberCount)&&void 0!==t?t:0)>=5}},34183:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u,G:()=>c});var r=n(202351),o=n(61209),i=n(567403),a=n(682776),l=n(2590);function u(e){var t=(0,r.e7)([i.Z],(function(){return i.Z.getGuild(e.guildId)})),n=(0,r.e7)([o.Z],(function(){return o.Z.getChannel(e.channelId)})),u=(0,r.e7)([a.Z],(function(){return a.Z.can(l.Plq.ADMINISTRATOR,t)})),c=(0,r.e7)([a.Z],(function(){return a.Z.can(l.Plq.MANAGE_MESSAGES,n)}));return{isEntryAdmin:u,canEdit:u||c,canRemove:u||c}}function c(e){return(0,r.e7)([a.Z],(function(){
|
||
return a.Z.can(l.Plq.SEND_MESSAGES,e)}))}},156342:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>g});var r=n(785893),o=n(667294),i=n(707961),a=n(971402),l=n(112897),u=n(424871),c=n(528334),s=n(921603),f=n(34183),d=n(473708);function p(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,l,"next",e)}function l(e){p(i,r,o,a,l,"throw",e)}a(void 0)}))}}function y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){y(e,t,n[t])}))}return e}
|
||
function v(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var m=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:
|
||
a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function g(e){var t=e.entry,p=e.onSelect,y=e.closePopout,g=e.forceLightTheme,O=e.hideEditButton,E=void 0!==O&&O,C=function(){(0,a.Zy)();null==y||y()},j=(0,f.Z)(t),S=j.isEntryAdmin,I=j.canEdit,_=j.canRemove,w=(0,l.Z)(t.guildId,void 0,void 0,y);o.useEffect((function(){I||_||null!=w||(0,a.Zy)()}));var x=function(){s.kx(t.channelId,t.guildId)};return(0,r.jsxs)(i.v2r,{className:g?"theme-light":null,navId:"guild-entry-context",onClose:C,
|
||
"aria-label":d.Z.Messages.GUILD_ACTIONS_MENU_LABEL,onSelect:p,children:[(0,r.jsxs)(i.kSQ,{children:[I&&!E?(0,r.jsx)(i.sNh,{id:"update-entry",label:d.Z.Messages.HUB_ENTRY_UPDATE,action:function(){(0,i.ZDy)(h((function(){var e,o;return m(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(62439)]).then(n.bind(n,162439))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,v(b({},e),{entry:t}))}]}}))})));C()}}):null,_?(0,r.jsx)(i.sNh,{id:"remove-from-hub",label:d.Z.Messages.HUB_ENTRY_REMOVE,action:function(){(0,i.h7j)((function(e){return(0,r.jsx)(i.sm4,v(b({header:d.Z.Messages.HUB_ENTRY_REMOVE,confirmText:d.Z.Messages.REMOVE,cancelText:d.Z.Messages.CANCEL,onConfirm:x},e),{children:(0,r.jsx)(i.xvT,{variant:"text-md/normal",children:d.Z.Messages.HUB_ENTRY_REMOVE_BODY.format({guildName:t.name})})}))}));C()},color:"danger"}):null,S?null:(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(i.sNh,{id:"report-server-listing",
|
||
label:d.Z.Messages.REPORT_SERVER_NO_NAME,action:function(){if(null!=t){(0,u.sq)(t);C()}},icon:c.Z,color:"danger"})})]}),(0,r.jsx)(i.kSQ,{children:w})]})}},977085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(785893),o=(n(667294),n(707961)),i=n(156342);const a=function(e){var t=e.entry,n=e.forceLightTheme,a=e.hideEditButton,l=e.children,u=e.onRequestOpen,c=e.onRequestClose;return(0,r.jsx)(o.yRy,{onRequestOpen:u,onRequestClose:c,animation:o.yRy.Animation.NONE,position:"bottom",spacing:4,align:"right",renderPopout:function(e){var o=e.closePopout;return(0,r.jsx)(i.default,{entry:t,closePopout:o,forceLightTheme:n,hideEditButton:a})},children:l})}},516659:(e,t,n)=>{"use strict";n.d(t,{au:()=>u,dy:()=>c,op:()=>s});var r=n(667294),o=n(202351),i=(n(744564),n(674748),n(188344),n(896490),n(671723),n(618887)),a=n(99827),l=n(293078);function u(e){if(null==e)return null;var t,n,r=(0,l.BS)(e);if(null==r)return null;r.dropsQuestId;n=null;return null==(t=null)||null==n?null:{experiment:t,config:n,
|
||
drop:r}}function c(){return!1}function s(e){var t=u(e),n=null==t?void 0:t.drop,l=(0,o.e7)([a.Z],(function(){return null!=n&&a.Z.serverEligibleByQuestIds[n.dropsQuestId]})),c=(0,o.e7)([a.Z],(function(){return a.Z.hasInitialProgressFetched}));r.useEffect((function(){null!=n&&l&&!c&&(0,i.Vb)(n.dropsQuestId)}),[n,l,c])}},955521:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>v,Kq:()=>h,Ot:()=>y,jz:()=>b});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(896656),u=n(2590),c=n(214436),s=n.n(c);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function h(e){var t,n=e.locked,o=void 0!==n&&n,a=e.channelType;return(0,r.jsx)("div",{className:i()(s().emptyChannelIcon,(t={},f(t,s().locked,o),f(t,s().voiceChat,a===u.d4z.GUILD_VOICE||a===u.d4z.GUILD_STAGE_VOICE),t))})}function y(e){var t=e.children,n=e.className;return(0,r.jsx)(a.X6q,{"aria-hidden":"true",className:i()(n,s().header),variant:"heading-xxl/extrabold",children:t})}function b(e){var t=e.children;return(0,r.jsx)(a.xvT,{variant:"text-md/normal",color:"none",className:s().description,children:t})}const v=function(e){
|
||
var t=e.className,n=e.channelId,o=e.children,a=p(e,["className","channelId","children"]);return(0,r.jsx)("div",d(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}({className:i()(t,s().container),id:(0,l.p)(n,n)},a),{children:o}))}},940405:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n.n(l),c=n(707961),s=n(971402),f=n(707906),d=n(749565),p=n(983403),h=n.n(p);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function v(e){return function(){var t=this,n=arguments
|
||
;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,l,"next",e)}function l(e){b(i,r,o,a,l,"throw",e)}a(void 0)}))}}function m(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function g(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value)
|
||
;if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,
|
||
r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function C(e){var t=e.className,i=e.maxUsers,l=e.users,p=e.guildId,y=function(){return(0,r.jsx)(c.VqE,{className:h().popoutWrapper,children:(0,r.jsx)(c.Ttm,{className:h().scroller,children:l.map((function(e){return(0,r.jsx)(f.Z,{guildId:p,user:e,nick:d.ZP.getName(e),
|
||
onContextMenu:function(t){return(0,s.jW)(t,v((function(){var t,o;return E(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(85572)]).then(n.bind(n,810848))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,g(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){m(e,t,n[t])}))}return e}({},t),{user:e}))}]}}))})),{onClose:function(){return j(!1)}})}},e.id)}))})})},b=O(o.useState(!1),2),C=b[0],j=b[1];return l.length<=0?null:(0,r.jsx)("div",{className:a()(t,h().avatars),children:function(){var e=u()(l).take(i).map((function(e){var t=d.ZP.getName(e);return(0,r.jsx)(c.DY3,{text:t,className:h().avatar,children:(0,r.jsx)(c.qEK,{src:e.getAvatarURL(p,24),"aria-label":t,size:c.EFr.SIZE_24})
|
||
},e.id)})).value(),t=l.length-i;t>0&&(e[e.length-1]=(0,r.jsx)(c.yRy,{renderPopout:y,shouldShow:C,position:"bottom",onRequestClose:function(){return j(!1)},children:function(){return(0,r.jsxs)(c.zxk,{className:a()(h().avatar,h().overflow),onClick:function(){return j(!0)},look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.NONE,children:["+",t+1]})}},"overflow"));return e}()})}},672886:(e,t,n)=>{"use strict";n.d(t,{i:()=>ne,Z:()=>re});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(989824),u=n(853158),c=n(202351),s=n(418705),f=n(707961),d=n(502526),p=n(396043),h=n(333398),y=n(4361),b=n(496486),v=n.n(b),m=n(15970),g=n(791707),O=n(736818),E=n(61209),C=n(5544),j=n(27851),S=n(567403),I=n(50433),_=n(598123),w=n(682776),x=n(102921),P=n(2590);function N(e){return(0,c.e7)([C.ZP],(function(){var t=function(t){return null!=e&&x.Z.extractTimestamp(t.channel.id)-x.Z.extractTimestamp(e.id)>500},n=C.ZP.getChannels(null==e?void 0:e.id),r=n[C.Zb];return n[C.sH].some(t)||r.some(t)}),[e])}function A(e){var t=(0,
|
||
c.e7)([E.Z],(function(){return E.Z.getChannel(null==e?void 0:e.systemChannelId)})),n=(0,c.Wu)([_.Z],(function(){return null!=t?_.Z.getMessages(t.id).toArray():[]}));return(0,c.e7)([j.Z],(function(){var t,r=null!==(t=j.Z.getMemberCount(null==e?void 0:e.id))&&void 0!==t&&t,o=n.some((function(e){return e.type===P.uaV.USER_JOIN}));return r>1||o}),[e,n])}function T(e){var t=(0,c.e7)([I.Z],(function(){return I.Z.hasLayers()})),n=(0,c.e7)([S.Z],(function(){return S.Z.getGuild(null==e?void 0:e.id)}));return null!=(null==n?void 0:n.icon)&&!t}function Z(e){var t=(0,c.e7)([E.Z],(function(){return null!=e?E.Z.getMutableBasicGuildChannelsForGuild(e.id):null}));return function(e){var t=(0,c.e7)([O.default],(function(){return O.default.getId()}));return(0,c.e7)([_.Z],(function(){return v().some(e,(function(e){var n=_.Z.getMessages(e.id).toArray();return v().some(n,(function(e){return e.author.id===t&&!(0,g.Z)(e)}))}))}))}(o.useMemo((function(){return null==t?[]:v().values(t)}),[t]))}
|
||
var M=n(703790),R=n(425902),L=n(917019),D=n(473903),k=n(718831),U=n(621329),B=n(930948),F=n(348592),G=n(120415),H=n(955521),V=n(909647),W=n(473708),z=n(713230),Y=n.n(z);function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Q(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){q(i,r,o,a,l,"next",e)}function l(e){q(i,r,o,a,l,"throw",e)}a(void 0)}))}}function X(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
|
||
;r.forEach((function(t){X(e,t,n[t])}))}return e}function $(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return K(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var te=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1}
|
||
;case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function ne(e){var t=e.className,n=e.iconUrl,i=e.icon,l=e.header,u=e.completed,c=e.onClick,s=ee(o.useState(!1),2),p=s[0],h=s[1],y=(0,d.Z)(u);o.useEffect((function(){if(null!=y&&u!==y){h(!0);setTimeout((function(){return h(!1)}),1e3)}}),[u,y]);return(0,r.jsxs)(f.P3F,{className:a()(t,Y().card,X({},Y().completed,u)),onClick:c,children:[null!=i?i:(0,r.jsx)("div",{className:Y().icon,style:{backgroundImage:"url('".concat(n,"')")}}),(0,r.jsx)(f.xvT,{color:"header-primary",
|
||
className:a()(Y().cardTextContainer,Y().cardHeader),variant:"text-sm/normal",children:l}),u?(0,r.jsx)(U.Z,{className:a()(Y().checkmark,X({},Y().animate,p))}):(0,r.jsx)(k.Z,{className:Y().arrow,direction:k.Z.Directions.RIGHT})]})}function re(e){var t,i=e.channel,d=(0,c.e7)([S.Z],(function(){return null!=i?S.Z.getGuild(i.getGuildId()):null}),[i]),b=null!=d&&x.Z.extractTimestamp(d.id)<Date.now()-P._8R,v=(0,c.e7)([O.default],(function(){return(null==d?void 0:d.ownerId)===O.default.getId()}),[d]),g=function(e,t){return(0,c.cj)([w.Z],(function(){return{canInvite:(0,m.b)(w.Z,t,e),canManageGuild:null!=t&&w.Z.can(P.Plq.MANAGE_GUILD,t),canMessage:null!=e&&w.Z.can(P.Plq.SEND_MESSAGES,e),canCreateChannel:null!=t&&w.Z.can(P.Plq.MANAGE_CHANNELS,t)}}),[t,e])}(i,d),E=g.canInvite,C=g.canManageGuild,j=g.canMessage,I=(0,c.e7)([D.default],(function(){var e,t
|
||
;return!0===(null===(e=D.default.getCurrentUser())||void 0===e?void 0:e.desktop)||!0===(null===(t=D.default.getCurrentUser())||void 0===t?void 0:t.mobile)})),_=function(e){return{guildPopulated:A(e),guildMessaged:Z(e),guildPersonalized:T(e),guildChannelCreated:N(e)}}(d),k=_.guildPopulated,U=_.guildMessaged,z=_.guildPersonalized,K=function(e){return{handleInvite:o.useCallback((function(){p.ZP.trackWithMetadata(P.rMx.SERVER_SETUP_CTA_CLICKED,{setup_type:V.Ft.CHANNEL_WELCOME,action:V.j7.INVITE});null!=e&&(0,f.ZDy)(Q((function(){var t,o;return te(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,$(J({},t),{guild:e,source:P.t4x.CHANNEL_WELCOME,analyticsLocation:{section:P.jXE.CHANNEL_WELCOME_CTA}}))}]}}))})))}),[e]),handleMessage:o.useCallback((function(){p.ZP.trackWithMetadata(P.rMx.SERVER_SETUP_CTA_CLICKED,{setup_type:V.Ft.CHANNEL_WELCOME,
|
||
action:V.j7.SEND_MESSAGE});B.S.dispatch(P.CkL.TEXTAREA_FOCUS,{highlight:!0})}),[]),handlePersonalize:o.useCallback((function(){p.ZP.trackWithMetadata(P.rMx.SERVER_SETUP_CTA_CLICKED,{setup_type:V.Ft.CHANNEL_WELCOME,action:V.j7.PERSONALIZE_SERVER});null!=e&&M.Z.open(e.id,P.pNK.OVERVIEW,{section:P.jXE.CHANNEL_WELCOME_CTA})}),[e]),handleDownload:o.useCallback((function(){p.ZP.trackWithMetadata(P.rMx.SERVER_SETUP_CTA_CLICKED,{setup_type:V.Ft.CHANNEL_WELCOME,action:V.j7.DOWNLOAD});(0,f.ZDy)(Q((function(){var e,t;return te(this,(function(o){switch(o.label){case 0:return[4,Promise.resolve().then(n.bind(n,908056))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,J({source:P.jXE.CHANNEL_WELCOME_CTA},e))}]}}))})))}),[]),handleAddApplication:o.useCallback((function(){if(null!=e){p.ZP.trackWithMetadata(P.rMx.SERVER_SETUP_CTA_CLICKED,{setup_type:V.Ft.CHANNEL_WELCOME,action:V.j7.ADD_APP});(0,f.ZDy)(Q((function(){var t,o,i;return te(this,(function(a){switch(a.label){case 0:
|
||
return[4,Promise.all([n.e(40532),n.e(80664)]).then(n.bind(n,580664))];case 1:t=a.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,$(J({guildId:null!==(i=e.id)&&void 0!==i?i:""},t),{analyticsType:s.z$.APP_DIRECTORY_SERVER_SETUP_UPSELL_MODAL}))}]}}))})));(0,L.w9)(s.z$.APP_DIRECTORY_COACH_MARK)}}),[e])}}(d),q=K.handleInvite,ee=K.handleMessage,re=K.handlePersonalize,oe=K.handleDownload,ie=K.handleAddApplication,ae=!(I||k||U||z),le=function(e){var t=(0,l.Z)((function(){return new u.Z.Value(0)})),n=(0,l.Z)((function(){return new u.Z.Value(0)})),r=[];r.push((0,l.Z)((function(){return new u.Z.Value(0)})));r.push((0,l.Z)((function(){return new u.Z.Value(0)})));r.push((0,l.Z)((function(){return new u.Z.Value(0)})));r.push((0,l.Z)((function(){return new u.Z.Value(0)})));o.useEffect((function(){u.Z.stagger(300,[u.Z.parallel([u.Z.timing(n,{toValue:1,duration:450}),u.Z.timing(t,{toValue:1,duration:450})]),u.Z.stagger(100,[u.Z.timing(r[0],{toValue:1,duration:300}),u.Z.timing(r[1],{toValue:1,
|
||
duration:300}),u.Z.timing(r[2],{toValue:1,duration:300}),u.Z.timing(r[3],{toValue:1,duration:300})])]).start()}),[n,t,r]);return{titleAnimatedStyle:e?{transform:[{translateY:t.interpolate({inputRange:[0,1],outputRange:["-20px","0px"]})}],opacity:n}:{},opacities:r}}(ae),ue=le.titleAnimatedStyle,ce=le.opacities,se=(0,y.Sh)(null!==(t=null==d?void 0:d.id)&&void 0!==t?t:"",C),fe=C&&null!=se&&!0===se.showNewServerChecklistRec,de=(0,c.e7)([h.Z],(function(){return h.Z.getGuildApplications(null==d?void 0:d.id)})),pe=void 0!==de&&de.length>0;o.useEffect((function(){if(fe){var e;(0,R.i)(null!==(e=null==d?void 0:d.id)&&void 0!==e?e:"")}}),[d,fe]);if(null==d)return null;var he=[];if(!b){E&&he.push((0,r.jsx)(u.Z.div,{className:Y().cardWrapper,style:ae?{opacity:ce[he.length]}:{},children:(0,r.jsx)(ne,{iconUrl:n(930519),header:W.Z.Messages.WELCOME_CTA_INVITE_TITLE,completed:k,onClick:q})},"invite"));C&&he.push((0,r.jsx)(u.Z.div,{className:Y().cardWrapper,style:ae?{opacity:ce[he.length]}:{},
|
||
children:(0,r.jsx)(ne,{iconUrl:n(157862),header:W.Z.Messages.WELCOME_CTA_PERSONALIZE_TITLE,completed:z,onClick:re})},"customize"));j&&he.push((0,r.jsx)(u.Z.div,{className:Y().cardWrapper,style:ae?{opacity:ce[he.length]}:{},children:(0,r.jsx)(ne,{iconUrl:n(747048),header:W.Z.Messages.WELCOME_CTA_MESSAGE_TITLE,completed:U,onClick:ee})},"message"));(0,G.$L)()&&he.push((0,r.jsx)(u.Z.div,{className:Y().cardWrapper,style:ae?{opacity:ce[he.length]}:{},children:(0,r.jsx)(ne,{iconUrl:n(932568),header:W.Z.Messages.WELCOME_CTA_DOWNLOAD_TITLE,completed:I,onClick:oe})},"download"));fe&&he.push((0,r.jsx)(u.Z.div,{className:Y().cardWrapper,style:ae?{opacity:ce[he.length]}:{},children:(0,r.jsx)(ne,{iconUrl:n(467314),header:W.Z.Messages.WELCOME_CTA_APPS_RECOMMENDATION_TITLE,completed:pe,onClick:ie})},"addapp"))}var ye=v?W.Z.Messages.WELCOME_CTA_SUBTITLE_OWNER:W.Z.Messages.WELCOME_CTA_SUBTITLE_MEMBER;b&&(ye=W.Z.Messages.WELCOME_CTA_SUBTITLE_EXISTING_SERVER)
|
||
;var be,ve="".concat(F.Z.getArticleURL(P.BhN.GUILD_GETTING_STARTED),"?utm_source=discord&utm_medium=blog&utm_campaign=2020-06_help-new-user&utm_content=--t%3Apm");return(0,r.jsx)(H.ZP,{channelId:i.id,children:(0,r.jsx)("div",{className:Y().container,children:(0,r.jsxs)("div",{className:Y().inner,children:[(0,r.jsxs)(u.Z.div,{style:ue,children:[(0,r.jsx)(f.X6q,{className:Y().titleName,variant:"heading-xxl/semibold",children:W.Z.Messages.WELCOME_CTA_TITLE.format({guildName:d.name})}),(0,r.jsxs)(f.xvT,{color:"header-secondary",className:a()((be={},X(be,Y().subtitle,!0),X(be,Y().noChildren,0===he.length),be)),variant:"text-sm/normal",children:[ye," ",he.length>0?W.Z.Messages.WELCOME_CTA_SUBTITLE_ACTION_WITH_GUIDE.format({guideURL:ve}):null]})]}),he]})})})}},963985:(e,t,n)=>{"use strict";n.d(t,{kj:()=>d,oC:()=>p,UT:()=>h,CM:()=>y,xh:()=>b,s3:()=>v,_Z:()=>m});var r=n(842227),o=n(418705),i=n(917019),a=n(61209),l=n(682776),u=n(419051),c=n(488462);function s(){
|
||
var e=u.Z.getFavoriteChannels(),t=1;for(var n in e)t=Math.max(t,e[n].order);return t+1}function f(e){for(var t in e){var n=e[t];if(null!=n){if(n.type!==o.Dd.CATEGORY){var r=a.Z.getChannel(t);null!=r&&(r.isPrivate()||l.Z.can(c.Pl.VIEW_CHANNEL,r))||delete e[t]}}else delete e[t]}}function d(e,t){u.Z.isFavorite(e)||i.hW.updateAsync("favorites",(function(n){n.favoriteChannels[e]=o.aV.create({nickname:"",type:o.Dd.REFERENCE_ORIGINAL,position:s(),parentId:null!=t?t:"0"});f(n.favoriteChannels)}),i.fy.FREQUENT_USER_ACTION)}function p(e){var t=u.Z.getFavorite(e);null!=t&&i.hW.updateAsync("favorites",(function(n){delete n.favoriteChannels[e];if(t.type===o.Dd.CATEGORY)for(var r in n.favoriteChannels)n.favoriteChannels[r].parentId===e&&(n.favoriteChannels[r].parentId="0");f(n.favoriteChannels)}),i.fy.FREQUENT_USER_ACTION)}function h(e,t){u.Z.isFavorite(e)&&i.hW.updateAsync("favorites",(function(n){n.favoriteChannels[e].nickname=null!=t?t:""}),i.fy.FREQUENT_USER_ACTION)}function y(e){
|
||
var t=r.default.fromTimestamp(Date.now());i.hW.updateAsync("favorites",(function(n){n.favoriteChannels[t]=o.aV.create({nickname:e,type:o.Dd.CATEGORY,position:s(),parentId:"0"})}),i.fy.FREQUENT_USER_ACTION)}function b(e){p(e)}function v(e){i.hW.updateAsync("favorites",(function(t){var n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value;null!=l.position&&(t.favoriteChannels[l.id].position=l.position);if(void 0!==l.parent_id){var u;t.favoriteChannels[l.id].parentId=null!==(u=l.parent_id)&&void 0!==u?u:"0"}}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}),i.fy.FREQUENT_USER_ACTION)}function m(){i.hW.updateAsync("favorites",(function(e){e.muted=!e.muted}),i.fy.INFREQUENT_USER_ACTION)}},495085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(202351),o=n(61209),i=n(602397),a=n(419051),l=n(2590);function u(e){return(0,r.cj)([i.ZP,o.Z,a.Z],(function(){if(e!==l.I_8)return i.ZP.getVoiceStates(e)
|
||
;var t=a.Z.getFavoriteChannels(),n={};for(var r in t){var u=o.Z.getChannel(r);null!=u&&(n[r]=i.ZP.getVoiceStatesForChannel(u))}return n}),[e])}},234503:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(202351),o=n(744564);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return a(e)}function l(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){u=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return u(e,t)}var c=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
|
||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var f=new Set;var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&u(e,t)}(n,e);var t=s(n);function n(){i(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){null!=e&&(f=new Set(e))};r.hasHidden=function(e){return f.has(e)};r.getState=function(){return f};r.__getLocalVars=function(){return{hiddenChannels:f}};return n}(r.ZP.PersistedStore);d.displayName="ForumChannelAdminOnboardingGuideStore";d.persistKey="ForumChannelAdminOnboardingGuideStore";const p=new d(o.Z,{ADMIN_ONBOARDING_GUIDE_HIDE:function(e){var t=e.channelId
|
||
;e.hide?f.add(t):f.delete(t)}})},793998:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var r=n(730381),o=n.n(r),i=n(842227),a=function(e){var t=i.default.extractTimestamp(e);return!o()().isBefore(o()(t).add(o().duration(15,"days")))}},122590:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(202351),o=n(736818),i=n(407561),a=n(409125);function l(){var e=(0,r.e7)([o.default],(function(){return o.default.getId()})),t=(0,r.e7)([a.Z],(function(){return a.Z.getRemoteSessionId()}));return(0,r.e7)([i.Z],(function(){var n;return null!==(n=i.Z.getVoiceStateForSession(e,t))&&void 0!==n?n:void 0}))}},774209:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(202351),o=n(629223),i=n(72580),a=n(2590);function l(){return(0,r.Wu)([o.Z],(function(){return[o.Z.getAccount(null,a.ABu.XBOX),o.Z.getAccount(null,a.ABu.PLAYSTATION),o.Z.getAccount(null,a.ABu.PLAYSTATION_STAGING)].filter(i.lm)}))}},292571:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(785893),o=n(667294),i=n(468811),a=n.n(i),l=n(633878);function u(e,t){
|
||
(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function s(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){
|
||
var t=e.width,n=void 0===t?16:t,i=e.height,u=void 0===i?16:i,p=e.color,h=void 0===p?"currentColor":p,y=e.foreground,b=f(e,["width","height","color","foreground"]),v=d(o.useState((function(){return a().v4()})),1)[0];return(0,r.jsxs)("svg",s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){c(e,t,n[t])}))}return e}({},(0,l.Z)(b)),{width:n,height:u,viewBox:"0 0 24 24",children:[(0,r.jsx)("g",{clipPath:"url(".concat(v,")"),children:(0,r.jsx)("path",{className:y,fillRule:"evenodd",clipRule:"evenodd",d:"M4.83075 2H13.2444C14.817 2 16.0751 3.13475 15.9965 4.55319V11H14.5025V4.69504H3.57264V18.8085H6V22H4.83075C3.25811 22 2 20.8652 2 19.4468V4.55319C2 3.13475 3.25811 2 4.83075 2Z",fill:h})}),(0,r.jsx)("path",{
|
||
d:"M10.5646 13H19.4354C20.5365 13 21.4507 13.7808 21.5303 14.7893L21.9965 20.6997C22.0492 21.3677 21.5021 21.9485 20.7746 21.9968C20.7429 21.9989 20.7111 22 20.6792 22C19.8442 22 19.1157 21.4795 18.9105 20.7363L18.5495 19.4286H11.4504L11.0894 20.7363C10.8842 21.4795 10.1557 22 9.3207 22C8.5913 22 8 21.4571 8 20.7873C8 20.7581 8.00115 20.7289 8.00345 20.6997L8.46966 14.7893C8.5492 13.7808 9.46342 13 10.5646 13Z",className:y,fill:h}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:v,children:(0,r.jsx)("rect",{width:"14",height:"21",fill:h,transform:"translate(2 2)"})})})]}))}var h=n(423871),y=n(753724),b=n(550677);function v(e){return null!=e?e===b.YE.XBOX?y.Z:h.Z:p}},302123:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Z});var r=n(785893),o=(n(667294),n(318715)),i=n(707961),a=n(419087),l=n(202351),u=n(567403),c=n(682776),s=n(407561),f=n(176758),d=n(488462);var p=n(563367),h=n(441143),y=n.n(h),b=n(656645),v=n(842629),m=n(736097),g=n(520436),O=n(919694)
|
||
;var E=n(122590),C=n(774209),j=n(292571),S=n(2590),I=n(473708);function _(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_(i,r,o,a,l,"next",e)}function l(e){_(i,r,o,a,l,"throw",e)}a(void 0)}))}}function x(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){x(e,t,n[t])}))}return e}function N(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var A=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,
|
||
o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function T(e,t){return e===S.ABu.XBOX?t?I.Z.Messages.TRANSFER_VOICE_TO_XBOX:I.Z.Messages.JOIN_ON_XBOX:e===S.ABu.PLAYSTATION?t?I.Z.Messages.CONSOLE_PLAYSTATION_TRANSFER_VOICE:I.Z.Messages.CONSOLE_PLAYSTATION_JOIN_VOICE:e===S.ABu.PLAYSTATION_STAGING?t?I.Z.Messages.CONSOLE_PLAYSTATION_STAGING_TRANSFER_VOICE:I.Z.Messages.CONSOLE_PLAYSTATION_STAGING_JOIN_VOICE:void 0}function Z(e){var t=(0,o.ZP)([p.Z],(function(){return p.Z.getChannelId()===e.id})),h=(0,E.Z)(),_=(null==h?void 0:h.channelId)===e.id,x=function(e){return(0,l.e7)([c.Z],(function(){return!c.Z.can(d.Pl.CONNECT,e)}),[e])
|
||
}(e)&&!e.isPrivate(),Z=function(e){return(0,l.e7)([s.Z,u.Z],(function(){return(0,f.rY)(e,s.Z,u.Z)}))}(e),M=!(0,o.ZP)([s.Z],(function(){return s.Z.isInChannel(e.id)}))&&Z||x,R=(0,C.Z)();if(!_&&0===R.length)return null;return(0,r.jsx)(r.Fragment,{children:_?(0,r.jsx)(i.sNh,{label:I.Z.Messages.TRANSFER_VOICE_TO_DEVICE,id:"handoff",action:function(){!function(e,t){var n,r=null!==(n=e.sessionId)&&void 0!==n?n:"";(0,g._)(r);(0,g.s6)();var o=null!=t?t:e.channelId;y()(null!=o,"attempted to transfer to unknown channel");e.selfMute!==m.Z.isSelfMute()&&b.Z.toggleSelfMute();e.selfDeaf!==m.Z.isSelfDeaf()&&b.Z.toggleSelfDeaf();(0,O.Z)(o,"discord_client",r);v.default.selectVoiceChannel(o,!1)}(h)},icon:(0,j.Z)(void 0),disabled:M}):R.map((function(o){return(0,r.jsx)(i.sNh,{id:"transfer-".concat(o.type,"-").concat(o.id),label:T(o.type,t),action:function(){return function(t){t.twoWayLink&&!t.revoked?t.type===S.ABu.XBOX?(0,i.ZDy)(w((function(){var t,o;return A(this,(function(i){switch(i.label){case 0:
|
||
return[4,Promise.all([n.e(40532),n.e(1653),n.e(6834)]).then(n.bind(n,106834))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,N(P({},t),{channel:e}))}]}}))}))):t.type!==S.ABu.PLAYSTATION&&t.type!==S.ABu.PLAYSTATION_STAGING||(0,i.ZDy)(w((function(){var o,i;return A(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(20188)]).then(n.bind(n,720188))];case 1:o=a.sent(),i=o.default;return[2,function(n){return(0,r.jsx)(i,N(P({},n),{platform:t.type,channel:e}))}]}}))}))):(0,a.Z)(t.type,"Console Transfer Item")}(o)},icon:(0,j.Z)(o.type),disabled:M},o.id)}))})}},503857:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(202351),o=n(736818),i=n(361298),a=n(69660),l=n(77643),u=n(295652),c=n(72580),s=n(2590),f=n(473708);function d(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var p;!function(e){e.PACKET_LOSS="Packet Loss";e.FRAME_RATE_INPUT="Frame Rate Encode"
|
||
;e.FRAME_RATE_NETWORK="Frame Rate Decode";e.SOUNDSHARE_FAILED="Soundshare Failed";e.BAD_CONNECTION="Bad Connection"}(p||(p={}));function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:30;return e<=5?3:e<=15?10:15}function y(e,t){var n={packetsSentOrReceived:0,packetsLost:0,packetLossRate:0,frameRate:0,resolution:0,numDatapoints:0},r=e.slice(-1*t).filter(c.lm);if(0===r.length)return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){d(e,t,n[t])}))}return e}({type:"streamer"},n);r.forEach((function(e,t,r){n.packetsSentOrReceived+=t>0?r[t].packetsSentOrReceived-r[t-1].packetsSentOrReceived:0;n.packetsLost+=t>0?r[t].packetsLost-r[t-1].packetsLost:0;n.frameRate+=e.frameRate;n.resolution+=e.resolution}))
|
||
;var o=r[0].type,i=r.length;return{type:o,packetsSentOrReceived:n.packetsSentOrReceived,packetsLost:n.packetsLost,packetLossRate:n.packetsLost/(n.packetsLost+n.packetsSentOrReceived),frameRate:n.frameRate/i,resolution:n.resolution/i,numDatapoints:i}}var b=(0,u.oH)((function(e,t){return{message:e,errorType:t}}));function v(e,t){if("streamer"===e.type){if(100*e.packetLossRate>10)return b(f.Z.Messages.STREAM_BAD_STREAMER,p.PACKET_LOSS);if(e.frameRate<=h(t))return b(f.Z.Messages.STREAM_BAD_STREAMER,p.FRAME_RATE_INPUT)}else{if(100*e.packetLossRate>10)return b(f.Z.Messages.STREAM_BAD_SPECTATOR,p.PACKET_LOSS);if(e.frameRate<=h(t))return b(f.Z.Messages.STREAM_BAD_SPECTATOR,p.FRAME_RATE_NETWORK)}return null}function m(e){var t=(0,l.Wc)(e),n=e.stream.guildId,u=e.stream.ownerId;return(0,r.e7)([a.Z,i.Z,o.default],(function(){return null!=u?function(e,t,n,r){if(n)return b(f.Z.Messages.STREAM_SOUNDSHARE_FAILED,p.SOUNDSHARE_FAILED);if(null!=t){var o=y(t,5),i=y(t,30);if(i.numDatapoints>=5){var a
|
||
;return null!==(a=v(o,null==r?void 0:r.maxFrameRate))&&void 0!==a?a:v(i,null==r?void 0:r.maxFrameRate)}}return e===s.IE4.BAD?b(f.Z.Messages.STREAM_NETWORK_QUALITY_ERROR,p.BAD_CONNECTION):null}(a.Z.getQuality(),a.Z.getStatsHistory(n,u,u===o.default.getId()),u===o.default.getId()&&null!=i.Z.getHookError(s.K3D.SOUND),t):null}),[t,n,u])}},974760:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(473708),o=/[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]/g;function i(e){var t=r.Z.Messages.ACTIVITY_PANEL_GO_LIVE;null!=e&&null!=e.sourceName&&e.sourceName.length>0&&(t=e.sourceName);return{sanitizedTitle:t.replace(o,""),title:t}}},538272:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(306263),o=n(924066),i=n(2590),a=n(473708);function l(e,t,n,l){return null==t||t.state===i.jm8.ENDED||(0,r.V9)(t)!==(0,r.V9)(e)?(0,o.P9)(l):t.ownerId===n?a.Z.Messages.WATCH_STREAM_STREAMING:a.Z.Messages.WATCH_STREAM_WATCHING}},216299:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b})
|
||
;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(547308),u=n(542231),c=n(211482),s=n(133310),f=n.n(s);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var h=[1752220,3066993,3447003,10181046,15277667,15844367];function y(e){return(0,l.Rf)(h[function(e){var t=5381,n=0;for(;n<e.length;)t=33*t^e.charCodeAt(n++);return t>>>0}(e)%h.length])}function b(e){var t,n=e.title,i=e.className,l=p(o.useState(y(n)),2),s=l[0],d=l[1];o.useEffect((function(){d(y(n))}),[n]);return(0,r.jsxs)("div",{className:f().wrapper,children:[(0,r.jsx)(c.ZP,{mask:c.ZP.Masks.STATUS_SCREENSHARE,width:32,height:32,children:(0,r.jsx)("div",{className:a()(f().icon,i),style:{backgroundColor:s},children:null!==(t=n[0])&&void 0!==t?t:"?"})}),(0,r.jsx)(u.Z,{className:f().badge})]})}},246549:(e,t,n)=>{"use strict";n.d(t,{c:()=>h,Z:()=>y});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(180172),s=n(107364),f=n(473708),d=n(627375),p=n.n(d);function h(e){
|
||
var t=e.isLoading,n=e.noText,o=e.className;return(0,r.jsx)(s.Z,{className:a()(p().emptyPreviewContainer,o),direction:s.Z.Direction.VERTICAL,align:s.Z.Align.CENTER,justify:s.Z.Justify.CENTER,children:t?(0,r.jsx)(u.$jN,{}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:p().emptyPreviewImage}),n?null:(0,r.jsx)(u.xvT,{variant:"text-sm/normal",color:"none",className:p().emptyPreviewText,children:f.Z.Messages.STREAM_NO_PREVIEW})]})})}function y(e){var t=e.stream,n=e.className,i=e.noText,u=void 0!==i&&i,s=(0,l.cj)([c.Z],(function(){return{url:c.Z.getPreviewURL(t.guildId,t.channelId,t.ownerId),isLoading:c.Z.getIsPreviewLoading(t.guildId,t.channelId,t.ownerId)}})),f=s.url,d=s.isLoading,y=o.useRef(d?null:f);o.useEffect((function(){d||(y.current=f)}),[f,d]);var b=null==f||d?y.current:f;return null==b?(0,r.jsx)(h,{className:n,isLoading:d,noText:u}):(0,r.jsx)("div",{className:a()(n,p().root),children:(0,r.jsx)("img",{src:b,alt:"",className:p().image})})}},544475:(e,t,n)=>{"use strict"
|
||
;n.d(t,{Z:()=>K});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(248088),u=n(712861),c=n(202351),s=n(336194),f=n(707961),d=n(579581),p=n(859853),h=n(19585),y=n(725691),b=n(473903),v=n(95891),m=n(531441),g=n(977005),O=n(652591),E=n(850841),C=n(77643),j=n(503857),S=n(2590),I=n(203600),_=n(473708),w=n(233635),x=n.n(w),P=n(2019),N=n.n(P);function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Z(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){T(i,r,o,a,l,"next",e)}function l(e){T(i,r,o,a,l,"throw",e)}a(void 0)}))}}function M(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){M(e,t,n[t])}))}return e}function L(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{
|
||
a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var k=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),
|
||
0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},U=(0,u.Mg)(N().borderRadius),B={opacity:0,transform:"translate3d(100%, 0, 0)"},F={opacity:1,transform:"translate3d(0%, 0, 0)"},G={opacity:0},H={opacity:1},V={borderRadius:"".concat(U,"px ").concat(U,"px ").concat(U,"px ").concat(U,"px")},W={borderRadius:"0px ".concat(U,"px ").concat(U,"px 0px")},z={mass:1,tension:500,friction:18,clamp:!0
|
||
},Y=function(e){var t,i,l=e.participant,u=e.isUpsellEnabled,p=e.shape,y=e.size,w=e.didTrackUpsellViewed,P=e.setDidTrackUpsellViewed,N=e.className,A=(0,C.Wc)(l),T=(0,h.Z)().analyticsLocations,D=null!=(0,j.Z)(l);try{t=(0,C.nG)(A)}catch(e){t=!1}try{i=(0,C.tR)(A)}catch(e){i=!1}var U=t||i,B=(0,d.O)().location,F=(0,c.e7)([b.default],(function(){return b.default.getCurrentUser()})),G=u&&!E.ZP.isPremium(F,I.p9.TIER_1)&&!E.ZP.canStreamMidQuality(F),H=o.useCallback((function(){G&&U&&(0,f.ZDy)(Z((function(){var e,t;return k(this,(function(o){switch(o.label){case 0:return[4,n.e(23850).then(n.bind(n,123850))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,L(R({},e),{analyticsSource:B}))}]}}))})))}),[G,U,B]);o.useEffect((function(){if(!w&&U){O.default.track(S.rMx.PREMIUM_UPSELL_VIEWED,{type:I.cd.STREAM_QUALITY_INDICATOR,has_premium_stream_fps:t,has_premium_stream_resolution:i,location_stack:T});P(!0)}}),[t,i,U,w,P,T]);if(null==A)return null;var V=(0,r.jsx)(f.ua7,{
|
||
text:D?_.Z.Messages.SCREENSHARE_QUALITY_TOOLTIP_REDUCED:U?_.Z.Messages.SCREENSHARE_QUALITY_TOOLTIP_PREMIUM:_.Z.Messages.SCREENSHARE_QUALITY_TOOLTIP_NORMAL,position:"bottom",color:f.ua7.Colors.GREY,children:function(e){return(0,r.jsxs)(f.P3F,L(R({},e),{onClick:H,className:a()(x().qualityIndicator,y,g.eE[p],D?x().qualityIndicatorLowQuality:x().qualityIndicatorFullQuality,M({},x().clickable,G&&U)),children:[U?(0,r.jsx)(v.Z,{className:x().premiumStreamIcon}):null,(0,r.jsx)("span",{className:x().qualityResolution,children:(0,C.ml)(A.maxResolution)}),(0,r.jsx)("span",{children:(0,C.bp)(A.maxFrameRate)})]}))}});return(0,r.jsx)(m.IG,{text:V,className:a()(N,x().qualityIndicatorBadge),color:s.Z.unsafe_rawColors.PRIMARY_500.css,shape:p})};const K=function(e){var t=e.participant,n=e.showQuality,i=e.isUpsellEnabled,u=void 0===i||i,c=e.size,s=e.className,f=D(o.useState(!1),2),d=f[0],h=f[1],b=(0,C.Wc)(t),v=o.useContext(p.S).reducedMotion,O=n&&null!=b;o.useEffect((function(){(0,
|
||
y.Z)(t.stream.ownerId,t.user.getAvatarURL(t.stream.guildId,80),{dispatchWait:!0})}),[t]);var E=(0,l.useTransition)(O,{enter:{from:v.enabled?G:B,to:v.enabled?H:F},leave:v.enabled?G:B,config:z}),j=(0,l.useSpring)({to:O?W:V,config:z});return function(e){var n=e.className,o=e.popoutProps;return(0,r.jsxs)("div",L(R({className:a()(x().streamQualityIndicator,n)},o),{children:[E((function(e,n){return n?(0,r.jsx)(l.animated.div,{style:e,children:(0,r.jsx)(Y,{className:x().liveQualityIndicator,participant:t,size:c,shape:m.Dv.ROUND_LEFT,isUpsellEnabled:u,didTrackUpsellViewed:d,setDidTrackUpsellViewed:h})}):null})),(0,r.jsx)(l.animated.div,{style:j,className:x().liveIndicator,children:(0,r.jsx)(g.ZP,{look:g.jZ.RED,size:c,shape:O?m.Dv.ROUND_RIGHT:m.Dv.ROUND})})]}))}({className:s})}},944514:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(226810);function o(e,t){if(__OVERLAY__){var n=t.getGame(),o=(0,r.QF)();return null==n||null==o?null:{id:n.id,pid:o,pidPath:[],nativeProcessObserverId:0,hidden:!1,
|
||
elevated:!1,name:n.name,lastFocused:0,exePath:"",exeName:"",cmdLine:"",processName:"",distributor:null,windowHandle:null}}return e.getVisibleGame()}},945549:(e,t,n)=>{"use strict";n.d(t,{X:()=>a});var r=n(842227),o=n(496916),i=n(290679),a=function(e){(0,o.Ju)(e,i.W.GUILD_HOME,r.default.fromTimestamp(Date.now()))}},153771:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(281110),o=n(744564),i=n(886391),a=n(201615),l=n(2590);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}var s,f=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){
|
||
return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},d=(s=c((function(e){var t,n,u,c,s,d,p,h,y,b,v,m,g;return f(this,(function(f){switch(f.label){case 0:t=e.guildId,n=e.status,u=void 0===n?i.wB.SUBMITTED:n,c=e.before,s=e.after,d=e.limit,
|
||
p=void 0===d?i.tB:d;o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_FETCH_START"});f.label=1;case 1:f.trys.push([1,3,,4]);return[4,r.Z.get({url:l.ANM.GUILD_JOIN_REQUESTS(t),query:{status:u,limit:p,before:c,after:s}})];case 2:h=f.sent();y=h.body.total;v=null!==(b=h.body.guild_join_requests)&&void 0!==b?b:[];m=v.map(a.j);o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_FETCH_SUCCESS",status:u,requests:m,total:y,limit:p,guildId:t});return[2,h];case 3:g=f.sent();o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_FETCH_FAILURE"});throw g;case 4:return[2]}}))})),function(e){return s.apply(this,arguments)}),p=function(){var e=c((function(e){var t;return f(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,r.Z.delete({url:l.ANM.GUILD_MEMBER_REQUEST_TO_JOIN(e)})];case 1:t=n.sent();o.Z.dispatch({type:"USER_GUILD_JOIN_REQUEST_UPDATE",guildId:e,request:null});return[2,t];case 2:throw n.sent();case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),h=function(){
|
||
var e=c((function(e,t){return f(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,3,4]);return[4,r.Z.post({url:l.ANM.GUILD_JOIN_REQUEST_ACK(e,t)})];case 1:return[2,n.sent()];case 2:n.sent();return[3,4];case 3:o.Z.dispatch({type:"ACK_APPROVED_GUILD_JOIN_REQUEST",id:t,guildId:e});return[7];case 4:return[2]}}))}));return function(t,n){return e.apply(this,arguments)}}(),y=function(){var e=c((function(e,t){var n,a,u,c=arguments;return f(this,(function(s){switch(s.label){case 0:n=c.length>2&&void 0!==c[2]?c[2]:i.wB.APPROVED,a=c.length>3?c[3]:void 0;return[4,r.Z.patch({url:l.ANM.GUILD_JOIN_REQUEST(e,t),body:{action:n,rejection_reason:a}})];case 1:u=s.sent();o.Z.dispatch({type:"GUILD_JOIN_REQUEST_UPDATE",guildId:e,status:u.body.application_status,request:u.body});return[2]}}))}));return function(t,n){return e.apply(this,arguments)}}(),b=function(){var e=c((function(e,t){var n;return f(this,(function(i){switch(i.label){case 0:return[4,r.Z.patch({url:l.ANM.GUILD_JOIN_REQUESTS(e),body:{
|
||
action:t}})];case 1:n=i.sent();o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_BULK_ACTION",guildId:e,action:t});return[2,n.body]}}))}));return function(t,n){return e.apply(this,arguments)}}(),v=function(){var e=c((function(e){var t,n;return f(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);return[4,r.Z.post({url:l.ANM.GUILD_MEMBER_REQUEST_TO_JOIN(e)})];case 1:t=i.sent();n=t.body;o.Z.dispatch({type:"USER_GUILD_JOIN_REQUEST_UPDATE",guildId:e,request:n});return[2,n];case 2:throw i.sent();case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=c((function(){var e;return f(this,(function(t){switch(t.label){case 0:return[4,r.Z.get({url:l.ANM.USER_JOIN_REQUEST_GUILDS})];case 1:e=t.sent();o.Z.dispatch({type:"USER_JOIN_REQUEST_GUILDS_FETCH",guilds:e.body});return[2]}}))}));return function(){return e.apply(this,arguments)}}();const g={fetchGuildJoinRequests:d,ackUserGuildJoinRequest:h,removeGuildJoinRequest:p,updateGuildJoinRequest:y,
|
||
actionAllPendingJoinRequests:b,resetGuildJoinRequest:v,fetchRequestToJoinGuilds:m,setSelectedApplicationStatus:function(e,t){o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_SET_APPLICATION_STATUS",guildId:e,applicationStatus:t})},setSelectedSortOrder:function(e,t){o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_SET_SORT_ORDER",guildId:e,sortOrder:t})},setSelectedGuildJoinRequest:function(e,t){o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_SET_SELECTED",guildId:e,request:t})}}},780409:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(260561).B)({kind:"user",id:"2022-10_guild_onboarding_home_landing",label:"Guild Onboarding landing on home experience",defaultConfig:{landOnHome:!1},treatments:[{id:1,label:"Land on home for onboarding",config:{landOnHome:!0}}]})},145202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(318715),o=n(61209),i=n(661123),a=n(202351),l=n(744564);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e){
|
||
c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return c(e)}function s(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t){f=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return f(e,t)}var d=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}var h=null,y=null;var b=function(e){!function(e,t){
|
||
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&f(e,t)}(n,e);var t=p(n);function n(){u(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getSelectedResourceChannelId=function(){return h};r.getSelectedTodoChannelId=function(){return y};r.getHomeNavigationChannelId=function(){return null!=h?h:y};r.__getLocalVars=function(){return{selectedResourceChannelId:h,selectedTodoChannelId:y}};return n}(a.ZP.Store);b.displayName="GuildOnboardingHomeNavigationStore";const v=new b(l.Z,{CHANNEL_SELECT:function(e){var t=e.channelId,n=o.Z.getChannel(t);if(!(null==n?void 0:n.isThread())||null==(null==n?void 0:n.parent_id)||![y,h].includes(n.parent_id)){t!==h&&(h=null);t!==y&&(y=null)}},SELECT_HOME_RESOURCE_CHANNEL:function(e){var t=e.channelId;h=t;y=null},SELECT_NEW_MEMBER_ACTION_CHANNEL:function(e){var t=e.channelId;h=null;y=t}})
|
||
;var m=n(848465),g=n(897196);function O(e){var t,n=(0,r.ZP)([o.Z],(function(){return o.Z.getChannel(e)})),a=null!=n&&(0,i.yE)(n.flags,g.zZ.IS_GUILD_RESOURCE_CHANNEL),l=(0,r.ZP)([v],(function(){return v.getSelectedResourceChannelId()})),u=(0,m.g)(null!==(t=null==n?void 0:n.guild_id)&&void 0!==t?t:"");return null!=n&&u&&a&&l===n.id}},406665:(e,t,n)=>{"use strict";n.d(t,{R:()=>s,Z:()=>f});var r=n(785893),o=(n(667294),n(77413)),i=n(318715),a=n(732016),l=n(797815);var u=n(8370),c=n.n(u),s={SMALL:c().small,MEDIUM:c().medium,LARGE:c().large};function f(e){var t=e.emojiId,n=e.emojiName,u=e.defaultComponent,c=e.size,f=void 0===c?s.MEDIUM:c,d=function(e,t){return{customEmoji:(0,i.ZP)([l.Z],(function(){return null!=e?l.Z.getCustomEmojiById(e):null}),[e]),unicodeEmoji:null!=t?a.ZP.getByName(a.ZP.convertSurrogateToName(t,!1)):null}}(t,n),p=d.customEmoji,h=d.unicodeEmoji;return null==p&&null==h?(0,r.jsx)(r.Fragment,{children:u}):(0,r.jsx)(o.Z,{emojiName:null!=p?null==p?void 0:p.name:n,
|
||
animated:null!=p&&p.animated,emojiId:null==p?void 0:p.id,autoplay:!0,className:f})}},920803:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(853158),u=n(318715),c=n(707961),s=n(316878),f=n(773011),d=n(239813),p=n(61209),h=n(21372),y=n(177001),b=n(436622),v=n(83623),m=n(347005),g=n(185161),O=n(128169),E=n(661123),C=n(386531),j=n(689175),S=n(745623);var I=n(848465),_=n(406665),w=n(473708),x=n(98932),P=n.n(x);function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e){var t=e.action,n=(0,u.ZP)([p.Z],(function(){return p.Z.getChannel(t.channelId)})),o=(0,f.ZP)(n,!0);return null==n?(0,r.jsx)(c.xvT,{variant:"text-xxs/normal",color:"header-secondary",children:w.Z.Messages.IN_CHANNEL.format({channelName:w.Z.Messages.UNKNOWN_CHANNEL_PLACEHOLDER})}):(0,r.jsx)(c.xvT,{variant:"text-xxs/normal",color:"header-secondary",children:w.Z.Messages.IN_CHANNEL.format({channelName:o})})}function Z(e){var t,n=e.channelId,o=e.emojiId,i=e.emojiName,a=(0,u.ZP)([p.Z],(function(){return p.Z.getChannel(n)}))
|
||
;if(null==a)return null;var l=null!==(t=(0,d.KS)(a))&&void 0!==t?t:b.Z;return(0,r.jsx)(_.Z,{emojiId:o,emojiName:i,size:_.R.MEDIUM,defaultComponent:(0,r.jsx)(l,{className:P().channelIcon})})}function M(e){var t,n,i,f,d=e.guildId,p=e.channel,h=e.className,b=function(e,t){var n,r=(0,S.Z)(e),o=(0,u.ZP)([C.Z],(function(){return C.Z.getNewMemberActions(e)})),i=(0,u.ZP)([j.Z],(function(){return j.Z.getCompletedActions(e)}));if(!r)return{};var a=null!==(n=null==o?void 0:o.findIndex((function(e){return e.channelId===t.id})))&&void 0!==n?n:0,l=a>=0&&null!=o?o[a]:null;return{channelAction:l,completed:null!=l&&!0===(null==i?void 0:i[l.channelId])}}(d,p),O=b.channelAction,E=b.completed,I=function(e,t){var n=(0,u.ZP)([C.Z],(function(){return C.Z.getNewMemberActions(e)})),r=(0,u.ZP)([j.Z],(function(){return j.Z.getCompletedActions(e)}));return null==n?void 0:n.find((function(e){return!0!==(null==r?void 0:r[e.channelId])&&e.channelId!==t}))}(d,null==O?void 0:O.channelId),_=(0,u.ZP)([s.Z],(function(){
|
||
return s.Z.useReducedMotion})),x=(null==O?void 0:O.actionType)===g.oi.VIEW,N=A(o.useState(!1),2),M=N[0],R=N[1],L=A(o.useState(E),2),D=L[0],k=L[1];o.useEffect((function(){k(E)}),[p.id]);o.useEffect((function(){!D&&E&&setTimeout((function(){k(!0)}),x?1e3:0)}),[E,D,x]);var U=A(o.useState(new l.Z.Value(0)),1)[0],B=A(o.useState(new l.Z.Value(0)),1)[0];o.useEffect((function(){D?l.Z.timing(U,{toValue:0,duration:_?1:350,easing:l.Z.Easing.quad,delay:x?1e3:500}).start((function(){return R(!0)})):l.Z.timing(U,{toValue:1,duration:_?1:350,easing:l.Z.Easing.quad,delay:400}).start()}),[D,U,x,_]);o.useEffect((function(){D&&M&&l.Z.timing(B,{toValue:1,duration:_?0:350,easing:l.Z.Easing.quad,delay:400}).start()}),[D,B,M,_]);var F=o.useCallback((function(){null!=I&&(0,m.gp)(I.channelId)}),[I]);return null==O?null:(0,r.jsx)("div",{className:a()(P().container,h),children:M&&null!=I?(0,r.jsx)(l.Z.div,{style:{marginBottom:B.interpolate({inputRange:[0,1],outputRange:[-60,0]})},children:(0,r.jsxs)(c.P3F,{
|
||
className:a()(P().banner,P().clickable),onClick:F,children:[(0,r.jsx)(Z,{channelId:I.channelId,emojiId:null===(t=I.emoji)||void 0===t?void 0:t.id,emojiName:null==I||null===(n=I.emoji)||void 0===n?void 0:n.name}),(0,r.jsxs)("div",{className:P().text,children:[(0,r.jsx)(c.xvT,{variant:"text-md/semibold",color:"header-primary",children:w.Z.Messages.MEMBER_ACTIONS_NEXT_STEP.format({step:I.title})}),(0,r.jsx)(T,{action:I})]}),(0,r.jsx)("div",{className:P().iconCircle,children:(0,r.jsx)(y.Z,{width:16,height:16,className:P().nextIcon})})]})}):(0,r.jsxs)(l.Z.div,{className:P().banner,style:{marginBottom:U.interpolate({inputRange:[0,1],outputRange:[-60,0]})},children:[(0,r.jsx)(Z,{channelId:O.channelId,emojiId:null===(i=O.emoji)||void 0===i?void 0:i.id,emojiName:null==O||null===(f=O.emoji)||void 0===f?void 0:f.name}),(0,r.jsxs)("div",{className:P().text,children:[(0,r.jsx)(c.xvT,{variant:"text-md/semibold",color:"header-primary",children:O.title}),(0,r.jsx)(c.xvT,{variant:"text-xxs/normal",
|
||
color:"text-muted",children:x?w.Z.Messages.MEMBER_ACTION_VIEW:w.Z.Messages.MEMBER_ACTION_CHAT})]}),D?(0,r.jsx)(v.Z,{className:P().completed,backgroundColor:"#fff",width:20,height:20}):null]})})}function R(e){var t=e.guildId,n=e.channel,o=e.className,i=(0,I.g)(t),a=(0,u.ZP)([h.ZP],(function(){var e;return!0===(null===(e=h.ZP.getSelfMember(t))||void 0===e?void 0:e.isPending)})),l=function(e){var t,n=(0,u.ZP)([h.ZP],(function(){return h.ZP.getSelfMember(e)}));return(0,E.yE)(null!==(t=null==n?void 0:n.flags)&&void 0!==t?t:0,O.qQ.COMPLETED_HOME_ACTIONS)}(t);return l||a||!i?null:(0,r.jsx)(M,{guildId:t,channel:n,className:o})}},909647:(e,t,n)=>{"use strict";n.d(t,{Rg:()=>r,j7:()=>o,Ft:()=>i});var r,o,i;!function(e){e.INVITE="member_joined";e.CHANNEL="create_channel";e.AVATAR="avatar";e.MESSAGE="send_message";e.COMPLETED="completed";e.DISMISSED="dismissed"}(r||(r={}));!function(e){e.PERSONALIZE_SERVER="Personalize Server";e.INVITE="Invite Friends";e.CREATE_CHANNEL="Create Channel"
|
||
;e.SEND_MESSAGE="Send Message";e.DOWNLOAD="Download";e.ADD_APP="Add App";e.DISMISS_GUILD_PROGRESS="Dismiss Guild Progress";e.DISCORD_OVERVIEW_VIDEO="Discord Overview Video";e.JOIN_GUILD="Join Guild";e.CONTACT_SYNC="Sync Contacts";e.DISMISS="Dismiss"}(o||(o={}));!function(e){e.CHANNEL_WELCOME="Channel Welcome CTA";e.GUILD_PROGRESS="Guild Progress";e.HUB_PROGRESS="Hub Progress"}(i||(i={}))},116433:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(202351),o=n(744564),i=n(709992);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e){l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return l(e)}function u(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t){c=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return c(e,t)}
|
||
var s=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}var d,p=null,h=!1,y=!1;var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&c(e,t)}(n,e);var t=f(n);function n(){a(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getRecommendedGuilds=function(){return p};r.getLoadId=function(){return d};r.isFetching=function(){return h}
|
||
;r.failed=function(){return y};r.__getLocalVars=function(){return{recommendations:p,loadId:d,fetching:h,failed:y}};return n}(r.ZP.Store);b.displayName="GuildRecommendationsStore";const v=new b(o.Z,{GUILD_RECOMMENDATION_FETCH:function(){h=!0},GUILD_RECOMMENDATION_FETCH_SUCCESS:function(e){p=e.recommendedGuilds.map(i.PP);d=e.loadId;h=!1},GUILD_RECOMMENDATION_FETCH_FAILURE:function(){y=!0;h=!1}})},547721:(e,t,n)=>{"use strict";n.d(t,{tT:()=>m,Xf:()=>g,ix:()=>O,_k:()=>E,jO:()=>C,YN:()=>j,GG:()=>S,qi:()=>I,sp:()=>_,r4:()=>w,_1:()=>x,HQ:()=>P,YB:()=>N,QV:()=>A,Yl:()=>T,JH:()=>Z,oC:()=>M});var r=n(667294),o=n(202351),i=n(251295),a=n(532548),l=n(704230),u=n(840249),c=n(633440);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){
|
||
var i=e.apply(t,n);function a(e){f(i,r,o,a,l,"next",e)}function l(e){f(i,r,o,a,l,"throw",e)}a(void 0)}))}}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}var b=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++
|
||
;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},v=[],m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.refetchOnMount,i=void 0!==n&&n,c=t.includeSoftDeleted,s=void 0===c||c,f=t.countryCode,d=t.dontFetchWhileTrue,p=(0,o.e7)([a.Z],(function(){return a.Z.isConnected()})),h=(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionGroupListingsForGuildFetchState(e):u.M.FETCHED})),y=r.useRef(i);r.useEffect((function(){if(null!=e&&p&&!0!==d){
|
||
var t=u.Z.getSubscriptionGroupListingsForGuildFetchState(e);if(i||t===u.M.NOT_FETCHED){y.current=!1;l.FP(e,{includeSoftDeleted:s,countryCode:f})}}}),[p,e,s,i,f,d]);return{listingsLoaded:h===u.M.FETCHED&&!0!==y.current}},g=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=(e=d((function(e,t){var n;return b(this,(function(r){switch(r.label){case 0:o(!0);u(null);r.label=1;case 1:r.trys.push([1,3,4,5]);return[4,l.uw(e,t)];case 2:return[2,r.sent()];case 3:n=r.sent();u(n);return[3,5];case 4:o(!1);return[7];case 5:return[2]}}))})),function(t,n){return e.apply(this,arguments)});return{loading:n,createSubscriptionGroupListing:c,error:a}},O=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=r.useCallback((e=d((function(e,t,n){var r;return b(this,(function(i){switch(i.label){case 0:o(!0);u(null);i.label=1;case 1:i.trys.push([1,3,4,5]);return[4,l.AD(e,t,n)];case 2:return[2,i.sent()];case 3:r=i.sent();u(r)
|
||
;return[3,5];case 4:o(!1);return[7];case 5:return[2]}}))})),function(t,n,r){return e.apply(this,arguments)}),[]);return{loading:n,updateSubscriptionGroupListing:c,error:a}},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.includeSoftDeleted,r=void 0!==n&&n,i=t.includeUnpublished,a=void 0===i||i;return(0,o.Wu)([u.Z],(function(){if(null==e)return[];var t=u.Z.getSubscriptionGroupListing(e);if(null==t)return[];var n=[],o=!0,i=!1,l=void 0;try{for(var c,s=t.subscription_listings_ids[Symbol.iterator]();!(o=(c=s.next()).done);o=!0){var f=c.value,d=u.Z.getSubscriptionListing(f);null!=d&&(d.soft_deleted&&!r||(d.published||a)&&n.push(d))}}catch(e){i=!0;l=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw l}}return n}),[e,r,a])},C=function(e){return(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionListing(e):null}))},j=function(e){return(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionGroupListing(e):null}))},S=function(e){
|
||
return(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionGroupListingsForGuild(e):v}))},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{includeSoftDeleted:!1,sortDeletedListingsLast:!1};m(e);return(0,o.Wu)([u.Z],(function(){var n=null!=e?u.Z.getSubscriptionGroupListingsForGuild(e):v,r=[],o=!0,i=!1,a=void 0;try{for(var l,c=n[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var s=l.value,f=!0,d=!1,p=void 0;try{for(var y,b=s.subscription_listings_ids[Symbol.iterator]();!(f=(y=b.next()).done);f=!0){var m=y.value,g=u.Z.getSubscriptionListing(m);null==g||!t.includeSoftDeleted&&g.soft_deleted||r.push(g)}}catch(e){d=!0;p=e}finally{try{f||null==b.return||b.return()}finally{if(d)throw p}}}}catch(e){i=!0;a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return t.includeSoftDeleted&&t.sortDeletedListingsLast?h(r.filter((function(e){return!e.soft_deleted}))).concat(h(r.filter((function(e){return e.soft_deleted})))):r}))},_=function(e){
|
||
var t=p(r.useState(!1),2),n=t[0],i=t[1],a=r.useMemo((function(){return e.map(c.W)}),[e]),s=(0,o.Wu)([u.Z],(function(){return a.filter((function(e){return!u.Z.getDidFetchListingForSubscriptionPlanId(e)}))}),[a]);r.useEffect((function(){if(!n&&s.length>0){i(!0);Promise.all(s.map((function(e){return l.vY(e)}))).catch((function(){})).then((function(){i(!1)}))}}),[n,s]);return{loading:n}},w=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=(e=d((function(e,t,n){var r;return b(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,3,4]);o(!0);u(null);return[4,l._d(e,t,n)];case 1:i.sent();return[2,!0];case 2:r=i.sent();u(r);return[3,4];case 3:o(!1);return[7];case 4:return[2]}}))})),function(t,n,r){return e.apply(this,arguments)});return{error:a,submitting:n,deleteSubscriptionListing:c}},x=function(){var e=p((0,i.Z)(l.AE),2),t=e[0],n=e[1],r=n.loading;return{error:n.error,submitting:r,archiveSubscriptionListing:t}},P=function(){
|
||
var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=(e=d((function(e){var t,n,r,i;return b(this,(function(a){switch(a.label){case 0:t=e.guildId,n=e.groupListingId,r=e.listingId;a.label=1;case 1:a.trys.push([1,3,4,5]);o(!0);u(null);return[4,l.O0({guildId:t,groupListingId:n,listingId:r,data:{published:!0}})];case 2:a.sent();return[2,!0];case 3:i=a.sent();u(i);return[3,5];case 4:o(!1);return[7];case 5:return[2]}}))})),function(t){return e.apply(this,arguments)});return{error:a,submitting:n,publishSubscriptionListing:c}},N=function(e){return(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionSettings(e):void 0}))},A=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=r.useCallback((e=d((function(e,t){var n;return b(this,(function(r){switch(r.label){case 0:o(!0);u(null);r.label=1;case 1:r.trys.push([1,3,4,5]);return[4,l.W2(e,t)];case 2:r.sent();return[3,5];case 3:n=r.sent();u(n);return[3,5];case 4:o(!1)
|
||
;return[7];case 5:return[2]}}))})),function(t,n){return e.apply(this,arguments)}),[]);return{loading:n,updateSubscriptionsSettings:c,error:a}},T=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=(e=d((function(e,t){var n;return b(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,3,4]);o(!0);u(null);return[4,l.J6(e,t)];case 1:return[2,r.sent()];case 2:n=r.sent();u(n);return[3,4];case 3:o(!1);return[7];case 4:return[2]}}))})),function(t,n){return e.apply(this,arguments)});return{error:a,submitting:n,deleteSubscriptionGroupListing:c}},Z=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],c=i[1],s=(e=d((function(e){var t;return b(this,(function(n){switch(n.label){case 0:if(null!=u.Z.getSubscriptionSettings(e))return[2];o(!0);c(null);n.label=1;case 1:n.trys.push([1,3,4,5]);return[4,l.Qb(e)];case 2:n.sent();return[3,5];case 3:t=n.sent();c(t);return[3,5];case 4:o(!1);return[7];case 5:return[2]}}))})),
|
||
function(t){return e.apply(this,arguments)});return{loading:n,fetchSubscriptionsSettings:s,error:a}},M=function(e){return(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionTrial(e):null}))}},154146:(e,t,n)=>{"use strict";n.d(t,{I:()=>r,n:()=>u});var r,o=n(38736);function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}function l(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}!function(e){e[e.ALL_CHANNELS_ACCESS=0]="ALL_CHANNELS_ACCESS";e[e.SOME_CHANNELS_ACCESS=1]="SOME_CHANNELS_ACCESS"}(r||(r={}));var u=(0,o.Z)((function(e){return{listings:{},setListing:function(t,n){return e((function(e){return{listings:l(a({},e.listings),i({},t,n(e.listings[t])))}}))},editStateIdsForGroup:{},setEditStateIdsForGroup:function(t,n){return e((function(e){return{editStateIdsForGroup:l(a({},e.editStateIdsForGroup),i({},t,n(e.editStateIdsForGroup[t])))}}))}}}))},341095:(e,t,n)=>{"use strict";n.d(t,{GM:()=>re,GP:()=>W,UE:()=>Y,Xo:()=>ce,PK:()=>B,B7:()=>se,Lo:()=>te,d9:()=>F,R7:()=>q,_T:()=>k,mR:()=>U,qs:()=>H,Ek:()=>V,p9:()=>G,H9:()=>ne,XZ:()=>J,TT:()=>$,F2:()=>ee})
|
||
;var r=n(667294),o=n(441143),i=n.n(o),a=n(496486),l=n(468811),u=n.n(l),c=n(547308),s=n(202351),f=n(91500),d=n(327499),p=n(797815),h=n(534681),y=n(543491),b=n(704230),v=n(547721),m=n(840249),g=n(523347),O=n(84124),E=n(121052),C=n(2590),j={id:"0",name:"",mentionable:!1,position:0,hoist:!1,permissions:C.Plq.SEND_MESSAGES,color:0,colorString:"0",icon:null,unicodeEmoji:null,flags:0},S=n(154146),I=n(203600);function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){w(i,r,o,a,l,"next",e)}function l(e){w(i,r,o,a,l,"throw",e)}a(void 0)}))}}function P(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function N(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){P(e,t,n[t])}))}return e}function A(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value)
|
||
;if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}var R=function(e,t){var n,r,o,i,a={
|
||
label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{
|
||
value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function L(e,t,n){var o=(0,S.n)((function(e){return e.setListing})),i=r.useCallback((function(r){o(e,(function(e){var o,i=null!==(o=null==e?void 0:e[t])&&void 0!==o?o:n,a="function"==typeof r?r(i):r;return Object.assign({},e,P({},t,a))}))}),[o,e,t,n]),a=(0,S.n)((function(n){var r;return null===(r=n.listings[e])||void 0===r?void 0:r[t]}));return[void 0!==a?a:n,i]}function D(e,t){var n=(0,s.e7)([m.Z],(function(){return m.Z.getSubscriptionListing(e)}));return r.useMemo((function(){return t(n)}),[n])}function k(e){var t;return L(e,"name",D(e,(function(e){return null!==(t=null==e?void 0:e.name)&&void 0!==t?t:""})))}function U(e){return L(e,"priceTier",D(e,(function(e){var t;return null===(t=null==e?void 0:e.subscription_plans[0])||void 0===t?void 0:t.price})))}function B(e){var t;return L(e,"description",D(e,(function(e){return null!==(t=null==e?void 0:e.description)&&void 0!==t?t:""})))}function F(e,t){return L(e,"image",D(e,(function(e){
|
||
if(null!=e)return(0,h._W)(e.application_id,e.image_asset,t)})))}function G(e,t){var n,o,i=(0,O.Z)(t,e);return L(e,"roleIcon",r.useMemo((function(){return{icon:null!==(n=null==i?void 0:i.icon)&&void 0!==n?n:void 0,unicodeEmoji:null!==(o=null==i?void 0:i.unicodeEmoji)&&void 0!==o?o:void 0}}),[i]))}function H(e,t){var n=(0,O.Z)(t,e),o=(0,S.n)((function(t){var n;return null===(n=t.listings[e])||void 0===n?void 0:n.roleColor})),i=(0,S.n)((function(t){var n;return null===(n=t.listings[e])||void 0===n?void 0:n.roleIcon}));return r.useMemo((function(){var e=N({},null!=n?n:j);if(void 0!==i){var t,r;e.icon=null!==(t=i.icon)&&void 0!==t?t:"";e.unicodeEmoji=null!==(r=i.unicodeEmoji)&&void 0!==r?r:""}if(void 0!==o){e.color=o;e.colorString=(0,c.Rf)(o)}return e}),[n,i,o])}function V(e,t){var n,o=(0,O.Z)(t,e);return L(e,"roleColor",r.useMemo((function(){return null!==(n=null==o?void 0:o.color)&&void 0!==n?n:C.p6O}),[o]))}function W(e,t){var n=(0,O.Z)(t,e)
|
||
;return L(e,"channelAccessFormat",r.useMemo((function(){return null==n?S.I.SOME_CHANNELS_ACCESS:(0,g.MT)(n)?S.I.ALL_CHANNELS_ACCESS:S.I.SOME_CHANNELS_ACCESS}),[n]))}var z=[];function Y(e){return L(e,"channelBenefits",D(e,(function(e){return null==e?z:e.role_benefits.benefits.filter(y.rC)})))}var K=[];function q(e){return L(e,"intangibleBenefits",D(e,(function(e){return null==e?K:e.role_benefits.benefits.filter(y.lL)})))}var Q=new Set;function X(e,t){if(0===e.length)return Q;var n=e.filter((function(e){return e.roles.includes(t)}));return new Set(n.map((function(e){return e.id})))}function J(e,t){var n=(0,O.Z)(t,e),o=(0,s.e7)([p.Z],(function(){return p.Z.getGuildEmoji(t)}),[t]);return L(e,"tierEmojiIds",r.useMemo((function(){return null===n?Q:X(o,n.id)}),[o,n]))}function $(e){var t,n=(0,v.oC)(e),r=(0,E.Z)(null!==(t=null==n?void 0:n.active_trial)&&void 0!==t?t:null).selectedOption;return L(e,"trialInterval",null!=r?r:null)}function ee(e){var t,n=(0,v.oC)(e)
|
||
;return L(e,"trialLimit",null!==(t=null==n?void 0:n.max_num_active_trial_users)&&void 0!==t?t:null)}function te(e){return(0,S.n)((function(t){var n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value;if(void 0!==t.listings[l])return!0}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return!1}))}function ne(e){var t,n,o,i,a,l=D(e,(function(e){return null==e?void 0:e.subscription_plans[0]})),u=T(L(e,"priceTier",void 0),1)[0];return[r.useMemo((function(){return{price:null!==(t=null!=u?u:null==l?void 0:l.price)&&void 0!==t?t:0,currency:null!==(n=null==l?void 0:l.currency)&&void 0!==n?n:C.pKx.USD,interval:null!==(o=null==l?void 0:l.interval)&&void 0!==o?o:I.rV.MONTH,interval_count:null!==(i=null==l?void 0:l.interval_count)&&void 0!==i?i:1,id:null!==(a=null==l?void 0:l.id)&&void 0!==a?a:""}}),[l,u])]}function re(e){t="nonexistantEditStateId",n=e,S.n.setState((function(e){return{
|
||
listings:A(N({},e.listings),P({},n,e.listings[t]))}}));var t,n}function oe(e){return ie.apply(this,arguments)}function ie(){return(ie=x((function(e){var t,n,r,o,l,u,c,s,h,y,v,g,O,E,C,j,I,_;return R(this,(function(w){switch(w.label){case 0:t=e.guildId,n=e.editStateId;r=m.Z.getSubscriptionListing(n);i()(null!=r,"listing doesnt exist");o=r.role_id;l=r.id;u=S.n.getState().listings[n];i()(null!=u,"edit state does not exist");c=u.roleColor,s=u.roleIcon,h=u.trialLimit,y=u.trialInterval,v=u.tierEmojiIds;return void 0===c&&void 0===s?[3,2]:[4,d.Z.updateRole(t,o,{color:c,icon:null==s?void 0:s.icon,unicodeEmoji:null==s?void 0:s.unicodeEmoji})];case 1:w.sent();w.label=2;case 2:g=m.Z.getSubscriptionTrial(l);return null!=h||null!=y||null!=g&&null==y?[4,b.I1(t,l,{trial:y,max_num_active_trial_users:h})]:[3,4];case 3:w.sent();w.label=4;case 4:if(void 0===v)return[3,6];O=p.Z.getGuildEmoji(t);E=X(O,o);C=(0,a.difference)(Z(v),Z(E));j=(0,a.difference)(Z(E),Z(v));I=C.map((function(e){
|
||
return p.Z.getCustomEmojiById(e)})).map((function(e){if(null!=e)return(0,f.dv)({guildId:t,emojiId:e.id,roles:Z(e.roles).concat([o])})}));_=j.map((function(e){return p.Z.getCustomEmojiById(e)})).map((function(e){if(null!=e){var n=e.roles.filter((function(e){return e!==o}));return n.length>0?(0,f.dv)({guildId:t,emojiId:e.id,roles:n}):(0,f.RE)(t,e.id)}}));return[4,Promise.all(Z(I).concat(Z(_)))];case 5:w.sent();w.label=6;case 6:return[2]}}))}))).apply(this,arguments)}function ae(e){var t,n=e.guildId,r=e.editStateId,o=e.groupListingId,l=m.Z.getSubscriptionListing(r);i()(null!=l,"listing doesnt exist");var u=r,c=S.n.getState().listings[u];i()(null!=c,"edit state does not exist");var s=c.name,f=c.description,d=c.channelBenefits,p=c.intangibleBenefits,h=c.priceTier,v=c.image,g=c.channelAccessFormat,O={};s!==l.name&&(O.name=s);f!==l.description&&(O.description=f);h!==(null===(t=l.subscription_plans[0])||void 0===t?void 0:t.price)&&(O.priceTier=h);null!=v&&(O.image=v)
|
||
;null!=g&&(O.can_access_all_channels=g===S.I.ALL_CHANNELS_ACCESS);if(null!=d||null!=p){var E=l.role_benefits.benefits.filter(y.rC),C=l.role_benefits.benefits.filter(y.lL),j=Z(null!=d?d:E).concat(Z(null!=p?p:C));O.benefits=j}return(0,a.isEmpty)(O)?l:b.O0({guildId:n,groupListingId:o,listingId:u,data:O})}function le(e){return ue.apply(this,arguments)}function ue(){return(ue=x((function(e){var t,n,r,o,a,l,u,c,s,f,d,p,h,y,v,m;return R(this,(function(g){switch(g.label){case 0:t=e.guildId,n=e.editStateId,r=e.groupListingId,o=e.onBeforeDispatchNewListing;a=S.n.getState().listings[n];i()(null!=a,"edit state does not exist");l=a.name,u=a.description,c=a.channelBenefits,s=a.intangibleBenefits,f=a.priceTier,d=a.image,p=a.channelAccessFormat;i()(null!=l,"no name provided");i()(null!=u,"no description provided");i()(null!=f,"no priceTier provided");i()(null!=d,"no image provided");h=p===S.I.ALL_CHANNELS_ACCESS;y=Z(null!=c?c:[]).concat(Z(null!=s?s:[]));return null!=(v=r)?[3,2]:[4,b.uw(t,{})];case 1:
|
||
m=g.sent();v=m.id;g.label=2;case 2:return[2,b.dA({guildId:t,groupListingId:v,data:{can_access_all_channels:h,image:d,name:l,description:u,benefits:y,priceTier:f},onBeforeDispatchNewListing:o})]}}))}))).apply(this,arguments)}function ce(){var e,t=T(r.useState(!1),2),n=t[0],o=t[1],a=T(r.useState(),2),l=a[0],u=a[1],c=r.useCallback((e=x((function(e){var t,n,r,a,l,c,s,f,d,p;return R(this,(function(h){switch(h.label){case 0:t=e.guildId,n=e.editStateId,r=e.groupListingId,a=e.onBeforeDispatchNewListing,l=e.onAfterDispatchNewListing;c=n;s=m.Z.getSubscriptionListing(c);f=null!=s;h.label=1;case 1:h.trys.push([1,7,8,9]);o(!0);u(void 0);if(!f)return[3,3];i()(null!=r,"groupListingId is null");return[4,ae({guildId:t,editStateId:c,groupListingId:r})];case 2:h.sent();return[3,5];case 3:return[4,le({guildId:t,editStateId:c,groupListingId:r,onBeforeDispatchNewListing:a})];case 4:d=h.sent();c=d.id;y=n,b=c,S.n.setState((function(e){var t;return{listings:A(N({},e.listings),(t={},P(t,b,e.listings[y]),
|
||
P(t,y,void 0),t))}}));null==l||l(d);h.label=5;case 5:return[4,oe({guildId:t,editStateId:c})];case 6:h.sent();re(c);return[2,!0];case 7:if(!("getAnyErrorMessage"in(p=h.sent())))throw p;u(p);return[3,9];case 8:o(!1);return[7];case 9:return[2]}var y,b}))})),function(t){return e.apply(this,arguments)}),[]);return{loading:n,error:l,handleCreateOrUpdateFromEditState:c}}function se(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{includeSoftDeleted:!1},o=(0,v._k)(e,n),i=(0,S.n)((function(e){return e.editStateIdsForGroup[t]})),a=(0,S.n)((function(e){return e.setEditStateIdsForGroup})),l=r.useMemo((function(){return Z(o.map((function(e){return e.id}))).concat(Z(null!=i?i:[]))}),[i,o]),c=r.useCallback((function(){a(t,(function(e){return Z(null!=e?e:[]).concat([u().v4()])}))}),[t,a]),s=r.useCallback((function(e){a(t,(function(t){return(null!=t?t:[]).filter((function(t){return t!==e}))}))}),[t,a]);return{editStateIds:l,addNewEditStateId:c,removeEditStateId:s}}},633440:(e,t,n)=>{
|
||
"use strict";n.d(t,{W:()=>i,V:()=>a});var r=n(441143),o=n.n(r);function i(e){var t=e.items;o()(1===t.length,"more than 1 subscription item for role subscription");return t[0].planId}function a(e){var t,n=null==e||null===(t=e.renewalMutations)||void 0===t?void 0:t.items;if(null!=n){o()(n.length<=1,"more than 1 renewal mutation for role subscription");return null==n?void 0:n[0].planId}}},506847:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(667294),o=n(202351),i=n(810978),a=n(551778),l=n(536392),u=n(840249),c=n(633440),s=n(2590);function f(e){var t=(0,o.e7)([l.Z],(function(){return l.Z.getSubscriptions()})),n=r.useMemo((function(){if(null==t)return{};var e={},n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(t)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value;if(l.type===s.NYc.GUILD){e[(0,c.W)(l)]=l}}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return e}),[t]),f=(0,o.cj)([u.Z],(function(){
|
||
var t,r,o=null,i=null!=e?u.Z.getSubscriptionGroupListing(e):null,a=null!==(r=null==i?void 0:i.subscription_listings_ids)&&void 0!==r?r:[],l=!0,c=!1,s=void 0;try{for(var f,d=a[Symbol.iterator]();!(l=(f=d.next()).done);l=!0){var p=f.value,h=u.Z.getSubscriptionListing(p),y=null==h?void 0:h.subscription_plans[0].id;if(null!=y){var b=n[y];if(null!=b){o=b;t=h;break}}}}catch(e){c=!0;s=e}finally{try{l||null==d.return||d.return()}finally{if(c)throw s}}return{activeSubscription:o,activeSubscriptionListing:t}})),d=f.activeSubscription,p=f.activeSubscriptionListing,h=null==p?void 0:p.subscription_plans[0],y=null==h?void 0:h.id,b=null==h?void 0:h.sku_id,v=(0,o.e7)([a.Z],(function(){return null!=y?a.Z.get(y):null})),m=null==p?void 0:p.soft_deleted;r.useEffect((function(){null!=v||null==b||a.Z.isFetchingForSKU(b)||(0,i.GZ)(b,void 0,void 0,m)}),[v,b,m]);return{activeSubscription:d,activeSubscriptionListing:p,activeSubscriptionPlanFromStore:v}}},345623:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u})
|
||
;var r=n(667294),o=n(202351),i=n(797815),a=n(104627),l=[];function u(e){var t=(0,o.e7)([i.Z],(function(){return i.Z.getGuildEmoji(e)}),[e]);return r.useMemo((function(){return null==t?l:t.filter((function(t){return(0,a.Kt)(t,e)}))}),[t,e])}},84124:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(202351),o=n(567403),i=n(547721);function a(e,t){var n=(0,r.e7)([o.Z],(function(){return o.Z.getGuild(e)}),[e]),a=(0,i.jO)(t);return null==n||null==a?null:n.roles[a.role_id]}},805537:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(667294),o=n(202351),i=n(396043),a=n(19585),l=n(784426),u=n(652591),c=n(547721),s=n(840249),f=n(506847),d=n(2590);function p(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function h(e){var t,n=e.guildId,h=e.groupListingId,y=e.location,b=e.relevantSubscriptionListingIds,v=(0,c.tT)(n,{refetchOnMount:!1}).listingsLoaded,m=null!=(0,f.Z)(h).activeSubscription,g=(0,o.Wu)([s.Z],(function(){
|
||
return(null!=b?b:[]).filter((function(e){var t;return!0===(null===(t=s.Z.getSubscriptionListing(e))||void 0===t?void 0:t.published)}))}),[b]),O=(0,a.Z)(null!==(t=(0,l.DR)())&&void 0!==t?t:[]).analyticsLocations,E=r.useRef(!1);r.useEffect((function(){if(v&&null!=h&&null!=g&&!E.current){E.current=!0;u.default.track(d.rMx.ROLE_SUBSCRIPTION_LISTING_UPSELL_PAGE_VIEWED,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){p(e,t,n[t])}))}return e}({role_subscription_group_listing_id:h,role_subscription_listing_ids:g,is_premium_member:m,location_stack:O,location:y},(0,i.hH)(n)))}}),[n,h,v,y,g,m,O])}},121052:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(667294),o=n(543491),i=n(856744),a=n(203600),l=n(473708);function u(e){
|
||
return r.useMemo((function(){var t,n=i.DN.map((function(e){return{value:e,label:e.interval===a.rV.DAY&&7===e.interval_count?l.Z.Messages.GUILD_ROLE_SUBSCRIPTION_SETUP_TIER_TRIAL_TIME_LIMIT_DEFAULT_OPTION.format({defaultLimit:(0,o.iG)(e)}):(0,o.iG)(e),isDefault:e.interval===a.rV.DAY&&7===e.interval_count}})),r=null!=e?null===(t=n.find((function(t){return null!=t.value&&t.value.interval===e.interval&&t.value.interval_count===e.interval_count})))||void 0===t?void 0:t.value:e;return{options:n,selectedOption:r}}),[e])}},719511:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(202351),o=n(61209);function i(e){return(0,r.Wu)([o.Z],(function(){return e.filter((function(e){return o.Z.hasChannel(e.ref_id)}))}),[e])}},22572:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(77413),l=n(202351),u=n(797815);const c=function(e,t){return(0,l.e7)([u.Z],(function(){if(null==t)return null;var n,r=u.Z.getDisambiguatedEmojiContext(e)
|
||
;return null!==(n=r.getById(t))&&void 0!==n?n:r.getByName(t)}),[e,t])};var s=n(124296),f=n(142412),d=n.n(f);function p(e){var t,n=e.guildId,o=e.emojiId,l=e.emojiName,u=e.className,f=c(n,o);return null!=f||null!=l?(0,r.jsx)(a.Z,{emojiId:null==f?void 0:f.id,emojiName:null!=l?l:null==f?void 0:f.name,animated:null!==(t=null==f?void 0:f.animated)&&void 0!==t&&t,className:i()(d().emojiIcon,u)}):(0,r.jsx)(s.Z,{className:i()(d().emojiIcon,u),useGradient:!0})}},922799:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(959468),l=n(239813),u=n(61209),c=n(72580),s=n(856744),f=n(473708),d=n(983739),p=n.n(d);function h(e){var t=e.channelId,n=(0,o.e7)([u.Z],(function(){return u.Z.getChannel(t)}));if(null==n)return(0,r.jsx)(r.Fragment,{children:"[".concat(f.Z.Messages.GUILD_ROLE_SUBSCRIPTION_SETUP_TIER_DELETED_CHANNEL_LABEL,"]")});var c=(0,l.Th)(n.type);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.nn4,{children:(0,a.Z)({channel:n})}),(0,
|
||
r.jsxs)("div",{"aria-hidden":!0,children:[null!=c&&(0,r.jsx)(c,{className:p().icon,"aria-hidden":!0}),n.name]})]})}function y(e){switch(e.ref_type){case s.Qs.CHANNEL:return(0,r.jsx)(h,{channelId:e.ref_id});case s.Qs.INTANGIBLE:return e.name;default:(0,c.vE)(e)}}},217131:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(837162),c=n(649536),s=n(358624),f=n(219369),d=n(473903),p=n(773148),h=n(463473),y=n(2590),b=n(473708),v=n(803596),m=n.n(v);function g(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function E(e){var t,n=e.guildId,i=e.role,v=e.theme,E=e.content,C=void 0===E?b.Z.Messages.GUILD_ROLE_SUBSCRIPTION_SETUP_FLAIR_PREVIEW_MESSAGE_TEXT:E,j=e.className,S=(0,l.e7)([d.default],(function(){return d.default.getCurrentUser()})),I=p.Z.useName(n,null,S),_=(0,u.Kz)(i),w=o.useMemo((function(){return(0,c.e5)(O(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){g(e,t,n[t])}))}return e}({},(0,s.ZP)({channelId:"0",content:C,tts:void 0,type:void 0,messageReference:void 0,allowedMentions:void 0,author:S})),{state:y.yb.SENT,id:"0"}))}),[S,C]),x={nick:I,colorString:null!==(t=i.colorString)&&void 0!==t?t:void 0};return(0,r.jsx)("div",{className:a()((0,
|
||
h.Q)(v),m().container,j),children:(0,r.jsx)(f.Z,{hideTimestamp:!0,author:x,roleIcon:_,message:w,isGroupStart:!0,disableInteraction:!0})})}},383163:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(289283),u=n(707961),c=n(142926),s=n(473708),f=n(274522),d=n.n(f);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){var t=e.text,n=e.hasScrolled;return(0,r.jsxs)("div",{className:a()(d().container,h({},d().containerHide,n)),children:[(0,r.jsx)("div",{className:d().notice,children:(0,r.jsx)(u.xvT,{className:d().label,variant:"text-md/medium",color:"header-primary",children:t})}),(0,r.jsx)("div",{className:d().noticeArrow})]})}var v=n(508038),m=n.n(v);function g(e){var t=e.guildId,n=e.children,i=e.className,f=function(e){var t=y(o.useState(),2),n=t[0],i=t[1],a=y(o.useState(),2),l=a[0],u=a[1],f=y(o.useState(!1),2),d=f[0],p=f[1],h=y(o.useState(!1),2),v=h[0],m=h[1],g=(0,
|
||
c.s1)(e).enabled;o.useEffect((function(){p(!(!g||null==n||null==l)&&n<l)}),[g,n,l]);return{horizontalScrollNotice:o.useMemo((function(){return d?(0,r.jsx)(b,{text:s.Z.Messages.GUILD_ROLE_SUBSCRIPTION_LISTINGS_SCROLLABLE_NOTICE,hasScrolled:v}):null}),[d,v]),handleScroll:function(){return m(!0)},handleSetScrollerRef:function(e){var t;return u(null===(t=null==e?void 0:e.getScrollerState())||void 0===t?void 0:t.scrollWidth)},handleSetContainerRef:function(e){return i(null==e?void 0:e.clientWidth)}}}(t),d=f.horizontalScrollNotice,p=f.handleScroll,h=f.handleSetScrollerRef,v=f.handleSetContainerRef,g=(0,r.jsx)("div",{className:m().tierPreviewsContainer,children:(0,r.jsx)("div",{className:a()(m().tierPreviews,i),children:n})});l.tq||(g=(0,r.jsxs)(r.Fragment,{children:[d,(0,r.jsx)(u.Den,{className:m().scroller,orientation:"horizontal",ref:h,onScroll:p,children:g})]}));return(0,r.jsx)("div",{className:m().carouselMaxWidth,ref:v,children:g})}},772040:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u})
|
||
;var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}
|
||
function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=l(e,["width","height"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(s)),{width:n,height:c,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{
|
||
d:"M17.225 6.06504C17.3227 6.00866 17.4362 5.98608 17.548 6.00084C17.6598 6.0156 17.7637 6.06686 17.8434 6.14665C17.9232 6.22645 17.9744 6.33037 17.9892 6.44225C18.0039 6.55413 17.9813 6.66772 17.925 6.76548L15.65 10.2551L21.9875 11.581C21.9875 11.7185 21.9875 11.8562 21.9875 11.9937C21.9875 12.1313 21.9875 12.2689 21.9875 12.4065L15.65 13.7323L17.925 17.222C17.9939 17.3117 18.0313 17.4216 18.0313 17.5347C18.0313 17.6478 17.9939 17.7577 17.925 17.8474C17.8281 17.9424 17.6982 17.9962 17.5625 17.9975C17.466 17.996 17.3714 17.9702 17.2875 17.9224L13.8125 15.646L12.4125 22H11.5875L10.2625 15.6585L6.77501 17.935C6.69176 17.9843 6.59672 18.0102 6.49997 18.01C6.43455 18.0098 6.3699 17.9963 6.30977 17.9705C6.24964 17.9447 6.1953 17.9072 6.15001 17.8599C6.06977 17.7789 6.01879 17.6734 6.0052 17.5601C5.99162 17.4468 6.01621 17.3323 6.07501 17.2345L8.36253 13.7449L2 12.4065C2 12.2689 2 12.1313 2 11.9937C2 11.8562 2 11.7185 2 11.581L8.35002 10.2551L6.0625 6.76548C6.0037 6.66774 5.97918 6.55315 5.99277 6.43988C6.00635 6.32661 6.05726 6.22113 6.1375 6.14009C6.21731 6.05781 6.32295 6.00542 6.43672 5.99176C6.5505 5.97809 6.6655 6.00399 6.7625 6.06504L10.25 8.34148L11.575 2H12.4L13.7375 8.34148L17.225 6.06504Z",
|
||
fill:"white"}),(0,r.jsx)("path",{
|
||
d:"M22 12.4065C21.8956 14.9141 20.8533 17.2908 19.0798 19.0654C17.3062 20.8401 14.931 21.883 12.425 21.9875L13.7625 15.646L17.2375 17.9224C17.3214 17.9702 17.416 17.996 17.5125 17.9975C17.6481 17.9962 17.7781 17.9424 17.875 17.8474C17.9439 17.7577 17.9813 17.6478 17.9813 17.5347C17.9813 17.4216 17.9439 17.3117 17.875 17.222L15.6 13.7323L22 12.4065ZM13.7625 8.34148L17.2375 6.06504C17.3352 6.00866 17.4487 5.98608 17.5605 6.00084C17.6723 6.0156 17.7762 6.06686 17.8559 6.14665C17.9357 6.22645 17.9869 6.33037 18.0017 6.44225C18.0164 6.55413 17.9938 6.66772 17.9375 6.76548L15.6625 10.2551L22 11.581C21.8956 9.07342 20.8533 6.69669 19.0798 4.92206C17.3062 3.14742 14.931 2.10449 12.425 2L13.7625 8.34148ZM10.275 8.34148L11.6 2C9.09402 2.10449 6.71878 3.14742 4.94525 4.92206C3.17172 6.69669 2.12945 9.07342 2.02502 11.581L8.37497 10.2551L6.08752 6.76548C6.02873 6.66774 6.00413 6.55315 6.01772 6.43988C6.0313 6.32661 6.08228 6.22113 6.16252 6.14009C6.24233 6.05781 6.34797 6.00542 6.46175 5.99176C6.57552 5.97809 6.69052 6.00399 6.78752 6.06504L10.275 8.34148ZM6.16252 17.8474C6.08228 17.7663 6.0313 17.6609 6.01772 17.5476C6.00413 17.4343 6.02873 17.3197 6.08752 17.222L8.37497 13.7323L2 12.4065C2.10442 14.9141 3.1467 17.2908 4.92023 19.0654C6.69376 20.8401 9.06899 21.883 11.575 21.9875L10.25 15.646L6.7625 17.9224C6.67925 17.9718 6.58428 17.9977 6.48753 17.9975C6.35971 17.9937 6.23848 17.9398 6.15001 17.8474H6.16252Z",
|
||
fill:"url(#paint0_linear_3793:27920)"}),(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:"paint0_linear_3793:27920",x1:"2",y1:"21.9875",x2:"21.9875",y2:"1.98749",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#11A574"}),(0,r.jsx)("stop",{offset:"1",stopColor:"#169DD8"})]})})]}))}},340562:(e,t,n)=>{"use strict";n.d(t,{c:()=>dt,Z:()=>ht});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(333568),s=n(861426),f=n(615796),d=n(223430),p=n(443812),h=n(377463),y=n(58838),b=n(386991),v=n(775173),m=n(543491),g=n(142926),O=n(547721),E=n(341095),C=n(506847);var j=n(345623),S=n(84124),I=n(719511),_=n(133028),w=n(217131),x=n(22572),P=n(922799),N=n(959468),A=n(14096),T=n(784426),Z=n(61209),M=n(407561),R=n(414306),L=n(2590);function D(e,t){var n=(0,l.e7)([Z.Z],(function(){return Z.Z.getChannel(t)})),r=(0,R.Z)(null==n?void 0:n.id).needSubscriptionToAccess;if(null==n||r)return null;var o=n.isGuildVocal();return{navigateToChannel:function(){
|
||
o?A.Z.handleVoiceConnect({channel:n,connected:M.Z.isInChannel(n.id),needSubscriptionToAccess:!1,routeDirectlyToChannel:!0}):(0,T.uL)(L.Z5c.CHANNEL(e,n.id))},ariaLabel:(0,N.Z)({channel:n})}}var k=n(575103),U=n.n(k);function B(e){var t=e.benefit,n=e.guildId,o=D(n,t.ref_id),i=(0,r.jsx)(x.Z,{guildId:n,emojiId:t.emoji_id,emojiName:t.emoji_name}),l=null!=o?(0,r.jsx)(u.P3F,{className:U().channelLink,onClick:o.navigateToChannel,"aria-label":o.ariaLabel,role:"link",children:(0,r.jsx)(u.xvT,{variant:"text-md/medium",color:"header-primary",className:a()(U().name,U().linkedName),children:(0,P.Z)(t)})}):(0,r.jsx)(u.xvT,{variant:"text-md/medium",color:"header-primary",className:U().name,children:(0,P.Z)(t)});return(0,r.jsxs)("div",{className:U().container,children:[(0,r.jsxs)("div",{className:U().infoContainer,children:[l,(0,r.jsx)(u.xvT,{color:"interactive-normal",variant:"text-sm/normal",children:t.description})]}),(0,r.jsx)("div",{className:U().emojiContainer,children:i})]})}
|
||
var F=n(336194),G=n(531441),H=n(249052),V=n(712861),W=n(856744),z=n(873954),Y=n.n(z),K=(0,V.Mg)(Y().tierImageSize),q=(0,V.Mg)(Y().tierImageSizeMobile);function Q(){return(0,c.Z)(W.iP)?q:K}var X=n(473708);function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)
|
||
}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ee=function(e){var t=e.listingName;return(0,r.jsx)(u.X6q,{variant:"text-md/normal",color:"interactive-active",className:Y().tierName,children:t})};function te(e){var t=e.image;return null==t?null:(0,r.jsx)("img",{src:t,alt:"",className:Y().tierImage})}var ne=function(){return(0,r.jsx)(G.IG,{color:F.Z.unsafe_rawColors.YELLOW_300.css,text:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_MANAGEMENT_DRAFT_LABEL,className:Y().draftBadge})},re=function(e){var t=e.listingId,n=e.isListingPublished,o=Q(),i=$(E._T(t),1)[0],a=$(E.d9(t,o),1)[0],l=$(E.H9(t),1)[0];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ee,{listingName:i}),(0,r.jsx)(te,{image:a}),!n&&(0,r.jsx)("div",{className:Y().draftBadgeContainer,children:(0,r.jsx)(ne,{})}),(0,r.jsx)(u.xvT,{variant:"heading-xl/semibold",className:Y().tierPrice,tag:"div",
|
||
children:(0,H.T4)(l.price,l.currency)}),(0,r.jsx)(u.xvT,{variant:"text-xs/normal",color:"interactive-normal",className:Y().tierPeriod,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_AMOUNT_PER_PERIOD.format({period:(0,m.JE)({interval:l.interval,interval_count:l.interval_count})})})]})},oe=n(84619),ie=n.n(oe);function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name)
|
||
;if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ae(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ue=function(e){var t=e.listingId,n=e.isListingPublished,o=e.expanded,i=e.onToggleExpanded,a=Q(),l=le(E._T(t),1)[0],c=le(E.d9(t,a),1)[0],s=le(E.H9(t),1)[0];return(0,r.jsxs)("div",{className:ie().container,children:[(0,r.jsx)(te,{image:c}),(0,r.jsxs)("div",{className:ie().tierTextInfoContainer,children:[(0,r.jsx)(ee,{listingName:l}),(0,r.jsxs)("div",{className:ie().tierPriceContainer,children:[!n&&(0,r.jsx)(ne,{}),(0,r.jsxs)(u.xvT,{variant:"text-xs/normal",className:ie().tierPrice,children:[(0,H.T4)(s.price,s.currency)," ",X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_AMOUNT_PER_PERIOD.format({period:(0,m.JE)({interval:s.interval,interval_count:s.interval_count})})]})]})]}),(0,
|
||
r.jsx)(u.P3F,{onClick:i,children:o?(0,r.jsx)(y.Z,{className:ie().toggleButton}):(0,r.jsx)(h.Z,{className:ie().toggleButton})})]})},ce=n(441143),se=n.n(ce),fe=n(730381),de=n.n(fe),pe=n(744564),he=n(810978),ye=n(19585),be=n(276985),ve=n(886391),me=n(201615),ge=n(716371),Oe=n(944522),Ee=n(753557),Ce=n(551778),je=n(348592),Se=n(633440),Ie=n(447930);function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function we(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return _e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _e(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Pe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:
|
||
a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Ne=function(){var e,t,n=xe(o.useState(!1),2),r=n[0],i=n[1],a=xe(o.useState(null),2),l=a[0],u=a[1],c=o.useCallback((t=(e=function(e,t,n){var r;return Pe(this,(function(o){switch(o.label){case 0:i(!0);u(null);o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,(0,Ie.LB)(e,t,n)];case 2:return[2,o.sent()];case 3:r=o.sent();u(r);return[3,5];case 4:i(!1);return[7];case 5:return[2]}}))},function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n)
|
||
;function a(e){we(i,r,o,a,l,"next",e)}function l(e){we(i,r,o,a,l,"throw",e)}a(void 0)}))}),function(e,n,r){return t.apply(this,arguments)}),[]);return{loading:r,error:l,getTrialPurchaseEligibility:c}},Ae=n(845882),Te=n(567403);var Ze=["a","b","c","d"],Me=function(e){return e};function Re(e,t){for(var n=function(n){r[Ze[n]]=function(r,o){return t(e[n],o)}},r={},o=Math.min(e.length,Ze.length),i=0;i<o;++i)n(i);return r}var Le=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.items=t}var t=e.prototype;t.asString=function(){return this.transformed(Me)};t.isEmpty=function(){return 0===this.items.length};t.transformed=function(e){switch(this.items.length){case 0:return"";case 1:return e(this.items[0],"");case 2:return X.Z.Messages.GENERIC_FORMATTED_LIST_TWO.format(Re(this.items,e));case 3:return X.Z.Messages.GENERIC_FORMATTED_LIST_THREE.format(Re(this.items,e));default:
|
||
return X.Z.Messages.GENERIC_FORMATTED_LIST_FOUR.format(Re(this.items,e))}};return e}();var De=n(879581),ke=n.n(De),Ue=function(e){var t=e.onClose,n=e.listing,i=e.guildId,a=(0,l.e7)([Te.Z],(function(){return Te.Z.getGuild(i)}),[i]),c=function(e){var t=e.includeFlairAsBenefit,n=e.listing,r=e.guildId,i=0,a=0,l=!0,u=!1,c=void 0;try{for(var s,f=n.role_benefits.benefits[Symbol.iterator]();!(l=(s=f.next()).done);l=!0){var d=s.value;(0,m.rC)(d)?i+=1:(0,m.lL)(d)&&(a+=1)}}catch(e){u=!0;c=e}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}var p=n.role_id,h=(0,j.Z)(r).filter((function(e){return e.roles.includes(p)})).length;return o.useMemo((function(){var e=[];!0===t&&e.push(X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_BENEFIT_VISUAL_FLAIR);0!==i&&e.push(X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_LITE_EXCLUSIVE_CHANNELS_SUBTITLE.format({channelCount:i}));0!==a&&e.push(X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_LITE_BENEFITS_SUBTITLE.format({
|
||
benefitCount:a}));0!==h&&e.push(X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_LITE_EMOJI_SUBTITLE.format({emojiCount:h}));return new Le(e)}),[i,a,h,t])}({listing:n,guildId:i});return(0,r.jsxs)("div",{className:ke().confirmationContainer,children:[(0,r.jsx)(u.X6q,{className:ke().confirmationHeader,variant:"heading-lg/extrabold",children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_LITE_TITLE.format({serverName:null==a?void 0:a.toString(),tierName:n.name})}),!c.isEmpty()&&(0,r.jsx)(u.xvT,{className:ke().confirmationSubtitle,variant:"text-sm/normal",color:"header-secondary",children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_LITE_SUBTITLE.format({benefits:c.asString()})}),(0,r.jsx)(u.zxk,{className:ke().openDiscordButton,onClick:function(){return(0,Ae.Z)("role_sub_mweb_success_modal")},children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_LITE_OPEN_DISCORD_BUTTON}),(0,r.jsx)(u.zxk,{className:ke().doneButton,
|
||
look:u.zxk.Looks.BLANK,onClick:function(){return t(!0)},children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_LITE_DONE_BUTTON})]})},Be=n(77413),Fe=n(83471),Ge=n(189865),He=n(534681),Ve=n(718831),We=n(778381),ze=n.n(We);function Ye(e){var t=e.benefit,n=e.guildId,o=e.onClick,i=D(n,t.ref_id),a=(0,r.jsx)(x.Z,{guildId:n,emojiId:t.emoji_id,emojiName:t.emoji_name});return(0,r.jsxs)(u.P3F,{className:ze().container,onClick:function(){null==i||i.navigateToChannel();o()},"aria-label":null==i?void 0:i.ariaLabel,role:"link",children:[(0,r.jsx)("div",{className:ze().emojiContainer,children:a}),(0,r.jsxs)("div",{className:ze().infoContainer,children:[(0,r.jsx)(u.xvT,{variant:"text-md/medium",color:"header-primary",className:ze().name,children:(0,P.Z)(t)}),(0,r.jsx)(u.xvT,{color:"interactive-normal",variant:"text-sm/normal",children:t.description})]}),(0,r.jsx)(Ve.Z,{direction:Ve.Z.Directions.RIGHT,className:ze().caret})]})}var Ke=n(328589),qe=n.n(Ke);function Qe(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var Xe=function(e){var t=e.onClose,n=e.listing,o=e.step,i=e.guildId,l=(0,O.YB)(i),s=(0,c.Z)(W.Xy);return(0,r.jsxs)("div",{className:a()(qe().headerContainer,Qe({},qe().headerEmpty,s)),children:[function(){var e;if(s)return null;var t=null!=(null==l||null===(e=l.cover_image_asset)||void 0===e?void 0:e.application_id)?(0,He._W)(l.cover_image_asset.application_id,l.cover_image_asset,440):void 0;return(0,r.jsx)("img",{src:t,alt:"",className:qe().headerImage})}(),function(){if(o!==Fe.h8.CONFIRM)return null;var e=(0,He._W)(n.application_id,n.image_asset,80);return(0,r.jsx)("div",{className:qe().tierImageContainer,children:(0,r.jsx)("img",{src:e,alt:"",className:qe().tierImage})})}(),(0,r.jsx)(u.P3F,{className:qe().closeContainer,onClick:function(){return t(!1)},"aria-label":X.Z.Messages.CLOSE,children:(0,r.jsx)(Ge.Z,{className:qe().closeIcon})})]})},Je=function(e){
|
||
var t=e.onClose,n=e.listing,o=e.guildId,i=(0,l.e7)([Te.Z],(function(){return Te.Z.getGuild(o)}),[o]),a=(0,j.Z)(o).filter((function(e){return e.roles.includes(n.role_id)})),c=n.role_benefits.benefits.filter(m.rC).slice(0,null===a.length?4:3),s=(0,I.Z)(c).slice(0,null===a.length?4:3);return(0,r.jsxs)("div",{className:qe().confirmationContainer,children:[(0,r.jsx)(u.X6q,{className:qe().confirmationHeader,variant:"heading-xl/semibold",color:"header-secondary",children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_TITLE.format({serverName:null==i?void 0:i.toString()})}),(0,r.jsx)(u.xvT,{className:qe().confirmationSubtitle,variant:"text-md/normal",color:"header-secondary",children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_SUBTITLE.format({tier:n.name})}),s.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.xvT,{variant:"text-xs/normal",color:"header-secondary",className:qe().confirmationSectionLabel,
|
||
children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_CHANNEL_PREVIEW}),(0,r.jsx)("div",{className:qe().confirmationBenefits,children:s.map((function(e){return(0,r.jsx)(Ye,{benefit:e,guildId:o,onClick:function(){return t(!0)}},(0,m.ab)(e))}))})]}),function(){if(0===a.length)return null;var e,t=a[0];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.xvT,{variant:"text-xs/medium",color:"header-secondary",className:qe().confirmationSectionLabel,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_PREMIUM_EMOJI_PREVIEW_TITLE}),(0,r.jsxs)("div",{className:qe().emojiBenefitsRow,children:[(0,r.jsx)(Be.Z,{emojiId:t.id,emojiName:t.name,animated:null!==(e=t.animated)&&void 0!==e&&e,className:qe().emojiImage}),(0,r.jsxs)("div",{children:[(0,r.jsx)(u.xvT,{variant:"text-md/medium",color:"header-primary",className:qe().emojiName,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_PREMIUM_EMOJI_BENEFIT_TEXT}),(0,r.jsx)(u.xvT,{
|
||
color:"interactive-normal",variant:"text-sm/normal",children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_PREMIUM_EMOJI_BENEFIT_DESCRIPTION.format({count:a.length})})]})]})]})}(),(0,r.jsx)(u.zxk,{className:qe().confirmationButton,onClick:function(){return t(!0)},children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_DONE_BUTTON})]})};function $e(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function et(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$e(i,r,o,a,l,"next",e)}function l(e){$e(i,r,o,a,l,"throw",e)}a(void 0)}))}}var tt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){
|
||
if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};const nt=function(e,t,n,i){var a,u=(0,l.e7)([Oe.Z],(function(){return Oe.Z.isLurking(t)})),s=(0,ge.J)(t),f=(0,l.e7)([me.Z],(function(){return null!=t?me.Z.getRequest(t):null
|
||
})),d=(null==f?void 0:f.applicationStatus)===ve.wB.SUBMITTED,p=null==e?void 0:e.subscription_plans[0],h=null==p?void 0:p.id,y=!0===(null==e?void 0:e.published),b=null==p?void 0:p.sku_id,v=(0,l.e7)([Ce.Z],(function(){return null!=h?Ce.Z.get(h):null})),E=(0,C.Z)(n),j=E.activeSubscription,S=E.activeSubscriptionPlanFromStore,I=null==j||null!=S,_=(0,O._k)(n,{includeSoftDeleted:!0}).map((function(e){return e.subscription_plans[0].id})),w=(0,Se.V)(j),x=null!=w,P=null!=(null==j?void 0:j.trialId),N=Ne(),A=N.loading,T=N.getTrialPurchaseEligibility,Z=(0,g.oM)(t),M=(0,O.oC)(null==e?void 0:e.id),R=(0,ye.Z)().analyticsLocations,D=!u&&null!=v&&I&&!d&&!x&&!P;d||u&&!s?a=X.Z.Messages.GUILD_ROLE_SUBSCRIPTIONS_REQUIRE_APPROVED_MEMBER:w===h?a=X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_HAS_PENDING_MUTATION_TO_CURRENT_LISTING.format({changeDate:null!=j?de()(j.currentPeriodEnd).format("MMM DD, YYYY"):""
|
||
}):x?a=X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_HAS_PENDING_MUTATION:P&&(a=X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_CHANGE_TIER_DISABLED_IN_TRIAL);var k=(0,c.Z)(W.iP);o.useEffect((function(){y&&null!=b&&pe.Z.wait((function(){(0,he.GZ)(b)}))}),[y,b]);var U=o.useCallback(et((function(){var n,o,a,l;return tt(this,(function(u){switch(u.label){case 0:se()(null!=e,"No subscription listing");se()(null!=p,"No subscription plan");se()(y,"Cannot purchase this unpublished plan");return null!=(null==M?void 0:M.active_trial)&&Z?[4,T(t,e.id,M.active_trial.id)]:[3,2];case 1:!0===(null==(a=u.sent())?void 0:a.is_eligible)?n=null==M||null===(l=M.active_trial)||void 0===l?void 0:l.id:o=X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_INELIGIBLE_TRIAL_DISCLAIMER;u.label=2;case 2:(0,Ee.Z)({activeSubscription:j,analyticsSubscriptionType:L.NYc.GUILD,trialId:n,trialFooterMessageOverride:null!=(null==M?void 0:M.active_trial)?X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TRIAL_RENEWAL_FOOTER.format({trialInterval:(0,m.iG)(M.active_trial),
|
||
days:1,contactLink:L.EYA.CONTACT,helpdeskArticle:je.Z.getArticleURL(L.BhN.ROLE_SUBSCRIPTION_TRIAL)}):void 0,analyticsLocations:R,analyticsLocation:i,renderHeader:function(n,o,i){return(0,r.jsx)(Xe,{onClose:o,listing:e,step:i,guildId:t})},initialPlanId:p.id,skuId:p.sku_id,planGroup:_,renderPurchaseConfirmation:function(n,o){return k?(0,r.jsx)(Ue,{listing:e,onClose:o,guildId:t}):(0,r.jsx)(Je,{listing:e,onClose:o,guildId:t})},reviewWarningMessage:o});return[2]}}))})),[y,e,p,j,_,t,R,i,T,Z,M,k]),B=o.useCallback((function(){(0,be.hk)(t)}),[t]);return{openModal:s?B:U,canOpenModal:D,cannotOpenReason:a,isCheckingTrialEligibility:A}};var rt=n(508987),ot=n.n(rt);function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function at(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){at(e,t,n[t])}))}return e}function ut(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ct(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{
|
||
try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var st=function(e){var t=e.benefits,n=e.header,i=e.guildId,a=ct(o.useState(!1),2),l=a[0],c=a[1],s=l?t:t.slice(0,5),f=t.length>5,h=t.length-5,y=X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_SHOW_MORE_DESCRIPTION_WITH_ITEMS.format({numTruncated:h}),b=(0,p.Dt)();return 0===t.length?null:(0,r.jsxs)("div",{className:ot().benefitsSection,children:[(0,r.jsx)(u.X6q,{variant:"text-xs/bold",color:"header-secondary",className:ot().sectionHeader,id:b,
|
||
children:n}),(0,r.jsx)(d.Z,{size:12}),(0,r.jsx)("ul",{className:ot().benefitsList,"aria-labelledby":b,children:s.map((function(e,t){return(0,r.jsx)("li",{children:(0,r.jsx)(B,{guildId:i,benefit:e},(0,m.ab)(e))},t)}))}),f&&(0,r.jsx)(pt,{isViewAll:l,onToggle:function(){return c((function(e){return!e}))},showMoreText:y})]})},ft=function(e){var t,n=e.guildId,o=e.listingId,i=function(e){return v.ZP.getEmojiURL({id:e.id,animated:e.animated,size:24})},a=(0,j.Z)(n),l=ct(E.XZ(o,n),1)[0],c=a.filter((function(e){return l.has(e.id)}));return 0===c.length?null:(0,r.jsxs)("div",{className:ot().benefitsSection,children:[(0,r.jsx)(u.X6q,{variant:"text-xs/bold",color:"header-secondary",className:ot().sectionHeader,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_EMOJI_SECTION_TITLE.format({count:c.length})}),(0,r.jsx)(d.Z,{size:12}),(0,r.jsx)("div",{className:ot().emojiList,children:c.map((function(e,n){return(0,r.jsx)(u.ua7,{text:e.name,"aria-label":!1,children:function(t){return(0,
|
||
r.jsx)("img",ut(lt({},t),{className:ot().emojiListEmoji,src:i(e),width:24,height:24,alt:e.name}))}},null!==(t=e.id)&&void 0!==t?t:n)}))})]})},dt=function(e){var t=e.listingId,n=e.guildId,o=e.className,i=(0,S.Z)(n,t),l=ct(E.UE(t),1)[0],c=(0,I.Z)(l),s=ct(E.R7(t),1)[0],f=E.qs(t,n),p=ct(E.XZ(t,n),1)[0];return null==i&&0===c.length&&0===s.length&&0===p.size?null:(0,r.jsxs)("div",{className:a()(ot().subscriptionPerks,o),children:[null!=i&&(0,r.jsxs)(u.y5t,{component:(0,r.jsx)(u.X6q,{variant:"text-xs/bold",color:"header-secondary",className:ot().sectionHeader,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_REVIEW_MEMBER_PREVIEW}),children:[(0,r.jsx)(d.Z,{size:8}),(0,r.jsx)(w.Z,{role:f,guildId:n,className:ot().roleMessagePreview})]}),(0,r.jsx)(st,{header:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_EXCLUSIVE_CHANNELS_SECTION_TITLE,benefits:c,guildId:n}),(0,r.jsx)(st,{header:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_ADDITIONAL_BENEFITS_SECTION_TITLE,benefits:s,guildId:n}),(0,r.jsx)(ft,{
|
||
guildId:n,listingId:t})]})},pt=function(e){var t,n=e.onToggle,o=e.isViewAll,i=e.showMoreText;t=o?(0,r.jsxs)(r.Fragment,{children:[X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_SHOW_LESS_DESCRIPTION,(0,r.jsx)(y.Z,{className:ot().toggleTruncationButtonIcon})]}):(0,r.jsxs)(r.Fragment,{children:[i,(0,r.jsx)(h.Z,{className:ot().toggleTruncationButtonIcon})]});return(0,r.jsx)(u.zxk,{look:u.zxk.Looks.BLANK,size:u.zxk.Sizes.NONE,className:ot().toggleTruncationButton,innerClassName:ot().toggleTruncationButtonInner,onClick:n,children:t})};const ht=function(e){var t,n=e.listingId,i=e.guildId,p=e.groupListingId,h=e.analyticsLocation,y=(0,O.jO)(n),v=nt(y,i,p,h),j=v.openModal,S=v.canOpenModal,I=v.cannotOpenReason,w=v.isCheckingTrialEligibility,x=(0,l.e7)([f.Z],(function(){return f.Z.isSyncing})),P=(0,
|
||
C.Z)(p),N=P.activeSubscription,A=P.activeSubscriptionListing,T=(null==A?void 0:A.id)===n,Z=(null==N?void 0:N.status)===L.O0b.CANCELED,M=ct(o.useState(!1),2),R=M[0],D=M[1],k=ct(o.useState(!1),2),U=k[0],B=k[1],F=o.useCallback((function(e){var t=!1;null!=e&&(t=e.scrollHeight-e.clientHeight>1);B(t)}),[]),G=ct(E._T(n),1)[0],H=ct(E.PK(n),1)[0],V=ct(E.TT(n),1)[0],z=ct(E.F2(n),1)[0],Y=function(e,t){var n=(0,O.oC)(t);return o.useMemo((function(){return null!=n&&(null==n.max_num_active_trial_users||n.max_num_active_trial_users>(null!==(e=n.num_active_trial_users)&&void 0!==e?e:0));var e}),[n])}(0,n),K=(0,g.oM)(i)&&null!=V&&null==N&&Y,q=(0,c.Z)(W.iP),Q=ct(o.useState(!1),2),J=Q[0],$=Q[1],ee=J||!q,te=(0,l.e7)([s.Z],(function(){return s.Z.isViewingSubscriptionRoles(i)})),ne=!0===(null==y?void 0:y.published),oe=!0===(null==y?void 0:y.soft_deleted),ie=X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_SHOW_MORE_DESCRIPTION;return!ne&&!te||oe?null:(0,r.jsxs)("article",{className:ot().container,"aria-label":G,
|
||
children:[K&&(0,r.jsxs)("div",{className:a()(ot().tierTrialIndicator,ot().tierTopIndicator),children:[X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TRIAL_PERIOD.format({trialPeriodDuration:(0,m.iG)({interval:V.interval,interval_count:V.interval_count})}),(0,r.jsx)(u.ua7,{clickableOnMobile:!0,text:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TRIAL_DISCLAIMER.format({activeTrialUserLimit:null!=z?z:0}),children:function(e){return(0,r.jsx)(b.Z,lt({className:ot().tierTrialIndicatorIcon},e))}})]}),(0,r.jsxs)("div",{className:K?void 0:ot().cardContainerWithoutTopIndicator,children:[(0,r.jsxs)("div",{className:ot().tierInfoContainer,children:[q?(0,r.jsx)(ue,{listingId:n,isListingPublished:ne,expanded:ee,onToggleExpanded:function(){return $((function(e){return!e}))}}):(0,r.jsx)(re,{listingId:n,isListingPublished:ne}),ee&&(0,r.jsxs)(r.Fragment,{children:[q&&(0,r.jsx)("div",{className:ot().divider}),T?(0,r.jsx)(u.zxk,{fullWidth:!0,look:u.zxk.Looks.OUTLINED,color:u.zxk.Colors.PRIMARY,disabled:!0,
|
||
children:Z?X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_REVIEW_CANCELED_LABEL:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_REVIEW_SUBSCRIBED_LABEL}):(0,r.jsx)(u.ua7,{text:S?null:I,"aria-label":null!==(t=S&&I)&&void 0!==t&&t,children:function(e){return(0,r.jsx)(_.Z,ut(lt({},e),{fullWidth:!0,disabled:!S||x,submitting:w,onClick:j,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_REVIEW_SUBSCRIBE_LABEL}))}}),(0,r.jsx)(d.Z,{size:16}),(0,r.jsx)(u.xvT,{variant:"text-sm/normal",color:"text-normal",className:a()((!U||!R)&&ot().tierDescriptionTruncate),children:(0,r.jsx)("div",{ref:F,children:H})}),U&&(0,r.jsx)(pt,{isViewAll:R,onToggle:function(){return D((function(e){return!e}))},showMoreText:ie})]})]}),ee&&(0,r.jsx)(u.y5t,{children:(0,r.jsx)(dt,{listingId:n,guildId:i})})]})]})}},877116:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(736818),o=n(682776),i=n(602397),a=n(563135),l=n(269300),u=n(79522);function c(e){if(!e.isGuildVoice())return!1
|
||
;if(l.ZP.getGuildScheduledEventsByIndex(l.bN.CHANNEL_EVENT_ACTIVE(e.id)).length<1)return!1;if(!o.Z.can(u.AN,e))return!1;var t=new Set(i.ZP.getVoiceStatesForChannel(e).map((function(e){return e.user.id}))),n=r.default.getId(),c=!0,s=!1,f=void 0;try{for(var d,p=t[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var h=d.value;if(h!==n&&a.ZP.can({permission:u.AN,user:h,context:e}))return!1}}catch(e){s=!0;f=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw f}}return!0}},194026:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(136317),u=n(473708),c=n(782777),s=n.n(c);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e){var t=e.className,n=e.iconContainerClassName,o=e.icon,c=e.color,d=e.title,p=e.description,h=e.userCount,y=e.onClick,b=e.highlight;return(0,r.jsxs)(a.P3F,{className:i()(s().container,t,null!=b&&f({},s().pulse,b)),onClick:y,
|
||
children:[(0,r.jsx)("div",{style:{backgroundColor:c},className:i()(s().icon,n),children:o}),(0,r.jsxs)("div",{className:s().textContainer,children:[(0,r.jsx)(a.X6q,{variant:"heading-md/semibold",children:d}),(0,r.jsx)(a.xvT,{variant:"text-xs/normal",color:"header-secondary",className:s().inline,children:p}),null!=h&&h>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.xvT,{variant:"text-xs/normal",color:"header-secondary",className:s().dot,children:"•"}),(0,r.jsx)(a.xvT,{variant:"text-xs/normal",color:"header-secondary",className:s().inline,children:u.Z.Messages.GUILD_EVENT_INTERESTED.format({count:h})})]}):null]}),(0,r.jsx)(l.Z,{height:16,width:16,className:s().caret})]})}},311569:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=(n(667294),n(202351)),i=n(336194),a=n(707961),l=n(61209),u=n(570202),c=n(382840),s=n(852221),f=n(201441),d=n(371188),p=n(194026),h=n(473708),y=n(769539),b=n.n(y);function v(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}
|
||
l.done?t(u):Promise.resolve(u).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,l,"next",e)}function l(e){v(i,r,o,a,l,"throw",e)}a(void 0)}))}}function g(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},
|
||
"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function C(e){var t=e.guildId,y=e.channelId,v=function(e){I?(0,a.ZDy)(m((function(){
|
||
var t,o;return E(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(40706),n.e(74544)]).then(n.bind(n,874544))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,O(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){g(e,t,n[t])}))}return e}({},t),{event:e}))}]}}))}))):(0,c.bO)({eventId:e.id,parentGuildId:e.guild_id})},C=(0,o.e7)([l.Z],(function(){return l.Z.getChannel(y)}),[y]),j=(0,f.sz)(y),S=null!=(0,f.qY)(y),I=(0,s.o)(t,C);return j.length<1||S?null:(0,r.jsx)(r.Fragment,{children:j.map((function(e){return(0,r.jsx)(p.Z,{icon:(0,r.jsx)(u.Z,{height:20,width:20}),color:i.Z.unsafe_rawColors.GREEN_360.css,
|
||
title:(I?h.Z.Messages.GUILD_EVENT_START_PROMPT:h.Z.Messages.GUILD_EVENT_UPCOMING_PROMPT).format({eventName:e.name}),description:h.Z.Messages.GUILD_EVENT_START_PROMPT_DESCRIPTION.format({startTime:(0,d.ub)(e.scheduled_start_time).startDateTimeString}),onClick:function(){return v(e)},userCount:e.user_count,className:b().eventPrompt},e.id)}))})}},865050:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={"😀":"#E67E22","😃":"#E67E22","😄":"#E67E22","😁":"#E67E22","😆":"#E67E22","😅":"#E67E22","🤣":"#F1C40F","😂":"#E67E22","🙂":"#F1C40F","🙃":"#F1C40F","🫠":"#F1C40F","😉":"#F1C40F","😊":"#F1C40F","😇":"#3498DB","🥰":"#F1C40F","😍":"#E67E22","🤩":"#E67E22","😘":"#F1C40F","😗":"#F1C40F","☺️":"#607D8B","😚":"#F1C40F","😙":"#F1C40F","🥲":"#F1C40F","😋":"#F1C40F","😛":"#F1C40F","😜":"#F1C40F","🤪":"#E67E22","😝":"#F1C40F","🤑":"#F1C40F","🤗":"#E67E22","🤭":"#F1C40F","🫢":"#F1C40F","🫣":"#F1C40F","🤫":"#F1C40F","🤔":"#F1C40F","🫡":"#F1C40F","🤐":"#F1C40F","🤨":"#F1C40F","😐":"#F1C40F",
|
||
"😑":"#F1C40F","😶":"#F1C40F","🫥":"#F1C40F","😶🌫️":"#9B59B6","😏":"#F1C40F","😒":"#F1C40F","🙄":"#E67E22","😬":"#9B59B6","😮💨":"#F1C40F","🤥":"#F1C40F","😌":"#F1C40F","😔":"#F1C40F","😪":"#F1C40F","🤤":"#F1C40F","😴":"#F1C40F","😷":"#9B59B6","🤒":"#E67E22","🤕":"#9B59B6","🤢":"#E67E22","🤮":"#11806A","🤧":"#9B59B6","🥵":"#E67E22","🥶":"#3498DB","🥴":"#F1C40F","😵":"#F1C40F","😵💫":"#F1C40F","🤯":"#E67E22","🤠":"#E67E22","🥳":"#F1C40F","🥸":"#E67E22","😎":"#11806A","🤓":"#E67E22","🧐":"#F1C40F","😕":"#F1C40F","🫤":"#F1C40F","😟":"#F1C40F","🙁":"#F1C40F","☹️":"#F1C40F","😮":"#F1C40F","😯":"#F1C40F","😲":"#F1C40F","😳":"#E67E22","🥺":"#F1C40F","🥹":"#F1C40F","😦":"#F1C40F","😧":"#F1C40F","😨":"#5865F2","😰":"#E67E22","😥":"#F1C40F","😢":"#F1C40F","😭":"#F1C40F","😱":"#9B59B6","😖":"#F1C40F","😣":"#F1C40F","😞":"#F1C40F","😓":"#F1C40F","😩":"#F1C40F","😫":"#F1C40F","🥱":"#F1C40F","😤":"#F1C40F","😡":"#E67E22","😠":"#F1C40F","🤬":"#992D22","😈":"#9B59B6","👿":"#9B59B6","💀":"#9B59B6",
|
||
"☠️":"#9B59B6","💩":"#992D22","🤡":"#9B59B6","👹":"#E74C3C","👺":"#E74C3C","👻":"#9B59B6","👽":"#9B59B6","👾":"#9B59B6","🤖":"#607D8B","😺":"#E67E22","😸":"#E67E22","😹":"#E67E22","😻":"#E67E22","😼":"#E67E22","😽":"#E67E22","🙀":"#E67E22","😿":"#E67E22","😾":"#E67E22","🙈":"#E67E22","🙉":"#E67E22","🙊":"#E67E22","💋":"#992D22","💌":"#9B59B6","💘":"#3498DB","💝":"#E91E63","💖":"#E91E63","💗":"#E91E63","💓":"#E91E63","💞":"#E91E63","💕":"#E91E63","💟":"#9B59B6","❣️":"#E74C3C","💔":"#E74C3C","❤️🔥":"#E74C3C","❤️🩹":"#9B59B6","❤️":"#E74C3C","🧡":"#E67E22","💛":"#F1C40F","💚":"#11806A","💙":"#3498DB","💜":"#9B59B6","🤎":"#992D22","🖤":"#607D8B","🤍":"#9B59B6","💯":"#992D22","💢":"#E74C3C","💥":"#E74C3C","💫":"#F1C40F","💦":"#9B59B6","💨":"#9B59B6","🕳️":"#9B59B6","💣":"#11806A","💬":"#9B59B6","👁️🗨️":"#11806A","🗨️":"#206694","🗯️":"#9B59B6","💭":"#9B59B6","💤":"#206694","👋":"#F1C40F","🤚":"#F1C40F","🖐️":"#F1C40F","✋":"#F1C40F","🖖":"#F1C40F","🫱":"#F1C40F","🫲":"#F1C40F",
|
||
"🫳":"#F1C40F","🫴":"#F1C40F","👌":"#F1C40F","🤌":"#F1C40F","🤏":"#E67E22","✌️":"#F1C40F","🤞":"#F1C40F","🫰":"#F1C40F","🤟":"#F1C40F","🤘":"#F1C40F","🤙":"#F1C40F","👈":"#F1C40F","👉":"#F1C40F","👆":"#F1C40F","🖕":"#F1C40F","👇":"#E67E22","☝️":"#F1C40F","🫵":"#F1C40F","👍":"#F1C40F","👎":"#F1C40F","✊":"#F1C40F","👊":"#E67E22","🤛":"#F1C40F","🤜":"#E67E22","👏":"#F1C40F","🙌":"#F1C40F","🫶":"#E67E22","👐":"#F1C40F","🤲":"#F1C40F","🤝":"#F1C40F","🙏":"#F1C40F","✍️":"#607D8B","💅":"#F1C40F","🤳":"#9B59B6","💪":"#F1C40F","🦾":"#11806A","🦿":"#9B59B6","🦵":"#E67E22","🦶":"#F1C40F","👂":"#F1C40F","🦻":"#F1C40F","👃":"#F1C40F","🧠":"#9B59B6","🫀":"#E74C3C","🫁":"#E74C3C","🦷":"#9B59B6","🦴":"#9B59B6","👀":"#9B59B6","👁️":"#9B59B6","👅":"#9B59B6","👄":"#E74C3C","🫦":"#E74C3C","👶":"#F1C40F","🧒":"#F1C40F","👦":"#F1C40F","👧":"#F1C40F","🧑":"#F1C40F","👱":"#F1C40F","👨":"#F1C40F","🧔":"#F1C40F","🧔♂️":"#F1C40F","🧔♀️":"#E67E22","👨🦰":"#F1C40F","👨🦱":"#F1C40F","👨🦳":"#F1C40F",
|
||
"👨🦲":"#F1C40F","👩":"#F1C40F","👩🦰":"#E67E22","🧑🦰":"#F1C40F","👩🦱":"#F1C40F","🧑🦱":"#F1C40F","👩🦳":"#F1C40F","🧑🦳":"#F1C40F","👩🦲":"#F1C40F","🧑🦲":"#F1C40F","👱♀️":"#F1C40F","👱♂️":"#F1C40F","🧓":"#F1C40F","👴":"#F1C40F","👵":"#F1C40F","🙍":"#F1C40F","🙍♂️":"#206694","🙍♀️":"#F1C40F","🙎":"#F1C40F","🙎♂️":"#F1C40F","🙎♀️":"#E67E22","🙅":"#9B59B6","🙅♂️":"#3498DB","🙅♀️":"#992D22","🙆":"#9B59B6","🙆♂️":"#206694","🙆♀️":"#992D22","💁":"#F1C40F","💁♂️":"#F1C40F","💁♀️":"#F1C40F","🙋":"#F1C40F","🙋♂️":"#F1C40F","🙋♀️":"#9B59B6","🧏":"#F1C40F","🧏♂️":"#206694","🧏♀️":"#E67E22","🙇":"#F1C40F","🙇♂️":"#206694","🙇♀️":"#992D22","🤦":"#9B59B6","🤦♂️":"#206694","🤦♀️":"#992D22","🤷":"#E67E22","🤷♂️":"#F1C40F","🤷♀️":"#992D22","🧑⚕️":"#9B59B6","👨⚕️":"#F1C40F","👩⚕️":"#9B59B6","🧑🎓":"#F1C40F","👨🎓":"#F1C40F","👩🎓":"#E67E22","🧑🏫":"#E67E22","👨🏫":"#E67E22","👩🏫":"#E67E22","🧑⚖️":"#F1C40F","👨⚖️":"#F1C40F","👩⚖️":"#E67E22",
|
||
"🧑🌾":"#992D22","👨🌾":"#E67E22","👩🌾":"#992D22","🧑🍳":"#E67E22","👨🍳":"#E67E22","👩🍳":"#E67E22","🧑🔧":"#5865F2","👨🔧":"#206694","👩🔧":"#5865F2","🧑🏭":"#F1C40F","👨🏭":"#F1C40F","👩🏭":"#F1C40F","🧑💼":"#F1C40F","👨💼":"#F1C40F","👩💼":"#F1C40F","🧑🔬":"#9B59B6","👨🔬":"#9B59B6","👩🔬":"#9B59B6","🧑💻":"#9B59B6","👨💻":"#9B59B6","👩💻":"#9B59B6","🧑🎤":"#1ABC9C","👨🎤":"#206694","👩🎤":"#9B59B6","🧑🎨":"#E67E22","👨🎨":"#E67E22","👩🎨":"#E67E22","🧑✈️":"#992D22","👨✈️":"#F1C40F","👩✈️":"#992D22","🧑🚀":"#9B59B6","👨🚀":"#9B59B6","👩🚀":"#9B59B6","🧑🚒":"#992D22","👨🚒":"#992D22","👩🚒":"#992D22","👮":"#F1C40F","👮♂️":"#F1C40F","👮♀️":"#F1C40F","🕵️":"#992D22","🕵️♂️":"#992D22","🕵️♀️":"#992D22","💂":"#E67E22","💂♂️":"#E67E22","💂♀️":"#E67E22","🥷":"#11806A","👷":"#F1C40F","👷♂️":"#F1C40F","👷♀️":"#F1C40F","🫅":"#E67E22","🤴":"#F1C40F","👸":"#F1C40F","👳":"#F1C40F","👳♂️":"#9B59B6","👳♀️":"#F1C40F","👲":"#992D22","🧕":"#206694",
|
||
"🤵":"#F1C40F","🤵♂️":"#992D22","🤵♀️":"#E67E22","👰":"#F1C40F","👰♂️":"#F1C40F","👰♀️":"#F1C40F","🤰":"#9B59B6","🫃":"#E67E22","🫄":"#9B59B6","🤱":"#992D22","👩🍼":"#992D22","👨🍼":"#E67E22","🧑🍼":"#E67E22","👼":"#F1C40F","🎅":"#9B59B6","🤶":"#9B59B6","🧑🎄":"#E67E22","🦸":"#E67E22","🦸♂️":"#E67E22","🦸♀️":"#E67E22","🦹":"#F1C40F","🦹♂️":"#F1C40F","🦹♀️":"#E67E22","🧙":"#992D22","🧙♂️":"#992D22","🧙♀️":"#992D22","🧚":"#E67E22","🧚♂️":"#E67E22","🧚♀️":"#3498DB","🧛":"#F1C40F","🧛♂️":"#607D8B","🧛♀️":"#E67E22","🧜":"#206694","🧜♂️":"#E67E22","🧜♀️":"#9B59B6","🧝":"#11806A","🧝♂️":"#F1C40F","🧝♀️":"#9B59B6","🧞":"#206694","🧞♂️":"#3498DB","🧞♀️":"#9B59B6","🧟":"#11806A","🧟♂️":"#11806A","🧟♀️":"#11806A","🧌":"#992D22","💆":"#F1C40F","💆♂️":"#F1C40F","💆♀️":"#F1C40F","💇":"#F1C40F","💇♂️":"#F1C40F","💇♀️":"#F1C40F","🚶":"#206694","🚶♂️":"#206694","🚶♀️":"#206694","🧍":"#9B59B6","🧍♂️":"#992D22","🧍♀️":"#F1C40F","🧎":"#E67E22","🧎♂️":"#F1C40F",
|
||
"🧎♀️":"#E67E22","🧑🦯":"#206694","👨🦯":"#206694","👩🦯":"#206694","🧑🦼":"#11806A","👨🦼":"#992D22","👩🦼":"#992D22","🧑🦽":"#11806A","👨🦽":"#11806A","👩🦽":"#206694","🏃":"#F1C40F","🏃♂️":"#206694","🏃♀️":"#3498DB","💃":"#F1C40F","🕺":"#992D22","🕴️":"#607D8B","👯":"#E67E22","👯♂️":"#992D22","👯♀️":"#E67E22","🧖":"#9B59B6","🧖♂️":"#9B59B6","🧖♀️":"#F1C40F","🧗":"#9B59B6","🧗♂️":"#9B59B6","🧗♀️":"#9B59B6","🤺":"#9B59B6","🏇":"#992D22","⛷️":"#992D22","🏂":"#206694","🏌️":"#9B59B6","🏌️♂️":"#607D8B","🏌️♀️":"#E67E22","🏄":"#E67E22","🏄♂️":"#F1C40F","🏄♀️":"#9B59B6","🚣":"#E74C3C","🚣♂️":"#E74C3C","🚣♀️":"#E74C3C","🏊":"#9B59B6","🏊♂️":"#9B59B6","🏊♀️":"#9B59B6","⛹️":"#E67E22","⛹️♂️":"#206694","⛹️♀️":"#E67E22","🏋️":"#E67E22","🏋️♂️":"#E67E22","🏋️♀️":"#992D22","🚴":"#11806A","🚴♂️":"#11806A","🚴♀️":"#992D22","🚵":"#9B59B6","🚵♂️":"#9B59B6","🚵♀️":"#992D22","🤸":"#F1C40F","🤸♂️":"#206694","🤸♀️":"#F1C40F","🤼":"#E67E22","🤼♂️":"#E67E22",
|
||
"🤼♀️":"#E67E22","🤽":"#E67E22","🤽♂️":"#E67E22","🤽♀️":"#E67E22","🤾":"#9B59B6","🤾♂️":"#E67E22","🤾♀️":"#E67E22","🤹":"#E67E22","🤹♂️":"#F1C40F","🤹♀️":"#E67E22","🧘":"#F1C40F","🧘♂️":"#E67E22","🧘♀️":"#F1C40F","🛀":"#9B59B6","🛌":"#9B59B6","🧑🤝🧑":"#9B59B6","👭":"#F1C40F","👫":"#F1C40F","👬":"#E67E22","💏":"#9B59B6","👩❤️💋👨":"#9B59B6","👨❤️💋👨":"#9B59B6","👩❤️💋👩":"#9B59B6","💑":"#9B59B6","👩❤️👨":"#9B59B6","👨❤️👨":"#9B59B6","👩❤️👩":"#9B59B6","👪":"#F1C40F","👨👩👦":"#206694","👨👩👧":"#F1C40F","👨👩👧👦":"#F1C40F","👨👩👦👦":"#F1C40F","👨👩👧👧":"#F1C40F","👨👨👦":"#206694","👨👨👧":"#F1C40F","👨👨👧👦":"#206694","👨👨👦👦":"#206694","👨👨👧👧":"#F1C40F","👩👩👦":"#E67E22","👩👩👧":"#E67E22","👩👩👧👦":"#E67E22","👩👩👦👦":"#F1C40F","👩👩👧👧":"#E67E22","👨👦":"#F1C40F","👨👦👦":"#206694","👨👧":"#206694","👨👧👦":"#F1C40F","👨👧👧":"#F1C40F","👩👦":"#F1C40F","👩👦👦":"#F1C40F","👩👧":"#F1C40F",
|
||
"👩👧👦":"#F1C40F","👩👧👧":"#F1C40F","🗣️":"#607D8B","👤":"#607D8B","👥":"#607D8B","🫂":"#607D8B","👣":"#11806A","🐵":"#E67E22","🐒":"#E67E22","🦍":"#206694","🦧":"#992D22","🐶":"#9B59B6","🐕":"#E67E22","🦮":"#E67E22","🐕🦺":"#992D22","🐩":"#9B59B6","🐺":"#9B59B6","🦊":"#E67E22","🦝":"#992D22","🐱":"#F1C40F","🐈":"#9B59B6","🐈⬛":"#11806A","🦁":"#E67E22","🐯":"#F1C40F","🐅":"#992D22","🐆":"#E67E22","🐴":"#992D22","🐎":"#992D22","🦄":"#9B59B6","🦓":"#206694","🦌":"#E67E22","🦬":"#992D22","🐮":"#9B59B6","🐂":"#E74C3C","🐃":"#992D22","🐄":"#9B59B6","🐷":"#9B59B6","🐖":"#9B59B6","🐗":"#992D22","🐽":"#9B59B6","🐏":"#9B59B6","🐑":"#9B59B6","🐐":"#9B59B6","🐪":"#E67E22","🐫":"#E67E22","🦙":"#9B59B6","🦒":"#E67E22","🐘":"#9B59B6","🦣":"#992D22","🦏":"#9B59B6","🦛":"#9B59B6","🐭":"#9B59B6","🐁":"#9B59B6","🐀":"#9B59B6","🐹":"#9B59B6","🐰":"#9B59B6","🐇":"#9B59B6","🐿️":"#992D22","🦫":"#992D22","🦔":"#992D22","🦇":"#992D22","🐻":"#992D22","🐻❄️":"#9B59B6","🐨":"#9B59B6","🐼":"#11806A",
|
||
"🦥":"#992D22","🦦":"#992D22","🦨":"#9B59B6","🦘":"#E67E22","🦡":"#9B59B6","🐾":"#11806A","🦃":"#992D22","🐔":"#E74C3C","🐓":"#9B59B6","🐣":"#F1C40F","🐤":"#F1C40F","🐥":"#F1C40F","🐦":"#9B59B6","🐧":"#E67E22","🕊️":"#9B59B6","🦅":"#992D22","🦆":"#9B59B6","🦢":"#9B59B6","🦉":"#992D22","🦤":"#E67E22","🪶":"#992D22","🦩":"#E74C3C","🦚":"#11806A","🦜":"#11806A","🐸":"#11806A","🐊":"#11806A","🐢":"#11806A","🦎":"#11806A","🐍":"#992D22","🐲":"#F1C40F","🐉":"#992D22","🦕":"#206694","🦖":"#11806A","🐳":"#3498DB","🐋":"#9B59B6","🐬":"#3498DB","🦭":"#9B59B6","🐟":"#3498DB","🐠":"#F1C40F","🐡":"#E67E22","🦈":"#9B59B6","🐙":"#992D22","🐚":"#9B59B6","🪸":"#E74C3C","🐌":"#E67E22","🦋":"#11806A","🐛":"#992D22","🐜":"#992D22","🐝":"#607D8B","🪲":"#11806A","🐞":"#992D22","🦗":"#992D22","🪳":"#992D22","🕷️":"#11806A","🕸️":"#9B59B6","🦂":"#992D22","🦟":"#992D22","🪰":"#E67E22","🪱":"#E74C3C","🦠":"#11806A","💐":"#F1C40F","🌸":"#9B59B6","💮":"#9B59B6","🪷":"#9B59B6","🏵️":"#E67E22","🌹":"#992D22",
|
||
"🥀":"#9B59B6","🌺":"#E91E63","🌻":"#F1C40F","🌼":"#F1C40F","🌷":"#E74C3C","🌱":"#11806A","🪴":"#11806A","🌲":"#11806A","🌳":"#11806A","🌴":"#11806A","🌵":"#11806A","🌾":"#E67E22","🌿":"#11806A","☘️":"#11806A","🍀":"#11806A","🍁":"#992D22","🍂":"#992D22","🍃":"#11806A","🪹":"#992D22","🪺":"#3498DB","🍇":"#992D22","🍈":"#9B59B6","🍉":"#E74C3C","🍊":"#E67E22","🍋":"#F1C40F","🍌":"#9B59B6","🍍":"#992D22","🥭":"#E67E22","🍎":"#E74C3C","🍏":"#11806A","🍐":"#E67E22","🍑":"#E74C3C","🍒":"#E74C3C","🍓":"#992D22","🫐":"#206694","🥝":"#F1C40F","🍅":"#E74C3C","🫒":"#992D22","🥥":"#9B59B6","🥑":"#F1C40F","🍆":"#992D22","🥔":"#992D22","🥕":"#E67E22","🌽":"#992D22","🌶️":"#E74C3C","🫑":"#11806A","🥒":"#F1C40F","🥬":"#11806A","🥦":"#11806A","🧄":"#9B59B6","🧅":"#E67E22","🍄":"#E74C3C","🥜":"#E67E22","🫘":"#992D22","🌰":"#992D22","🍞":"#E67E22","🥐":"#E67E22","🥖":"#F1C40F","🫓":"#9B59B6","🥨":"#E74C3C","🥯":"#E67E22","🥞":"#F1C40F","🧇":"#E67E22","🧀":"#F1C40F","🍖":"#992D22","🍗":"#992D22",
|
||
"🥩":"#992D22","🥓":"#E74C3C","🍔":"#E67E22","🍟":"#F1C40F","🍕":"#E67E22","🌭":"#E67E22","🥪":"#F1C40F","🌮":"#F1C40F","🌯":"#9B59B6","🫔":"#E67E22","🥙":"#E67E22","🧆":"#992D22","🥚":"#9B59B6","🍳":"#11806A","🥘":"#E67E22","🍲":"#9B59B6","🫕":"#992D22","🥣":"#3498DB","🥗":"#11806A","🍿":"#E74C3C","🧈":"#F1C40F","🧂":"#9B59B6","🥫":"#E74C3C","🍱":"#992D22","🍘":"#992D22","🍙":"#9B59B6","🍚":"#9B59B6","🍛":"#9B59B6","🍜":"#9B59B6","🍝":"#F1C40F","🍠":"#E74C3C","🍢":"#E67E22","🍣":"#E74C3C","🍤":"#E67E22","🍥":"#9B59B6","🥮":"#992D22","🍡":"#9B59B6","🥟":"#F1C40F","🥠":"#E67E22","🥡":"#9B59B6","🦀":"#E74C3C","🦞":"#992D22","🦐":"#E74C3C","🦑":"#E74C3C","🦪":"#9B59B6","🍦":"#E67E22","🍧":"#9B59B6","🍨":"#9B59B6","🍩":"#992D22","🍪":"#E67E22","🎂":"#9B59B6","🍰":"#9B59B6","🧁":"#E67E22","🥧":"#E67E22","🍫":"#E74C3C","🍬":"#9B59B6","🍭":"#9B59B6","🍮":"#9B59B6","🍯":"#F1C40F","🍼":"#9B59B6","🥛":"#9B59B6","☕":"#9B59B6","🫖":"#9B59B6","🍵":"#9B59B6","🍶":"#9B59B6","🍾":"#992D22",
|
||
"🍷":"#9B59B6","🍸":"#9B59B6","🍹":"#F1C40F","🍺":"#E67E22","🍻":"#E67E22","🥂":"#9B59B6","🥃":"#9B59B6","🫗":"#9B59B6","🥤":"#E74C3C","🧋":"#E67E22","🧃":"#9B59B6","🧉":"#992D22","🧊":"#3498DB","🥢":"#992D22","🍽️":"#9B59B6","🍴":"#9B59B6","🥄":"#607D8B","🔪":"#9B59B6","🫙":"#9B59B6","🏺":"#992D22","🌍":"#F1C40F","🌎":"#206694","🌏":"#F1C40F","🌐":"#3498DB","🗺️":"#3498DB","🗾":"#3498DB","🧭":"#9B59B6","🏔️":"#11806A","⛰️":"#11806A","🌋":"#11806A","🗻":"#9B59B6","🏕️":"#992D22","🏖️":"#E67E22","🏜️":"#992D22","🏝️":"#3498DB","🏞️":"#3498DB","🏟️":"#9B59B6","🏛️":"#9B59B6","🏗️":"#F1C40F","🧱":"#992D22","🪨":"#11806A","🪵":"#992D22","🛖":"#992D22","🏘️":"#9B59B6","🏚️":"#9B59B6","🏠":"#9B59B6","🏡":"#11806A","🏢":"#9B59B6","🏣":"#9B59B6","🏤":"#9B59B6","🏥":"#9B59B6","🏦":"#9B59B6","🏨":"#9B59B6","🏩":"#9B59B6","🏪":"#607D8B","🏫":"#9B59B6","🏬":"#607D8B","🏭":"#9B59B6","🏯":"#206694","🏰":"#9B59B6","💒":"#9B59B6","🗼":"#992D22","🗽":"#607D8B","⛪":"#9B59B6","🕌":"#E67E22",
|
||
"🛕":"#E67E22","🕍":"#E67E22","⛩️":"#992D22","🕋":"#992D22","⛲":"#9B59B6","⛺":"#E74C3C","🌁":"#9B59B6","🌃":"#206694","🏙️":"#206694","🌄":"#9B59B6","🌅":"#E67E22","🌆":"#E67E22","🌇":"#E67E22","🌉":"#206694","♨️":"#992D22","🎠":"#9B59B6","🛝":"#206694","🎡":"#992D22","🎢":"#E67E22","💈":"#9B59B6","🎪":"#9B59B6","🚂":"#992D22","🚃":"#607D8B","🚄":"#9B59B6","🚅":"#206694","🚆":"#607D8B","🚇":"#11806A","🚈":"#206694","🚉":"#206694","🚊":"#11806A","🚝":"#206694","🚞":"#9B59B6","🚋":"#11806A","🚌":"#3498DB","🚍":"#607D8B","🚎":"#206694","🚐":"#9B59B6","🚑":"#11806A","🚒":"#11806A","🚓":"#11806A","🚔":"#11806A","🚕":"#E67E22","🚖":"#992D22","🚗":"#9B59B6","🚘":"#E74C3C","🚙":"#3498DB","🛻":"#206694","🚚":"#E67E22","🚛":"#11806A","🚜":"#F1C40F","🏎️":"#E74C3C","🏍️":"#11806A","🛵":"#E67E22","🦽":"#11806A","🦼":"#992D22","🛺":"#F1C40F","🚲":"#11806A","🛴":"#607D8B","🛹":"#11806A","🛼":"#3498DB","🚏":"#9B59B6","🛣️":"#11806A","🛤️":"#992D22","🛢️":"#992D22","⛽":"#E74C3C","🛞":"#11806A",
|
||
"🚨":"#E74C3C","🚥":"#9B59B6","🚦":"#11806A","🛑":"#9B59B6","🚧":"#607D8B","⚓":"#206694","🛟":"#9B59B6","⛵":"#992D22","🛶":"#992D22","🚤":"#9B59B6","🛳️":"#9B59B6","⛴️":"#206694","🛥️":"#9B59B6","🚢":"#9B59B6","✈️":"#3498DB","🛩️":"#9B59B6","🛫":"#206694","🛬":"#206694","🪂":"#992D22","💺":"#607D8B","🚁":"#E74C3C","🚟":"#9B59B6","🚠":"#992D22","🚡":"#F1C40F","🛰️":"#206694","🚀":"#9B59B6","🛸":"#206694","🛎️":"#992D22","🧳":"#992D22","⌛":"#9B59B6","⏳":"#9B59B6","⌚":"#992D22","⏰":"#9B59B6","⏱️":"#9B59B6","⏲️":"#9B59B6","🕰️":"#9B59B6","🕛":"#9B59B6","🕧":"#9B59B6","🕐":"#9B59B6","🕜":"#9B59B6","🕑":"#9B59B6","🕝":"#9B59B6","🕒":"#9B59B6","🕞":"#9B59B6","🕓":"#9B59B6","🕟":"#9B59B6","🕔":"#9B59B6","🕠":"#9B59B6","🕕":"#9B59B6","🕡":"#9B59B6","🕖":"#9B59B6","🕢":"#9B59B6","🕗":"#9B59B6","🕣":"#9B59B6","🕘":"#9B59B6","🕤":"#9B59B6","🕙":"#9B59B6","🕥":"#9B59B6","🕚":"#9B59B6","🕦":"#9B59B6","🌑":"#11806A","🌒":"#11806A","🌓":"#11806A","🌔":"#11806A","🌕":"#F1C40F","🌖":"#11806A",
|
||
"🌗":"#11806A","🌘":"#11806A","🌙":"#F1C40F","🌚":"#206694","🌛":"#F1C40F","🌜":"#F1C40F","🌡️":"#9B59B6","☀️":"#F1C40F","🌝":"#F1C40F","🌞":"#F1C40F","🪐":"#E67E22","⭐":"#9B59B6","🌟":"#9B59B6","🌠":"#206694","🌌":"#9B59B6","☁️":"#9B59B6","⛅":"#9B59B6","⛈️":"#9B59B6","🌤️":"#9B59B6","🌥️":"#9B59B6","🌦️":"#F1C40F","🌧️":"#9B59B6","🌨️":"#9B59B6","🌩️":"#9B59B6","🌪️":"#607D8B","🌫️":"#9B59B6","🌬️":"#9B59B6","🌀":"#206694","🌈":"#1ABC9C","🌂":"#206694","☂️":"#9B59B6","☔":"#5865F2","⛱️":"#F1C40F","⚡":"#F1C40F","❄️":"#3498DB","☃️":"#9B59B6","⛄":"#9B59B6","☄️":"#E67E22","🔥":"#E67E22","💧":"#3498DB","🌊":"#9B59B6","🎃":"#E67E22","🎄":"#11806A","🎆":"#9B59B6","🎇":"#992D22","🧨":"#992D22","✨":"#F1C40F","🎈":"#E74C3C","🎉":"#E67E22","🎊":"#E67E22","🎋":"#E67E22","🎍":"#E67E22","🎎":"#206694","🎏":"#E67E22","🎐":"#9B59B6","🎑":"#11806A","🧧":"#E74C3C","🎀":"#9B59B6","🎁":"#E67E22","🎗️":"#F1C40F","🎟️":"#E74C3C","🎫":"#F1C40F","🎖️":"#F1C40F","🏆":"#E67E22","🏅":"#F1C40F","🥇":"#F1C40F",
|
||
"🥈":"#9B59B6","🥉":"#992D22","⚽":"#9B59B6","⚾":"#9B59B6","🥎":"#F1C40F","🏀":"#E67E22","🏐":"#9B59B6","🏈":"#E74C3C","🏉":"#E67E22","🎾":"#F1C40F","🥏":"#3498DB","🎳":"#9B59B6","🏏":"#F1C40F","🏑":"#9B59B6","🏒":"#E67E22","🥍":"#206694","🏓":"#E74C3C","🏸":"#E67E22","🥊":"#E74C3C","🥋":"#9B59B6","🥅":"#992D22","⛳":"#11806A","⛸️":"#9B59B6","🎣":"#607D8B","🤿":"#11806A","🎽":"#3498DB","🎿":"#3498DB","🛷":"#992D22","🥌":"#11806A","🎯":"#9B59B6","🪀":"#11806A","🪁":"#206694","🎱":"#11806A","🔮":"#9B59B6","🪄":"#9B59B6","🧿":"#206694","🪬":"#206694","🎮":"#11806A","🕹️":"#11806A","🎰":"#9B59B6","🎲":"#9B59B6","🧩":"#1ABC9C","🧸":"#E67E22","🪅":"#9B59B6","🪩":"#9B59B6","🪆":"#E67E22","♠️":"#607D8B","♥️":"#607D8B","♦️":"#607D8B","♣️":"#607D8B","♟️":"#607D8B","🃏":"#9B59B6","🀄":"#9B59B6","🎴":"#992D22","🎭":"#992D22","🖼️":"#F1C40F","🎨":"#E67E22","🧵":"#E67E22","🪡":"#206694","🧶":"#E67E22","🪢":"#206694","👓":"#9B59B6","🕶️":"#607D8B","🥽":"#9B59B6","🥼":"#9B59B6","🦺":"#E74C3C",
|
||
"👔":"#3498DB","👕":"#3498DB","👖":"#206694","🧣":"#992D22","🧤":"#1ABC9C","🧥":"#E67E22","🧦":"#9B59B6","👗":"#1ABC9C","👘":"#E67E22","🥻":"#E67E22","🩱":"#11806A","🩲":"#11806A","🩳":"#E67E22","👙":"#9B59B6","👚":"#9B59B6","👛":"#9B59B6","👜":"#E74C3C","👝":"#992D22","🛍️":"#9B59B6","🎒":"#E74C3C","🩴":"#3498DB","👞":"#992D22","👟":"#9B59B6","🥾":"#992D22","🥿":"#206694","👠":"#E74C3C","👡":"#9B59B6","🩰":"#9B59B6","👢":"#E67E22","👑":"#E67E22","👒":"#E67E22","🎩":"#11806A","🎓":"#992D22","🧢":"#3498DB","🪖":"#11806A","⛑️":"#992D22","📿":"#992D22","💄":"#E74C3C","💍":"#9B59B6","💎":"#3498DB","🔇":"#11806A","🔈":"#11806A","🔉":"#607D8B","🔊":"#11806A","📢":"#9B59B6","📣":"#992D22","📯":"#E74C3C","🔔":"#992D22","🔕":"#992D22","🎼":"#9B59B6","🎵":"#11806A","🎶":"#11806A","🎙️":"#11806A","🎚️":"#9B59B6","🎛️":"#9B59B6","🎤":"#9B59B6","🎧":"#9B59B6","📻":"#E67E22","🎷":"#E67E22","🪗":"#992D22","🎸":"#E74C3C","🎹":"#607D8B","🎺":"#E67E22","🎻":"#992D22","🪕":"#9B59B6","🥁":"#E74C3C",
|
||
"🪘":"#992D22","📱":"#607D8B","📲":"#607D8B","☎️":"#E74C3C","📞":"#11806A","📟":"#11806A","📠":"#9B59B6","🔋":"#11806A","🪫":"#9B59B6","🔌":"#11806A","💻":"#607D8B","🖥️":"#11806A","🖨️":"#607D8B","⌨️":"#9B59B6","🖱️":"#9B59B6","🖲️":"#11806A","💽":"#9B59B6","💾":"#11806A","💿":"#9B59B6","📀":"#9B59B6","🧮":"#992D22","🎥":"#11806A","🎞️":"#9B59B6","📽️":"#206694","🎬":"#11806A","📺":"#992D22","📷":"#11806A","📸":"#11806A","📹":"#607D8B","📼":"#11806A","🔍":"#11806A","🔎":"#11806A","🕯️":"#9B59B6","💡":"#9B59B6","🔦":"#607D8B","🏮":"#E74C3C","🪔":"#992D22","📔":"#F1C40F","📕":"#992D22","📖":"#206694","📗":"#E67E22","📘":"#206694","📙":"#E67E22","📚":"#11806A","📓":"#9B59B6","📒":"#F1C40F","📃":"#9B59B6","📜":"#9B59B6","📄":"#9B59B6","📰":"#9B59B6","🗞️":"#9B59B6","📑":"#9B59B6","🔖":"#9B59B6","🏷️":"#F1C40F","💰":"#E67E22","🪙":"#206694","💴":"#9B59B6","💵":"#9B59B6","💶":"#9B59B6","💷":"#9B59B6","💸":"#9B59B6","💳":"#9B59B6","🧾":"#9B59B6","💹":"#9B59B6","✉️":"#9B59B6","📧":"#9B59B6",
|
||
"📨":"#9B59B6","📩":"#9B59B6","📤":"#3498DB","📥":"#3498DB","📦":"#E67E22","📫":"#206694","📪":"#3498DB","📬":"#607D8B","📭":"#11806A","📮":"#E74C3C","🗳️":"#3498DB","✏️":"#E67E22","✒️":"#11806A","🖋️":"#11806A","🖊️":"#11806A","🖌️":"#206694","🖍️":"#E74C3C","📝":"#9B59B6","💼":"#992D22","📁":"#9B59B6","📂":"#9B59B6","🗂️":"#E67E22","📅":"#E74C3C","📆":"#9B59B6","🗒️":"#9B59B6","🗓️":"#9B59B6","📇":"#9B59B6","📈":"#9B59B6","📉":"#9B59B6","📊":"#9B59B6","📋":"#9B59B6","📌":"#E74C3C","📍":"#E74C3C","📎":"#9B59B6","🖇️":"#9B59B6","📏":"#9B59B6","📐":"#9B59B6","✂️":"#9B59B6","🗃️":"#11806A","🗄️":"#206694","🗑️":"#9B59B6","🔒":"#E67E22","🔓":"#E67E22","🔏":"#9B59B6","🔐":"#E67E22","🔑":"#F1C40F","🗝️":"#11806A","🔨":"#9B59B6","🪓":"#992D22","⛏️":"#9B59B6","⚒️":"#11806A","🛠️":"#11806A","🗡️":"#9B59B6","⚔️":"#11806A","🔫":"#1ABC9C","🪃":"#E74C3C","🏹":"#9B59B6","🛡️":"#9B59B6","🪚":"#9B59B6","🔧":"#206694","🪛":"#1ABC9C","🔩":"#9B59B6","⚙️":"#9B59B6","🗜️":"#607D8B","⚖️":"#607D8B",
|
||
"🦯":"#9B59B6","🔗":"#206694","⛓️":"#9B59B6","🪝":"#E67E22","🧰":"#E74C3C","🧲":"#E74C3C","🪜":"#992D22","⚗️":"#9B59B6","🧪":"#11806A","🧫":"#9B59B6","🧬":"#3498DB","🔬":"#9B59B6","🔭":"#9B59B6","📡":"#9B59B6","💉":"#9B59B6","🩸":"#E74C3C","💊":"#F1C40F","🩹":"#9B59B6","🩼":"#9B59B6","🩺":"#11806A","🩻":"#3498DB","🚪":"#992D22","🛗":"#3498DB","🪞":"#E67E22","🪟":"#992D22","🛏️":"#992D22","🛋️":"#3498DB","🪑":"#E74C3C","🚽":"#9B59B6","🪠":"#E74C3C","🚿":"#9B59B6","🛁":"#9B59B6","🪤":"#F1C40F","🪒":"#9B59B6","🧴":"#9B59B6","🧷":"#9B59B6","🧹":"#992D22","🧺":"#992D22","🧻":"#9B59B6","🪣":"#206694","🧼":"#1ABC9C","🫧":"#9B59B6","🪥":"#9B59B6","🧽":"#F1C40F","🧯":"#E74C3C","🛒":"#9B59B6","🚬":"#9B59B6","⚰️":"#992D22","🪦":"#9B59B6","⚱️":"#E67E22","🗿":"#206694","🪧":"#9B59B6","🪪":"#9B59B6","🏧":"#3498DB","🚮":"#9B59B6","🚰":"#9B59B6","♿":"#9B59B6","🚹":"#3498DB","🚺":"#9B59B6","🚻":"#607D8B","🚼":"#E67E22","🚾":"#9B59B6","🛂":"#9B59B6","🛃":"#9B59B6","🛄":"#9B59B6","🛅":"#9B59B6",
|
||
"⚠️":"#F1C40F","🚸":"#F1C40F","⛔":"#9B59B6","🚫":"#E74C3C","🚳":"#11806A","🚭":"#E74C3C","🚯":"#E74C3C","🚱":"#E74C3C","🚷":"#E74C3C","📵":"#E74C3C","🔞":"#607D8B","☢️":"#E67E22","☣️":"#E67E22","⬆️":"#607D8B","↗️":"#607D8B","➡️":"#607D8B","↘️":"#607D8B","⬇️":"#607D8B","↙️":"#607D8B","⬅️":"#607D8B","↖️":"#607D8B","↕️":"#607D8B","↔️":"#607D8B","↩️":"#607D8B","↪️":"#607D8B","⤴️":"#607D8B","⤵️":"#607D8B","🔃":"#607D8B","🔄":"#607D8B","🔙":"#11806A","🔚":"#11806A","🔛":"#11806A","🔜":"#206694","🔝":"#11806A","🛐":"#9B59B6","⚛️":"#9B59B6","🕉️":"#9B59B6","✡️":"#9B59B6","☸️":"#9B59B6","☯️":"#9B59B6","✝️":"#9B59B6","☦️":"#9B59B6","☪️":"#9B59B6","☮️":"#9B59B6","🕎":"#9B59B6","🔯":"#9B59B6","♈":"#9B59B6","♉":"#9B59B6","♊":"#9B59B6","♋":"#9B59B6","♌":"#9B59B6","♍":"#9B59B6","♎":"#9B59B6","♏":"#9B59B6","♐":"#9B59B6","♑":"#9B59B6","♒":"#9B59B6","♓":"#9B59B6","⛎":"#9B59B6","🔀":"#607D8B","🔁":"#607D8B","🔂":"#607D8B","▶️":"#607D8B","⏩":"#607D8B","⏭️":"#607D8B","⏯️":"#607D8B","◀️":"#607D8B",
|
||
"⏪":"#607D8B","⏮️":"#607D8B","🔼":"#607D8B","⏫":"#607D8B","🔽":"#607D8B","⏬":"#607D8B","⏸️":"#607D8B","⏹️":"#607D8B","⏺️":"#607D8B","⏏️":"#607D8B","🎦":"#607D8B","🔅":"#F1C40F","🔆":"#F1C40F","📶":"#9B59B6","📳":"#F1C40F","📴":"#9B59B6","♀️":"#607D8B","♂️":"#607D8B","⚧️":"#607D8B","✖️":"#11806A","➕":"#11806A","➖":"#11806A","➗":"#11806A","🟰":"#9B59B6","♾️":"#607D8B","‼️":"#607D8B","⁉️":"#E74C3C","❓":"#992D22","❔":"#9B59B6","❕":"#9B59B6","❗":"#992D22","〰️":"#11806A","💱":"#206694","💲":"#206694","⚕️":"#607D8B","♻️":"#11806A","⚜️":"#992D22","🔱":"#E67E22","📛":"#9B59B6","🔰":"#F1C40F","⭕":"#992D22","✅":"#11806A","☑️":"#206694","✔️":"#11806A","❌":"#E74C3C","❎":"#11806A","➰":"#11806A","➿":"#206694","〽️":"#F1C40F","✳️":"#11806A","✴️":"#9B59B6","❇️":"#11806A","©️":"#607D8B","®️":"#607D8B","™️":"#607D8B","#️⃣":"#607D8B","*️⃣":"#607D8B","0️⃣":"#607D8B","1️⃣":"#607D8B","2️⃣":"#607D8B","3️⃣":"#607D8B","4️⃣":"#607D8B","5️⃣":"#607D8B","6️⃣":"#607D8B","7️⃣":"#607D8B","8️⃣":"#607D8B",
|
||
"9️⃣":"#607D8B","🔟":"#607D8B","🔠":"#607D8B","🔡":"#607D8B","🔢":"#607D8B","🔣":"#607D8B","🔤":"#607D8B","🅰️":"#E74C3C","🆎":"#E74C3C","🅱️":"#9B59B6","🆑":"#E74C3C","🆒":"#607D8B","🆓":"#607D8B",ℹ️:"#9B59B6","🆔":"#9B59B6","Ⓜ️":"#9B59B6","🆕":"#607D8B","🆖":"#607D8B","🅾️":"#E74C3C","🆗":"#607D8B","🅿️":"#3498DB","🆘":"#9B59B6","🆙":"#607D8B","🆚":"#9B59B6","🈁":"#607D8B","🈂️":"#3498DB","🈷️":"#9B59B6","🈶":"#9B59B6","🈯":"#9B59B6","🉐":"#9B59B6","🈹":"#9B59B6","🈚":"#9B59B6","🈲":"#9B59B6","🉑":"#9B59B6","🈸":"#9B59B6","🈴":"#E74C3C","🈳":"#9B59B6","㊗️":"#9B59B6","㊙️":"#9B59B6","🈺":"#9B59B6","🈵":"#9B59B6","🔴":"#992D22","🟠":"#F1C40F","🟡":"#F1C40F","🟢":"#11806A","🔵":"#206694","🟣":"#9B59B6","🟤":"#992D22","⚫":"#607D8B","⚪":"#9B59B6","🟥":"#E74C3C","🟧":"#E67E22","🟨":"#F1C40F","🟩":"#11806A","🟦":"#3498DB","🟪":"#9B59B6","🟫":"#9B59B6","⬛":"#11806A","⬜":"#9B59B6","◼️":"#607D8B","◻️":"#9B59B6","◾":"#607D8B","◽":"#9B59B6","▪️":"#607D8B","▫️":"#607D8B","🔶":"#F1C40F",
|
||
"🔷":"#206694","🔸":"#E67E22","🔹":"#206694","🔺":"#E74C3C","🔻":"#E74C3C","💠":"#3498DB","🔘":"#206694","🔳":"#9B59B6","🔲":"#607D8B","🏁":"#9B59B6","🚩":"#992D22","🎌":"#9B59B6","🏴":"#11806A","🏳️":"#9B59B6","🏳️🌈":"#E67E22","🏳️⚧️":"#9B59B6","🏴☠️":"#11806A","🇦🇨":"#206694","🇦🇩":"#206694","🇦🇪":"#E74C3C","🇦🇫":"#E74C3C","🇦🇬":"#992D22","🇦🇮":"#206694","🇦🇱":"#992D22","🇦🇲":"#E74C3C","🇦🇴":"#607D8B","🇦🇶":"#206694","🇦🇷":"#3498DB","🇦🇸":"#9B59B6","🇦🇹":"#9B59B6","🇦🇺":"#206694","🇦🇼":"#3498DB","🇦🇽":"#206694","🇦🇿":"#E91E63","🇧🇦":"#F1C40F","🇧🇧":"#206694","🇧🇩":"#E74C3C","🇧🇪":"#F1C40F","🇧🇫":"#11806A","🇧🇬":"#992D22","🇧🇭":"#9B59B6","🇧🇮":"#11806A","🇧🇯":"#E74C3C","🇧🇱":"#9B59B6","🇧🇲":"#992D22","🇧🇳":"#F1C40F","🇧🇴":"#11806A","🇧🇶":"#206694","🇧🇷":"#F1C40F","🇧🇸":"#3498DB","🇧🇹":"#E67E22","🇧🇻":"#E74C3C","🇧🇼":"#3498DB","🇧🇾":"#11806A","🇧🇿":"#206694","🇨🇦":"#992D22","🇨🇨":"#11806A","🇨🇩":"#E74C3C","🇨🇫":"#11806A","🇨🇬":"#F1C40F",
|
||
"🇨🇭":"#9B59B6","🇨🇮":"#E67E22","🇨🇰":"#206694","🇨🇱":"#E74C3C","🇨🇲":"#E74C3C","🇨🇳":"#992D22","🇨🇴":"#206694","🇨🇵":"#206694","🇨🇷":"#206694","🇨🇺":"#206694","🇨🇻":"#206694","🇨🇼":"#206694","🇨🇽":"#11806A","🇨🇾":"#9B59B6","🇨🇿":"#992D22","🇩🇪":"#E74C3C","🇩🇬":"#9B59B6","🇩🇯":"#11806A","🇩🇰":"#992D22","🇩🇲":"#E67E22","🇩🇴":"#206694","🇩🇿":"#11806A","🇪🇦":"#F1C40F","🇪🇨":"#F1C40F","🇪🇪":"#9B59B6","🇪🇬":"#9B59B6","🇪🇭":"#9B59B6","🇪🇷":"#11806A","🇪🇸":"#F1C40F","🇪🇹":"#11806A","🇪🇺":"#206694","🇫🇮":"#206694","🇫🇯":"#3498DB","🇫🇰":"#206694","🇫🇲":"#3498DB","🇫🇴":"#3498DB","🇫🇷":"#206694","🇬🇦":"#11806A","🇬🇧":"#206694","🇬🇩":"#11806A","🇬🇪":"#E74C3C","🇬🇫":"#11806A","🇬🇬":"#9B59B6","🇬🇭":"#11806A","🇬🇮":"#9B59B6","🇬🇱":"#992D22","🇬🇲":"#11806A","🇬🇳":"#F1C40F","🇬🇵":"#F1C40F","🇬🇶":"#11806A","🇬🇷":"#9B59B6","🇬🇸":"#206694","🇬🇹":"#3498DB","🇬🇺":"#206694","🇬🇼":"#F1C40F","🇬🇾":"#E67E22","🇭🇰":"#992D22","🇭🇲":"#206694",
|
||
"🇭🇳":"#9B59B6","🇭🇷":"#206694","🇭🇹":"#E91E63","🇭🇺":"#11806A","🇮🇨":"#206694","🇮🇩":"#992D22","🇮🇪":"#11806A","🇮🇱":"#206694","🇮🇲":"#992D22","🇮🇳":"#9B59B6","🇮🇴":"#9B59B6","🇮🇶":"#607D8B","🇮🇷":"#992D22","🇮🇸":"#9B59B6","🇮🇹":"#992D22","🇯🇪":"#9B59B6","🇯🇲":"#11806A","🇯🇴":"#E74C3C","🇯🇵":"#9B59B6","🇰🇪":"#E74C3C","🇰🇬":"#E74C3C","🇰🇭":"#992D22","🇰🇮":"#E74C3C","🇰🇲":"#11806A","🇰🇳":"#E74C3C","🇰🇵":"#206694","🇰🇷":"#9B59B6","🇰🇼":"#1ABC9C","🇰🇾":"#206694","🇰🇿":"#1ABC9C","🇱🇦":"#E74C3C","🇱🇧":"#9B59B6","🇱🇨":"#3498DB","🇱🇮":"#206694","🇱🇰":"#E74C3C","🇱🇷":"#E74C3C","🇱🇸":"#9B59B6","🇱🇹":"#11806A","🇱🇺":"#E74C3C","🇱🇻":"#992D22","🇱🇾":"#E74C3C","🇲🇦":"#992D22","🇲🇨":"#9B59B6","🇲🇩":"#206694","🇲🇪":"#992D22","🇲🇫":"#206694","🇲🇬":"#E74C3C","🇲🇭":"#206694","🇲🇰":"#992D22","🇲🇱":"#F1C40F","🇲🇲":"#F1C40F","🇲🇳":"#206694","🇲🇴":"#11806A","🇲🇵":"#9B59B6","🇲🇶":"#206694","🇲🇷":"#E74C3C","🇲🇸":"#206694","🇲🇹":"#9B59B6",
|
||
"🇲🇺":"#E74C3C","🇲🇻":"#11806A","🇲🇼":"#992D22","🇲🇽":"#9B59B6","🇲🇾":"#9B59B6","🇲🇿":"#E67E22","🇳🇦":"#E74C3C","🇳🇨":"#E67E22","🇳🇪":"#11806A","🇳🇫":"#9B59B6","🇳🇬":"#9B59B6","🇳🇮":"#5865F2","🇳🇱":"#206694","🇳🇴":"#E74C3C","🇳🇵":"#992D22","🇳🇷":"#206694","🇳🇺":"#F1C40F","🇳🇿":"#206694","🇴🇲":"#11806A","🇵🇦":"#206694","🇵🇪":"#9B59B6","🇵🇫":"#992D22","🇵🇬":"#E74C3C","🇵🇭":"#992D22","🇵🇰":"#11806A","🇵🇱":"#E74C3C","🇵🇲":"#206694","🇵🇳":"#206694","🇵🇷":"#992D22","🇵🇸":"#9B59B6","🇵🇹":"#E74C3C","🇵🇼":"#F1C40F","🇵🇾":"#9B59B6","🇶🇦":"#9B59B6","🇷🇪":"#E74C3C","🇷🇴":"#F1C40F","🇷🇸":"#206694","🇷🇺":"#992D22","🇷🇼":"#F1C40F","🇸🇦":"#11806A","🇸🇧":"#11806A","🇸🇨":"#11806A","🇸🇩":"#9B59B6","🇸🇪":"#F1C40F","🇸🇬":"#E74C3C","🇸🇭":"#206694","🇸🇮":"#E74C3C","🇸🇯":"#E74C3C","🇸🇰":"#992D22","🇸🇱":"#9B59B6","🇸🇲":"#9B59B6","🇸🇳":"#F1C40F","🇸🇴":"#3498DB","🇸🇷":"#11806A","🇸🇸":"#E74C3C","🇸🇹":"#E67E22","🇸🇻":"#9B59B6","🇸🇽":"#E74C3C",
|
||
"🇸🇾":"#992D22","🇸🇿":"#992D22","🇹🇦":"#206694","🇹🇨":"#206694","🇹🇩":"#F1C40F","🇹🇫":"#206694","🇹🇬":"#11806A","🇹🇭":"#992D22","🇹🇯":"#E91E63","🇹🇰":"#F1C40F","🇹🇱":"#E74C3C","🇹🇲":"#11806A","🇹🇳":"#992D22","🇹🇴":"#992D22","🇹🇷":"#E74C3C","🇹🇹":"#992D22","🇹🇻":"#607D8B","🇹🇼":"#3498DB","🇹🇿":"#11806A","🇺🇦":"#F1C40F","🇺🇬":"#607D8B","🇺🇲":"#E74C3C","🇺🇳":"#3498DB","🇺🇸":"#E74C3C","🇺🇾":"#9B59B6","🇺🇿":"#1ABC9C","🇻🇦":"#9B59B6","🇻🇨":"#F1C40F","🇻🇪":"#206694","🇻🇬":"#206694","🇻🇮":"#9B59B6","🇻🇳":"#992D22","🇻🇺":"#11806A","🇼🇫":"#E74C3C","🇼🇸":"#E74C3C","🇽🇰":"#206694","🇾🇪":"#E74C3C","🇾🇹":"#9B59B6","🇿🇦":"#E67E22","🇿🇲":"#11806A","🇿🇼":"#11806A","🏴":"#992D22","🏴":"#206694","🏴":"#11806A"}},7602:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(318715),o=n(829816);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,r.ZP)([o.Z],(function(){return o.Z.getGuildChannelEmojis(e,t)
|
||
}))}},630203:(e,t,n)=>{"use strict";n.d(t,{_:()=>F,Z:()=>G});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(457217),u=n(202351),c=n(707961),s=n(77413),f=n(679724),d=n(859853),p=n(621647),h=n(773011),y=n(239813),b=n(201521),v=n(491260),m=n(788169),g=n(473903),O=n(319086),E=n(971611),C=n(362660),j=n(310126),S=n(2590),I=n(411325),_=n.n(I);function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){x(e,t,n[t])}))}return e}function N(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function A(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){
|
||
var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name)
|
||
;return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}var R={SELECTED:_().modeSelected,CONNECTED:_().modeConnected,UNREAD_HIGHLIGHT:_().modeUnread,UNREAD:_().modeUnreadNormal,MUTED:_().modeMuted,LOCKED:_().modeLocked};function L(e){e.stopPropagation()}function D(e){switch(e){case S.d4z.GUILD_STAGE_VOICE:case S.d4z.GUILD_VOICE:return _().typeVoice;case S.d4z.ANNOUNCEMENT_THREAD:case S.d4z.PUBLIC_THREAD:case S.d4z.PRIVATE_THREAD:return _().typeThread;case S.d4z.GUILD_ANNOUNCEMENT:case S.d4z.GUILD_TEXT:case S.d4z.GUILD_STORE:case S.d4z.GUILD_FORUM:default:return _().typeDefault}}var k=j.default.getEnableHardwareAcceleration()?c.Xo$:c.qEK;function U(e){var t=e.channel;return(0,r.jsx)(k,{src:(0,p.x)(t),"aria-hidden":!0,size:c.EFr.SIZE_20})}function B(e){var t=e.channel,n=(0,u.e7)([g.default],(function(){return g.default.getUser(null==t?void 0:t.recipients[0])})),o=(0,u.e7)([m.Z],(function(){
|
||
return null!=n&&null!=t&&!t.isMultiUserDM()&&null!=m.Z.getTypingUsers(null==t?void 0:t.id)[null==n?void 0:n.id]})),i=(0,u.cj)([v.Z],(function(){return null==n||null==t||t.isMultiUserDM()?{status:null,isMobile:!1}:{status:v.Z.getStatus(n.id),isMobile:v.Z.isMobileOnline(n.id)}})),a=i.status,l=i.isMobile;return(0,r.jsx)(k,{size:c.EFr.SIZE_20,src:null==n?void 0:n.getAvatarURL(void 0,40),status:a,isMobile:l,isTyping:o,"aria-label":null==n?void 0:n.username,statusTooltip:!0})}var F=function(e){var t=e.className,n=e.channel,o=e.guild,i=e.locked,l=e.hasActiveThreads,u=function(e,t,n){switch(e.type){case S.d4z.DM:return function(){return(0,r.jsx)(B,{channel:e})};case S.d4z.GROUP_DM:return function(){return(0,r.jsx)(U,{channel:e})};default:return(0,y.KS)(e,t,n)}}(n,o,{locked:i,hasActiveThreads:l});if(null==u)return null;var s=(0,y.bT)(n,o,i,l);return(0,r.jsx)(c.ua7,{text:s,delay:500,children:function(e){return(0,r.jsx)("div",N(P({},e),{role:"img",className:_().iconContainer,children:(0,
|
||
r.jsx)(u,{className:a()(_().icon,t)})}))}})};function G(e){var t,n,i,u=e.channel,p=e.name,y=e.muted,v=e.selected,m=e.connected,g=e.unread,j=e.canHaveDot,I=e.mentionCount,w=e.relevant,M=e.locked,k=e.hasActiveThreads,U=e.onClick,B=e.onMouseDown,G=e.onMouseUp,H=e.onContextMenu,V=e.connectDragPreview,W=e.className,z=e.iconClassName,Y=e.subtitle,K=e.subtitleColor,q=e.channel.type,Q=e.onMouseEnter,X=e.onMouseLeave,J=e["aria-label"],$=e.children,ee=e.guild,te=e.channelTypeOverride,ne=e.forceInteractable,re=e.isFavoriteSuggestion,oe=e.emojiAndColor,ie=(0,l.JA)(u.id),ae=(ie.role,A(ie,["role"])),le=o.useRef(null),ue=o.useRef(null),ce=(0,b.Z)(u),se=S.Z5c.CHANNEL(ce,u.id),fe=(0,h.ZP)(u),de=u.isGuildVocal(),pe=de&&!m,he=f._.useExperiment({}),ye=he.enabled,be=he.left,ve=o.useContext(d.S).reducedMotion.enabled,me=T(o.useState([]),2),ge=me[0],Oe=me[1];t=ge.length,n=500,i=function(){Oe([])},o.useLayoutEffect((function(){var e=null;if(t>0){clearTimeout(e);e=setTimeout((function(){i();clearTimeout(e)
|
||
}),4*n)}return function(){return clearTimeout(e)}}),[t,n,i]);var Ee,Ce,je=null!=oe?(0,C.Cj)(oe[1],.16):void 0,Se=o.useMemo((function(){return null!=oe?(0,r.jsx)(s.Z,{emojiName:oe[0],className:_().twemoji}):null}),[oe]),Ie=(0,r.jsxs)("div",{className:a()(_().content,x({},_().favoriteSuggestion,re)),ref:ue,children:[ye&&null!=oe&&(0,r.jsx)("div",{className:_().emojiColorFill,style:{backgroundColor:je,opacity:v?1:0}}),(0,r.jsxs)(O.Z,N(P({role:pe?"button":"link",href:de?void 0:se,ref:le,className:a()(_().mainContent,x({},_().mainContentWithChannelEmoji,null!=oe)),onMouseDown:function(e){ye&&0===e.button&&function(e){if(!ve){var t=e.currentTarget.getBoundingClientRect(),n=t.width>t.height?t.width:t.height,r={x:e.pageX-t.x-n/2,y:e.pageY-t.y-n/2,size:n};Oe(Z(ge).concat([r]))}}(e)},onClick:function(){return null==U?void 0:U(u)}},ae),{"aria-label":J,focusProps:{enabled:!1},children:[null!=oe&&be&&(0,r.jsx)("div",{className:a()(_().channelEmoji,_().channelEmojiLeftOfIcon),style:{
|
||
backgroundColor:je},children:Se}),(0,r.jsx)(F,{className:z,channel:u,guild:ee,hasActiveThreads:k,locked:M}),null!=oe&&!be&&(0,r.jsx)("div",{className:a()(_().channelEmoji,_().channelEmojiRightOfIcon),style:{backgroundColor:je},children:Se}),(0,r.jsxs)(E.Z,{className:a()(_().name,_().channelName),"aria-hidden":!0,children:[null==p?fe:p,null!=Y&&""!==Y?(0,r.jsx)(c.xvT,{color:null!=K?K:"text-muted",variant:"text-xs/medium",className:_().subtitle,children:Y}):null]})]})),o.Children.count($)>0?(0,r.jsx)("div",{onClick:L,className:_().children,children:$}):null,ye&&ge.length>0&&ge.map((function(e,t){return(0,r.jsx)("span",{className:_().ripple,style:{top:e.y,left:e.x,width:e.size,height:e.size,backgroundColor:null!=oe?oe[1]:"#607D8B",animationDuration:"".concat(500,"ms"),opacity:.36}},"ripple-".concat(t))}))]}),_e=null!=U||null!=G||null!=B||ne;return(0,r.jsx)(c.tEY,{focusTarget:le,ringTarget:ue,offset:{top:2,bottom:2,right:4},children:(0,r.jsxs)("div",{
|
||
className:a()(W,_e?_().wrapper:_().notInteractive,(Ce=null!=oe,v&&!Ce?R.SELECTED:m?R.CONNECTED:M?R.LOCKED:y?R.MUTED:g?w||null!=I&&I>0?R.UNREAD_HIGHLIGHT:R.UNREAD:null),D(null!=te?te:q)),onMouseUp:function(e){return null==G?void 0:G(e,u)},onMouseDown:function(e){return null==B?void 0:B(e,u)},onContextMenu:function(e){return null==H?void 0:H(e,u)},onMouseEnter:Q,onMouseLeave:X,children:[y||!j||!g||v&&!de?null:(0,r.jsx)("div",{className:a()(_().unread,(w||I)&&_().unreadRelevant)}),null!==(Ee=null==V?void 0:V(Ie))&&void 0!==Ee?Ee:Ie]})})}},125680:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(641277),u=n(639115),c=n.n(u);function s(e){var t=e.className,n=e.embeddedApps;if(n.length<=0)return null;if(1===n.length)return(0,r.jsx)("div",{className:i()(c().container,t),children:(0,r.jsx)(l.Z,{game:n[0].application,className:c().icon24px})});var o=n.length-1;return(0,r.jsxs)("div",{className:i()(c().container,t),children:[(0,r.jsx)(l.Z,{
|
||
game:n[0].application,className:c().icon20px}),2===n.length?(0,r.jsx)(l.Z,{game:n[1].application,className:c().icon20px}):(0,r.jsx)(a.xvT,{className:c().overflow,variant:"text-xs/bold",color:"interactive-active",children:"+".concat(o)})]})}},811182:(e,t,n)=>{"use strict";n.d(t,{j:()=>ku,E:()=>Uu});var r=n(785893),o=n(667294),i=n(496486),a=n.n(i),l=n(798159),u=n(457217),c=n(202351),s=n(707961),f=n(216151),d=n(217458),p=n(213276),h=n(316878),y=n(153686),b=n(19585),v=n(294184),m=n.n(v),g=n(248088),O=n(971402),E=n(396043),C=n(703790),j=n(682776),S=n(718831),I=n(930865),_=n(744564);function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function P(e){P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return P(e)}function N(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function A(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e,t){T=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return T(e,t)}var Z=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
|
||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return A(this,n)}}var R={},L=function(e){var t=e.guildId,n=e.premiumCount;R=N(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){x(e,t,n[t])}))}return e}({},R),x({},t,n))},D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&T(e,t)}(n,e);var t=M(n);function n(){w(this,n);return t.apply(this,arguments)}var r=n.prototype
|
||
;r.initialize=function(e){null!=e&&(R=e)};r.getState=function(){return R};r.getCountForGuild=function(e){return R[e]};r.__getLocalVars=function(){return{state:R,handlePremiumCountUpdate:L}};return n}(c.ZP.PersistedStore);D.displayName="GuildBoostingProgressBarPersistedStore";D.persistKey="PremiumGuildProgressBarPersistedStore";const k=new D(_.Z,{APPLIED_GUILD_BOOST_COUNT_UPDATE:L});var U=n(596801),B=n(557877),F=n(2590),G=n(473708),H=n(628438),V=n.n(H);function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Y(e,t,n[t])}))}return e}function q(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{
|
||
a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var X=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),
|
||
0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},J=function(e){var t,n,i=e.guild,a=e.onSelect,l=Q(o.useState(i.premiumProgressBarEnabled),2),u=l[0],f=l[1],d=Q(o.useState(!1),2),p=d[0],h=d[1],y=(0,c.e7)([j.Z],(function(){return j.Z.can(F.Plq.MANAGE_GUILD,i)})),b=(n=(t=function(){return X(this,(function(e){switch(e.label){case 0:if(!y)return[2];h(!0);return[4,C.Z.saveGuild(i.id,{
|
||
premiumProgressBarEnabled:!u})];case 1:e.sent();f(!u);h(!1);return[2]}}))},function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){z(i,r,o,a,l,"next",e)}function l(e){z(i,r,o,a,l,"throw",e)}a(void 0)}))}),function(){return n.apply(this,arguments)});return(0,r.jsx)(s.v2r,{navId:"progress-bar-context",onClose:O.Zy,"aria-label":G.Z.Messages.PROGRESS_BAR_ACTIONS_MENU_LABEL,onSelect:a,children:(0,r.jsx)(s.S89,{id:"progress-bar-enabled",label:G.Z.Messages.GUILD_ENABLE_PROGRESS_BAR,checked:u,disabled:p,action:b})})},$={tension:180,friction:80};const ee=function(e){var t,n=e.guild,i=(0,b.Z)(y.Z.GUILD_BOOSTING_SIDEBAR_DISPLAY).analyticsLocations,a=n.premiumSubscriberCount,l=n.id,u=(0,I.rF)(a,l),f=(0,I.FZ)(u,n.id),d=null==f,p=null!=f?f:u,v=(0,c.e7)([k],(function(){return null!==(t=k.getCountForGuild(l))&&void 0!==t?t:0})),C=(0,c.e7)([h.Z],(function(){return h.Z.useReducedMotion})),w=(0,c.e7)([j.Z],(function(){return j.Z.can(F.Plq.MANAGE_GUILD,n)}))
|
||
;o.useEffect((function(){v!==a&&(e=l,t=a,_.Z.wait((function(){_.Z.dispatch({type:"APPLIED_GUILD_BOOST_COUNT_UPDATE",guildId:e,premiumCount:t})})));var e,t}),[l,v,a]);var x="".concat(Math.min(100,a/(0,I.vn)(n.id)[p]*100),"%"),P=o.useRef(x).current,N={from:{width:v===a?P:"0%"},to:{width:x},config:$,immediate:C},A=Q((0,g.useSpring)((function(){return N})),2),T=A[0],Z=A[1],M=function(){(0,E.yw)(F.rMx.PREMIUM_GUILD_PROMOTION_OPENED,{location:{section:F.jXE.PREMIUM_GUILD_PROGRESS_BAR},guild_id:l,location_stack:i});(0,U.Z)({analyticsLocations:i,analyticsSourceLocation:{page:F.ZY5.GUILD_CHANNEL,section:F.jXE.PREMIUM_GUILD_PROGRESS_BAR,object:F.qAy.TOOLTIP},guild:n,perks:(0,B.VF)(),perkIntro:G.Z.Messages.PREMIUM_GUILD_SUBSCRIPTION_UPSELL_MODAL_PROGRESS_BAR_HEADER})},R=G.Z.Messages.PREMIUM_GUILD_SUBSCRIPTIONS_GOAL.format({levelName:(0,I.e9)(p)}),L=G.Z.Messages.PREMIUM_GUILD_SUBSCRIPTIONS_PROGRESS_BAR_BLURB.format({numBoosts:a,numTotal:(0,I.vn)(n.id)[p]});if(d){R=(0,I.e9)(p)
|
||
;L=G.Z.Messages.PREMIUM_GUILD_SUBSCRIPTIONS_PROGRESS_BAR_COMPLETED_BLURB.format({numBoosts:a})}return(0,r.jsx)(s.ua7,{text:d?G.Z.Messages.PREMIUM_GUILD_SUBSCRIPTIONS_NUDGE_TOOLTIP_COMPLETE:G.Z.Messages.PREMIUM_GUILD_SUBSCRIPTIONS_NUDGE_TOOLTIP.format({levelName:(0,I.nW)(p)}),color:s.ua7.Colors.BLACK,position:"top",delay:200,hideOnClick:!0,children:function(e){return(0,r.jsxs)(s.P3F,q(K({},e),{onClick:M,onMouseEnter:function(){var t;null===(t=e.onMouseEnter)||void 0===t||t.call(e);Z(N)},className:V().container,onContextMenu:function(e){w&&(0,O.vq)(e,(function(e){return(0,r.jsx)(J,q(K({},e),{guild:n}))}))},children:[(0,r.jsxs)("div",{className:V().textArea,children:[(0,r.jsx)("div",{className:V().goalTextContainer,children:(0,r.jsx)(s.xvT,{className:V().goalText,color:"interactive-active",variant:"text-xs/bold",children:R})}),(0,r.jsxs)("div",{className:V().progressFraction,children:[(0,r.jsx)(s.xvT,{color:"interactive-normal",variant:"text-xs/normal",children:L}),(0,r.jsx)(S.Z,{
|
||
className:V().count,height:16,width:16,direction:S.Z.Directions.RIGHT})]})]}),(0,r.jsxs)("div",{className:m()(V().progressBarContainer,Y({},V().progressBarContainerComplete,d)),children:[(0,r.jsx)(g.animated.div,{className:V().progressBar,style:T}),d?(0,r.jsx)("span",{"aria-label":G.Z.Messages.PREMIUM_GUILD_SUBSCRIPTIONS_PROGRESS_BAR_TADA_ICON_ALT_TEXT,role:"img",className:V().tadaIcon,children:"🎉"}):null]}),(0,r.jsx)("div",{role:"separator",className:V().divider})]}))}})};var te=n(198325),ne=n(995247),re=n(489610),oe=n(419051),ie=n(61209),ae=n(602397),le=n(72580),ue=n(82274),ce=n(808194),se=n(68537);function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value)
|
||
;if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e){var t=e.voiceState,n=e.userNick;return{user:e.user,voiceState:t,nick:n,comparator:(0,ae.sQ)(t,n)}}var he=n(361925),ye=n(382060),be=n(953727),ve=n(5544),me=n(717091),ge=n(464187),Oe=n(443812),Ee=n(96606),Ce=n(176758),je=n(556056),Se=n(978868),Ie=n(4207),_e=n(966554);function we(e,t,n){return!function(e,t){if(t===je.zm){var n=e.getCommunitySection().getRows()
|
||
;return 1===n.length&&n[0]===_e.f.GUILD_PREMIUM_PROGRESS_BAR||e.getCommunitySection().isEmpty()}return 0===e.getSections()[t]}(e,n)&&(n===je.zm||!!t&&(n===je.p2||n!==je.wd&&(n===e.recentsSectionNumber||(e.voiceChannelsSectionNumber,!1))))}function xe(e,t){return!(t===je.zm||t===je.p2||t===je.wd||t===e.recentsSectionNumber||t===e.voiceChannelsSectionNumber)}function Pe(e,t,n){return{hasDivider:we(e,t,n),hasVoiceSummary:xe(e,n)}}var Ne=n(865050),Ae=n(433932),Te=n(925369),Ze=n(780409),Me=n(189827),Re=n(386531),Le=n(848465),De=n(745623),ke=n(365637),Ue=n(350403),Be=n(678545),Fe=n(201441);function Ge(e,t){var n=(0,Ae.N2)(e),r=function(e){var t=(0,Be.Z)(null==e?void 0:e.id),n=(0,Fe.ZP)(null==e?void 0:e.id),r=(0,Ue.Z)(null==e?void 0:e.id),o=null==e?void 0:e.hasFeature(F.oNc.COMMUNITY);return!r&&(o&&t||n.length>0)}(e),o=(0,Te.W)(e.id),i=(0,ke.m)(e.id),a=Ze.Z.useExperiment({}).landOnHome,l=(0,c.e7)([Me.ZP],(function(){return Me.ZP.shouldShowOnboarding(e.id)})),u=(0,Le.g)(e.id),s=(0,
|
||
re.Ks)(e.id),f=Re.Z.getNewMemberActions(e.id),d=(0,De.Z)(e.id),p=[],h=e.hasFeature(F.oNc.HUB),y=e.hasFeature(F.oNc.COMMUNITY);h&&p.push(_e.f.GUILD_HUB_HEADER_OPTIONS);if(l&&a)return p;e.premiumProgressBarEnabled&&p.push(_e.f.GUILD_PREMIUM_PROGRESS_BAR);u&&d&&null!=f&&f.length>0&&p.push(_e.f.GUILD_NEW_MEMBER_ACTIONS_PROGRESS_BAR);h||!n&&!u||p.push(_e.f.GUILD_HOME);r&&!t&&p.push(_e.f.GUILD_SCHEDULED_EVENTS);s&&y&&p.push(_e.f.CHANNELS_AND_ROLES);i&&p.push(_e.f.GUILD_ROLE_SUBSCRIPTIONS);o&&p.push(_e.f.GUILD_MEMBER_APPLICATIONS);return p}var He=n(786522),Ve=n(791216),We=n(660177),ze=n(630631),Ye=n(327499),Ke=n(910878),qe=n(777158),Qe=n(963985),Xe=n(968968),Je=n(877475),$e=n(567403),et=n(90692);function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nt(e){return function(e){if(Array.isArray(e))return tt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)
|
||
}(e)||function(e,t){if(!e)return;if("string"==typeof e)return tt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rt(e,t){return null!=e&&null!=t&&(e===t||(0,ye.r8)(e)&&(0,ye.r8)(t)||(0,ye.bw)(e)&&(0,ye.bw)(t))}function ot(e,t,n,r){var o=-1;r.find((function(e,n){if(e.channel.id===t){o=n;return!0}return!1}));if(o<0)return null;for(var i=o;i>=0&&i<r.length;i+=e){var a=r[i];if(rt(a.channel.type,n))return a}return null}function it(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e)return 0;var r=null;t.filter((function(t){var r=t.channel.type;return null!=e&&(n||rt(e.type,r))
|
||
})).find((function(t,n){var o=t.channel.id;if(null!=e&&o===e.id){r=n;return!0}return!1}));return r}function at(e){return{referenceId:e.id,parentId:e.parent_id}}function lt(e,t,n,r,o){if(null==e||null==n)return null;var i=F.d4z.GUILD_CATEGORY;return e.type===i?r===t||r<t&&e.type===n.type?at(n):r>t?function(e,t,n){var r,o=F.d4z.GUILD_CATEGORY,i=n[(null!==(r=it(t,n,!0))&&void 0!==r?r:0)+1],a=ot(-1,t.id,e.type,n);return null==a||a.channel.id===e.id?null:null==i||i.channel.type===o?{referenceId:a.channel.id,parentId:null}:null}(e,n,o):null:rt(e.type,n.type)?at(n):r<t?n.type===i?function(e,t,n){var r,o=n[(null!==(r=it(t,n,!0))&&void 0!==r?r:0)-1],i=ot(1,t.id,e.type,n);if(null==o)return{referenceId:null,parentId:null};if(null!=i){if(rt(o.channel.type,e.type)||e.isGuildVocal()&&(0,ye.r8)(o.channel.type))return{referenceId:i.channel.id,parentId:o.channel.parent_id};if(o.channel.isCategory())return{referenceId:i.channel.id,parentId:o.channel.id}}return null}(e,n,o):function(e,t,n){
|
||
var r,o=n[(null!==(r=it(t,n,!0))&&void 0!==r?r:0)-1],i=ot(1,t.id,e.type,n);return null!=o||e.isGuildVocal()?(0,ye.r8)(e.type)&&null!=i&&((0,ye.r8)(o.channel.type)||o.channel.isCategory())?{referenceId:i.channel.id,parentId:t.parent_id}:null:{referenceId:null!=i?i.channel.id:null,parentId:null}}(e,n,o):n.type===i?function(e,t,n){var r,o=n[(null!==(r=it(t,n,!0))&&void 0!==r?r:0)+1],i=ot(-1,t.id,e.type,n);if(null!=i){if(null==o)return{referenceId:i.channel.id,parentId:t.id};if(rt(o.channel.type,e.type)||(0,ye.r8)(e.type)&&o.channel.isGuildVocal())return{referenceId:i.channel.id,parentId:o.channel.parent_id};if(o.channel.isCategory())return{referenceId:i.channel.id,parentId:t.id}}return null}(e,n,o):function(e,t,n){var r,o=n[(null!==(r=it(t,n,!0))&&void 0!==r?r:0)+1],i=ot(-1,t.id,e.type,n);if(null==i)return null;if(e.isGuildVocal()){if(null==o||o.channel.isCategory())return{referenceId:i.channel.id,parentId:t.parent_id};if(o.channel.isGuildVocal())return{referenceId:i.channel.id,
|
||
parentId:o.channel.parent_id}}return e.isCategory()&&(null==o||o.channel.isCategory())?{referenceId:i.channel.id,parentId:null}:null}(e,n,o)}var ut=n(563135);function ct(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function st(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ct(i,r,o,a,l,"next",e)}function l(e){ct(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ft(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ft(e,t,n[t])}))}return e}function pt(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var ht=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],
|
||
done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},yt="DRAGGABLE_GUILD_CHANNEL";function bt(e,t){if(null==e||null==t)return null;if(e!==F.I_8)return ie.Z.getChannel(t);var n,r,o=ve.ZP.getChannels(e),i=null!==(r=null!==(n=o[ve.sH].find((function(e){return e.channel.id===t})))&&void 0!==n?n:o[ve.Zb].find((function(e){return e.channel.id===t})))&&void 0!==r?r:o[F.d4z.GUILD_CATEGORY].find((function(e){return e.channel.id===t}));return null==i?void 0:i.channel}function vt(e){return(0,Ve.G)(yt,{drop:function(e,t){
|
||
var n=ge.Z.getGuildId(),o=t.getItem(),i=lt(bt(n,o.id),o.position,e.channel,e.position,o.channelList);if(null!=i){var a=bt(n,o.id);if(null!=a){var l=Je.Z.getCategories(n),u=$e.Z.getGuild(n);if(null!=u){var c=function(e,t,n,r){var o,i,a=[],l=[],u=r._categories,c=function(t){var n;n=null!=o&&null!=i&&function(e,t,n,r){return null!=t&&null!=n&&null!=r[t]&&r[t].channel===e&&null!=r[n]}(e,o,i,t)?et.ZP.moveItemFromTo(t,o,i):nt(t);a=a.concat(et.ZP.calculatePositionDeltas({oldOrdering:t,newOrdering:n,idGetter:function(e){return e.channel.id},existingPositionGetter:function(e){return e.channel.position}}));return n};if(e.isCategory()){var s=nt(u).slice(1);o=it(e,s);i=it(t,s);(l=c(s)).unshift(u[0])}if((0,ye.r8)(e.type)||e.isCategory()){var f=(0,qe.Z)(l.length>0?l:u,r,(function(e){var t=e.channel.type;return(0,ye.r8)(t)}));o=it(e,f);i=it(t,f);c(f)}if(e.isGuildVocal()||e.isCategory()){var d=(0,qe.Z)(l.length>0?l:u,r,(function(e){return e.channel.isGuildVocal()}));o=it(e,d);i=it(t,d);c(d)}
|
||
if(e.parent_id!==n){var p=!1;a.find((function(t){if(t.id===e.id){t.parent_id=n;return p=!0}return!1}));p||a.push({id:e.id,parent_id:n})}return a}(a,bt(n,i.referenceId),i.parentId,l);if(0!==c.length)if(n!==F.I_8){c=c.filter((function(e){var t=e.id,n=ie.Z.getChannel(t);if(null==n)return!1;var r=ie.Z.getChannel(n.parent_id);return n.type===F.d4z.GUILD_CATEGORY||null==r?j.Z.can(F.Plq.MANAGE_CHANNELS,u):j.Z.can(F.Plq.MANAGE_CHANNELS,r)}));var f;a.parent_id!==i.parentId&&c.find((function(e){if(e.id!==a.id)return!1;var t=ie.Z.getChannel(e.parent_id);if(!(null!=t&&j.Z.can(F.Plq.MANAGE_ROLES,a)&&j.Z.can(F.Plq.MANAGE_ROLES,t)))return!0;var n=ut.ZP.areChannelsLocked(a,t),r=ut.ZP.areChannelsLocked(a,ie.Z.getChannel(a.parent_id));(null==a.parent_id&&!n||r&&!n)&&(f=e);return!0}));if(null!=f){var d=ie.Z.getChannel(f.parent_id);null!=d&&(0,s.h7j)((function(e){return(0,r.jsx)(Ke.default,pt(dt({},e),{channel:a,category:d,onConfirm:function(){if(null!=f){f.lock_permissions=!0;Ye.Z.batchChannelUpdate(n,c)
|
||
}},onCancel:function(){null!=f&&Ye.Z.batchChannelUpdate(n,c)}}))}))}else Ye.Z.batchChannelUpdate(n,c)}else(0,Qe.s3)(c)}}}},canDrop:function(e,t){var n=t.getItem(),r=ie.Z.getChannel(n.id);if(null==r)return!1;var o=lt(ie.Z.getChannel(n.id),n.position,e.channel,e.position,n.channelList);if(null==o)return!1;if(ge.Z.getGuildId()===F.I_8)return!0;var i=$e.Z.getGuild(n.guildId);if(null==i)return!1;var a=ie.Z.getChannel(o.parentId),l=ie.Z.getChannel(r.parent_id),u=j.Z.can(F.Plq.MANAGE_CHANNELS,i),c=null!=l?j.Z.can(F.Plq.MANAGE_CHANNELS,l):u,s=null!=a?j.Z.can(F.Plq.MANAGE_CHANNELS,a):u;return c&&s}},(function(e,t){var n=t.getItem();return null==n||null==n.isChannelDrag?{connectChannelDropTarget:e.dropTarget(),sorting:!1,sortingType:null,sortingPosition:null,sortingParent:null}:{connectChannelDropTarget:e.dropTarget(),sorting:!0,sortingType:n.type,sortingPosition:t.isOver()&&t.canDrop()?n.position:null,sortingParent:t.isOver()&&t.canDrop()?n.parentId:null}}))((0,We.E)(yt,{canDrag:function(e){
|
||
var t=e.channel;if(ge.Z.getGuildId()===F.I_8)return!0;var o=$e.Z.getGuild(t.getGuildId());if(null==o)return!1;if((0,re.r1)(o.id)&&j.Z.can(F.Plq.MANAGE_CHANNELS,o)){"true"===ze.Z.get("doNotShowReorderModal")||(0,s.ZDy)(st((function(){var e,t;return ht(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(18359)]).then(n.bind(n,518359))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,dt({},e))}]}}))})));return!1}if(t.type===F.d4z.GUILD_CATEGORY)return j.Z.can(F.Plq.MANAGE_CHANNELS,o)&&!(0,re.r1)(o.id);var i=ie.Z.getChannel(t.parent_id);return null!=i&&j.Z.can(F.Plq.MANAGE_CHANNELS,i)||null==i&&j.Z.can(F.Plq.MANAGE_CHANNELS,o)},beginDrag:function(e){var t=e.channel,n=t.id,r=t.parent_id,o=t.guild_id,i=t.type,a=e.position,l=ge.Z.getGuildId(),u=Je.Z.getCategories(l),c=(0,qe.Z)(u._categories,u,(function(e){var t=e.channel
|
||
;return t.type===F.d4z.GUILD_CATEGORY&&null!=u[t.id]&&0===u[t.id].length?l===F.I_8||j.Z.can(F.Plq.MANAGE_CHANNELS,t)&&j.Z.can(F.Plq.VIEW_CHANNEL,t):!Xe.Z.isCollapsed(t.parent_id)}));return{isChannelDrag:!0,id:n,position:a,parentId:r,type:i,channelList:c,guildId:o}}},(function(e){return{connectChannelDragSource:e.dragSource(),connectDragPreview:e.dragPreview()}}))(e))}var mt=n(9430),gt=n(971611),Ot=n(127661),Et=n(613665),Ct=n(795909),jt=n(796938),St=n(202237),It=n(627001);var _t=n(559836),wt=n.n(_t);function xt(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Pt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xt(i,r,o,a,l,"next",e)}function l(e){xt(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Nt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function At(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Nt(e,t,n[t])}))}return e}function Tt(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Zt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e)
|
||
;for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var Mt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){
|
||
a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Rt(e){e.stopPropagation()}const Lt=vt(o.memo((function(e){var t,i=e.channel,a=e.connectChannelDragSource,l=e.connectChannelDropTarget,f=e.disableManageChannels,d=e.position,p=e.sortingPosition,h=e.hideIcon,y=e.children,b=(0,c.e7)([mt.Z],(function(){return mt.Z.isChannelMuted(i.getGuildId(),i.id)})),v=(0,c.e7)([Xe.Z],(function(){return Xe.Z.isCollapsed(i.id)})),g=(0,c.e7)([j.Z],(function(){return j.Z.can(F.Plq.MANAGE_CHANNELS,i)}));t=null!=p?d>p?wt().containerDragAfter:wt().containerDragBefore:wt().containerDefault;var E,C=o.useCallback((function(){v?(0,He.mJ)(i.id):(0,He.c4)(i.id)}),[i.id,v]),S=o.useCallback((function(e){if("null"!==i.id){var t=$e.Z.getGuild(i.getGuildId());null!=t&&(0,O.jW)(e,Pt((function(){var e,o;return Mt(this,(function(a){switch(a.label){case 0:
|
||
return[4,n.e(96006).then(n.bind(n,696006))];case 1:e=a.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,Tt(At({},e),{channel:i,guild:t}))}]}}))})))}}),[i]),I=o.useCallback((function(){var e=i.type===F.d4z.GUILD_CATEGORY?null:i.type,t=i.getGuildId();null!=t&&(0,s.ZDy)(Pt((function(){var o,a;return Mt(this,(function(l){switch(l.label){case 0:return[4,Promise.all([n.e(40532),n.e(94805),n.e(14929)]).then(n.bind(n,394805))];case 1:o=l.sent(),a=o.default;return[2,function(n){return(0,r.jsx)(a,Tt(At({},n),{channelType:e,guildId:t,categoryId:"null"!==i.id?i.id:null}))}]}}))})))}),[i]),_=(0,u.JA)(i.id),w=(_.role,_.tabIndex),x=Zt(_,["role","tabIndex"]),P=o.useRef(null),N=o.useRef(null),A=(0,r.jsxs)("li",{className:t,"data-dnd-name":i.name,children:[(0,r.jsx)(s.tEY,{focusTarget:P,ringTarget:N,offset:{left:4,right:4},children:(0,r.jsxs)("div",{ref:N,className:m()(wt().iconVisibility,wt().wrapper,(E={},Nt(E,wt().collapsed,v),Nt(E,wt().muted,b),Nt(E,wt().clickable,!0),E)),onContextMenu:S,
|
||
children:[(0,r.jsxs)(s.P3F,Tt(At({innerRef:P,className:wt().mainContent,tabIndex:w},x),{onClick:C,"aria-label":G.Z.Messages.CATEGORY_A11Y_LABEL.format({categoryName:i.name}),"aria-expanded":!v,focusProps:{enabled:!1},children:[h?null:(0,r.jsx)(Et.Z,{className:wt().icon}),(0,r.jsx)(St.Z,{className:wt().name,children:(0,r.jsx)(gt.Z,{children:i.name})})]})),(0,r.jsx)("div",{onClick:Rt,className:wt().children,children:g&&!f?(0,r.jsx)(s.ua7,{text:G.Z.Messages.CREATE_CHANNEL,children:function(e){var t=e.onMouseEnter,n=e.onMouseLeave;return(0,r.jsx)(s.zxk,{"aria-label":G.Z.Messages.CREATE_CHANNEL,look:s.zxk.Looks.BLANK,size:s.zxk.Sizes.NONE,className:m()(wt().addButton,wt().forceVisible),onClick:I,onMouseEnter:t,onMouseLeave:n,tabIndex:w,focusProps:{offset:{top:-3,right:-4,bottom:-3,left:-4}},children:(0,r.jsx)(Ct.Z,{className:wt().addButtonIcon})})}}):null})]})}),y]});return null!=l&&null!=a?l(a(A)):A})));var Dt=o.memo((function(e){var t=e.name,n=e.onDismiss,o=e.className;return(0,
|
||
r.jsx)("li",{className:m()(o,wt().containerDefault),children:(0,r.jsxs)("div",{className:m()(wt().iconVisibility,wt().wrapperStatic),children:[(0,r.jsx)("div",{className:wt().mainContent,children:(0,r.jsx)(St.Z,{className:wt().name,children:(0,r.jsx)(gt.Z,{children:t})})}),null!=n?(0,r.jsx)(s.DY3,{text:G.Z.Messages.CLEAR_RECENT_CHANNELS,className:wt().dismissWrapper,children:(0,r.jsx)(s.P3F,{className:wt().dismissButton,onClick:n,children:(0,r.jsx)(Ot.Z,{className:wt().dismiss})})}):null]})})})),kt=o.memo((function(e){var t=e.category,n=(0,c.e7)([It.Z],(function(){return It.Z.isVoiceCategoryCollapsed(t.guild.id)})),i=o.useCallback((function(){n?(e=t.guild.id,_.Z.dispatch({type:"VOICE_CATEGORY_EXPAND",guildId:e,expand:!0})):function(e){_.Z.dispatch({type:"VOICE_CATEGORY_COLLAPSE",guildId:e,expand:!1})}(t.guild.id);var e}),[t.guild.id,n]);return n?(0,r.jsxs)(s.P3F,{className:wt().voiceChannelsButton,onClick:i,children:[(0,r.jsx)(jt.Z,{className:wt().voiceChannelsToggleIcon,width:16,
|
||
height:16}),(0,r.jsx)(s.xvT,{variant:"text-sm/medium",children:G.Z.Messages.VOICE_CHANNELS_CATEGORY_BUTTON_EXPAND})]}):(0,r.jsxs)(s.P3F,{className:wt().voiceChannelsButton,onClick:i,children:[(0,r.jsx)(jt.Z,{className:wt().voiceChannelsToggleIcon,width:16,height:16}),(0,r.jsx)(s.xvT,{variant:"text-sm/medium",children:G.Z.Messages.VOICE_CHANNELS_CATEGORY_BUTTON_COLLAPSE})]})})),Ut=o.memo((function(e){var t=e.category,n=e.channel,o=(0,c.e7)([It.Z],(function(){return It.Z.isVoiceCategoryCollapsed(t.guild.id)}));return o||null==n||n.record.type===F.d4z.GUILD_CATEGORY?o?(0,r.jsx)("li",{className:m()(wt().containerDefault),children:(0,r.jsx)("div",{className:m()(wt().iconVisibility,wt().wrapperStatic),children:(0,r.jsx)(St.Z,{className:wt().name,children:(0,r.jsx)(gt.Z,{children:G.Z.Messages.VOICE_CHANNELS_CATEGORY_HEADER})})})}):null:(0,r.jsx)("div",{style:{height:16}})})),Bt=o.memo((function(e){var t=e.channel;return(0,r.jsx)("li",{className:m()(wt().containerDefault),children:(0,
|
||
r.jsx)("div",{className:m()(wt().iconVisibility,wt().wrapperStatic),children:(0,r.jsx)(St.Z,{className:wt().name,children:(0,r.jsx)(gt.Z,{children:t.name})})})})})),Ft=n(736543),Gt=n(37689),Ht=34,Vt=32,Wt={origin:{x:-36,y:7},targetWidth:232,targetHeight:40,offset:{x:0,y:0}},zt=n(797323),Yt=n.n(zt);function Kt(e,t,n){if(e===je.zm)return 12;if(e===je.wd)return t.hasFeature(F.oNc.HUB)?0:12;if(e===n.voiceChannelsSectionNumber){var r,o=n.getCategoryFromSection(e);if(null==o||o.isEmpty())return 0;if(o.isCollapsed)return 52;var i=null===(r=n.getChannelFromSectionRow(e,0))||void 0===r?void 0:r.channel;return null==i||i.record.type===F.d4z.GUILD_CATEGORY?12:28}return 40}function qt(e,t){switch(e){case je.zm:return"hoisted-spacer";case je.wd:return"uncategorized-spacer";case je.p2:return"favorites";case t.recentsSectionNumber:return"recents-header";case t.voiceChannelsSectionNumber:return"voice-channels-header";default:var n=t.getNamedCategoryFromSection(e)
|
||
;return null!=n?"category-".concat(n.id):"section-".concat(e)}}const Qt=o.memo((function(e){var t=e.sectionIndex,n=e.guild,i=e.guildChannels,a=e.guildChannelsVersion,l=e.selectedChannelId,u=e.disableManageChannels,c=o.useCallback((function(){var e=i.getCategoryFromSection(i.recentsSectionNumber);if(null!=e){var t=null,r=e.getShownChannelAndThreadIds();null!=l&&r.includes(l)&&(t=(0,ne.KY)(i));(0,ne.Uo)(n.id,r,t)}}),[n.id,l,i,a]);switch(t){case je.zm:return(0,r.jsx)("div",{style:{height:12}});case je.wd:return n.hasFeature(F.oNc.HUB)?null:(0,r.jsx)("div",{style:{height:12}});case je.p2:return(0,r.jsx)(Dt,{name:G.Z.Messages.FAVORITES});case i.recentsSectionNumber:return(0,r.jsx)(Dt,{name:G.Z.Messages.RECENTS_CATEGORY_HEADER,onDismiss:c});case i.voiceChannelsSectionNumber:var s,f=i.getCategoryFromSection(i.voiceChannelsSectionNumber);if(null==f||f.isEmpty())return null;var d=null===(s=i.getChannelFromSectionRow(t,0))||void 0===s?void 0:s.channel;return(0,r.jsxs)(o.Fragment,{children:[(0,
|
||
r.jsx)("div",{className:Yt().sectionDivider}),(0,r.jsx)(Ut,{category:f,channel:d})]});case je.wF:var p=i.getNamedCategoryFromSection(t);return null==p?null:(0,r.jsx)(Lt,{channel:p.record,position:p.position,disableManageChannels:u,children:(0,r.jsx)(Ft.Z,{inlineSpecs:Wt,arrowAlignment:Gt.cy.TOP,tutorialId:"organize-by-topic",position:"right"})});default:var h=i.getNamedCategoryFromSection(t);return null==h?null:(0,r.jsx)(Lt,{channel:h.record,position:h.position,disableManageChannels:u})}}));var Xt=n(87127),Jt=n(269300),$t=n(15970),en=n(347834),tn=n(766496),nn=n(177570),rn=n(621329),on=n(189865),an=n(466317),ln=n(226919),un=n(267682),cn=n.n(un);function sn(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function fn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){sn(i,r,o,a,l,"next",e)}function l(e){sn(i,r,o,a,l,"throw",e)}a(void 0)}))}}function dn(e,t){
|
||
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function hn(e){hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return hn(e)}function yn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){pn(e,t,n[t])}))}return e}function bn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)
|
||
}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function vn(e,t){return!t||"object"!==gn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mn(e,t){mn=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return mn(e,t)}var gn=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function On(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=hn(e);if(t){var o=hn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vn(this,n)}}var En=function(e,t){var n,r,o,i,a={label:0,sent:function(){
|
||
if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}
|
||
}([i,l])}}};function Cn(e,t,n){return!(null==t||!t)&&!rt(n,e.type)}function jn(e,t){return null==t?cn().containerDefault:e>t?cn().containerDragAfter:cn().containerDragBefore}function Sn(e){var t=e.channel,n=e.disableManageChannels,o=e.tabIndex,i=function(){Xt.ZP.open(t.id)};return(0,c.e7)([j.Z,ge.Z],(function(){return n||ge.Z.getGuildId()===F.I_8||!j.Z.can(F.Plq.MANAGE_CHANNELS,t)&&!j.Z.can(F.Plq.MANAGE_ROLES,t)&&!j.Z.can(F.Plq.MANAGE_WEBHOOKS,t)||(0,ye.r8)(t.type)&&!j.Z.can(F.Plq.VIEW_CHANNEL,t)||t.isGuildVocal()&&!j.Z.can(F.Plq.CONNECT,t)||!ye.dF.has(t.type)}))?null:(0,r.jsx)(s.ua7,{text:G.Z.Messages.EDIT_CHANNEL,spacing:2,children:function(e){var t=e.onMouseEnter,n=e.onMouseLeave,a=e.onFocus,l=e.onBlur;return(0,r.jsx)(s.P3F,{className:cn().iconItem,onClick:i,tabIndex:o,"aria-label":G.Z.Messages.EDIT_CHANNEL,onMouseEnter:t,onMouseLeave:n,onFocus:a,onBlur:l,children:(0,r.jsx)(an.Z,{width:16,height:16,className:cn().actionIcon})})}})}function In(e){
|
||
var t=e.channel,o=e.isDefaultChannel,i=void 0!==o&&o,a=e.locked,l=e.tabIndex,u=function(){if(null!=f){var e=nn.Z.getAllActiveStreams().filter((function(e){return e.state!==F.jm8.ENDED&&e.channelId===t.id}));(0,s.ZDy)(fn((function(){var o,i;return En(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:o=a.sent(),i=o.default;return[2,function(n){return(0,r.jsx)(i,bn(yn({},n),{guild:f,channel:t,streamUserId:1===e.length?e[0].ownerId:null,source:F.t4x.GUILD_CHANNELS,guildScheduledEvent:p}))}]}}))})))}},f=(0,c.e7)([$e.Z],(function(){return $e.Z.getGuild(t.getGuildId())})),d=(0,c.e7)([tn.Z],(function(){return tn.Z.getStageInstanceByChannel(t.id)}),[t.id]),p=(0,c.e7)([Jt.ZP],(function(){return Jt.ZP.getActiveEventByChannel(t.id)}),[t.id]),h=(0,c.e7)([j.Z],(function(){return(0,$t.b)(j.Z,f,t,d)})),y=(0,c.e7)([j.Z],(function(){
|
||
return j.Z.can(F.Plq.CREATE_INSTANT_INVITE,t)?G.Z.Messages.CREATE_INSTANT_INVITE:G.Z.Messages.INVITE_TO_SERVER}));if(a||!h)return null;var b=(0,r.jsx)(ln.Z,{width:16,height:16,className:cn().actionIcon,"aria-hidden":!0});i&&(b=(0,r.jsx)(Ft.Z,{tutorialId:"instant-invite",position:"left",children:(0,r.jsx)("div",{children:b})}));return(0,r.jsx)(s.ua7,{text:y,spacing:2,children:function(e){return(0,r.jsx)(s.P3F,bn(yn({className:cn().iconItem},e),{onClick:u,tabIndex:l,"aria-label":y,children:b}))}})}function _n(e){var t=e.channel,n=function(){(0,en._U)(t.guild_id,t.id)};return(0,r.jsx)(s.ua7,{text:G.Z.Messages.REMOVE_FAVORITE_SUGGESTION,spacing:2,children:function(e){return(0,r.jsx)(s.P3F,bn(yn({className:cn().iconItem},e),{onClick:n,"aria-label":G.Z.Messages.REMOVE_FAVORITE_SUGGESTION,children:(0,r.jsx)(on.Z,{width:16,height:16,className:cn().actionIcon})}))}})}function wn(e){var t=e.channel,n=function(){(0,en.dM)(t.guild_id,t.id,!0,{section:F.jXE.CHANNEL_LIST})};return(0,r.jsx)(s.ua7,{
|
||
text:G.Z.Messages.ADD_FAVORITE,spacing:2,children:function(e){return(0,r.jsx)(s.P3F,bn(yn({className:cn().iconItem},e),{onClick:n,"aria-label":G.Z.Messages.ADD_FAVORITE,children:(0,r.jsx)(rn.Z,{width:16,height:16,className:cn().actionIcon})}))}})}var xn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&mn(e,t)}(n,e);var t=On(n);function n(){dn(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderEditButton=function(){return(0,r.jsx)(Sn,yn({},this.props))};o.renderInviteButton=function(){return(0,r.jsx)(In,yn({},this.props))};o.renderRemoveSuggestionButton=function(){return(0,r.jsx)(_n,yn({},this.props))};o.renderAcceptSuggestionButton=function(){return(0,r.jsx)(wn,yn({},this.props))};o.getClassName=function(){var e=this.props;return jn(e.position,e.sortingPosition)};o.isDisabled=function(){
|
||
var e=this.props;return Cn(e.channel,e.sorting,e.sortingType)};return n}(o.PureComponent);xn.defaultProps={isDefaultChannel:!1};var Pn=n(630203);function Nn(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function An(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Nn(i,r,o,a,l,"next",e)}function l(e){Nn(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Tn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Zn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var Mn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}
|
||
o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};var Rn=vt((function(e){var t=e.guild,i=e.selectedChannelId,a=e.position,l=e.disableManageChannels,u=e.sorting,s=e.sortingType,f=e.sortingPosition,d=e.connectChannelDragSource,p=e.connectChannelDropTarget,h=e.tabIndex,y=(0,c.e7)([ie.Z,ve.ZP],(function(){var e=ve.ZP.getDirectoryChannelIds(t.id);return 0===e.length?null:ie.Z.getChannel(e[0])})),b=(0,c.e7)([ie.Z],(function(){return ie.Z.getChannel(null==y?void 0:y.parent_id)})),v=i===(null==y?void 0:y.id),g=(0,c.e7)([j.Z],(function(){return null!=b?j.Z.can(F.Plq.MANAGE_CHANNELS,b):null!=t&&j.Z.can(F.Plq.MANAGE_CHANNELS,t)})),E=o.useCallback((function(e){null!=y&&(0,O.jW)(e,An((function(){var e,t;return Mn(this,(function(o){switch(o.label){case 0:return[4,n.e(14284).then(n.bind(n,914284))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,Zn(function(e){
|
||
for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Tn(e,t,n[t])}))}return e}({},e),{channel:y}))}]}}))})))}),[y]);if(null==y)return null;var C,S=jn(a,f),I=Cn(y,u,s),_=(0,r.jsx)("div",{className:m()(S,(C={},Tn(C,cn().disabled,I),Tn(C,cn().selected,v),C)),"data-dnd-name":y.name,children:(0,r.jsxs)(Pn.Z,{className:cn().iconVisibility,channel:y,guild:t,selected:v,onContextMenu:E,forceInteractable:!0,children:[(0,r.jsx)(In,{channel:y,tabIndex:h}),(0,r.jsx)(Sn,{channel:y,disableManageChannels:l,tabIndex:h})]})});g&&(_=p(d(_)));return _}));const Ln=Rn;var Dn=n(318715),kn=n(418705),Un=n(336194),Bn=n(896490),Fn=n(404741),Gn=n(977997),Hn=n(784426),Vn=n(353886),Wn=(n(232100),
|
||
n(531441)),zn=n(102921),Yn=n(897196),Kn=n(290679),qn=n(795589),Qn=n.n(qn),Xn=n(411325),Jn=n.n(Xn);function $n(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function er(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$n(i,r,o,a,l,"next",e)}function l(e){$n(i,r,o,a,l,"throw",e)}a(void 0)}))}}function tr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function nr(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}
|
||
var rr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}
|
||
if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function or(e){var t=e.guild,i=e.selected,a=(0,Gn.Z)(t),l=(0,Bn.wE)(kn.z$.CHANNEL_BROWSER_NEW_BADGE_NUX),u=(0,Dn.ZP)([me.ZP],(function(){return me.ZP.hasUnread(t.id,Kn.W.GUILD_ONBOARDING_QUESTION)})),c=(0,Dn.ZP)([Fn.Z,me.ZP],(function(){var e=Fn.Z.lastFetchedAt(t.id),n=me.ZP.lastMessageId(t.id,Kn.W.GUILD_ONBOARDING_QUESTION);if(null==n)return!1;var r=zn.Z.extractTimestamp(n);return null!=e&&e>r})),f=!l||u,d=o.useCallback((function(){(0,Hn.uL)(F.Z5c.CHANNEL(t.id,a?Yn.oC.CUSTOMIZE_COMMUNITY:Yn.oC.CHANNEL_BROWSER))}),[t.id,a]),p=o.useCallback((function(e){(0,O.jW)(e,er((function(){var e,o;return rr(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(93087)]).then(n.bind(n,93087))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,nr(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){tr(e,t,n[t])}))}return e}({},e),{guild:t}))}]}}))})))}),[t]),h=null;!f||i||c||(h=(0,r.jsx)(Wn.IG,{color:Un.Z.unsafe_rawColors.BRAND_260.css,text:G.Z.Messages.NEW,className:Qn().newChannel}));return(0,r.jsx)("div",{className:m()(cn().containerDefault,tr({},cn().selected,i)),children:(0,r.jsx)("div",{className:m()(cn().iconVisibility,Jn().wrapper,tr({},Jn().modeSelected,i)),children:(0,r.jsx)("div",{className:Jn().content,children:(0,r.jsxs)(s.P3F,{className:Jn().mainContent,onClick:d,onContextMenu:p,children:[(0,r.jsx)("div",{className:Jn().iconContainer,children:(0,r.jsx)(Vn.Z,{className:Jn().icon})}),(0,r.jsx)("div",{className:Jn().name,children:a?G.Z.Messages.CHANNELS_AND_ROLES:G.Z.Messages.CHANNEL_BROWSER_TITLE}),h]})})})})}var ir=n(761953),ar=n(945549),lr=n(83527),ur=n(409005)
|
||
;function cr(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function sr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){cr(i,r,o,a,l,"next",e)}function l(e){cr(i,r,o,a,l,"throw",e)}a(void 0)}))}}function fr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function dr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){fr(e,t,n[t])}))}return e}function pr(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e)
|
||
;t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var hr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}
|
||
if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function yr(e){var t=e.guild,i=e.selected,a=(0,u.JA)("home-tab-".concat(t.id)),l=Ae.bO.useExperiment({}).showBadge;o.useEffect((function(){Ae.bO.trackExposure({})}),[]);var f,d=(0,Le.g)(t.id),p=(0,c.e7)([me.ZP],(function(){return me.ZP.hasUnread(t.id,Kn.W.GUILD_HOME)&&l}),[t.id,l]);return(0,r.jsxs)("div",{className:m()(cn().iconVisibility,Jn().wrapper,(f={},fr(f,Jn().modeSelected,i),fr(f,Jn().modeUnread,p),f)),children:[p&&!i&&(0,r.jsx)("div",{className:m()(Jn().unread,Jn().unreadRelevant)}),(0,r.jsx)("div",{className:Jn().content,children:(0,r.jsxs)(s.P3F,pr(dr({},a),{className:Jn().mainContent,onClick:function(){(0,ar.X)(t.id);(0,
|
||
Hn.uL)(F.Z5c.CHANNEL(t.id,Yn.oC.GUILD_HOME))},onContextMenu:function(e){(0,O.jW)(e,sr((function(){var e,o;return hr(this,(function(i){switch(i.label){case 0:return[4,n.e(7799).then(n.bind(n,407799))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,pr(dr({},e),{guildId:t.id}))}]}}))})))},onMouseDown:function(){ir.Z.preload(t.id,Yn.oC.GUILD_HOME)},children:[(0,r.jsx)("div",{className:Jn().iconContainer,children:d?(0,r.jsx)(ur.Z,{className:Jn().icon}):(0,r.jsx)(lr.Z,{className:Jn().icon})}),(0,r.jsx)("div",{className:Jn().name,children:d?G.Z.Messages.SERVER_GUIDE:G.Z.Messages.GUILD_HOME})]}))})]})}var br=n(120306);function vr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function mr(e){var t=e.guild,n=e.selected;return(0,r.jsx)("div",{className:m()(cn().containerDefault,vr({},cn().selected,n)),children:(0,r.jsx)("div",{className:m()(cn().iconVisibility,Jn().wrapper,vr({},Jn().modeSelected,n)),children:(0,
|
||
r.jsx)("div",{className:Jn().content,children:(0,r.jsxs)(s.P3F,{className:Jn().mainContent,onClick:function(){(0,Hn.uL)(F.Z5c.CHANNEL(t.id,Yn.oC.MEMBER_APPLICATIONS))},children:[(0,r.jsx)("div",{className:Jn().iconContainer,children:(0,r.jsx)(br.Z,{className:Jn().icon,width:24,height:24})}),(0,r.jsx)("div",{className:Jn().name,children:G.Z.Messages.MEMBER_VERIFICATION_MEMBER_APPLICATIONS})]})})})})}var gr=n(795470),Or=n(689175),Er=n(592659),Cr=n(133998),jr=n.n(Cr);function Sr(e,t){return(0,r.jsx)(s.xvT,{variant:"text-xs/bold",color:"text-normal",children:e},t)}var Ir=o.memo((function(e){var t=e.guild,n=(0,c.e7)([Re.Z],(function(){return Re.Z.getNewMemberActions(t.id)})),i=(0,c.e7)([Or.Z],(function(){return Or.Z.getCompletedActions(t.id)})),a=o.useMemo((function(){if(null==n||null==i)return 0;var e=0;n.forEach((function(t){null!=i[t.channelId]&&e++}));return e}),[i,n]),l=null==n?0:n.length;return(0,r.jsxs)(s.P3F,{className:jr().progressBarContainer,onClick:function(){(0,
|
||
Hn.uL)(F.Z5c.CHANNEL(t.id,Yn.oC.GUILD_HOME))},children:[(0,r.jsxs)("div",{className:jr().progressBarText,children:[(0,r.jsx)(s.X6q,{variant:"heading-sm/bold",children:G.Z.Messages.GUILD_ONBOARDING_NEW_MEMBER_PROGRESS_BAR_GET_STARTED}),(0,r.jsxs)("div",{className:jr().rightContainer,children:[(0,r.jsx)(s.xvT,{variant:"text-xs/medium",color:"text-muted",className:jr().rightText,children:G.Z.Messages.GUILD_ONBOARDING_NEW_MEMBER_PROGRESS_BAR_COUNTER.format({numberHook:Sr,total:l.toString(),completed:a.toString()})}),(0,r.jsx)(S.Z,{className:jr().arrow,width:16,height:16,direction:S.Z.Directions.RIGHT})]})]}),(0,r.jsx)(Er.Z,{foregroundGradientColor:[(0,gr.Lq)(F.Ilk.GREEN_300),(0,gr.Lq)(F.Ilk.GREEN_230)],percent:a/l*100+3,animate:!0})]})})),_r=n(772040),wr=n(366007);function xr(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Pr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n)
|
||
;function a(e){xr(i,r,o,a,l,"next",e)}function l(e){xr(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Nr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ar(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var Tr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){
|
||
if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Zr(e){var t=e.guild,o=e.selected;return(0,r.jsx)("div",{className:m()(cn().containerDefault,Nr({},cn().selected,o)),children:(0,r.jsx)("div",{
|
||
className:m()(cn().iconVisibility,Jn().wrapper,Nr({},Jn().modeSelected,o)),children:(0,r.jsx)("div",{className:Jn().content,children:(0,r.jsxs)(s.P3F,{className:Jn().mainContent,onClick:function(){(0,Hn.uL)(F.Z5c.CHANNEL(t.id,Yn.oC.ROLE_SUBSCRIPTIONS))},onContextMenu:function(e){null!=t&&(0,O.jW)(e,Pr((function(){var e,o;return Tr(this,(function(i){switch(i.label){case 0:return[4,n.e(27314).then(n.bind(n,727314))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,Ar(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Nr(e,t,n[t])}))}return e}({},e),{guild:t}))}]}}))})))},children:[(0,r.jsx)("div",{className:Jn().iconContainer,children:(0,r.jsx)(_r.Z,{className:Jn().icon,color:o?wr.JX.CREATOR_REVENUE:void 0})}),(0,
|
||
r.jsx)("div",{className:Jn().name,children:G.Z.Messages.GUILD_ROLE_SUBSCRIPTIONS_CHANNEL_LABEL})]})})})})}var Mr=n(487685),Rr=n(367406),Lr=n(407561);function Dr(e){return null!=e&&e>0}var kr=n(708258),Ur=n(542231),Br=n(883825),Fr=n.n(Br);function Gr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Hr(e){var t,n=e.total,o=e.users,i=e.videoLimit;return(0,r.jsxs)("div",{className:Fr().wrapper,children:[(0,r.jsxs)("span",{className:m()(Fr().users,(t={},Gr(t,Fr().video,i),Gr(t,Fr().extraLong,o>=100),t)),children:[i?(0,r.jsx)(Ur.Z,{className:Fr().videoIcon}):null,o.toString().padStart(2,"0")]}),(0,r.jsx)("span",{className:m()(Fr().total,Gr({},Fr().extraLong,n>=100)),children:n.toString().padStart(2,"0")})]})}function Vr(e){var t=e.channel,n=e.video,o=e.userCount,i=(0,kr.Z)(t).limit,a=-1,l=!1;t.userLimit>0&&(a=t.userLimit);if(n&&i>0){l=a<0||i<a;a=a>0?Math.min(a,i):i}return(0,r.jsx)(Hr,{users:o,total:a,videoLimit:l})}
|
||
var Wr=n(550744),zr=n.n(Wr);function Yr(e){var t=e.mentionsCount;return(0,r.jsx)("div",{className:zr().mentionsBadge,"aria-hidden":!0,children:(0,r.jsx)(Wn.mA,{count:t})})}var Kr=n(973198),qr=n(379364),Qr=n(948025),Xr=n.n(Qr);function Jr(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function $r(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Jr(i,r,o,a,l,"next",e)}function l(e){Jr(i,r,o,a,l,"throw",e)}a(void 0)}))}}function eo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function to(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){eo(e,t,n[t])}))}return e}
|
||
function no(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ro(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var oo=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},
|
||
"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function io(e){
|
||
var t,i=e.thread,a=e.isSelectedChannel,l=e.isSelectedVoice,f=e.isLast,d=(0,c.e7)([ae.ZP],(function(){return ae.ZP.getVoiceStatesForChannel(i)}),[i]),p=(0,c.e7)([Lr.Z],(function(){return Lr.Z.hasVideo(i.id)})),h=(0,c.cj)([me.ZP],(function(){return{unread:me.ZP.hasUnread(i.id),mentionCount:me.ZP.getMentionCount(i.id)}})),y=h.unread,b=h.mentionCount,v=(0,c.e7)([Mr.Z],(function(){return Mr.Z.isMuted(i.id)})),g=o.useCallback((function(e){(0,Rr.ok)(i,!e.shiftKey,qr.on.CHANNEL_LIST)}),[i]),E=o.useCallback((function(){ir.Z.preload(i.guild_id,i.id)}),[i.guild_id,i.id]),C=o.useCallback((function(e){var t=ie.Z.getChannel(i.id);null!=t&&(0,O.jW)(e,$r((function(){var e,o;return oo(this,(function(i){switch(i.label){case 0:return[4,n.e(81580).then(n.bind(n,881580))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,no(to({},e),{channel:t}))}]}}))})))}),[i.id]),j=null==d?0:d.length,S=(0,
|
||
u.JA)(i.id),I=S.role,_=ro(S,["role"]),w=o.useRef(null),x=o.useRef(null),P=b>0?G.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL_WITH_MENTIONS.format({channelName:i.name,mentionCount:b}):y?G.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL_WITH_UNREADS.format({channelName:i.name}):G.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL.format({channelName:i.name});return(0,r.jsxs)("li",{role:I,className:m()(cn().containerDefault,eo({},cn().selected,a)),children:[(0,r.jsx)(ao,{}),f?null:(0,r.jsx)(ao,{style:{transform:"rotateX(180deg) translateY(-9px)"}}),(0,r.jsx)(s.tEY,{focusTarget:w,ringTarget:x,offset:{top:2,bottom:2,right:4},children:(0,r.jsxs)("div",{className:m()(cn().iconVisibility,Jn().wrapper,Jn().typeThread,(t={},eo(t,Jn().modeSelected,a),eo(t,Jn().modeMuted,!a&&v),eo(t,Jn().modeUnread,!v&&!a&&y),t)),onMouseDown:E,onContextMenu:C,children:[!y||v||a?null:(0,r.jsx)("div",{className:m()(Jn().unread,Jn().unreadRelevant)}),(0,r.jsx)("div",{className:Jn().content,ref:x,children:(0,r.jsxs)(s.P3F,no(to({
|
||
innerRef:w,className:m()(Jn().mainContent,Jn().threadMainContent),onClick:g},_),{"aria-label":P,focusProps:{enabled:!1},children:[(0,r.jsx)(gt.Z,{className:m()(Jn().name,Jn().channelName),"aria-hidden":!0,children:i.name}),(0,r.jsxs)("div",{className:Jn().children,children:[j>0&&i.userLimit>0?(0,r.jsx)(Vr,{userCount:j,video:p,channel:i}):null,Dr(b)?(0,r.jsx)(Yr,{mentionsCount:b}):null]})]}))})]})}),(0,r.jsx)(Kr.Z,{channel:i,collapsed:!l,collapsedMax:6,voiceStates:d,location:F.Sbl.GUILD_CHANNEL_LIST})]})}function ao(e){var t=e.style;return(0,r.jsx)("svg",{className:Xr().spine,width:"12",height:"11",viewBox:"0 0 12 11",fill:"none","aria-hidden":!0,style:t,children:(0,r.jsx)("path",{d:"M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",fill:"currentColor"})})}const lo=o.memo(io);function uo(e){
|
||
var t=e.channel,n=e.selectedChannel,o=e.selectedVoiceChannelId,i=e.sortedThreadIds,a=(0,c.Wu)([ie.Z],(function(){return i.map((function(e){return ie.Z.getChannel(e)})).filter(le.lm)}),[i]),l=(0,c.e7)([ae.ZP],(function(){var e=a[a.length-1];if(null==e)return 0;var t=ae.ZP.getVoiceStates(e.guild_id)[e.id];return null==t||0===t.length?0:o!==e.id?40:32*t.length+8}));return(0,r.jsx)("li",{className:Xr().container,children:(0,r.jsxs)("ul",{role:"group","aria-label":G.Z.Messages.THREAD_GROUP_A11Y_LABEL.format({channelName:t.name}),children:[(0,r.jsx)("div",{className:Xr().spineBorder,style:{bottom:24+l}}),a.map((function(e,t){return(0,r.jsx)(lo,{thread:e,isSelectedChannel:(null==n?void 0:n.id)===e.id,isSelectedVoice:o===e.id,isLast:t===a.length-1},e.id)}))]})})}const co=o.memo(uo);var so=n(247250),fo=n(387927),po=n(959468),ho=n(276985),yo=n(716371),bo=n(414306),vo=n(84441),mo=n(852626),go=n(426797),Oo=n(746477),Eo=n(473903),Co=n(58118),jo=n(415788),So=n.n(jo);function Io(e,t,n,r,o,i,a){try{
|
||
var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function _o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Io(i,r,o,a,l,"next",e)}function l(e){Io(i,r,o,a,l,"throw",e)}a(void 0)}))}}function wo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function xo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){wo(e,t,n[t])}))}return e}function Po(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var No,Ao=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1]
|
||
;break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};!function(e){e[e.VOICE=0]="VOICE"}(No||(No={}));const To=function(e){var t=e.type,o=e.guildId,i=e.closePopout,a=(0,Oe.Dt)(),l=(0,c.e7)([Oo.Z],(function(){return Oo.Z.getCheck(o)}),[o]),u=l.notClaimed,f=l.notEmailVerified,d=l.notPhoneVerified,p=l.newAccount,h=l.newMember,y=t===No.VOICE?G.Z.Messages.GUILD_VERIFICATION_VOICE_HEADER:null,b=null,v=null;if(t===No.VOICE)if(u){b=G.Z.Messages.GUILD_VERIFICATION_VOICE_NOT_CLAIMED;v=G.Z.Messages.CLAIM_ACCOUNT}else if(d){b=G.Z.Messages.GUILD_VERIFICATION_VOICE_NOT_PHONE_VERIFIED;v=G.Z.Messages.VERIFY_PHONE}else if(f){b=G.Z.Messages.GUILD_VERIFICATION_VOICE_NOT_VERIFIED;v=G.Z.Messages.RESEND_VERIFICATION_EMAIL}else if(h){b=G.Z.Messages.GUILD_VERIFICATION_VOICE_MEMBER_AGE.format({
|
||
min:F.fDV.MEMBER_AGE});v=G.Z.Messages.OKAY}else if(p){b=G.Z.Messages.GUILD_VERIFICATION_VOICE_ACCOUNT_AGE.format({min:F.fDV.ACCOUNT_AGE});v=G.Z.Messages.OKAY}if(null==y||null==b)return null;return(0,r.jsxs)(s.VqE,{className:So().container,"aria-labelledby":a,children:[(0,r.jsx)("img",{alt:"",className:So().image,src:n(522873)}),(0,r.jsxs)("div",{className:So().content,children:[(0,r.jsx)(s.X6q,{variant:"heading-md/semibold",id:a,children:y}),(0,r.jsx)(s.xvT,{color:"header-secondary",variant:"text-sm/normal",children:b}),(0,r.jsxs)("div",{className:So().buttonContainer,children:[null!=v?(0,r.jsx)(s.zxk,{onClick:function(){if(u)mo.j();else if(d)(0,s.ZDy)(_o((function(){var e,t;return Ao(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(11177)]).then(n.bind(n,411177))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,xo({reason:go.L.GUILD_PHONE_REQUIRED},e))}]}}))})),{modalKey:Co.M});else if(f){vo.Z.verifyResend();(0,s.h7j)((function(e){
|
||
var t;return(0,r.jsx)(s.sm4,Po(xo({header:G.Z.Messages.VERIFICATION_EMAIL_TITLE,confirmText:G.Z.Messages.OKAY,confirmButtonColor:s.zxk.Colors.BRAND},e),{children:(0,r.jsx)(s.xvT,{variant:"text-md/normal",children:G.Z.Messages.VERIFICATION_EMAIL_BODY.format({email:null===(t=Eo.default.getCurrentUser())||void 0===t?void 0:t.email})})}))}))}i()},className:So().primaryButton,children:v}):null,u||d||f?(0,r.jsx)(s.zxk,{onClick:i,look:s.zxk.Looks.BLANK,className:So().cancel,children:G.Z.Messages.NEVERMIND}):null]})]})]})};var Zo=n(451458),Mo=n(915840),Ro=n(442812),Lo=n(713717),Do=n(736818),ko=n(933022);var Uo,Bo=n(455771);!function(e){e[e.NORMAL=0]="NORMAL";e[e.START_EVENT=1]="START_EVENT"}(Uo||(Uo={}));function Fo(e){var t=(0,Bo.Z)(e),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,c.cj)([ko.ZP,Do.default],(function(){var n=Do.default.getId();return ko.ZP.getPermissionsForUser(n,e,t)}),[e,t])}(e,!0).moderator;return!t&&n?Uo.START_EVENT:Uo.NORMAL}
|
||
var Go=n(980617),Ho=n(921122),Vo=n(933954),Wo=n(438355),zo=n(358969),Yo=n(124296),Ko=n(957361),qo=n.n(Ko);function Qo(e){var t=e.locked;return(0,r.jsx)("div",{className:m()(cn().iconItem,qo().premiumChannelIcon),children:(0,r.jsx)(Yo.Z,{className:cn().actionIcon,useGradient:t})})}var Xo=n(337207),Jo=n(18882),$o=n(913302);function ei(e){var t=e.channel,n=e.locked,r=e.video,o=e.selected,i=(0,kr.Z)(t).limit,a=-1;t.userLimit>0&&(a=t.userLimit);r&&i>0&&(a=a>0?Math.min(a,i):i);return a>0&&!n&&!o}var ti=n(125680);function ni(e){var t,n=e.channel,o=e.highlighted,i=e.isChannelSelected,a=e.isChannelCollapsed,l=e.voiceStates,u=e.enableConnectedUserLimit,f=e.enableActivities,d=e.isSubscriptionGated,p=e.needSubscriptionToAccess,h=e.isNewChannel,y=e.muted,b=(0,c.e7)([me.ZP],(function(){return me.ZP.getMentionCount(n.id)})),v=(0,Vo.ZP)(n),m=(0,c.e7)([j.Z],(function(){return!j.Z.can(F.Plq.CONNECT,n)})),g=(0,c.e7)([Lr.Z],(function(){return Lr.Z.hasVideo(n.id)})),O=(0,
|
||
Lo.PK)(n.id)&&n.isGuildStageVoice(),E=ei({channel:n,locked:m,video:g||O,selected:i}),C=(0,Xo.ar)(),S=(0,c.e7)([Jo.Z],(function(){return Jo.Z.getNewThreadCount(n.guild_id,n.id)})),I=(0,zo.n2)(n.guild_id,n.id);if(Dr(b))return(0,r.jsx)(Yr,{mentionsCount:b});if(h)return(0,r.jsx)(Wn.IG,{text:G.Z.Messages.NEW,color:Un.Z.unsafe_rawColors.BRAND_260.css,className:Qn().newChannel});if(o)return(0,r.jsx)(Wo.Z,{width:16,height:16});if(!y&&n.isForumChannel()&&null!=S&&S>0)return(0,r.jsx)(s.xvT,{variant:"text-xs/semibold",color:"text-brand",children:G.Z.Messages.CHANNEL_NEW_POSTS_LABEL.format({count:(0,Wn.NG)(S)})});if(!y&&n.isForumChannel()&&null!=I&&I>0)return(0,r.jsx)(s.xvT,{variant:"text-xs/semibold",color:"text-muted",children:(0,Wn.NG)(I)});var _=null!==(t=null==l?void 0:l.length)&&void 0!==t?t:0;return null!=u&&u&&E?(0,r.jsx)(Vr,{userCount:_,video:g||O,channel:n}):C&&a&&(0,$o.a)(l)?(0,r.jsx)(Wn.IG,{text:G.Z.Messages.LIVE,color:Un.Z.unsafe_rawColors.RED_400.css}):null!=f&&f&&function(e){
|
||
return e.length>0}(v)?(0,r.jsx)(ti.Z,{embeddedApps:v}):d?(0,r.jsx)(Qo,{locked:p}):null}var ri=n(485911),oi=n(314824),ii=n.n(oi);function ai(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function li(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ai(i,r,o,a,l,"next",e)}function l(e){ai(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ui(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ci(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function si(e){si=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return si(e)}function fi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ci(e,t,n[t])}))}return e}function di(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function pi(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function hi(e,t){return!t||"object"!==bi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yi(e,t){yi=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return yi(e,t)}var bi=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function vi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=si(e);if(t){var o=si(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return hi(this,n)}}var mi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},
|
||
trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},gi=function(e){
|
||
!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&yi(e,t)}(o,e);var t=vi(o);function o(){ui(this,o);var e;(e=t.apply(this,arguments)).state={shouldShowGuildVerificationPopout:!1};e.closeGuildVerificationPopout=function(){e.setState({shouldShowGuildVerificationPopout:!1})};e.handleClick=function(){var t=e.props,n=t.channel,r=t.locked,o=t.connected,i=t.unverifiedAccount,a=n.getGuildId();null!=a&&(0,yo.n)(a)&&(0,ho.hk)(a);i&&e.setState({shouldShowGuildVerificationPopout:!0});r||o||(0,Mo.Cq)(n);__OVERLAY__||(0,Zo.Kh)(n.id)};e.handleClickChat=function(){var t=e.props,n=t.channel,r=t.locked;__OVERLAY__||r||(0,Zo.Kh)(n.id)};e.handleContextMenu=function(t){var o=e.props.channel,i=$e.Z.getGuild(o.getGuildId());null!=i&&(0,O.jW)(t,li((function(){var e,t;return mi(this,(function(a){switch(a.label){case 0:
|
||
return[4,Promise.all([n.e(84663),n.e(58539),n.e(26981)]).then(n.bind(n,926981))];case 1:e=a.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,di(fi({},e),{channel:o,guild:i}))}]}}))})))};e.renderPopout=function(){var t=e.props.channel;if(e.state.shouldShowGuildVerificationPopout)return(0,r.jsx)(To,{type:No.VOICE,guildId:t.guild_id,closePopout:e.closeGuildVerificationPopout});throw new Error("VoiceChannel.renderPopout: There must always be something to render")};e.renderOpenChatButton=function(){var t=e.props,n=t.channel,o=t.locked;if(n.isGuildStageVoice()&&(0,Go.Og)(n.guild_id)&&!o)return(0,r.jsx)(s.ua7,{text:G.Z.Messages.OPEN_CHAT,spacing:2,children:function(t){var o=t.onMouseEnter,i=t.onMouseLeave,a=t.onFocus,l=t.onBlur;return(0,r.jsx)(s.P3F,{className:m()(cn().iconItem,cn().openChatIconItem),onClick:function(){so.Z.updateChatOpen(n.id,!0);e.handleClickChat()},"aria-label":G.Z.Messages.OPEN_CHAT,onMouseEnter:o,onMouseLeave:i,onFocus:a,onBlur:l,children:(0,r.jsx)(Ho.Z,{
|
||
width:16,height:16,className:cn().actionIcon})})}})};e.getTooltipText=function(){var t=e.props.connected;return e.isFull()&&!t?G.Z.Messages.UNABLE_TO_JOIN_CHANNEL_FULL:null};return e}var i=o.prototype;i.getVoiceStatesCount=function(){var e,t=this.props.voiceStates;return null!==(e=null==t?void 0:t.length)&&void 0!==e?e:0};i.isFull=function(){var e=this.props.channel;return(0,Ce.rY)(e,Lr.Z,$e.Z)};i.getModeClass=function(){var e=this.props,t=e.position,n=e.sortingPosition;return e.isUserOver?cn().containerUserOver:null!=n?t>n?cn().containerDragAfter:cn().containerDragBefore:cn().containerDefault};i.renderVoiceUsers=function(){var e=this.props,t=e.channel,n=e.collapsed,o=e.tabIndex,i=e.speakerVoiceStates,a=e.numAudience;return(0,r.jsx)(Kr.Z,{channel:t,voiceStates:i,collapsed:n,tabIndex:o,location:F.Sbl.GUILD_CHANNEL_LIST,numAudience:a})};i.renderChannelInfo=function(){var e=this.props,t=e.channel,n=e.collapsed,o=e.isSubscriptionGated,i=e.needSubscriptionToAccess,a=e.voiceStates,l=(0,
|
||
Lo.xJ)(t.id);return(0,r.jsx)(ni,{channel:t,highlighted:!1,isChannelSelected:!1,isChannelCollapsed:n,voiceStates:a,isSubscriptionGated:o,needSubscriptionToAccess:i,enableConnectedUserLimit:l||t.userLimit>0&&t.userLimit<F.xGv})};i.render=function(){var e=this,t=this.props,n=t.channel,o=t.selected,i=t.connected,a=t.locked,l=t.connectChannelDropTarget,u=t.connectChannelDragSource,c=t.connectUserDropTarget,f=t.connectDragPreview,d=t.canReorderChannel,p=t.canMoveMembers,h=t.stageInstance,y=t.isSubscriptionGated,b=t.needSubscriptionToAccess,v=t.unread,g=t.mentionCount,O=t.isFavoriteSuggestion,E=t.emojiAndColor,C=this.state.shouldShowGuildVerificationPopout,j=this.getVoiceStatesCount(),S=(0,r.jsxs)("li",{className:m()(this.getModeClass(),ci({},cn().disabled,this.isDisabled())),"data-dnd-name":n.name,children:[(0,r.jsx)(s.yRy,{position:"right",renderPopout:this.renderPopout,spacing:0,onRequestClose:this.closeGuildVerificationPopout,shouldShow:C,children:function(){return(0,r.jsx)(s.ua7,{
|
||
text:e.getTooltipText(),children:function(t){var l=t.onClick,u=t.onContextMenu,c=pi(t,["onClick","onContextMenu"]);return(0,r.jsxs)(Pn.Z,di(fi({className:cn().iconVisibility,iconClassName:m()(ci({},ii().iconLive,null!=h)),channel:n,selected:!O&&o,connected:i,unread:i?v:void 0,mentionCount:g,locked:a,onClick:function(){e.handleClick();null==l||l()},onContextMenu:function(t){e.handleContextMenu(t);null==u||u()},connectDragPreview:f,subtitle:null==h?void 0:h.topic,isFavoriteSuggestion:O,emojiAndColor:E,"aria-label":(0,po.Z)({channel:n,unread:v,mentionCount:g,userCount:j,isSubscriptionGated:y,needSubscriptionToAccess:b})},c),{children:[O&&e.renderAcceptSuggestionButton(),O&&e.renderRemoveSuggestionButton(),!O&&e.renderOpenChatButton(),!O&&e.renderInviteButton(),!O&&e.renderEditButton(),!O&&e.renderChannelInfo()]}))}})}}),this.renderVoiceUsers()]});p&&(S=c(S));d&&(S=l(u(S)));return S};return o}(xn),Oi=vt((0,fo.Q)(gi));function Ei(e){
|
||
var t=e.guild,n=e.channel,o=e.disableSorting,i=e.isFavoriteCategory,a=e.emojiAndColor,l=(0,c.cj)([me.ZP],(function(){return{unread:me.ZP.hasUnread(n.id),mentionCount:me.ZP.getMentionCount(n.id)}})),u=(0,c.cj)([ie.Z,Oo.Z,j.Z],(function(){var e=ie.Z.getChannel(n.parent_id),r=Oo.Z.getCheck(n.guild_id);return{canManageChannel:null!=t&&j.Z.can(F.Plq.MANAGE_CHANNELS,n),canReorderChannel:!0!==o&&(t.id===ri._||(null!=e?j.Z.can(F.Plq.MANAGE_CHANNELS,e):j.Z.can(F.Plq.MANAGE_CHANNELS,t))),canMoveMembers:j.Z.can(F.Plq.MOVE_MEMBERS,n),locked:!j.Z.can(F.Plq.CONNECT,n),bypassLimit:j.Z.can(F.Plq.MOVE_MEMBERS,n),unverifiedAccount:!r.canChat}})),s=(0,c.e7)([Xe.Z],(function(){return Xe.Z.isCollapsed(n.parent_id)})),f=Fo(n.id),d=(0,c.e7)([tn.Z],(function(){return tn.Z.getStageInstanceByChannel(n.id)}),[n.id]),p=(0,Ro.Rk)(n.id,ce.pV.AUDIENCE),h=(0,bo.Z)(n.id),y=h.isSubscriptionGated,b=h.needSubscriptionToAccess,v=(0,c.e7)([mt.Z],(function(){return mt.Z.isFavorite(t.id,n.id)}));return(0,r.jsx)(Oi,di(fi({
|
||
categoryCollapsed:s,connectAction:f,numAudience:p,stageInstance:d,isSubscriptionGated:y,needSubscriptionToAccess:b},l,u,e),{isFavoriteSuggestion:i&&!v,emojiAndColor:a}))}function Ci(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function ji(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ci(i,r,o,a,l,"next",e)}function l(e){Ci(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Si(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ii(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _i(e){_i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return _i(e)}function wi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ii(e,t,n[t])}))}return e}function xi(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Pi(e,t){return!t||"object"!==Ai(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ni(e,t){Ni=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ni(e,t)}var Ai=function(e){
|
||
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Ti(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=_i(e);if(t){var o=_i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pi(this,n)}}var Zi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,
|
||
o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Mi(e){var t=e.getGuildId();if(null==t)throw new Error("TextChannel, transitionTo: Channel does not have a guildId");(0,Hn.uL)(F.Z5c.CHANNEL(t,e.id),{state:{analyticsSource:{page:F.ZY5.GUILD_CHANNEL,section:F.jXE.CHANNEL_LIST,object:F.qAy.CHANNEL}}})}function Ri(e,t){var n=t.getGuildId();if(null==n)throw new Error("TextChannel, preloadChannel: Channel does not have a guildId")
|
||
;ir.Z.preload(n,t.id)}var Li=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Ni(e,t)}(o,e);var t=Ti(o);function o(){Si(this,o);var e;(e=t.apply(this,arguments)).handleContextMenu=function(t){var o=e.props.channel,i=$e.Z.getGuild(o.getGuildId());null!=i&&(0,O.jW)(t,ji((function(){var e,t;return Zi(this,(function(a){switch(a.label){case 0:return[4,n.e(48372).then(n.bind(n,848372))];case 1:e=a.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,xi(wi({},e),{channel:o,guild:i}))}]}}))})))};e.handleClick=function(e){Mi(e)};return e}o.prototype.render=function(){var e=this.props,t=e.channel,n=e.selected,o=e.connectChannelDropTarget,i=e.connectChannelDragSource,a=e.connectDragPreview,l=e.canReorderChannel,u=(0,r.jsx)("li",{className:m()(this.getClassName(),Ii({},cn().disabled,this.isDisabled())),
|
||
"data-dnd-name":t.name,children:(0,r.jsxs)(Pn.Z,{className:cn().iconVisibility,channel:t,selected:n,onClick:this.handleClick,onMouseDown:Ri,onContextMenu:this.handleContextMenu,connectDragPreview:l?a:null,"aria-label":(0,po.Z)({channel:t}),children:[this.renderInviteButton(),this.renderEditButton()]})});return l?o(i(u)):u};return o}(xn),Di=vt(Li);const ki=o.memo((function(e){var t=e.channel,n=e.guild,o=e.disableSorting,i=(0,c.cj)([ie.Z,j.Z],(function(){var e=ie.Z.getChannel(t.parent_id);return{canManageChannel:j.Z.can(F.Plq.MANAGE_CHANNELS,t),canReorderChannel:!0!==o&&null!=e?j.Z.can(F.Plq.MANAGE_CHANNELS,e):j.Z.can(F.Plq.MANAGE_CHANNELS,n)}}));return(0,r.jsx)(Di,wi({},i,e))}));function Ui(e){if(null==e)return null;switch(e.type){case"embedded-activities":case"event":return{subtitle:e.name};case"go-live":return{subtitle:G.Z.Messages.GO_LIVE_SUBTITLE}}}var Bi=n(327566),Fi=n(510758),Gi=n(225386),Hi=n(385028),Vi=n(217973),Wi=n(775173),zi=n(327311),Yi=n.n(zi);function Ki(e,t,n,r,o,i,a){
|
||
try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function qi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ki(i,r,o,a,l,"next",e)}function l(e){Ki(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Qi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var Xi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:
|
||
a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Ji(e){var t=e.channel,i=(0,c.Wu)([Jo.Z,me.ZP,j.Z],(function(){var e=Jo.Z.getActiveJoinedRelevantThreadsForParent(t.guild_id,t.id);return a()(Jo.Z.getActiveJoinedThreadsForParent(t.guild_id,t.id)).values().map((function(e){return e.channel})).concat(a().values(Jo.Z.getActiveUnjoinedThreadsForParent(t.guild_id,t.id))).filter((function(t){return!(t.id in e)&&j.Z.can(F.Plq.VIEW_CHANNEL,t)})).sort((function(e,t){var n=me.ZP.lastMessageId(e.id),r=me.ZP.lastMessageId(t.id);return zn.Z.compare(n,r)
|
||
})).reverse().value()})),l=t.isForumChannel()?5:3;o.useEffect((function(){(0,Vi.q)()}),[]);return(0,r.jsxs)("div",{className:Yi().popout,children:[(0,r.jsx)(s.xvT,{className:Yi().title,variant:"text-xs/bold",color:"header-secondary",children:t.isForumChannel()?G.Z.Messages.ACTIVE_THREADS_POPOUT_HEADER_FORUM:G.Z.Messages.ACTIVE_THREADS_POPOUT_HEADER}),i.slice(0,t.isForumChannel()?i.length:l).map((function(e){return(0,r.jsx)($i,{thread:e},e.id)})).filter((function(e){return o.isValidElement(e)})).slice(0,l),(0,r.jsx)(s.P3F,{className:Yi().more,onClick:function(){t.isForumChannel()?(0,Zo.Kh)(t.id):(0,s.ZDy)(qi((function(){var e,o;return Xi(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(21588)]).then(n.bind(n,321588))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Qi(e,t,n[t])}))}return e}({channel:t},e))}]}}))})))},children:(0,r.jsx)(s.xvT,{variant:"text-sm/normal",color:"none",children:G.Z.Messages.ACTIVE_THREADS_POPOUT_LINK})})]})}function $i(e){var t=e.thread,n=(0,c.e7)([Eo.default],(function(){return Eo.default.getUser(t.ownerId)})),o=(0,Vi.Ok)(t);return(0,r.jsxs)(s.P3F,{className:Yi().row,onClick:function(e){(0,Rr.ok)(t,t.isForumPost()?e.shiftKey:!e.shiftKey,qr.on.POPOUT)},children:[null==n?(0,r.jsx)("img",{className:Yi().avatar,src:Wi.ZP.getDefaultAvatarURL(),alt:""}):(0,r.jsx)(Hi.Z,{className:Yi().avatar,user:n,size:s.EFr.SIZE_16}),(0,r.jsx)(s.xvT,{className:Yi().name,variant:"text-sm/normal",color:"none",children:t.name}),(0,r.jsxs)(s.xvT,{className:Yi().timestamp,variant:"text-sm/normal",color:"none",children:[(0,r.jsx)("span",{
|
||
className:Yi().bullet,children:"•"}),(0,Vi.Ye)(o)]})]})}function ea(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function ta(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ea(i,r,o,a,l,"next",e)}function l(e){ea(i,r,o,a,l,"throw",e)}a(void 0)}))}}function na(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ra(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function oa(e){oa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return oa(e)}function ia(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable
|
||
}))));r.forEach((function(t){ra(e,t,n[t])}))}return e}function aa(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function la(e,t){return!t||"object"!==ca(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ua(e,t){ua=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return ua(e,t)}var ca=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function sa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1
|
||
;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=oa(e);if(t){var o=oa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return la(this,n)}}var fa=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue
|
||
;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},da=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&ua(e,t)}(o,e);var t=sa(o);function o(){na(this,o);var e;(e=t.apply(this,arguments)).state={shouldShowThreadsPopout:!1};e.enterTimer=0;e.exitTimer=0;e.handleMouseEnter=function(){if(e.props.canShowThreadPreviewForUser){e.resetThreadPopoutTimers();e.enterTimer=setTimeout((function(){e.setState({shouldShowThreadsPopout:!0})}),200)}}
|
||
;e.handleMouseLeave=function(){e.resetThreadPopoutTimers();e.exitTimer=setTimeout((function(){e.state.shouldShowThreadsPopout&&e.setState({shouldShowThreadsPopout:!1})}),250)};e.handleThreadsPopoutClose=function(){e.resetThreadPopoutTimers();e.setState({shouldShowThreadsPopout:!1})};e.handleMouseDown=function(){e.handleThreadsPopoutClose();var t=e.props,n=t.channel,r=t.highlighted,o=n.getGuildId();ir.Z.preload(null!=o?o:F.ME,n.id,r)};e.renderThreadsPopout=function(t){return(0,r.jsx)(Ji,aa(ia({},t),{channel:e.props.channel}))};e.handleContextMenu=function(t){var o=e.props.channel;if(o.type!==F.d4z.GROUP_DM)if(o.type!==F.d4z.DM){var i=$e.Z.getGuild(o.getGuildId());null!=i&&(0,O.jW)(t,ta((function(){var e,t;return fa(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(84663),n.e(58539),n.e(11261)]).then(n.bind(n,811261))];case 1:e=a.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,aa(ia({},e),{channel:o,guild:i}))}]}}))})))}else{
|
||
var a=Eo.default.getUser(o.getRecipientId());null!=a&&(0,O.jW)(t,ta((function(){var e,t;return fa(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(50865)]).then(n.bind(n,550865))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,aa(ia({},e),{user:a,channel:o,showModalItems:!1}))}]}}))})))}else(0,O.jW)(t,ta((function(){var e,t;return fa(this,(function(i){switch(i.label){case 0:return[4,n.e(13035).then(n.bind(n,413035))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,aa(ia({},e),{channel:o,selected:!0}))}]}}))})))};return e}var i=o.prototype;i.componentWillUnmount=function(){this.resetThreadPopoutTimers()};i.resetThreadPopoutTimers=function(){clearTimeout(this.enterTimer);clearTimeout(this.exitTimer)};i.renderChannelInfo=function(){var e=this.props,t=e.channel,n=e.selected,o=e.highlighted,i=e.isSubscriptionGated,a=e.needSubscriptionToAccess,l=e.isNewChannel,u=e.muted;return(0,r.jsx)("div",{
|
||
className:cn().channelInfo,children:(0,r.jsx)(ni,{channel:t,highlighted:o,isChannelSelected:n,isChannelCollapsed:!1,isSubscriptionGated:i,needSubscriptionToAccess:a,isNewChannel:l,muted:u})})};i.render=function(){var e,t=this,n=this.props,o=n.channel,i=n.guild,a=n.selected,l=n.muted,u=n.unread,c=n.canHaveDot,f=n.relevant,d=n.hasActiveThreads,p=n.hasMoreActiveThreads,h=n.mentionCount,y=n.connectChannelDropTarget,b=n.connectChannelDragSource,v=n.connectDragPreview,g=n.canReorderChannel,O=n.isSubscriptionGated,E=n.isFavoriteSuggestion,C=n.subtitle,j=n.emojiAndColor,S=p,I=Ui(C),_=(0,r.jsx)("li",{className:m()(this.getClassName(),(e={},ra(e,cn().disabled,this.isDisabled()),ra(e,cn().selected,a),e)),"data-dnd-name":o.name,onMouseEnter:S?this.handleMouseEnter:void 0,onMouseLeave:S?this.handleMouseLeave:void 0,children:(0,r.jsx)(s.yRy,{position:"right",renderPopout:this.renderThreadsPopout,onRequestClose:this.handleThreadsPopoutClose,spacing:0,shouldShow:S&&this.state.shouldShowThreadsPopout,
|
||
children:function(){return(0,r.jsxs)(Pn.Z,{className:cn().iconVisibility,channel:o,guild:i,selected:!E&&a,muted:l,unread:u,canHaveDot:c,relevant:f,mentionCount:h,hasActiveThreads:d,subtitle:null==I?void 0:I.subtitle,subtitleColor:null==I?void 0:I.color,onMouseDown:t.handleMouseDown,onContextMenu:t.handleContextMenu,connectDragPreview:g?v:null,isFavoriteSuggestion:E,emojiAndColor:j,"aria-label":(0,po.Z)({channel:o,unread:u,mentionCount:h,isSubscriptionGated:O}),children:[E&&t.renderAcceptSuggestionButton(),E&&t.renderRemoveSuggestionButton(),!E&&t.renderInviteButton(),!E&&t.renderEditButton(),!E&&t.renderChannelInfo()]})}})});return g?y(b(_)):_};return o}(xn),pa=vt(da);function ha(e){var t=e.channel,n=e.guild,o=e.disableSorting,i=e.isFavoriteCategory,a=e.emojiAndColor,l=(0,Gi.JQ)(t),u=l.hasActiveThreads,s=l.hasMoreActiveThreads,f=(0,c.cj)([me.ZP],(function(){return{ackMessageId:me.ZP.ackMessageId(t.id),unread:me.ZP.hasUnread(t.id),mentionCount:me.ZP.getMentionCount(t.id)}})),d=(0,
|
||
c.e7)([me.ZP],(function(){return me.ZP.hasNotableUnread(t.id)})),p=(0,c.cj)([ie.Z,j.Z],(function(){var e=ie.Z.getChannel(t.parent_id);return{canManageChannel:j.Z.can(F.Plq.MANAGE_CHANNELS,t),canReorderChannel:!0!==o&&(n.id===ri._||(null!=e?j.Z.can(F.Plq.MANAGE_CHANNELS,e):j.Z.can(F.Plq.MANAGE_CHANNELS,n)))}})),h=(0,c.e7)([mt.Z],(function(){return mt.Z.isChannelRelevant(t)})),y=(0,re.sk)(t.guild_id),b=(0,Bi.rd)(t.id,f.ackMessageId).length>0,v=!(!y||!f.unread)&&b,m=(0,c.e7)([Fi.Z],(function(){return Fi.Z.shouldIndicateNewChannel(n.id,t.id)})),g=(0,bo.Z)(t.id),O=g.needSubscriptionToAccess,E=g.isSubscriptionGated,C=(0,c.e7)([mt.Z],(function(){return mt.Z.isFavorite(n.id,t.id)})),S=(0,c.e7)([Eo.default],(function(){var e=Eo.default.getCurrentUser();return null!=e&&(!t.isNSFW()||e.nsfwAllowed)}),[t]);return(0,r.jsx)(pa,aa(ia({},f,p,e),{highlighted:v,canHaveDot:d,hasActiveThreads:u,hasMoreActiveThreads:s,relevant:h,isSubscriptionGated:E,needSubscriptionToAccess:O,
|
||
isNewChannel:m&&e.canBeNewChannel,isFavoriteSuggestion:i&&!C,canShowThreadPreviewForUser:S,emojiAndColor:a}))}var ya=n(495085),ba=n(901654),va=n(294162),ma=n(377463),ga=n(58838);function Oa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ea(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ca(e){Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Ca(e)}function ja(e,t){return!t||"object"!==wa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sa(e,t){Sa=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Sa(e,t)}function Ia(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){
|
||
var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Oa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oa(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var _a,wa=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function xa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
|
||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ca(e);if(t){var o=Ca(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ja(this,n)}}!function(e){e.HIDDEN="hidden";e.UNREAD="unread";e.MENTIONS="mentions";e.VOICE_CHANNELS="voice-channels"}(_a||(_a={}));var Pa={mode:_a.HIDDEN,mentionCount:0,targetChannelId:null},Na={topBar:Pa,bottomBar:Pa},Aa={},Ta={};function Za(e){var t=ie.Z.getChannel(e);return null!=t&&null!=t.getGuildId()&&!t.isGuildVocal()&&(!(t.isThread()?Mr.Z.isMuted(t.id):mt.Z.isChannelMuted(t.getGuildId(),t.id))&&me.ZP.hasRelevantUnread(t))}function Ma(e){var t=ie.Z.getChannel(e);if(null==t)return!1;var n=t.getGuildId();if(null==n)return!1;var r=mt.Z.isGuildCollapsed(n),o=mt.Z.isChannelMuted(n,t.id);return(!r||!o)&&me.ZP.getMentionCount(e)>0}function Ra(e){
|
||
return e.isGuildStageVoice()?ue.Z.getMutableParticipants(e.id,ce.pV.SPEAKER).length>0:ae.ZP.getVoiceStatesForChannel(e).length>0}function La(e){var t,n=Se.Z.getGuildWithoutChangingCommunityRows(e).guildChannels,r=n.getChannels(null!==(t=Ta[e])&&void 0!==t?t:[]);if(null==r||0===r.length)return!1;for(var o,i=null,l=null,u=null,c=null,s=!0,f=!0,d=!1,p=n.getCategoryFromSection(n.voiceChannelsSectionNumber),h=null!==(o=null==p?void 0:p.getShownChannelIds())&&void 0!==o?o:[],y=Ia(n.getSlicedChannels(r),3),b=y[0],v=y[1],m=y[2],g=0;g<v.length;g++){var O=v[g];(Za(O.id)||a().some(O.threadIds,Za))&&(f=!1);(Ma(O.id)||a().some(O.threadIds,Ma))&&(s=!1);h.includes(O.id)&&(d=!0);if(!f&&!s&&d)break}var E=0,C=!1,j=0,S=!1;if(f||s)for(var I=b.length-1;I>=0;I--){var _=b[I];if(Za(_.id)||a().some(_.threadIds,Za)){null==l&&(l=_.id);C=!0}if(Ma(_.id)||a().some(_.threadIds,Ma)){null==i&&(i=_.id);E+=me.ZP.getMentionCount(_.id);E+=a().sumBy(_.threadIds,me.ZP.getMentionCount)}}if(f||s)for(var w=0;w<m.length;w++){
|
||
var x=m[w];if(!f&&!s)break;if(Za(x.id)||a().some(x.threadIds,Za)){null==c&&(c=x.id);S=!0}if(Ma(x.id)||a().some(x.threadIds,Ma)){null==u&&(u=x.id);j+=me.ZP.getMentionCount(x.id);j+=a().sumBy(x.threadIds,me.ZP.getMentionCount)}}var P,N=null,A=null,T=null!==(P=null==p?void 0:p.getChannelRecords())&&void 0!==P?P:[];s&&j>0?N={mode:_a.MENTIONS,mentionCount:j,targetChannelId:u}:!d&&a().some(T,Ra)?N={mode:_a.VOICE_CHANNELS,mentionCount:0,targetChannelId:null}:f&&S&&(N={mode:_a.UNREAD,mentionCount:0,targetChannelId:c});s&&E>0?A={mode:_a.MENTIONS,mentionCount:E,targetChannelId:i}:f&&C&&(A={mode:_a.UNREAD,mentionCount:0,targetChannelId:l});var Z=null!=A&&(null==N||N.mode!==_a.MENTIONS&&A.mode===_a.MENTIONS),M=null!=N&&(N.mode===_a.MENTIONS||!Z);Aa[e]={topBar:Z&&null!=A?A:Pa,bottomBar:M&&null!=N?N:Pa};return!0}var Da=a().throttle(La,200);function ka(e){var t=e.guildId;return!!(0,re.pE)(t)&&Da(t)}function Ua(e){var t=e.id,n=ie.Z.getChannel(t);return null!=n&&(!!(0,
|
||
re.pE)(n.guild_id)&&Da(n.guild_id))}function Ba(e){var t=e.channel,n=ie.Z.getChannel(t.id);return null!=n&&(!!(0,re.pE)(n.guild_id)&&Da(n.guild_id))}function Fa(e){var t=e.channelId,n=ie.Z.getChannel(t);return null!=n&&(!!(0,re.pE)(n.guild_id)&&(ge.Z.getGuildId()===n.guild_id&&Da(n.guild_id)))}var Ga=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Sa(e,t)}(n,e);var t=xa(n);function n(){Ea(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(Se.Z,me.ZP,mt.Z,Mr.Z,ae.ZP,ge.Z)};r.getUnreadStateForGuildId=function(e){var t;return null!==(t=Aa[e])&&void 0!==t?t:Na};r.__getLocalVars=function(){return{EMPTY_BAR:Pa,EMPTY_STATE:Na,unreadStatesByGuildId:Aa,visibleChannelIdsByGuildId:Ta,recalculate:Da}};return n}(c.ZP.Store);Ga.displayName="ChannelListUnreadsStore"
|
||
;const Ha=new Ga(_.Z,{UPDATE_CHANNEL_LIST_DIMENSIONS:function(e){var t=e.guildId,n=e.channelIds;if(!(0,re.pE)(t)||null==n)return!1;if(!a().isEqual(Ta[t],n)){Ta[t]=n;return La(t)}return!1},BULK_ACK:function(e){var t=e.channels,n=!1;a()(t).map((function(e){var t,n=e.channelId;return null===(t=ie.Z.getChannel(n))||void 0===t?void 0:t.guild_id})).filter(le.lm).uniq().forEach((function(e){(0,re.pE)(e)&&Da(e)&&(n=!0)}));return n},CHANNEL_ACK:Fa,CHANNEL_DELETE:Ba,CHANNEL_LOCAL_ACK:Fa,MESSAGE_ACK:Fa,MESSAGE_CREATE:Fa,MESSAGE_DELETE_BULK:Fa,MESSAGE_DELETE:Fa,PASSIVE_UPDATE_V1:function(e){return!(null==e.channels||!(0,re.pE)(e.guildId))&&Da(e.guildId)},RESORT_THREADS:Fa,THREAD_CREATE:Ba,THREAD_DELETE:Ba,THREAD_LIST_SYNC:ka,THREAD_MEMBER_UPDATE:Ua,THREAD_MEMBERS_UPDATE:Ua,THREAD_UPDATE:Ba,BULK_CLEAR_RECENTS:ka,CATEGORY_COLLAPSE_ALL:ka,CATEGORY_EXPAND_ALL:ka,VOICE_STATE_UPDATES:function(e){var t=e.voiceStates,n=ge.Z.getGuildId();if(null==n)return!1;if(!new Set(t.map((function(e){return e.guildId
|
||
}))).has(n))return!1;var r=Aa[n];return null!=r&&r.bottomBar.mode===_a.VOICE_CHANNELS&&Da(n)},USER_GUILD_SETTINGS_CHANNEL_UPDATE:function(e){var t=e.guildId,n=e.channelId;if(null==t||null==n)return!1;var r=Ta[t];return null!=r&&(!!r.includes(n)&&Da(t))}});var Va=n(57937),Wa=n.n(Va);function za(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var Ya={friction:30,tension:300};function Ka(e){var t,n=e.guildChannels,i=e.jumpToVoiceChannels,a=n.getCategoryFromSection(n.voiceChannelsSectionNumber),l=(0,ya.Z)(n.id),u=o.useCallback((function(e){e.preventDefault();e.stopPropagation();i()}),[i]),c=null!==(t=null==a?void 0:a.getChannelRecords())&&void 0!==t?t:[],f=(0,Ce.c4)(c,null,l);return(0,r.jsxs)(s.P3F,{className:m()(Wa().bar),onClick:u,children:[(0,r.jsx)(jt.Z,{className:Wa().voiceChannelsIcon,width:14,height:14,color:Un.Z.unsafe_rawColors.GREEN_330.css}),(0,r.jsx)(s.xvT,{variant:"text-xs/semibold",color:"text-positive",
|
||
className:Wa().barText,children:G.Z.Messages.VOICE_CHANNEL_BAR_ACTIVE.format({count:f.length})}),(0,r.jsx)(va.Z,{guildId:n.id,className:Wa().voiceChannelsUsers,users:f.slice(0,4),renderMoreUsers:function(){return null},max:4,size:s.EFr.SIZE_16})]})}function qa(e){var t,n=e.position,i=e.guildChannels,a=e.guildChannelsVersion,l=e.jumpToVoiceChannels,u=e.jumpToChannel,f=(0,c.cj)([Ha],(function(){return Ha.getUnreadStateForGuildId(i.id)})),d=f.bottomBar,p=f.topBar,y=(0,c.e7)([h.Z],(function(){return h.Z.useReducedMotion})),b=(0,c.e7)([ba.Z],(function(){return ba.Z.isFocused()})),v="bottom"===n?d:p,O=v.mode,E=v.mentionCount,C=v.targetChannelId,j=O===_a.HIDDEN,S="bottom"===n?"translateY(180%)":"translateY(-180%)",I=(0,g.useSpring)({to:{transform:j?S:"translateY(0%)"},config:Ya,immediate:y||!b}),_=o.useCallback((function(e){e.preventDefault();e.stopPropagation();null!=C&&u(C)}),[u,C]);return(0,r.jsx)("div",{className:m()(Wa().container,(t={},za(t,Wa().top,"top"===n),
|
||
za(t,Wa().bottom,"bottom"===n),t)),children:(0,r.jsx)(g.animated.div,{className:Wa().containerPadding,style:I,"aria-hidden":j,children:O===_a.HIDDEN?(0,r.jsx)("div",{className:m()(Wa().bar,Wa().emptyBar)}):O===_a.UNREAD?(0,r.jsxs)(s.P3F,{className:Wa().bar,onClick:_,children:["bottom"===n?(0,r.jsx)(ma.Z,{className:Wa().unreadIcon,height:14,width:14}):(0,r.jsx)(ga.Z,{className:Wa().unreadIcon,height:14,width:14}),(0,r.jsx)(s.xvT,{variant:"text-xs/semibold",color:"interactive-normal",className:Wa().barText,children:G.Z.Messages.NEW_UNREADS})]}):O===_a.MENTIONS?(0,r.jsx)(s.P3F,{className:m()(Wa().bar,Wa().mentionsBar),onClick:_,children:(0,r.jsx)(s.xvT,{variant:"text-xs/semibold",color:"status-danger-text",className:Wa().barText,children:G.Z.Messages.NEW_MENTIONS_COUNT.format({count:E})})}):O===_a.VOICE_CHANNELS?(0,r.jsx)(Ka,{jumpToVoiceChannels:l,guildChannels:i,guildChannelsVersion:a}):void 0})})}var Qa=n(487517),Xa=n(633997);function Ja(e,t,n){t in e?Object.defineProperty(e,t,{value:n,
|
||
enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function $a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function el(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function tl(e){var t=ie.Z.getChannel(e)
|
||
;return null!=t&&null!=t.getGuildId()&&(!(t.isThread()?Mr.Z.isMuted(t.id):mt.Z.isChannelMuted(t.getGuildId(),t.id))&&me.ZP.hasRelevantUnread(t))}function nl(e){var t=ie.Z.getChannel(e);if(null==t)return!1;var n=t.getGuildId();if(null==n)return!1;var r=mt.Z.isGuildCollapsed(n),o=mt.Z.isChannelMuted(n,t.id);return(!r||!o)&&me.ZP.getMentionCount(e)>0}const rl=o.forwardRef((function(e,t){var n=e.guildId,o=e.guildChannels,i=e.guildChannelsVersion,a=el(e,["guildId","guildChannels","guildChannelsVersion"]),l=(0,Qa.T)(n,o,i,!1,{ignoreRecents:!0}),u=(0,c.e7)([ba.Z],(function(){return ba.Z.isFocused()}));return(0,r.jsx)(Xa.Z,$a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ja(e,t,n[t])}))}return e}({ref:t},a),{isUnread:tl,isMentioned:nl,
|
||
items:l,animate:u}))}));var ol=n(570202);function il(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function al(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){il(i,r,o,a,l,"next",e)}function l(e){il(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ll(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ul(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ll(e,t,n[t])}))}return e}function cl(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var sl=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,
|
||
o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function fl(e){var t,n=e.selected,o=e.showUnread,i=e.handleClick,a=e.handleContextMenu,l=e.eventsMuted,u=e.rowLabel,c=e.mentionCount,f=e.listItemProps;return(0,r.jsx)("li",{className:m()(cn().containerDefault,ll({},cn().selected,n)),children:(0,r.jsxs)("div",{className:m()(cn().iconVisibility,Jn().wrapper,(t={},ll(t,Jn().modeSelected,n),ll(t,Jn().modeUnread,o),t)),children:[o&&(0,r.jsx)("div",{className:m()(Jn().unread,Jn().unreadRelevant)}),(0,r.jsx)("div",{className:Jn().content,children:(0,r.jsxs)(s.P3F,cl(ul({},f),{className:Jn().mainContent,onContextMenu:a,onClick:function(){i()},children:[(0,
|
||
r.jsx)("div",{className:Jn().iconContainer,children:(0,r.jsx)(ol.Z,{className:Jn().icon})}),(0,r.jsx)("div",{className:Jn().name,children:u}),!l&&c>0&&(0,r.jsx)(Wn.mA,{className:Jn().numberBadge,disableColor:!0,count:c})]}))})]})})}function dl(e){var t=e.guild,o=e.selected,i=(0,c.cj)([me.ZP],(function(){return{hasUnread:me.ZP.hasUnread(t.id,Kn.W.GUILD_EVENT),mentionCount:me.ZP.getMentionCount(t.id,Kn.W.GUILD_EVENT)}}),[t.id]),a=i.hasUnread,l=i.mentionCount,f=(0,c.e7)([mt.Z],(function(){return mt.Z.isMuteScheduledEventsEnabled(t.id)})),d=(0,u.JA)("upcoming-events-".concat(t.id));function p(){p=al((function(){return sl(this,(function(e){switch(e.label){case 0:return[4,(0,s.ZDy)(al((function(){var e,o;return sl(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(40706),n.e(89853)]).then(n.bind(n,389853))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,cl(ul({},e),{guildId:t.id}))}]}}))})))];case 1:e.sent();(0,
|
||
Bn.EW)(kn.z$.GUILD_HEADER_EVENT_UPSELL);return[2]}}))}));return p.apply(this,arguments)}var h=(0,Fe.ZP)(t.id),y=h.length>0?G.Z.Messages.GUILD_EVENTS_PLURAL.format({number:h.length}):G.Z.Messages.GUILD_EVENTS,b=a&&!f;return(0,r.jsx)(fl,{selected:o,showUnread:b,handleClick:function(){return p.apply(this,arguments)},handleContextMenu:function(e){(0,O.jW)(e,al((function(){var e,o;return sl(this,(function(i){switch(i.label){case 0:return[4,n.e(28008).then(n.bind(n,28008))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,cl(ul({},e),{guildId:t.id}))}]}}))})))},eventsMuted:f,rowLabel:y,mentionCount:l,listItemProps:d})}var pl=n(513328);function hl(e){var t=e.channel,n=e.embeddedApps;if(t.type!==F.d4z.GUILD_VOICE);else if(null!=n&&n.length>0){var r=n.map((function(e){return e.application.name}));return G.Z.Messages.GUILD_SIDEBAR_VOICE_CHANNEL_DESCRIBED_BY_LABEL_ACTIVITIES.format({activeActivities:r.join(", ")})}}
|
||
var yl=n(773011),bl=n(14096),vl=n(122590),ml=n(769321),gl=n(616679),Ol=n(357088),El=n(545580),Cl=n(71854),jl=n(542517),Sl=n(699248),Il=n(239813),_l=n(181763),wl=n(491260),xl=n(954979),Pl=n(754953),Nl=n(802467),Al=n(3564),Tl=n(749565),Zl=n(238871),Ml=n.n(Zl);function Rl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var Ll=Ee.u.SIZE_24;function Dl(e){var t,n=e.activity,i=e.user,a=e.embeddedApp,l=e.onOpenSpotifyAlbum,u=n.assets,c=n.application_id;if(null==u||null==u.large_image&&null==u.small_image)return null!=a?function(e){var t=Wi.ZP.getApplicationIconURL({id:e.application.id,icon:e.application.icon}),n=e.application.name;return(0,r.jsx)(s.ua7,{text:n,position:"top",
|
||
children:function(){return(0,r.jsx)("img",{alt:n,src:t,className:Ml().applicationLargeImage})}})}(a):null;var f,d=null!==(t=u.large_image)&&void 0!==t?t:u.small_image,p=(0,jl.Z)(n),h=p?Ml().spotifyLargeImage:Ml().applicationLargeImage,y=null!=d?(0,r.jsx)("img",{alt:null!==(f=u.large_text)&&void 0!==f?f:"",src:(0,Al.xF)(c,d,[128,128]),className:h}):null;if(p){y=(0,r.jsx)(s.P3F,{className:Ml().clickable,onClick:function(){l(n,i.id)},children:y});return(0,r.jsx)(s.ua7,{text:null!=u.large_text?u.large_text:null,position:"top",children:function(e){e.onClick;var t=Rl(e,["onClick"]);return null!=y?o.cloneElement(y,t):null}})}return y}function kl(e){var t=e.activity,n=e.embeddedApp,o=e.onOpenSpotifyTrack,i=t.details,a=t.name,l=a;if(null!=n)l=n.application.name;else{if(!(0,jl.Z)(t)||null==t.sync_id||null==i)return null;a=i;l=(0,r.jsx)(s.P3F,{className:Ml().headerLink,onClick:function(){o(t)},children:i})}return(0,r.jsx)(Nl.Z,{title:a,className:Ml().header,children:l})}function Ul(e){
|
||
var t=e.activity,n=e.user,o=e.onOpenSpotifyArtist,i=t.details,a=t.state,l=i;(0,jl.Z)(t)&&null!=a&&(l=[(0,r.jsx)(Pl.Z,{artists:a,linkClassName:Ml().bodyLink,canOpen:null!=t.sync_id,onOpenSpotifyArtist:function(e){o(t,n.id,e)}},a)]);return null==l||""===l?null:(0,r.jsx)("div",{className:m()(Ml().ellipsisRow,Ml().colorHeaderSecondary,Ml().bodyTextSize),children:l})}function Bl(e){var t=e.activity,n=t.state;return null==n||""===n||(0,jl.Z)(t)?null:(0,r.jsx)("div",{className:m()(Ml().ellipsisRow,Ml().colorHeaderSecondary,Ml().bodyTextSize,Ml().activity),children:n})}function Fl(e){var t=e.activity;if(!(0,jl.Z)(t))return null;var n=t.timestamps;if(null==(null==n?void 0:n.start)||null==(null==n?void 0:n.end))return null;var o=n.start,i=n.end;return(0,r.jsx)(xl.Z,{start:o,end:i,className:Ml().timeBar,themed:!0,singleLine:!0})}function Gl(e){var t=e.activity,n=e.embeddedApp,i=e.user,a=e.channel,l=e.sortedVoiceStates,u=e.onOpenSpotifyTrack,f=e.onOpenSpotifyArtist,d=e.onOpenSpotifyAlbum,p=[]
|
||
;null!=n?p=Array.from(n.embeddedActivity.connections.keys()):(0,jl.Z)(t)&&(p=l.map((function(e){return e.user.id})));var h=(0,c.Wu)([Eo.default],(function(){return p.map((function(e){return Eo.default.getUser(e)})).filter(le.lm)})),y=null!=n||(0,jl.Z)(t),b=o.useMemo((function(){var e=new Map;y&&l.forEach((function(t){var n=t.member;null!=n&&e.set(t.user.id,n)}));return e}),[l,y]);if(!y)return null;return(0,r.jsxs)("div",{className:Ml().flexColumn,children:[(0,r.jsxs)("div",{className:Ml().flexRow,children:[(0,r.jsx)(Dl,{activity:t,user:i,embeddedApp:n,onOpenSpotifyAlbum:d}),(0,r.jsxs)("div",{className:Ml().detailsAndAvatarsContainer,children:[(0,r.jsx)(kl,{activity:t,embeddedApp:n,onOpenSpotifyTrack:u}),(0,r.jsx)(Ul,{activity:t,user:i,onOpenSpotifyArtist:f}),(0,r.jsx)(Bl,{activity:t}),p.length>0&&(0,r.jsx)(Ee.Z,{className:Ml().usersSummary,guildId:a.guild_id,users:h,size:Ll,max:7,renderUser:function(e){if(null==e)return null
|
||
;var t,n=b.get(e.id),o=null!==(t=null==n?void 0:n.nick)&&void 0!==t?t:Tl.ZP.getName(e);return(0,r.jsx)(s.DY3,{text:o,position:"bottom",children:(0,r.jsx)("img",{src:e.getAvatarURL(a.guild_id,Ll),alt:o,className:Ml().avatar},e.id)},e.id)}})]})]}),(0,r.jsx)(Fl,{activity:t})]})}var Hl=n(363582),Vl=n(758338),Wl=n.n(Vl);function zl(e){var t=e.userCount;return(0,r.jsxs)("div",{className:Wl().container,children:[(0,r.jsx)(Hl.Z,{width:12,height:12,className:Wl().peopleIcon}),(0,r.jsx)(s.xvT,{variant:"text-sm/normal",color:"header-secondary",className:Wl().userCountText,children:t})]})}var Yl=n(99354),Kl=n.n(Yl);function ql(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ql(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Xl(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ql(i,r,o,a,l,"next",e)}function l(e){
|
||
Ql(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Jl(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function $l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Jl(e,t,n[t])}))}return e}function eu(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function tu(e){return function(e){
|
||
if(Array.isArray(e))return ql(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ql(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ql(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var nu=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,
|
||
r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function ru(e){var t=e.guildId,n=e.member,o=e.className,i=null!=n.member?(0,Wi.CA)(n.member):null;return(0,r.jsx)(s.ua7,{text:n.nick,position:"bottom",children:function(e){return(0,r.jsx)(s.qEK,$l({src:null!=i?i:n.user.getAvatarURL(t,16),size:s.EFr.SIZE_16,
|
||
className:m()(Kl().partyAvatar,o),"aria-label":n.nick},e))}})}function ou(e){var t=e.members,n=e.guildId;return(0,r.jsx)(va.Z,{className:Kl().partyMembers,guildId:n,users:t,max:6,renderUser:function(e,t,o){return(0,r.jsx)(ru,{guildId:n,member:e,className:t},o)},renderMoreUsers:function(e,t,n){return(0,r.jsx)("div",{className:m()(Kl().morePartyMembers,t),children:e},n)}})}function iu(e){var t=e.channel,i=e.guild,a=e.onAction,l=e.voiceStates,u=e.isChannelSelected,f=e.shouldShowSettingNudge;!function(e,t){var n=o.useMemo((function(){return null==t||t.length>50?{}:Jl({},e.getGuildId(),null!==(n=t.map((function(e){return e.user.id})))&&void 0!==n?n:[]);var n}),[e,t]);(0,Ol.$)(n)}(t,l);var d,p=(0,Vo.ZP)(t),h=new Map;p.forEach((function(e){h.set(e.application.id,e)}));var y,b=null!==(d=null==l?void 0:l.filter(le.lm))&&void 0!==d?d:[],v=function(e){return function(t){
|
||
return[F.IIU.PLAYING,F.IIU.WATCHING].includes(t.type)&&(null!=t.assets||null!=t.state||null!=t.details||null!=t.party)&&(null==t.session_id||t.session_id===e.voiceState.sessionId)||t.type===F.IIU.LISTENING}},m=(0,c.e7)([wl.Z],(function(){var e=new Map(h);b.forEach((function(t){var n=wl.Z.findActivity(t.user.id,v(t));if(null!=n&&(0,Cl.Z)(n)){var r=null!=n.application_id?e.get(n.application_id):null;null!=r&&null!=n.application_id&&e.set(n.application_id,eu($l({},r),{embeddedActivity:eu($l({},n),{application_id:r.embeddedActivity.application_id,connections:r.embeddedActivity.connections,url:r.embeddedActivity.url,guildId:r.embeddedActivity.guildId,channelId:r.embeddedActivity.channelId})}))}}));return e}),[b,h],c.pF),g=(0,c.e7)([wl.Z],(function(){var e={};b.forEach((function(t){var n=wl.Z.findActivity(t.user.id,v(t));if(null!=n&&!(0,Cl.Z)(n)){
|
||
var r,o,i,a,l="".concat(null!==(o=n.application_id)&&void 0!==o?o:"",":").concat(null!==(i=null===(r=n.party)||void 0===r?void 0:r.id)&&void 0!==i?i:t.user.id),u=null!==(a=e[l])&&void 0!==a?a:{members:[],activity:n};u.members.push(t);(0,El.Z)(u.activity,F.xjy.JOIN)||(u.activity=n);e[l]=u}}));return Object.values(e)}),[b],c.pF),O=tu(Array.from(m.values()).map((function(e){return{members:b,activity:e.embeddedActivity}}))).concat(tu(g));return 0===O.length?null:(0,r.jsxs)(s.Ttm,{className:Kl().container,children:[(0,r.jsx)(lu,{channel:t,isChannelSelected:u,voiceStatesCount:null!==(y=null==l?void 0:l.length)&&void 0!==y?y:0}),(0,r.jsx)("div",{className:Kl().headerDivider}),O.map((function(e,n){var o=e.members,i=e.activity,l=i.application_id,u=null!=l?m.get(l):void 0;return(0,r.jsx)(au,{activity:i,embeddedApp:u,channel:t,members:o,onAction:a},n)})),f&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:Kl().headerDivider}),(0,r.jsx)("div",{className:Kl().settingNudgeText,
|
||
children:(0,r.jsx)(s.xvT,{variant:"text-xs/normal",tag:"span",children:G.Z.Messages.VOICE_CHANNEL_ACTIVITY_STATUS_REDIRECT.format({onClick:function(){(0,s.ZDy)(Xl((function(){var e,t;return nu(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(30530)]).then(n.bind(n,124561))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,eu($l({},e),{guild:i}))}]}}))})))}})})})]})]})}var au=function(e){var t=e.channel,n=e.activity,o=e.members,i=e.embeddedApp,a=e.onAction,l=null!=i,u=l?Array.from(i.embeddedActivity.connections.keys()):[],s=(0,c.e7)([Eo.default,Do.default],(function(){if(o.length<=0)return null;if(l){var e,t;return null!==(t=null===(e=o.find((function(e){return e.voiceState.sessionId===(null==n?void 0:n.session_id)})))||void 0===e?void 0:e.user)&&void 0!==t?t:Eo.default.getUser(u[0])}var r,i;return null!==(i=null===(r=o.find((function(e){return e.user.id!==Do.default.getId()})))||void 0===r?void 0:r.user)&&void 0!==i?i:o[0].user}))
|
||
;if(null==s)return null;var f=l||(0,jl.Z)(n);return(0,r.jsxs)("div",{className:Kl().activity,children:[(0,r.jsx)("div",{className:Kl().channelActivityContainer,children:f?(0,r.jsx)(Gl,{activity:n,embeddedApp:i,user:s,channel:t,sortedVoiceStates:o,onOpenSpotifyTrack:_l.aG,onOpenSpotifyArtist:_l.d$,onOpenSpotifyAlbum:_l.Z5}):(0,r.jsx)(gl.Z,{type:gl.P.VOICE_CHANNEL,activity:n,user:s,guildId:t.getGuildId(),channelId:t.id,renderHeaderAccessory:function(){return(0,r.jsx)(ou,{guildId:t.guild_id,members:o})},isEmbedded:l})}),(0,r.jsx)("div",{className:Kl().activityActionsContainer,children:(0,r.jsx)(Sl.Z,{type:gl.P.VOICE_CHANNEL,activity:n,user:s,guildId:t.getGuildId(),channelId:t.id,color:Kl().button,onAction:a,isEmbedded:l})})]})};function lu(e){var t=e.channel,n=e.isChannelSelected,o=e.voiceStatesCount,i=(0,c.e7)([j.Z],(function(){return!j.Z.can(F.Plq.CONNECT,t)})),a=(0,c.e7)([Lr.Z],(function(){return Lr.Z.hasVideo(t.id)})),l=ei({channel:t,locked:i,video:a,selected:n}),u=(0,
|
||
c.e7)([$e.Z],(function(){return $e.Z.getGuild(t.guild_id)})),f=(0,Il.KS)(t,u);return null==f?null:(0,r.jsxs)("div",{className:Kl().popoutHeaderContainer,children:[(0,r.jsxs)("div",{className:Kl().channelNameContainer,children:[(0,r.jsx)(f,{className:Kl().channelIcon}),(0,r.jsx)(s.xvT,{variant:"text-md/semibold",color:"interactive-normal",className:Kl().channelName,children:t.name})]}),l?(0,r.jsx)(Vr,{userCount:o,video:a,channel:t}):(0,r.jsx)(zl,{userCount:o})]})}function uu(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function cu(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){uu(i,r,o,a,l,"next",e)}function l(e){uu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function su(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}
|
||
function du(e){du=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return du(e)}function pu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){fu(e,t,n[t])}))}return e}function hu(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function yu(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{}
|
||
;var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function bu(e,t){return!t||"object"!==mu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vu(e,t){vu=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return vu(e,t)}var mu=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function gu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=du(e);if(t){
|
||
var o=du(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bu(this,n)}}var Ou=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2]
|
||
;a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Eu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&vu(e,t)}(o,e);var t=gu(o);function o(){su(this,o);var e;(e=t.apply(this,arguments)).state={shouldShowActivities:!1,shouldShowGuildVerificationPopout:!1};e.activitiesHideTimeout=new pl.V7;e.closeGuildVerificationPopout=function(){e.setState({shouldShowGuildVerificationPopout:!1})};e.handleVoiceConnect=function(){var t=e.props,n=t.locked,r=t.connected,o=t.channel,i=t.unverifiedAccount,a=t.needSubscriptionToAccess;i&&e.setState({shouldShowGuildVerificationPopout:!0});bl.Z.handleVoiceConnect({channel:o,connected:r,needSubscriptionToAccess:a,locked:n})}
|
||
;e.handleContextMenu=function(t){var o=e.props.channel,i=$e.Z.getGuild(o.getGuildId());null!=i&&(0,O.jW)(t,cu((function(){var e,t;return Ou(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(84663),n.e(58539),n.e(26981)]).then(n.bind(n,926981))];case 1:e=a.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,hu(pu({},e),{channel:o,guild:i}))}]}}))})))};e.handleMouseEnter=function(){e.activitiesHideTimeout.stop();e.setState({shouldShowActivities:!0})};e.handleMouseLeave=function(){e.activitiesHideTimeout.start(100,(function(){return e.setState({shouldShowActivities:!1})}))};e.closePopout=function(){e.activitiesHideTimeout.stop();e.setState({shouldShowActivities:!1})};e.handleClick=function(){var t=e.props.channel.getGuildId();null!=t&&(0,yo.n)(t)&&(0,ho.hk)(t);e.handleVoiceConnect()};e.renderPopout=function(){
|
||
var t=e.props,n=t.channel,o=t.voiceStates,i=t.sorting,a=t.isUserOver,l=t.selected,u=t.guild,c=e.state,s=c.shouldShowActivities,f=c.shouldShowGuildVerificationPopout;if(s&&!i&&!a&&!f){var d=ml.SE.getSetting().includes(u.id);return(0,r.jsx)(iu,{onAction:e.closePopout,guild:u,channel:n,voiceStates:o,isChannelSelected:l,shouldShowSettingNudge:d})}if(f)return(0,r.jsx)(To,{type:No.VOICE,guildId:n.guild_id,closePopout:e.closeGuildVerificationPopout});throw new Error("VoiceChannel.renderPopout: There must always be something to render")};e.renderOpenChatButton=function(){var t=e.props,n=t.channel;if(!t.locked)return(0,r.jsx)(s.ua7,{text:G.Z.Messages.OPEN_CHAT,spacing:2,children:function(e){var t=e.onMouseEnter,o=e.onMouseLeave,i=e.onFocus,a=e.onBlur;return(0,r.jsx)(s.P3F,{className:m()(cn().iconItem,cn().openChatIconItem),onClick:function(){so.Z.updateChatOpen(n.id,!0);(0,Zo.Kh)(n.id)},"aria-label":G.Z.Messages.OPEN_CHAT,onMouseEnter:t,onMouseLeave:o,onFocus:i,onBlur:a,children:(0,
|
||
r.jsx)(Ho.Z,{width:16,height:16,className:cn().actionIcon})})}})};e.getTooltipText=function(){var t=e.props.connected;return e.isFull()&&!t?G.Z.Messages.UNABLE_TO_JOIN_CHANNEL_FULL:null};return e}var i=o.prototype;i.componentWillUnmount=function(){this.activitiesHideTimeout.stop()};i.getVoiceStatesCount=function(){var e,t=this.props.voiceStates;return null!==(e=null==t?void 0:t.length)&&void 0!==e?e:0};i.isFull=function(){var e=this.props.channel;return(0,Ce.rY)(e,Lr.Z,$e.Z)};i.getModeClass=function(){var e=this.props,t=e.position,n=e.sortingPosition;return e.isUserOver?cn().containerUserOver:null!=n?t>n?cn().containerDragAfter:cn().containerDragBefore:cn().containerDefault};i.renderVoiceUsers=function(){var e=this.props,t=e.channel,n=e.voiceStates,o=e.collapsed,i=e.tabIndex;return(0,r.jsx)(Kr.Z,{channel:t,collapsed:o,collapsedMax:6,voiceStates:n,tabIndex:i,location:F.Sbl.GUILD_CHANNEL_LIST})};i.renderChannelInfo=function(){
|
||
var e=this.props,t=e.channel,n=e.selected,o=e.collapsed,i=e.voiceStates,a=e.isSubscriptionGated,l=e.needSubscriptionToAccess;return(0,r.jsx)("div",{className:cn().channelInfo,children:(0,r.jsx)(ni,{channel:t,highlighted:!1,isChannelSelected:n,isChannelCollapsed:o,voiceStates:i,isSubscriptionGated:a,needSubscriptionToAccess:l,enableConnectedUserLimit:!0,enableActivities:!0})})};i.render=function(){var e=this,t=this.props,n=t.channel,o=t.selected,i=t.connected,a=t.unread,l=t.mentionCount,u=t.locked,c=t.sorting,f=t.isUserOver,d=t.connectChannelDropTarget,p=t.connectChannelDragSource,h=t.connectUserDropTarget,y=t.connectDragPreview,b=t.canReorderChannel,v=t.canMoveMembers,g=t.showTutorial,O=t.hasActiveEvent,E=t.subtitle,C=t.embeddedApps,j=t.isSubscriptionGated,S=t.isFavoriteSuggestion,I=t.emojiAndColor,_=this.state,w=_.shouldShowActivities,x=_.shouldShowGuildVerificationPopout,P=this.getVoiceStatesCount(),N=(0,r.jsxs)("li",{
|
||
className:m()(this.getModeClass(),fu({},cn().disabled,this.isDisabled())),"data-dnd-name":n.name,children:[(0,r.jsx)("div",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:(0,r.jsx)(s.yRy,{position:"right",renderPopout:this.renderPopout,spacing:0,onRequestClose:this.closeGuildVerificationPopout,shouldShow:w&&!c&&!f&&!x||x,children:function(){return(0,r.jsx)(s.ua7,{text:e.getTooltipText(),children:function(t){var c,s=t.onClick,f=t.onContextMenu,d=yu(t,["onClick","onContextMenu"]);return(0,r.jsxs)(Pn.Z,hu(pu({className:cn().iconVisibility,iconClassName:m()(fu({},cn().iconLive,O)),channel:n,selected:!S&&o,connected:i,unread:i?a:void 0,mentionCount:l,locked:u,subtitle:null===(c=Ui(E))||void 0===c?void 0:c.subtitle,onClick:function(){e.handleClick();null==s||s()},onContextMenu:function(t){e.handleContextMenu(t);null==f||f()},connectDragPreview:y,isFavoriteSuggestion:S,emojiAndColor:I,"aria-label":(0,po.Z)({channel:n,unread:a,mentionCount:l,userCount:P,
|
||
embeddedActivitiesCount:C.length,isSubscriptionGated:j}),"aria-describedby":hl({channel:n,embeddedApps:C})},d),{children:[S&&e.renderAcceptSuggestionButton(),S&&e.renderRemoveSuggestionButton(),!S&&e.renderOpenChatButton(),!S&&e.renderInviteButton(),!S&&e.renderEditButton(),!S&&e.renderChannelInfo()]}))}})}})}),this.renderVoiceUsers()]});v&&(N=h(N));b&&(N=d(p(N)));g&&(N=(0,r.jsx)(Ft.Z,{tutorialId:"voice-conversations",position:"right",offsetX:-20,children:N}));return N};return o}(xn),Cu=vt((0,fo.Q)(Eu));function ju(e){var t,n,o=e.guild,i=e.channel,a=e.disableSorting,l=e.isFavoriteCategory,u=e.emojiAndColor,s=(0,c.cj)([me.ZP],(function(){return{unread:me.ZP.hasUnread(i.id),mentionCount:me.ZP.getMentionCount(i.id)}})),f=(0,c.cj)([ie.Z,Oo.Z,j.Z],(function(){var e=ie.Z.getChannel(i.parent_id),t=Oo.Z.getCheck(i.guild_id);return{canManageChannel:j.Z.can(F.Plq.MANAGE_CHANNELS,i),
|
||
canReorderChannel:!0!==a&&(o.id===ri._||(null!=e?j.Z.can(F.Plq.MANAGE_CHANNELS,e):j.Z.can(F.Plq.MANAGE_CHANNELS,o))),canMoveMembers:j.Z.can(F.Plq.MOVE_MEMBERS,i),locked:!j.Z.can(F.Plq.CONNECT,i),bypassLimit:j.Z.can(F.Plq.MOVE_MEMBERS,i),unverifiedAccount:!t.canChat}})),d=(0,c.e7)([Lr.Z],(function(){return Lr.Z.hasVideo(i.id)})),p=(0,Vo.ZP)(i),h=(0,yl.ZP)(i),y=(0,Fe.qY)(i.id),b=(0,bo.Z)(i.id),v=b.isSubscriptionGated,m=b.needSubscriptionToAccess,g=(0,vl.Z)(),O=(0,c.e7)([mt.Z],(function(){return mt.Z.isFavorite(o.id,i.id)}));return(0,r.jsx)(Cu,hu(pu({channelName:h,embeddedApps:p,embeddedActivityType:null===(t=p[0])||void 0===t||null===(n=t.embeddedActivity)||void 0===n?void 0:n.type,video:d,hasActiveEvent:null!=y,isSubscriptionGated:v,needSubscriptionToAccess:m},s,f,e),{connected:e.connected||(null==g?void 0:g.channelId)===i.id,isFavoriteSuggestion:l&&!O,emojiAndColor:u}))}function Su(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
|
||
function Iu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function wu(e){wu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return wu(e)}function xu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){_u(e,t,n[t])}))}return e}function Pu(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})))
|
||
;n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Nu(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Au(e,t){return!t||"object"!==Mu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tu(e,t){Tu=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Tu(e,t)}function Zu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){
|
||
var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Su(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Su(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Mu=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Ru(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
|
||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=wu(e);if(t){var o=wu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Au(this,n)}}var Lu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Tu(e,t)}(n,e);var t=Ru(n);function n(){Iu(this,n);var e;(e=t.apply(this,arguments))._list=null;e.unreadTopRef=o.createRef();e.unreadBottomRef=o.createRef();e.state={initialized:!1,isUnreadVisible:!0,topUnread:null,topMention:null,bottomUnread:null,bottomMention:null};e.setListRef=function(t){var n;e.context.ref.current=null!==(n=null==t?void 0:t.getScrollerNode())&&void 0!==n?n:null;e._list=t};e.jumpToVoiceChannels=function(){
|
||
for(var t,n,r,o=e.props,i=o.guildChannels,a=o.voiceStates,l=0,u=null!==(r=null===(t=i.getCategoryFromSection(i.voiceChannelsSectionNumber))||void 0===t?void 0:t.getShownChannelIds())&&void 0!==r?r:[],c=0;c<u.length-1;c++){var s;if((null!==(s=a[u[c]])&&void 0!==s?s:[]).length>0){l=c+1;break}}null===(n=e._list)||void 0===n||n.scrollToIndex({section:i.voiceChannelsSectionNumber,row:l,animate:!0,padding:8})};e.jumpToChannel=function(t){return e.scrollToChannel(t,!0,32)};e.jumpToChannelWithMentionsAndUnreads=function(t,n){var r=Zu(n,2),o=r[0],i=r[1];return e.scrollToChannel(t,!0,null!=o&&null!=i?32:8)};e.isChannelVisible=function(t,n){var r=e.getSectionRowsFromChannel(t),o=e._list;if(null==o)return!1;var i=!0,a=!1,l=void 0;try{for(var u,c=r[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var s=u.value,f=s.row,d=s.section,p=Zu(o.getScrollPosition(d,f),2),h=p[0],y=p[1],b=o.getScrollerState();if(n&&h+y<b.scrollTop+b.offsetHeight)return!0;if(!n&&h>b.scrollTop)return!0}}catch(e){a=!0;l=e
|
||
}finally{try{i||null==c.return||c.return()}finally{if(a)throw l}}return!1};e.getVisibleChannels=function(){var t=e._list;if(null==t)return[];for(var n=t.getItems(),r=t.getScrollerState(),o=[],i=0;i<n.length;i++){var a=n[i];if((0,s.oZU)(a)&&a.section>=e.props.guildChannels.favoritesSectionNumber){var l=e.props.guildChannels.getChannelFromSectionRow(a.section,a.row),u=Zu(t.getScrollPosition(a.section,a.row),2),c=u[0],f=u[1];null!=l&&c+f<r.scrollTop+r.offsetHeight&&c>r.scrollTop&&o.push(l.channel.id)}}return o};e.handleResize=function(){var t,n,r=e.props.showNewUnreadsBar,o=null!==(n=null===(t=e._list)||void 0===t?void 0:t.getScrollerState())&&void 0!==n?n:null;e.setState({isUnreadVisible:e.isUnreadVisible()});if(r&&null!=o){var i=o.scrollTop;e.updateChannelListScroll(i)}};e.handleListScroll=function(){var t,n,r=e.props.onScroll,o=null!==(n=null===(t=e._list)||void 0===t?void 0:t.getScrollerState())&&void 0!==n?n:null;if(null!=o){var i=o.scrollTop;null!=r&&r(o)
|
||
;e.updateChannelListScroll(i)}null!=e.unreadTopRef.current&&e.unreadTopRef.current.calculateState();null!=e.unreadBottomRef.current&&e.unreadBottomRef.current.calculateState()};e.handleUnreadCalculate=function(t,n,r){var o=e.isUnreadVisible();r?e.setState({isUnreadVisible:o,bottomUnread:n,bottomMention:t}):e.setState({isUnreadVisible:o,topUnread:n,topMention:t})};e.updateChannelListScroll=a().throttle((function(t){f.Z.updateChannelListScroll(e.props.guildId,t,e.getVisibleChannels())}),100);e.getSectionHeight=function(t){var n=e.props;return Kt(t,n.guild,n.guildChannels)};e.getSectionFooterHeight=function(t){var n=e.props,r=n.guildChannels,o=n.voiceStates,i=n.selectedVoiceChannelId,a=n.optInEnabled;if(t===r.voiceChannelsSectionNumber)return 44;var l=Pe(r,a,t),u=l.hasDivider?12:0;if(!l.hasVoiceSummary)return u;var c=r.getNamedCategoryFromSection(t);return null!=c&&(0,Ce.af)(c.id,c.getChannelRecords(),i,o)?Ht+u:u};e.getRowHeight=function(t,n){
|
||
var r=e.props,o=r.guildChannels,i=r.voiceStates,a=r.stageChannelSpeakerVoiceStates,l=r.selectedVoiceChannelId,u=Ht;if(t===je.zm){var c=o.getCommunitySection();return c.isEmpty()?0:c.getRow(n)===_e.f.GUILD_PREMIUM_PROGRESS_BAR?56:u}if(o.isPlaceholderRow(t,n))return 0;var s=o.getChannelFromSectionRow(t,n);if(null==s)return 0;var f=s.channel,d=s.category;if(f.record.type===F.d4z.GUILD_CATEGORY)return 40;var p=!0,h=!1,y=void 0;try{for(var b,v=f.threadIds[Symbol.iterator]();!(p=(b=v.next()).done);p=!0){var m=b.value;u+=Ht;var g=i[f.id];if(null!=g&&g.length>0){u+=l===m?g.length*Vt:Vt;u+=8}}}catch(e){h=!0;y=e}finally{try{p||null==v.return||v.return()}finally{if(h)throw y}}if(f.record.isGuildVoice()){var O=i[f.id];if(null!=O&&O.length>0){var E=O.length*Vt;(f.isCollapsed||d.isCollapsed)&&(E=Vt);u+=E+8}}null!=f.subtitle&&(u+=16);if(f.record.isGuildStageVoice()){var C,j,S=null!==(C=i[f.id])&&void 0!==C?C:[],I=null!==(j=a[f.id])&&void 0!==j?j:[];if(null!=S&&S.length>0){var _=I.length*Vt
|
||
;f.isCollapsed||d.isCollapsed?_=Math.ceil(_/5):_+=Vt;u+=_+8}}return u};e.dismissRecents=function(){var t=e.props,n=t.guild,r=t.guildChannels,o=t.selectedChannelId,i=r.getCategoryFromSection(r.recentsSectionNumber);if(null!=i){var a=null,l=i.getShownChannelAndThreadIds();null!=o&&l.includes(o)&&(a=(0,ne.KY)(r));(0,ne.Uo)(n.id,l,a)}};e.renderSection=function(t){var n=t.section,o=e.props,i=o.guildChannels,a=o.guildChannelsVersion,l=o.guild,u=o.selectedChannelId,c=o.disableManageChannels;return(0,r.jsx)(Qt,{sectionIndex:n,guild:l,guildChannels:i,guildChannelsVersion:a,selectedChannelId:u,disableManageChannels:c},qt(n,i))};e.renderRow=function(t){var n=t.section,i=t.row,a=e.props,l=a.guild,u=a.selectedChannel,c=a.selectedChannelId,s=a.selectedVoiceChannel,f=a.selectedVoiceChannelId,d=a.guildChannels,p=a.voiceStates,h=a.disableManageChannels,y=a.stageChannelSpeakerVoiceStates,b=a.optInEnabled,v=a.channelEmojis;if(n===je.zm){var m=d.getCommunitySection().getRow(i);if(null==m)return null
|
||
;switch(m){case _e.f.GUILD_HUB_HEADER_OPTIONS:return(0,r.jsx)(te.Z,{guild:l,channel:ve.ZP.getDefaultChannel(l.id)},_e.f.GUILD_HUB_HEADER_OPTIONS);case _e.f.GUILD_PREMIUM_PROGRESS_BAR:return(0,r.jsx)(ee,{guild:l},_e.f.GUILD_PREMIUM_PROGRESS_BAR);case _e.f.GUILD_HOME:return(0,r.jsx)(yr,{guild:l,selected:c===Yn.oC.GUILD_HOME},_e.f.GUILD_HOME);case _e.f.GUILD_SCHEDULED_EVENTS:return(0,r.jsx)(dl,{guild:l,selected:c===_e.f.GUILD_SCHEDULED_EVENTS},_e.f.GUILD_SCHEDULED_EVENTS);case _e.f.GUILD_ROLE_SUBSCRIPTIONS:return(0,r.jsx)(Zr,{guild:l,selected:c===Yn.oC.ROLE_SUBSCRIPTIONS},_e.f.GUILD_ROLE_SUBSCRIPTIONS);case _e.f.GUILD_MEMBER_APPLICATIONS:return(0,r.jsx)(mr,{guild:l,selected:c===Yn.oC.MEMBER_APPLICATIONS},_e.f.GUILD_MEMBER_APPLICATIONS);case _e.f.GUILD_NEW_MEMBER_ACTIONS_PROGRESS_BAR:return(0,r.jsx)(Ir,{guild:l});case _e.f.CHANNELS_AND_ROLES:return(0,r.jsx)(or,{guild:l,selected:c===Yn.oC.CHANNEL_BROWSER||c===Yn.oC.CUSTOMIZE_COMMUNITY},_e.f.CHANNELS_AND_ROLES);case _e.f.GUILD_DIRECTORY:
|
||
return(0,r.jsx)(Ln,{guild:l,selectedChannelId:c,disableManageChannels:h},_e.f.GUILD_DIRECTORY);default:return null}}if(d.isPlaceholderRow(n,i))return null;var g=d.getChannelFromSectionRow(n,i);if(null==g)return null;var O,E=g.category,C=g.channel,j=E instanceof je.VR,S=C.record,I=null!=v?v[S.name.toLowerCase()]:void 0,_=null!=I?[I,null!==(O=Ne.Z[I])&&void 0!==O?O:"#607D8B"]:void 0,w="".concat(n).concat(C.id);switch(S.type){case F.d4z.GUILD_ANNOUNCEMENT:case F.d4z.GUILD_TEXT:case F.d4z.GUILD_FORUM:case F.d4z.DM:case F.d4z.GROUP_DM:return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(ha,{channel:S,guild:l,position:C.position,selected:c===C.id,muted:C.isMuted,subtitle:C.subtitle,disableManageChannels:h,canBeNewChannel:b&&n===d.recentsSectionNumber,isFavoriteCategory:j,emojiAndColor:_}),C.threadCount>0?(0,r.jsx)(co,{channel:S,sortedThreadIds:C.threadIds,selectedChannel:null==u||u.id!==C.id&&u.parent_id!==S.id?null:u,selectedVoiceChannelId:(null==s?void 0:s.parent_id)===S.id?f:null}):null]},w)
|
||
;case F.d4z.GUILD_STAGE_VOICE:var x,P;return(0,r.jsx)(Ei,{channel:S,guild:l,position:C.position,selected:c===C.id,connected:f===C.id,collapsed:C.isCollapsed||E.isCollapsed,voiceStates:null!==(x=p[C.id])&&void 0!==x?x:[],speakerVoiceStates:null!==(P=y[C.id])&&void 0!==P?P:[],disableManageChannels:h,isFavoriteCategory:j,emojiAndColor:_},w);case F.d4z.GUILD_VOICE:return(0,r.jsx)(ju,{channel:S,guild:l,position:C.position,selected:c===C.id,connected:f===C.id,collapsed:C.isCollapsed||E.isCollapsed,voiceStates:p[C.id],subtitle:C.subtitle,disableManageChannels:h,showTutorial:C.isFirstVoiceChannel,isFavoriteCategory:j,emojiAndColor:_},w);case F.d4z.GUILD_STORE:return(0,r.jsx)(ki,{channel:S,guild:l,position:C.position,selected:c===C.id},w);case F.d4z.GUILD_CATEGORY:return n!==d.voiceChannelsSectionNumber?null:(0,r.jsx)(Bt,{channel:S},"readonly-".concat(S.id));default:return null}};e.renderSectionFooter=function(t){
|
||
var n=t.section,i=e.props,a=i.guildChannels,l=i.voiceStates,u=i.selectedVoiceChannelId,c=i.optInEnabled;if(n===a.voiceChannelsSectionNumber){var s=a.getCategoryFromSection(a.voiceChannelsSectionNumber);return null==s?null:(0,r.jsx)(kt,{category:s},"voice-channels-button")}var f=Pe(a,c,n),d=f.hasDivider,p=f.hasVoiceSummary,h=d?(0,r.jsx)("div",{className:Yt().sectionDivider},"divider-".concat(n)):null;if(!p)return h;var y=a.getCategoryFromSection(n);if(null==y||!y.isCollapsed)return h;var b=(0,Ce.c4)(y.getChannelRecords(),u,l);return 0===b.length?h:(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)("div",{className:Yt().voiceUserSummary,children:(0,r.jsx)(Ee.Z,{renderIcon:!0,users:b,max:8,showUserPopout:!0,guildId:e.props.guildId})}),h]},"".concat(n,"-footer"))};e.getAnchorId=function(t,n){var r,o,i=e.props.guildChannels;if(t!==je.zm){if(null==n){var a
|
||
;return t===je.p2?"favorites-header":t===i.recentsSectionNumber?"recents-header":t===i.voiceChannelsSectionNumber?"voice-channels":t===je.wd?"uncategorized-header":null===(a=i.getNamedCategoryFromSection(t))||void 0===a?void 0:a.id}if(!i.isPlaceholderRow(t,n))return null===(r=i.getChannelFromSectionRow(t,n))||void 0===r||null===(o=r.channel)||void 0===o?void 0:o.id}};e.testShouldSkipTutorial=function(){if(he.Z.shouldShow("voice-conversations")){var t=e.props.guildChannels.getFirstVoiceChannel();if(null!=t){var n=e._list;if(null!=n){var r=e.getSectionRowsFromChannel(t.id),o=!0,i=!1,a=void 0;try{for(var l,u=r[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value,s=c.section,f=c.row;n.isItemVisible(s,f)||d.Z.dismiss("voice-conversations")}}catch(e){i=!0;a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}}else d.Z.dismiss("voice-conversations")}};return e}var i=n.prototype;i.componentDidMount=function(){this.setState({initialized:!0})}
|
||
;i.componentWillUnmount=function(){this.updateChannelListScroll.cancel()};i.componentDidUpdate=function(e,t){var n=this.props,r=n.scrollToChannel,o=n.guildId,i=n.selectedChannelId,a=this.state.initialized,l=be.Z.getGuildDimensions(o).scrollTop;if(null!=r){this.scrollToChannel(r);f.Z.clearChannelListScrollTo(o)}else o!==e.guildId?null!=l&&this.scrollTo(l):i!==e.selectedChannelId?this.scrollToChannel(i):!t.initialized&&a&&(null==l&&null!=i?this.scrollToChannel(i,!1,8,this.handleListScroll):this.scrollTo(null!=l?l:0,this.handleListScroll));this.testShouldSkipTutorial()};i.getSectionRowsFromChannel=function(e){return this.props.guildChannels.getSectionRowsFromChannel(e)};i.scrollTo=function(e,t){var n;null===(n=this._list)||void 0===n||n.scrollTo({to:e,animate:!1,callback:t})};i.scrollToChannel=function(e){
|
||
var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,r=arguments.length>3?arguments[3]:void 0,o=this._list,i=this.getSectionRowsFromChannel(e)[0];if(null!=i&&null!=o)if(null!=i.threadOffset){var a=Zu(o.getScrollPosition(i.section,i.row),1),l=a[0],u=i.threadOffset*Ht;o.scrollIntoViewRect({start:l+u,end:l+u+Ht,padding:n,animate:t,callback:r})}else o.scrollToIndex({section:i.section,row:i.row,animate:t,padding:n,callback:r})};i.isUnreadVisible=function(){var e=this.props.guildChannels,t=this._list;return null!=t&&t.getItems().some((function(n){if("row"!==n.type)return!1;var r=n.section,o=n.row;if(r<je.wd)return!1;if(e.isPlaceholderRow(r,o))return!1;var i=e.getChannelFromSectionRow(r,o);if(null==i)return!1;var a=i.channel,l=i.category;return!!(0,ye.vc)(a.record.type)&&(!(l.isCollapsed&&l.isMuted||a.isMuted||!t.isItemVisible(r,o,!0))&&me.ZP.hasRelevantUnread(a.record))}))};i.renderTopUnread=function(){
|
||
var e=this.state,t=e.topMention,n=e.bottomUnread,o=e.bottomMention,i=e.isUnreadVisible,a=this.props,l=a.guildId,u=a.guildChannels,c=a.guildChannelsVersion,s=null==t&&(i||null!=n||null!=o);return(0,r.jsx)("div",{className:Yt().positionedContainer,children:(0,r.jsx)(rl,{ref:this.unreadTopRef,textUnread:G.Z.Messages.NEW_UNREADS,textMention:G.Z.Messages.NEW_MENTIONS,hide:s,className:Yt().unreadTop,barClassName:Yt().unreadBar,guildId:l,guildChannels:u,guildChannelsVersion:c,isVisible:this.isChannelVisible,onJumpTo:this.jumpToChannelWithMentionsAndUnreads,onCalculate:this.handleUnreadCalculate})})};i.renderBottomUnread=function(){var e=this.props,t=e.guildId,n=e.guildChannels,o=e.guildChannelsVersion,i=this.state,a=i.bottomMention,l=i.isUnreadVisible,u=null==a&&l;return(0,r.jsx)(rl,{reverse:!0,ref:this.unreadBottomRef,textUnread:G.Z.Messages.NEW_UNREADS,textMention:G.Z.Messages.NEW_MENTIONS,hide:u,className:Yt().unreadBottom,barClassName:Yt().unreadBar,guildId:t,guildChannels:n,
|
||
guildChannelsVersion:o,isVisible:this.isChannelVisible,onJumpTo:this.jumpToChannelWithMentionsAndUnreads,onCalculate:this.handleUnreadCalculate})};i.renderList=function(){var e=this,t=this.props,n=t.guildChannels,o=t.guild,i=t.guildBanner,a=t.hasGuildSubheader,l=this.context,u=(l.ref,Nu(l,["ref"])),c=0;null!=i?c=84:o.hasCommunityInfoSubheader()&&!a&&(c=16);return(0,r.jsx)(s.Wdt,{children:function(t){return(0,r.jsx)(s.aVo,xu({ref:e.setListRef,className:Yt().scroller,fade:!0,customTheme:!0,sectionHeight:e.getSectionHeight,footerHeight:e.getSectionFooterHeight,rowHeight:e.getRowHeight,paddingTop:c,paddingBottom:12,renderSection:e.renderSection,renderFooter:e.renderSectionFooter,renderRow:e.renderRow,onScroll:e.handleListScroll,onResize:e.handleResize,onContentResize:e.handleResize,sections:n.getSections(),innerAriaLabel:G.Z.Messages.CHANNELS,innerTag:"ul",getAnchorId:e.getAnchorId},u,t),"guild-channels")}})};i.render=function(){
|
||
var e=this,t=this.props,n=t.guildChannels,i=t.guildChannelsVersion;return t.showNewUnreadsBar?(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)("div",{className:Yt().positionedContainer,children:(0,r.jsx)(qa,{position:"top",guildChannels:n,guildChannelsVersion:i,jumpToVoiceChannels:this.jumpToVoiceChannels,jumpToChannel:this.jumpToChannel})}),this.renderList(),(0,r.jsx)(qa,{position:"bottom",guildChannels:n,guildChannelsVersion:i,jumpToVoiceChannels:this.jumpToVoiceChannels,jumpToChannel:this.jumpToChannel})]}):(0,r.jsx)(o.Fragment,{children:(0,r.jsx)(Oe.FG,{children:function(t){return(0,r.jsxs)(s.y5t,{component:(0,r.jsx)(s.nn4,{children:(0,r.jsx)(s.H,{id:t,children:G.Z.Messages.CHANNELS})}),children:[e.renderTopUnread(),e.renderList(),e.renderBottomUnread()]})}})})};return n}(o.PureComponent);Lu.contextType=u.qB;var Du=function(e){var t=e.guildId,n=e.selectedChannelId,i=e.selectedVoiceChannelId,a=e.channelEmojis,s=(0,c.e7)([h.Z],(function(){return h.Z.keyboardModeEnabled})),f=(0,
|
||
b.Z)(y.Z.GUILD_CHANNEL_LIST).AnalyticsLocationProvider,d=(0,c.e7)([ie.Z],(function(){return ie.Z.getChannel(n)})),v=(0,c.e7)([ie.Z],(function(){return ie.Z.getChannel(i)})),m=(0,c.e7)([ge.Z],(function(){return ge.Z.getGuildId()})),g=(0,re.DM)(t,!0),O=o.useRef(null),E=o.useCallback((function(e,t){var n=O.current;if(null!=n)if(F.Xyh.test(t)||(0,Yn.AB)(t))n.scrollToChannel(t,!1,16,(function(){requestAnimationFrame((function(){var t;return null===(t=document.querySelector(e))||void 0===t?void 0:t.focus()}))}));else{var r;null===(r=document.querySelector(e))||void 0===r||r.focus()}}),[]),C=o.useCallback((function(){return new Promise((function(e){var t=O.current;if(null==t)return e();t.scrollTo(0,(function(){return requestAnimationFrame((function(){return e()}))}))}))}),[]),j=o.useCallback((function(){return new Promise((function(e){var t=O.current;if(null==t)return e();t.scrollTo(Number.MAX_SAFE_INTEGER,(function(){return requestAnimationFrame((function(){return e()}))}))}))}),[]),S=(0,
|
||
l.ZP)({id:"channels",defaultFocused:null!=n?n:void 0,isEnabled:s,setFocus:E,scrollToStart:C,scrollToEnd:j}),I=S.setFocus;o.useEffect((function(){null!=n&&I(n)}),[n,I]);var _=function(e){return de((0,c.e7)([ue.Z,ie.Z,oe.Z],(function(){var t;return[(t=e===F.I_8?Object.keys(oe.Z.getFavoriteChannels()).map((function(e){return ie.Z.getChannel(e)})).filter(le.lm).filter((function(e){return e.isGuildStageVoice()})):ue.Z.getChannels(e)).reduce((function(e,t){var n=ue.Z.getMutableParticipants(t.id,ce.pV.SPEAKER);e[t.id]=n.filter((function(e){return e.type===ce.Ui.VOICE})).map(pe);return e}),{}),t.reduce((function(e,t){var n=t.id;return e+ue.Z.getParticipantsVersion(n)}),0)]}),[e],se.QF),1)[0]}(t);return(0,r.jsx)(f,{children:(0,r.jsx)(p.Z,{section:F.jXE.GUILD_CHANNEL_LIST,children:(0,r.jsx)(u.bG,{navigator:S,children:(0,r.jsx)(Lu,Pu(xu({},e),{listNavigator:S,ref:O,selectedChannel:d,selectedVoiceChannel:v,stageChannelSpeakerVoiceStates:_,selectedGuildId:m,optInEnabled:g,channelEmojis:a}))})})})}
|
||
;function ku(e){var t=(0,Ie.o)();return(0,r.jsx)(Du,Pu(xu({},e),{guildChannels:t,guildChannelsVersion:0}))}function Uu(e){var t=Ge(e.guild),n=(0,c.cj)([Se.Z],(function(){return Se.Z.getGuild(e.guildId,t)}));return(0,r.jsx)(Du,xu({},e,n))}},63054:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>x});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(248088),u=n(289283),c=n(707961),s=n(769321),f=n(386991),d=n(755284),p=n(775173),h=n(393299),y=n(2590),b=n(485911),v=n(473708),m=n(273413),g=n.n(m);function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
|
||
;r.forEach((function(t){E(e,t,n[t])}))}return e}function j(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return O(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e){var t,n=e.guild,o=e.controller,i=e.guildBanner,c=e.animate,f=o.springs.value,d=s.QK.getSetting();return(0,r.jsx)(l.animated.div,{className:g().animatedContainer,style:{opacity:f,transform:f.to((function(e){return"translateY(-".concat(90*(1-e),"px)")}))},children:(0,r.jsx)(l.animated.div,{className:a()(g().bannerImage,E({},g().bannerImgFullWidth,u.tq)),style:{transform:f.to((function(e){return d?"translateY(".concat(60*(1-e),"px) scale(").concat(1+.2*(1-e),")"):"translateY(".concat(90*(1-e),"px)")}))},children:(0,r.jsx)("img",{
|
||
className:a()(g().bannerImg,E({},g().bannerImgFullWidth,u.tq)),src:null!==(t=p.ZP.getGuildBannerURL({id:n.id,banner:i},c))&&void 0!==t?t:"",alt:"",height:135,width:240,"aria-hidden":!0})})})}function _(e){var t=e.guild,n=e.controller,o=e.hasBanner,i=e.hasSubheader,u=n.springs.value,s=t.hasFeature(y.oNc.DISCOVERABLE),f=(0,r.jsx)("div",{className:g().communityInfo,children:s&&(0,r.jsx)(c.ua7,{text:v.Z.Messages.DISCOVERABLE_GUILD_HEADER_PUBLIC_INFO,position:"right",children:function(e){return(0,r.jsxs)("div",j(C({className:g().communityInfoPill},e),{children:[(0,r.jsx)(d.Z,{width:12,height:12,className:g().communityIcon}),(0,r.jsx)(c.xvT,{variant:"text-xs/normal",color:"none",children:v.Z.Messages.DISCOVERABLE_GUILD_HEADER_PUBLIC})]}))}})});return i?(0,r.jsx)("div",{className:a()(g().communityInfoContainer,g().hasSubheader),children:f}):(0,r.jsx)(l.animated.div,{className:g().communityInfoContainer,style:o?{opacity:u}:{height:u.to((function(e){return"".concat(20*e,"px")}))},children:f})}
|
||
function w(e){return e.guild.id===b._?(0,r.jsx)(c.ua7,{text:"Super-duper alpha! This may break, change, or be removed at any time. One day real users can use this. :')",children:function(e){return(0,r.jsx)(f.Z,C({className:g().favoritesInfo},e))}}):null}const x=o.memo((function(e){var t=e.bannerVisible,n=e.controller,i=e.className,l=e.onClick,u=e.onContextMenu,f=e.onMouseDown,d=e.disableBannerAnimation,b=e["aria-expanded"],m=e["aria-controls"],O=e.guild,C=e.guildBanner,j=e.animationOverlayHeight,x=e.children,P=e.headerClassName,N=e.communityInfoVisible,A=e.hasSubheader,T=O.hasFeature(y.oNc.ANIMATED_BANNER),Z=O.hasCommunityInfoSubheader(),M=(0,p.xR)(C)&&T&&!d,R=S(o.useState(!1),2),L=R[0],D=R[1],k=o.useRef(),U=o.useRef(null),B=o.useRef(),F=s.QK.getSetting();o.useEffect((function(){if(M&&t&&!k.current&&F){D(!0);B.current=setTimeout((function(){D(!1)}),5e3);return function(){clearTimeout(B.current)}}}),[M,t,F]);o.useEffect((function(){k.current=t}),[t]);var G,H,V=function(){
|
||
var t=e.renderBanner;return null!=e.guildBanner&&!t};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{ref:U,className:a()(i,(H={},E(H,g().container,!0),E(H,g().clickable,null!=l),E(H,g().selected,null!=l&&b),E(H,g().hasBanner,V()),E(H,g().bannerVisible,t),E(H,g().communityInfoVisible,N||A&&O.hasCommunityInfoSubheader()),H)),onMouseDown:f,onContextMenu:u,onClick:l,children:[(0,r.jsxs)("header",{className:a()(g().header,P),children:[(0,r.jsxs)("div",{className:a()(g().headerContent,g().primaryInfo),children:[(0,r.jsx)(h.Z,{guild:O,isBannerVisible:t}),(0,r.jsxs)(c.xvT,{color:"none",variant:"text-md/semibold",lineClamp:1,className:g().name,children:[O.toString(),(0,r.jsx)(w,{guild:O})]}),null!=l&&(0,r.jsx)(c.P3F,{className:g().headerButton,"aria-controls":m,"aria-expanded":b,focusProps:{ringTarget:U,offset:4},onClick:l,onContextMenu:u,"aria-label":v.Z.Messages.GUILD_SIDEBAR_ACTIONS_BUTTON.format({guildName:null!==(G=null==O?void 0:O.toString())&&void 0!==G?G:""})}),(0,
|
||
r.jsx)("div",{className:g().headerChildren,children:x})]}),Z&&(0,r.jsx)(_,{guild:O,controller:n,hasBanner:null!=C,hasSubheader:null!=A&&A})]}),null!=C?(0,r.jsx)(I,{guild:O,controller:n,guildBanner:C,animate:L}):null]}),M&&V()?(0,r.jsx)("div",{className:g().animatedBannerHoverLayer,onMouseEnter:function(){D(!0);clearTimeout(B.current)},onMouseLeave:function(){return D(!1)},style:{height:j}}):null]})}))},973198:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ze});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(513328),c=n(473664),s=n(258104),f=n(28661),d=n(895462),p=n(177570),h=n(736818),y=n(736097),b=n(682776),v=n(679450),m=n(377128),g=n(91717),O=n(707961),E=n(247250),C=n(971402),j=n(842629),S=n(481008),I=n(387927),_=n(409125),w=n(550677),x=n(473708);function P(e){switch(e){case w.YE.XBOX:return x.Z.Messages.XBOX_REMOTE_CONNECTED_RAW;case w.YE.PLAYSTATION:return x.Z.Messages.PLAYSTATION_REMOTE_CONNECTED_RAW}}
|
||
var N=n(306263),A=n(924066),T=n(88329),Z=n(616679),M=n(357088),R=n(699248),L=n(567403),D=n(491260),k=n(407561),U=n(700223),B=n(652591),F=n(179678),G=n(538272),H=n(246549),V=n(2590),W=n(811693),z=n.n(W);function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Q(e){Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Q(e)}function X(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n
|
||
}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function J(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function $(e,t){return!t||"object"!==ne(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ee(e,t){ee=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return ee(e,t)}function te(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{
|
||
for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ne=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function re(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
|
||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $(this,n)}}var oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&ee(e,t)}(n,e);var t=re(n);function n(){K(this,n);return t.apply(this,arguments)}var o=n.prototype;o.componentDidMount=function(){var e=this.props,t=e.user,n=e.streamApplication;B.default.track(V.rMx.OPEN_POPOUT,{type:"Stream Preview",other_user_id:t.id,application_id:null!=n?n.id:null,application_name:null!=n?n.name:null,game_id:null!=n?n.id:null,is_streaming:!0})};o.renderPreview=function(e){var t=this.props,n=t.onWatch,o=t.activeStream,i=t.currentUserId,a=t.canWatch,l=t.unavailableReason;return(0,
|
||
r.jsxs)(O.P3F,{onClick:n,className:z().previewContainer,children:[(0,r.jsx)(H.Z,{className:z().previewImage,stream:e}),a?(0,r.jsx)("div",{className:z().previewHover,children:(0,r.jsx)(O.xvT,{variant:"text-sm/normal",color:"none",className:z().white,children:(0,G.Z)(e,o,i,l)})}):null]})};o.render=function(){var e=this.props,t=e.activity,n=e.user,o=e.stream,i=e.previewIsOpen;return null==o?null:(0,r.jsx)("div",{className:a()(z().streamPreviewWrapper,q({},z().mounted,i)),children:(0,r.jsxs)("div",{className:z().streamPreview,children:[this.renderPreview(o),(0,r.jsxs)("div",{className:z().body,children:[null!=t?(0,r.jsx)(Z.Z,{hideHeader:!0,type:Z.P.STREAM_PREVIEW,activity:t,user:n,guildId:o.guildId,channelId:o.channelId}):(0,r.jsx)(R.Z,{type:Z.P.STREAM_PREVIEW,applicationStream:o,user:n,guildId:o.guildId,channelId:o.channelId,className:z().activityActions,color:z().watchButton}),(0,r.jsx)(U.Z,{type:U.Z.Types.INLINE,className:z().protip,
|
||
children:__OVERLAY__?x.Z.Messages.WATCH_STREAM_IN_APP:x.Z.Messages.WATCH_STREAM_TIP})]})]})})};return n}(o.PureComponent);function ie(e){var t=e.user,n=e.channel,i=J(e,["user","channel"]),a=te((0,l.Wu)([k.Z,L.Z,b.Z,_.Z],(function(){return(0,A.p9)(n,k.Z,L.Z,b.Z,_.Z)})),2),u=a[0],c=a[1],s=(0,l.e7)([p.Z],(function(){return p.Z.getStreamForUser(t.id,n.getGuildId())})),f=(0,l.e7)([p.Z],(function(){return p.Z.getActiveStreamForApplicationStream(s)})),d=(0,l.e7)([h.default],(function(){return h.default.getId()})),y=(0,l.e7)([D.Z],(function(){return(0,F.L2)(s,D.Z)})),v=(0,l.e7)([D.Z],(function(){return(0,F.Um)(s,D.Z)})),m=o.useMemo((function(){return q({},n.guild_id,[t.id])}),[n.guild_id,t.id]);(0,M.$)(m);return(0,r.jsx)(oe,X(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){q(e,t,n[t])}))}return e}({},i),{canWatch:u,unavailableReason:c,user:t,streamApplication:y,stream:s,activeStream:f,currentUserId:d,activity:v}))}var ae=n(725691),le=n(183640),ue=n(23727),ce=n(443132),se=n(104891),fe=n.n(se);function de(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function pe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){de(i,r,o,a,l,"next",e)}function l(e){de(i,r,o,a,l,"throw",e)}a(void 0)}))}}function he(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}function be(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n
|
||
;return e}function ve(e){ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return ve(e)}function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){be(e,t,n[t])}))}return e}function ge(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Oe(e,t){if(null==e)return{};var n,r,o=function(e,t){
|
||
if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ee(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e,t){Ce=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ce(e,t)}var je=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){
|
||
var n,r=ve(e);if(t){var o=ve(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ee(this,n)}}var Ie=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}
|
||
if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function _e(e){var t=e.numUsers;return(0,r.jsx)("div",{className:fe().moreContainer,children:(0,r.jsxs)(O.xvT,{color:"text-muted",variant:"text-sm/medium",children:["+",t]})})}function we(e){var t=e.numAudience,n=e.collapsed,o=n?t:x.Z.Messages.LISTENING_COUNT.format({count:t});return(0,r.jsxs)("div",{className:a()(fe().audienceContainer,be({},fe().audienceContainerCollapsed,n)),children:[(0,r.jsx)("div",{className:fe().audienceIconContainer,children:(0,r.jsx)(ue.Z,{className:fe().audienceIcon})}),(0,r.jsx)(O.xvT,{color:"text-muted",variant:"text-sm/medium",children:o})]})}var xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,
|
||
writable:!0,configurable:!0}});t&&Ce(e,t)}(i,e);var t=Se(i);function i(){he(this,i);var e;(e=t.apply(this,arguments)).domElementRef=o.createRef();e.state={userPopoutOpen:!1};e.handleClickUser=function(){e.setState({userPopoutOpen:!e.state.userPopoutOpen})};e.handleCloseUserPopout=function(){e.setState({userPopoutOpen:!1})};e.handleHidePreview=function(){var t=e.props,n=t.hidePreview,r=t.isStreaming,o=t.user;r&&(null==n||n(o.id))};e.handleMouseEnter=function(){var t=e.props,n=t.user,r=t.showPreview;t.isStreaming&&(null==r||r(n.id))};e.handleWatchStream=function(){var t=e.props,n=t.user,r=t.channel,o=t.isWatching,i=t.hidePreview;if(e.canWatchStream){var a={streamType:ce.lo.GUILD,ownerId:n.id,channelId:r.id,guildId:r.guild_id};h.default.getId()!==n.id&&j.default.selectVoiceChannel(r.id);if(o){(0,T.Z)(a);E.Z.selectParticipant(a.channelId,(0,N.V9)(a))}else(0,S.iV)(a);null==i||i(n.id)}};e.handleUserContextMenu=function(t){var o=e.props,i=o.channel,a=o.user;(0,C.jW)(t,pe((function(){var e,t
|
||
;return Ie(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(3454),n.e(77357),n.e(14136)]).then(n.bind(n,914136))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,ge(me({},e),{user:a,guildId:i.guild_id,channel:i,showMediaItems:!0,showStageChannelItems:i.isGuildStageVoice()}))}]}}))})))};e.renderUserPopout=function(t){var n=e.props,o=n.channel,i=n.user,a=o.getGuildId();return(0,r.jsx)(le.Z,me({userId:i.id,guildId:null!=a?a:void 0,channelId:o.id},t))};e.renderStreamPopout=function(){var t=e.props,n=t.user,o=t.channel,i=t.previewIsOpen,a=t.location;return(0,r.jsx)(ie,{user:n,channel:o,onWatch:e.handleWatchStream,previewIsOpen:i,location:a})};e.renderUser=function(t){
|
||
var n=e.props,o=n.isSelfOnOtherClient,i=n.otherClientSessionType,l=n.shouldShowPreview,u=n.mute,c=n.localMute,s=n.localVideoDisabled,f=n.speaking,d=n.user,p=n.deaf,h=n.priority,y=n.collapsed,b=n.isStreaming,v=n.nick,m=n.video,E=n.serverMute,C=n.serverDeaf,j=n.tabIndex,S=n.embeddedApplication,I=n.channel,_=e.state.userPopoutOpen,N=w.al.has(null!=i?i:""),A={user:d,speaking:f,mute:u,localMute:c,localVideoDisabled:s,isStreaming:b,video:m,priority:h,deaf:p,nick:v,collapsed:y,overlap:y,serverMute:E,serverDeaf:C,tabIndex:j,otherClientSessionType:i,embeddedApplication:S,avatarContainerClass:a()(be({},fe().userAvatar,!0)),disabled:o&&!N,selected:_,onClick:N?void 0:e.handleClickUser,onDoubleClick:e.handleWatchStream,onContextMenu:e.handleUserContextMenu,guildId:I.guild_id};if(o){var T;return(0,r.jsx)(O.ua7,{text:null!==(T=P(i))&&void 0!==T?T:x.Z.Messages.CONNECTED_ON_ANOTHER_CLIENT,children:function(e){e.onClick,e.onContextMenu;var t=Oe(e,["onClick","onContextMenu"]);return(0,
|
||
r.jsx)(g.Z,me({},A,t))}})}return(0,r.jsx)(O.yRy,{position:"right",renderPopout:e.renderStreamPopout,shouldShow:l&&!_,onRequestClose:e.handleHidePreview,spacing:0,children:function(){return(0,r.jsx)(g.Z,ge(me({},A),{onMouseDown:t.onMouseDown,onKeyDown:t.onKeyDown}))}})};return e}i.prototype.render=function(){var e=this,t=this.state.userPopoutOpen,n=this.props,o=n.connectUserDragSource,i=n.canDrag,a=n.isSelfOnOtherClient,l=n.user,u=n.channel,c=(0,r.jsx)("div",{className:fe().draggable,"data-dnd-name":u.name,onMouseEnter:a?void 0:this.handleMouseEnter,onMouseLeave:a?void 0:this.handleHidePreview,children:(0,r.jsx)(O.yRy,{preload:function(){return(0,ae.Z)(l.id,l.getAvatarURL(u.guild_id,80),{guildId:u.guild_id,channelId:u.id})},position:"right",renderPopout:this.renderUserPopout,shouldShow:t,onRequestClose:this.handleCloseUserPopout,children:function(t){return e.renderUser(t)}})});return i?o(c):c};!function(e,t,n){t&&ye(e.prototype,t);n&&ye(e,n)}(i,[{key:"canWatchStream",get:function(){
|
||
var e=this.props,t=e.channel;return e.isStreaming&&(0,A.p9)(t,k.Z,L.Z,b.Z,_.Z)[0]}}]);return i}(o.PureComponent);xe.defaultProps={isSelfOnOtherClient:!1};const Pe=(0,I.$)(xe);var Ne=n(69540),Ae=n(742213),Te=n.n(Ae);function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Re(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Le(e){Le=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Le(e)}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Re(e,t,n[t])}))}return e
|
||
}function ke(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ue(e,t){return!t||"object"!==Ge(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Be(e,t){Be=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Be(e,t)}function Fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){
|
||
i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ge=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function He(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}()
|
||
;return function(){var n,r=Le(e);if(t){var o=Le(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ue(this,n)}}var Ve=o.memo((function(e){var t,n=e.mute,o=e.deaf,i=e.user.id,a=e.channel,u=e.sessionId,b=(0,l.e7)([h.default],(function(){return h.default.getId()===i}),[i]),g=Fe((0,l.Wu)([y.Z],(function(){return b?[!y.Z.isSupported()||y.Z.isSelfMute()||y.Z.isSelfMutedTemporarily(),y.Z.isSelfDeaf(),!1]:[!y.Z.isSupported()||y.Z.isLocalMute(i),!1,y.Z.isLocalVideoDisabled(i)]}),[b,i]),3),O=g[0],E=g[1],C=g[2],j=(0,l.e7)([m.Z],(function(){return m.Z.isPrioritySpeaker(i)})),S=(0,c.Z)({userId:i,checkSoundSharing:!0}),I=(0,l.e7)([s.ZP],(function(){return s.ZP.getEmbeddedActivitiesForChannel(a.id).find((function(e){return e.connections.has(i)}))}),[i,a.id]),_=(0,f.Z)(null!=I?[I.application_id]:[]),w=Fe((0,l.Wu)([p.Z],(function(){return[p.Z.getStreamForUser(i,a.getGuildId()),p.Z.getActiveStreamForUser(i,a.getGuildId())]}),[i]),2),x=w[0],P=w[1],N=(0,
|
||
l.e7)([v.Z],(function(){return v.Z.getSessionById(u)}));return(0,r.jsx)(d.Z,{shakeLocation:Ne.oZ.VOICE_USER,isShaking:S,children:(0,r.jsx)(Pe,ke(De({},e),{otherClientSessionType:null==N||null===(t=N.clientInfo)||void 0===t?void 0:t.os,localMute:O&&!b,localVideoDisabled:C,mute:n||O,deaf:o||E,speaking:S,priority:j,embeddedApplication:_[0],isStreaming:null!=x&&x.channelId===a.id,isWatching:null!=P&&P.state!==V.jm8.ENDED}))})}));Ve.displayName="ConnectedVoiceUser";var We=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Be(e,t)}(n,e);var t=He(n);function n(){Me(this,n);var e;(e=t.apply(this,arguments)).showPreview=new u.sW(50,(function(){e.setState({previewUserId:e.previewUserIdAfterDelay});e.previewUserIdAfterDelay=null}));e.hidePreview=new u.sW(175,(function(){e.setState({previewUserId:null})}))
|
||
;e.previewUserIdAfterDelay=null;e.state={previewUserId:null,previewIsOpen:!1};e.handleShowPreview=function(t){if(e.props.allowPreviews){e.setState({previewIsOpen:!0});e.hidePreview.cancel();e.previewUserIdAfterDelay=t;e.showPreview.delay()}};e.handleHidePreview=function(t){if(e.props.allowPreviews){var n=e.state.previewUserId;e.showPreview.cancel();if(n===t){e.setState({previewIsOpen:!1});e.hidePreview.delay()}}};return e}var o=n.prototype;o.renderVoiceUsers=function(){var e=this,t=this.props,n=t.channel,o=t.allowDragging,i=t.voiceStates,a=t.collapsed,l=t.collapsedMax,u=void 0===l?6:l,c=t.tabIndex,s=t.location,f=t.numAudience,d=this.state,p=d.previewUserId,y=d.previewIsOpen;if(null==i||0===i.length)return null;var v=(a&&i.length>u+1?i.slice(0,u):i).map((function(t){var i,l=t.user,u=t.nick,f=t.voiceState;return(0,r.jsx)(Ve,{user:l,nick:u,isSelfOnOtherClient:h.default.getId()===l.id&&f.sessionId!==h.default.getSessionId(),mute:f.isVoiceMuted(),deaf:f.isVoiceDeafened(),video:f.selfVideo,
|
||
serverMute:f.mute,serverDeaf:f.deaf,sessionId:null!==(i=f.sessionId)&&void 0!==i?i:"",channel:n,collapsed:a,canDrag:o&&b.Z.can(V.Plq.MOVE_MEMBERS,n),showPreview:e.handleShowPreview,hidePreview:e.handleHidePreview,previewIsOpen:y,shouldShowPreview:p===l.id,tabIndex:c,location:s},l.id)}));null!=f&&f>0?v.push((0,r.jsx)(we,{collapsed:a,numAudience:f})):a&&i.length>u+1&&v.push((0,r.jsx)(_e,{numUsers:i.length-u}));return v};o.render=function(){var e=this.renderVoiceUsers(),t=this.props,n=t.collapsed,o=t.className,i=t.children;return null==e&&null==i?null:(0,r.jsxs)(g.e,{className:a()(o,Te().list,Re({},Te().collapsed,n)),collapsed:n,children:[e,i]})};return n}(o.Component);We.defaultProps={allowPreviews:!0,allowDragging:!0};const ze=We},896812:(e,t,n)=>{"use strict";n.d(t,{eD:()=>r,g8:()=>f,Mg:()=>d,qQ:()=>p});var r,o=n(441143),i=n.n(o),a=n(496486);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){
|
||
for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(e){e.ROOT="root";e.FOLDER="folder";e.GUILD="guild"}(r||(r={}));function s(){return Math.floor(4294967296*Math.random())}var f=function(){function e(){!function(e,t){
|
||
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.root={type:r.ROOT,children:[]};this.nodes={};this.version=0}var t=e.prototype;t.getSnapshot=function(){return{root:this.root,nodes:this.nodes}};t.loadSnapshot=function(e){this.root=e.root;this.nodes=e.nodes;this.version++};t.moveNextTo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._pluckNode(e);var o=null!=t.parentId?this.nodes[t.parentId]:this.root,a=o.children.indexOf(t);i()(!(e.type===r.FOLDER&&o.type===r.FOLDER),"[GUILDS TREE] Tried moving a folder (".concat(e.id,") inside of another folder (").concat(o.id,")"));i()(a>=0,"[GUILDS TREE] target node (".concat(t.id,") did not exist within its specified parent (").concat(t.parentId,")"));var l=n?1:0;o.children=c(o.children);o.children.splice(a+l,0,e);e.parentId=o.id;this.version++;return this};t.moveInto=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this._pluckNode(e)
|
||
;var r=n?t.children.length:0;t.children=c(t.children);t.children.splice(r,0,e);e.parentId=t.id;this.version++;return this};t.addNode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.root,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];i()(e.type!==r.ROOT,"[GUILDS TREE] Tried adding another root node into the tree");i()(null!=e.id,"[GUILDS TREE] Tried adding a node without an id");i()(null==this.nodes[e.id],"[GUILDS TREE] Tried adding a node that already exists (".concat(e.id,")"));this.nodes[e.id]=e;this.version++;return this.moveInto(e,t,n)};t.removeNode=function(e){i()(e!==this.root,"[GUILDS TREE] Tried removing the root node from the tree");i()(null!=e.id,"[GUILDS TREE] Tried removing a node without an id");this._pluckNode(e);e.parentId=void 0;delete this.nodes[e.id];this.version++;return this};t.replaceNode=function(e,t){i()(e!==this.root,"[GUILDS TREE] Tried replacing the root node of the tree")
|
||
;i()(null!=e.id,"[GUILDS TREE] Tried replacing a node without an id");i()(null!=t.id,"[GUILDS TREE] Tried replacing a node with one that does not have an id");i()(t.type!==r.ROOT,"[GUILDS TREE] Tried adding another root node into the tree");var n=null!=e.parentId?this.nodes[e.parentId]:this.root,o=n.children.indexOf(e);i()(o>=0,"[GUILDS TREE] existing node (".concat(e.id,") did not exist within its specified parent (").concat(e.parentId,")"));n.children=c(n.children);n.children.splice(o,1,t);t.parentId=n.id;e.parentId=void 0;delete this.nodes[e.id];this.nodes[t.id]=t;this.version++;return this};t.cloneNode=function(e){return(0,a.clone)(e)};t.convertToFolder=function(e){for(var t=s();null!=this.getNode(t);)t=s();var n={type:r.FOLDER,id:t,expanded:!1,children:[]};this.replaceNode(e,n);this.removeNode(e);this.addNode(e,n,!1);this.version++;return n};t.allNodes=function(){return Object.values(this.nodes)};t.getNode=function(e){return this.nodes[e]};t.getRoots=function(){
|
||
return this.root.children};t.sortedGuildNodes=function(){return function e(t){return null==t.children?[]:t.children.map((function(t){return e(t)})).flat()}(this.root)};t._pluckNode=function(e){var t=null!=e.parentId?this.nodes[e.parentId]:this.root;i()(null!=t,"[GUILDS TREE] source node (".concat(e.id,") had a parent id (").concat(e.parentId,") which doesn't exist in the tree"));var n=t.children;i()(null!=n,"[GUILDS TREE] source node (".concat(e.id,") had a parent id (").concat(e.parentId,") which contains no children"));t.children=n.filter((function(t){return t!==e}));e.parentId=void 0;this.version++};!function(e,t,n){t&&u(e.prototype,t);n&&u(e,n)}(e,[{key:"size",get:function(){return this.allNodes().length}}]);return e}();function d(e,t){return{type:r.GUILD,id:e,parentId:t,children:[],unavailable:!1}}function p(e,t){var n,o,i;return{type:r.FOLDER,id:e.folderId,parentId:t,name:null!==(n=e.folderName)&&void 0!==n?n:void 0,color:null!==(o=e.folderColor)&&void 0!==o?o:void 0,
|
||
expanded:null!==(i=e.expanded)&&void 0!==i&&i,children:[]}}},169071:(e,t,n)=>{"use strict";n.d(t,{n:()=>a});var r=n(751615),o=n(628486),i=n(2590);function a(){var e=(0,o.Z)((function(e){return e.guildId})),t=(0,r.TH)().pathname,n=t.startsWith(i.Z5c.GUILD_DISCOVERY),a=t.startsWith(i.Z5c.GUILD_MEMBER_VERIFICATION("")),l=t.startsWith(i.Z5c.GUILD_MEMBER_VERIFICATION_FOR_HUB(""));return null==e&&!(n||a||l)}},917313:(e,t,n)=>{"use strict";n.d(t,{Z:()=>na});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n.n(l),c=n(973935),s=n(751615),f=n(457217),d=n(809784),p=n(202351),h=n(199731),y=n(513328),b=n(707961),v=n(216151),m=n(106200),g=n(566706),O=n(825252),E=n(31914),C=(n(340974),n(567403)),j=n(671723),S=n(652591);n(116433);const I=(0,n(260561).B)({kind:"user",id:"2022-01_server_recommendations_rollout",label:"Rollout experiment for server recommendations.",defaultConfig:{showRecs:!1},treatments:[{id:1,label:"Show server recommendations",config:{showRecs:!0}}]})
|
||
;var _=n(2590),w=n(594697);var x=n(944522),P=n(628486),N=n(953727),A=n(107218),T=n(473903),Z=n(120415),M=n(463473),R=n(896812),L=n(656793),D=n(780861),k=n(813869),U=n(66768),B=n(552889),F=n(744564);function G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e){H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return H(e)}function V(e,t){return!t||"object"!==z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function W(e,t){W=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return W(e,t)}var z=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
|
||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=H(e);if(t){var o=H(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V(this,n)}}var K={};var q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&W(e,t)}(n,e);var t=Y(n);function n(){G(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){var t=e;null!=t&&Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(K[e]=t[e])}))};r.getState=function(){return K};r.hasViewed=function(e){return null!=K[e]};r.__getLocalVars=function(){return{lastViewed:K}};return n}(p.ZP.PersistedStore);q.displayName="ViewHistoryStore";q.persistKey="ViewHistoryStore";const Q=new q(F.Z,{VIEW_HISTORY_MARK_VIEW:function(e){
|
||
var t=e.key;K[t]=Date.now()}});var X=n(901654),J=n(633997),$=n(295652),ee=n(473708);function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ne(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function re(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function oe(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return te(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ie="app-download-item",ae="add-server-item";function le(e){var t;if(!(0,L.c)())return!1;var n=k.Z.getMutableGuildStates();return e!==ie&&e!==ae&&(null===(t=n[null!=e?e:"null"])||void 0===t?void 0:t.unread)}function ue(e){var t,n=k.Z.getMutableGuildStates();return e===_.x8Z.SERVER_DISCOVERY_BADGE&&!Q.hasViewed(_.x8Z.SERVER_DISCOVERY_BADGE)||e!==ie&&e!==ae&&(null===(t=n[null!=e?e:"null"])||void 0===t?void 0:t.mentionCount)>0}var ce=(0,$.oH)((function(e,t,n){return["null"].concat(oe(t),oe(e),[ae,_.x8Z.E3_SERVER_DISCOVERY_BADGE,ie])}))
|
||
;const se=o.forwardRef((function(e,t){var n=(0,p.Wu)([B.Z,U.Z,k.Z],(function(){return ce(B.Z.guildFolders,U.Z.getUnreadPrivateChannelIds(),k.Z.getStoreChangeSentinel())})),o=(0,p.e7)([X.Z],(function(){return X.Z.isFocused()})),i=(0,p.e7)([D.Z],(function(){return D.Z.getExpandedFolders()}));return(0,r.jsx)(J.Z,re(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ne(e,t,n[t])}))}return e}({},e),{ref:t,items:n,isUnread:le,textUnread:ee.Z.Messages.NEW,textMention:ee.Z.Messages.NEW,isMentioned:ue,animate:o,expandedFolders:i}))}));var fe=n(443660),de=n(61209),pe=n(563367),he=n(248088),ye=n(971402),be=n(621647),ve=n(773011),me=n(177570),ge=n(717091),Oe=n(715107),Ee=n(170450),Ce=n.n(Ee),je=Object.freeze({tension:400,friction:30
|
||
}),Se=Object.freeze({opacity:0,height:8,x:-4});function Ie(e){var t=e.selected,n=void 0!==t&&t,o=e.hovered,i=void 0!==o&&o,l=e.unread,u=void 0!==l&&l,c=e.disabled,s=void 0!==c&&c,f=e.className;i=!s&&i;u=!s&&u;var d={opacity:1,height:(n=!s&&n)?40:i?20:8,x:0},p=(0,he.useTransition)(n||i||u,{config:je,keys:function(e){return e?"pill":"empty"},immediate:!i&&!document.hasFocus(),initial:n||i||u?d:null,from:Se,leave:Se,enter:d,update:d});return(0,r.jsx)("div",{className:a()(f,Ce().wrapper),"aria-hidden":!0,children:p((function(e,t){return t&&(0,r.jsx)(he.animated.span,{className:Ce().item,style:e})}))})}var _e=n(531441),we=n(421281),xe=n(984187),Pe=n.n(xe);function Ne(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ne(e,t,n[t])}))}return e}function Te(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ze(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var Me=[18,18,16,16,14,12,10];const Re=function(e){var t,n,i=e.children,l=e.icon,u=e.name,c=e.ariaLabel,f=e.className,d=e.style,p=e.to,h=e.onClick,y=e.selected,v=void 0!==y&&y,m=Ze(e,["children","icon","name","ariaLabel","className","style","to","onClick","selected"]),g=(0,s.k6)();null==l&&null!=u&&(n=function(e){var t;return null!==(t=Me[e.length-1])&&void 0!==t?t:Me[Me.length-1]}(t=(0,we.Zg)(u)));var O=o.useCallback((function(e){if(null==p);else if("string"==typeof p)g.push(p);else{var t=p.pathname,n=void 0===t?"":t,r=p.state;g.push(n,r)}null!=h&&h(e)}),[g,p,h]);return(0,r.jsxs)(b.P3F,Te(Ae({},m),{onClick:O,className:a()(f,Pe().wrapper,Ne({},Pe().selected,v)),"aria-label":null!=c&&""!==c?c:null!=u?u:"",style:Te(Ae({},d),{fontSize:n}),focusProps:{enabled:!1},children:[null!=t?(0,r.jsx)("div",{className:a()(Pe().childWrapper,Pe().acronym),"aria-hidden":!0,children:t}):null,null!=l?(0,r.jsx)("img",{
|
||
className:Pe().icon,src:l,alt:" ",width:48,height:48,"aria-hidden":!0}):null,null!=i?(0,r.jsx)("div",{className:Pe().childWrapper,children:i}):null]}))};var Le=n(671232),De=n.n(Le);function ke(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ke(e,t,n[t])}))}return e}function Be(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n
|
||
}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Fe(e){var t=e.children,n=e.text,i=e.color,l=e.disableWrapper,u=void 0!==l&&l,c=e.disabled,s=void 0!==c&&c,f=e.hideOnClick,d=void 0===f||f,p=e.shouldShow,h=e.forceOpen,y=e.selected,v=void 0!==y&&y,m=e.tooltipClass;return(0,r.jsx)(b.ua7,{shouldShow:p,forceOpen:h,spacing:20,hideOnClick:d,text:s?null:n,position:"right",color:i,"aria-label":!1,tooltipClassName:a()(De().listItemTooltip,m),children:function(e){return u?o.cloneElement(o.Children.only(t),Ue({},e)):(0,r.jsx)("div",Be(Ue({className:a()(De().listItemWrapper,ke({},De().selected,v))},e),{children:t}))}})}var Ge=n(445547),He=n.n(Ge);function Ve(e,t){return(0,r.jsx)("div",{className:He().listItem,ref:t,children:e})}var We=n(795470),ze=n(886391),Ye=n(3219),Ke=n(570202),qe=n(542231),Qe=n(621329),Xe=n(189865),Je=n(449401),$e=n(425454),et=n(472034),tt=n(108206),nt=n(796938),rt=n(516909);function ot(e,t){
|
||
(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function it(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function at(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ot(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ot(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lt(e){return(0,r.jsx)(_e.mA,{count:e})}function ut(e){var t,n=e.audio,r=e.video,o=e.screenshare,i=e.participating,a=e.liveStage,l=e.hasActiveEvent,u=e.participatingInStage,c=e.activity;if(!l||i||u)if(a&&!i||u)t=rt.Z;else if(c)t=tt.Z;else if(o)t=$e.Z;else if(r)t=qe.Z;else{if(!n)return null;t=nt.Z}else t=Ke.Z;return st({icon:t,participating:i||u})}function ct(e){var t=at(function(e){switch(e){case ze.wB.SUBMITTED:return[void 0,Je.Z];case ze.wB.REJECTED:return[_.Ilk.RED_400,Xe.Z];case ze.wB.APPROVED:return[_.Ilk.GREEN_360,Qe.Z];default:return[void 0,et.Z]}}(e.guildJoinRequestStatus),2),n=t[0];return st({icon:t[1],color:n})}function st(e){var t=e.icon,n=e.color,o=e.participating,i=null==n?{disableColor:!0}:{color:(0,We.Lq)(n)};return(0,r.jsx)(_e.G2,function(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){it(e,t,n[t])}))}return e}({icon:t,className:a()(He().iconBadge,it({},He().participating,o))},i))}var ft=n(170010),dt=n.n(ft);function pt(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function ht(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){pt(i,r,o,a,l,"next",e)}function l(e){pt(i,r,o,a,l,"throw",e)}a(void 0)}))}}function yt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function vt(e){vt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){
|
||
return e.__proto__||Object.getPrototypeOf(e)};return vt(e)}function mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){bt(e,t,n[t])}))}return e}function gt(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ot(e,t){return!t||"object"!==Ct(t)&&"function"!=typeof t?function(e){
|
||
if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Et(e,t){Et=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Et(e,t)}var Ct=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function jt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=vt(e);if(t){var o=vt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ot(this,n)}}var St=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){
|
||
return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},It={friction:28,tension:600};function _t(e){switch(e){case"height":case"opacity":return mt({duration:150},It);case"scale":return mt({},It);default:
|
||
throw new Error("DirectMessage: getSpringConfigs() - Invalid spring ".concat(String(e)))}}var wt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Et(e,t)}(i,e);var t=jt(i);function i(){yt(this,i);var e;(e=t.apply(this,arguments)).state={hovered:!1,animating:!0,controller:new he.Controller({scale:0,height:0,opacity:0,config:_t})};e.handleContextMenu=function(t){var o=e.props.channel,i=o.type===_.d4z.DM?T.default.getUser(o.getRecipientId()):null;null!=i?(0,ye.jW)(t,ht((function(){var e,t;return St(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(50865)]).then(n.bind(n,550865))];case 1:e=a.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,gt(mt({},e),{channel:o,user:i}))}]}}))}))):(0,ye.jW)(t,ht((function(){var e,t;return St(this,(function(i){switch(i.label){
|
||
case 0:return[4,n.e(13035).then(n.bind(n,413035))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,gt(mt({},e),{channel:o,selected:!1}))}]}}))})))};return e}var a=i.prototype;a.componentWillEnter=function(e){var t=this,n=this.state.controller;e();n.update({immediate:!X.Z.isFocused(),height:1,opacity:1,scale:1,config:_t}).start().then((function(){return t.setState({animating:!1})}))};a.componentWillAppear=function(e){this.state.controller.update({immediate:!0,scale:1,opacity:1,height:1,config:_t}).start().then(e)};a.componentWillLeave=function(e){var t=this.state.controller;this.setState({animating:!0},(function(){return t.update({immediate:!X.Z.isFocused(),height:0,opacity:0,scale:0,config:_t}).start().then(e)}))};a.componentWillUnmount=function(){this.state.controller.dispose()};a.getAnimatedStyle=function(){var e=this.state.controller.springs,t=e.opacity,n=e.height,r=e.scale;return{opacity:t,height:n.to([0,1],[0,56]),transform:r.to([0,1],[.5,1]).to((function(e){
|
||
return"scale(".concat(e,")")}))}};a.getChannelIcon=function(){var e=this.props.channel,t=e.type===_.d4z.DM?T.default.getUser(e.getRecipientId()):null;return null!=t?t.getAvatarURL(void 0,48,!1):(0,be.x)(e)};a.render=function(){var e=this,t=this.props,n=t.channel,i=t.channelName,a=t.selected,l=t.badge,u=t.audio,c=t.video,s=t.stream,d=t.isCurrentUserInThisDMCall,p=t.unread,h=this.state,y=h.hovered,v=h.animating;return(0,r.jsx)(he.animated.div,{style:this.getAnimatedStyle(),children:Ve((0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(Ie,{hovered:!v&&y,selected:!v&&a,unread:!v&&p,className:dt().pill}),(0,r.jsx)(Fe,{text:null!=i?i:"",selected:a,children:(0,r.jsx)(b.aRk,{selected:a||y,lowerBadge:l>0?lt(l):null,upperBadge:ut({audio:u,video:c,screenshare:s,participating:d}),lowerBadgeWidth:(0,_e.OV)(l),children:(0,r.jsx)(f.mh,{id:n.id,children:function(t){return(0,r.jsx)(Re,mt({to:_.Z5c.CHANNEL(_.ME,n.id),onMouseEnter:function(){return e.setState({hovered:!0})},onMouseLeave:function(){
|
||
return e.setState({hovered:!1})},icon:e.getChannelIcon(),selected:a||y,ariaLabel:null!=i?i:"",onContextMenu:e.handleContextMenu},t))}})})})]}))})};return i}(o.PureComponent);wt.defaultProps={badge:0,audio:!1,video:!1,isCurrentUserInThisDMCall:!1};const xt=o.forwardRef((function(e,t){var n=e.channel.id,o=(0,ve.ZP)(e.channel),i=(0,p.e7)([pe.Z],(function(){return pe.Z.getChannelId()}),[]),a=(0,p.e7)([g.Z],(function(){return null!=i?g.Z.getMode(i):_.WtW.VOICE}),[i]),l=(0,p.e7)([me.Z],(function(){return me.Z.getAllApplicationStreamsForChannel(n).length>0})),u=(0,p.e7)([Oe.Z],(function(){return Oe.Z.getChannelId()}),[]),c=(0,p.e7)([ge.ZP],(function(){return ge.ZP.getMentionCount(n)}),[n]),s=i===n,f=!1,d=!1;if(s){f=a===_.WtW.VOICE;d=a===_.WtW.VIDEO}return(0,r.jsx)(wt,gt(mt({},e),{ref:t,channelName:o,unread:c>0,selected:u===n,badge:c,audio:f,video:d,stream:l,isCurrentUserInThisDMCall:s}))}));function Pt(){(0,p.e7)([de.Z],(function(){return de.Z.getPrivateChannelsVersion()}))
|
||
;var e=de.Z.getMutablePrivateChannels(),t=(0,p.Wu)([U.Z],(function(){return U.Z.getUnreadPrivateChannelIds()})),n=(0,p.cj)([pe.Z],(function(){return{selectedVoiceGuildId:pe.Z.getGuildId(),selectedVoiceChannelId:pe.Z.getChannelId()}})),i=n.selectedVoiceGuildId,a=n.selectedVoiceChannelId,l=t.map((function(t){var n=e[t];return null==n||n.id===a?null:(0,r.jsx)(xt,{channel:n},n.id)}));if(null==i&&null!=a){var u=e[a];null!=u&&l.unshift((0,r.jsx)(xt,{channel:u},u.id))}return(0,r.jsx)(fe.Z,{component:o.Fragment,children:l})}var Nt=n(898652),At=n(202772),Tt=n.n(At);function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Mt(e,t,n[t])}))}return e}function Lt(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Dt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{
|
||
try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const kt=o.forwardRef((function(e,t){var n=e.id,i=e.onClick,l=e.onContextMenu,u=e.icon,c=e.selected,s=e.tooltip,d=e.upperBadge,p=e.lowerBadge,h=e.lowerBadgeWidth,y=e.showPill,v=void 0===y||y,m=e.className,g=e["aria-label"],O=e.children,E=e.onMouseEnter,C=e.onMouseLeave,j=e.onMouseDown,S=(0,f.Ie)(n),I=Dt(o.useState(!1),2),_=I[0],w=I[1],x="string"==typeof s&&null==g?s:g;return Ve((0,r.jsxs)(r.Fragment,{children:[v?(0,r.jsx)("div",{
|
||
className:Tt().pill,children:(0,r.jsx)(Ie,{hovered:_,selected:c})}):null,(0,r.jsx)(Fe,{text:s,selected:c,children:(0,r.jsx)(b.aRk,{className:Tt().circleButtonMask,selected:c||_,upperBadge:d,lowerBadge:p,lowerBadgeWidth:h,children:(0,r.jsx)(b.P3F,Lt(Rt({innerRef:t,onMouseEnter:function(){null==E||E();w(!0)},onMouseLeave:function(){null==C||C();w(!1)},onMouseDown:j,className:a()(Tt().circleIconButton,m,Mt({},Tt().selected,c||_)),onClick:i,"aria-label":x,onContextMenu:l,focusProps:{enabled:!1}},S),{children:null!=u&&(0,r.jsx)(u,{className:Tt().circleIcon})}))})}),O]}))}));function Ut(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Bt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ut(i,r,o,a,l,"next",e)}function l(e){Ut(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ft(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0
|
||
}):e[t]=n;return e}var Gt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e]
|
||
;r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Ht="DOWNLOAD_APPS";function Vt(){var e=(0,b.s9z)((function(e){return(0,b.DEQ)(e,Ht)}));return(0,r.jsx)(kt,{id:"app-download-button",onClick:function(){(0,b.ZDy)(Bt((function(){var e,t;return Gt(this,(function(o){switch(o.label){case 0:return[4,Promise.resolve().then(n.bind(n,908056))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ft(e,t,n[t])}))}return e}({source:"Guilds"},e))}]}}))})),{modalKey:Ht})},selected:e,tooltip:ee.Z.Messages.DOWNLOAD_APPS,icon:Nt.Z})}
|
||
var Wt=n(19585),zt=n(454011),Yt=n(288634),Kt=n(549069),qt=n(736543),Qt=n(933850),Xt=n(441143),Jt=n.n(Xt),$t=n(306012),en=n(327499),tn=n(565283),nn=n.n(tn);function rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function on(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rn(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function an(e){var t=o.useRef(null),n=e.map((function(e){return e[0]}));o.useLayoutEffect((function(){var n=requestAnimationFrame((function(){var n=t.current;if(null!=n){var r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=on(a.value,2),c=u[0],s=u[1];c?n.classList.add(s):n.classList.remove(s)}}catch(e){o=!0;i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}}}));return function(){return cancelAnimationFrame(n)}}),n);return t}function ln(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Jt()(t.type!==R.eD.ROOT,"[GuildDropTarget] Tried using a root node as a drop target.");return{accept:e,canDrop:function(e){
|
||
return e.nodeId!==t.id&&((!r||e.type!==R.eD.FOLDER||t.type!==R.eD.FOLDER)&&(e.type!==R.eD.FOLDER||null==t.parentId))},drop:function(e){var o=e.nodeId;en.Z.moveById(o,t.id,n,r)},collect:function(e){return{canDrop:e.canDrop(),isOver:e.isOver()}}}}function un(e){var t=e.name,n=e.targetNode,i=e.combine,l=e.below,u=o.useMemo((function(){return ln([R.eD.GUILD,R.eD.FOLDER],n,l,i)}),[n,l,i]),c=on((0,$t.L)(u),2),s=c[0],f=s.canDrop,d=s.isOver,p=c[1],h=an([[f,nn().autoPointerEvents],[d,nn().dragOver]]);return(0,r.jsx)("div",{ref:function(e){h.current=e;p(e)},"data-dnd-name":ee.Z.Messages.DND_DROP_ABOVE.format({itemName:t}),className:a()(nn().target)})}function cn(e){var t=e.name,n=e.targetNode,i=e.onDragOverChanged,l=on((0,$t.L)((function(){return ln([R.eD.GUILD],n,!0,!0)})),2),u=l[0],c=u.canDrop,s=u.isOver,f=l[1];o.useEffect((function(){null==i||i(s)}),[i,s]);var d=an([[c,nn().autoPointerEvents],[s,nn().dragOver]]);return(0,r.jsx)(Fe,{text:t,shouldShow:s,forceOpen:s,disableWrapper:!0,
|
||
tooltipClass:nn().centerTargetTooltip,children:(0,r.jsx)("div",{ref:function(e){d.current=e;f(e)},"data-dnd-name":ee.Z.Messages.DND_DROP_COMBINE.format({itemName:t}),className:a()(nn().centerTarget,{})})})}const sn=o.memo((function(e){var t=e.name,n=e.targetNode,o=e.noCombine,i=void 0!==o&&o,a=e.below,l=void 0!==a&&a,u=e.onDragOverChanged,c=!i&&null==n.parentId;return(0,r.jsxs)("div",{className:nn().wrapper,"aria-hidden":!0,children:[(0,r.jsx)(un,{name:t,targetNode:n,below:l}),c?(0,r.jsx)(cn,{name:t,targetNode:n,onDragOverChanged:u}):null]})}));function fn(e){var t=e.name,n=e.targetNode,o=on((0,$t.L)((function(){return ln([R.eD.GUILD],n,!0,!0)})),2),i=o[0],l=i.canDrop,u=i.isOver,c=o[1],s=an([[u,nn().wrapperOver]]),f=an([[u,nn().dragOver],[l,nn().autoPointerEvents]]);return(0,r.jsx)("div",{ref:s,className:a()(nn().folderEndWrapper),"aria-hidden":!0,children:(0,r.jsx)("div",{className:nn().folderTarget,children:(0,r.jsx)("div",{ref:function(e){f.current=e;c(e)},
|
||
"aria-label":"At end of ".concat(t),className:a()(nn().target)})})})}function dn(e){var t=e.children,n=on((0,$t.L)({accept:[]}),2)[1];return(0,r.jsx)("div",{ref:n,children:t})}var pn=n(416625);function hn(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function yn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){hn(i,r,o,a,l,"next",e)}function l(e){hn(i,r,o,a,l,"throw",e)}a(void 0)}))}}function bn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var vn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,
|
||
r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},mn={origin:{x:-16,y:0},targetWidth:48,targetHeight:48,offset:{x:0,y:0}};function gn(e){(0,ye.jW)(e,yn((function(){var e,t;return vn(this,(function(o){switch(o.label){case 0:return[4,n.e(60625).then(n.bind(n,360625))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,
|
||
r.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){bn(e,t,n[t])}))}return e}({},e))}]}}))})))}function On(e){var t=e.disableTooltip,n=e.lastTargetNode,i=(0,p.e7)([C.Z],(function(){return C.Z.getGuilds()})),a=o.useMemo((function(){return Object.values(i)}),[i]),l=(0,p.e7)([T.default],(function(){return T.default.getCurrentUser()})),u=o.useMemo((function(){return a.some((function(e){return e.isOwner(l)}))}),[a,l]),c=(0,b.s9z)((function(e){return(0,b.DEQ)(e,pn.P)})),s=(0,Wt.Z)().analyticsLocations,f=(0,r.jsx)(kt,{showPill:!1,id:"create-join-button",onClick:function(){(0,Yt.yU)()?(0,Kt.Z)({analyticsSource:{page:_.Sbl.CREATE_JOIN_GUILD_MODAL},analyticsLocation:{page:_.Sbl.CREATE_JOIN_GUILD_MODAL,section:_.jXE.GUILD_CAP_UPSELL_MODAL},
|
||
analyticsLocations:s}):zt.Z.openCreateGuildModal({location:"Guild List"})},selected:c,onContextMenu:gn,tooltip:ee.Z.Messages.ADD_A_SERVER,icon:Qt.Z});return t?f:(0,r.jsx)("div",{className:He().tutorialContainer,children:(0,r.jsxs)(qt.Z,{tutorialId:u?"create-more-servers":"create-first-server",inlineSpecs:mn,position:"right",children:[f,null!=n&&(0,r.jsx)(sn,{name:ee.Z.Messages.DND_END_OF_LIST,targetNode:n,below:!0,noCombine:!0})]})})}var En=n(761953),Cn=n(258104),jn=n(419051),Sn=n(682776),In=n(488462);var _n=n(82274),wn=n(808194),xn=n(602397),Pn=n(23727),Nn=n(81308),An=n(96606),Tn=n(72580),Zn=n(866016),Mn=n.n(Zn),Rn=n(212515),Ln=n.n(Rn);function Dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Un(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Bn(e){return function(e){if(Array.isArray(e))return Dn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Dn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dn(e,t)}(e)||function(){
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fn(e,t){return 0===t.length?null:(0,r.jsxs)("div",{className:Mn().row,children:[(0,r.jsx)(e,{className:Mn().activityIcon}),(0,r.jsx)(An.Z,{guildId:void 0,users:t,max:6})]})}function Gn(){var e,t,n=(0,p.Wu)([jn.Z,de.Z],(function(){return Object.keys(jn.Z.getFavoriteChannels()).map((function(e){return de.Z.getChannel(e)})).filter(Tn.lm)})),o=n.map((function(e){return e.id})),i=n.filter((function(e){return e.type===_.d4z.GUILD_VOICE})),a=n.filter((function(e){return e.type===_.d4z.GUILD_STAGE_VOICE})).map((function(e){return e.id})),l=(0,p.Wu)([xn.ZP],(function(){return u().flatMap(i,(function(e){return xn.ZP.getVoiceStatesForChannel(e).map((function(e){return e.user}))}))}),[i]),c=(0,p.Wu)([_n.Z],(function(){return u().flatMap(a,(function(e){return _n.Z.getMutableParticipants(e,wn.pV.SPEAKER).filter((function(e){
|
||
return e.type===wn.Ui.VOICE})).map((function(e){return e.user}))}))})),s=(0,p.e7)([_n.Z],(function(){var e=0,t=!0,n=!1,r=void 0;try{for(var o,i=a[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var l=o.value;e+=_n.Z.getParticipantCount(l,wn.pV.AUDIENCE)}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e})),f=(0,p.Wu)([me.Z],(function(){return me.Z.getAllApplicationStreams().filter((function(e){return o.includes(e.channelId)})).map((function(e){return e.ownerId}))}),[o]),d=(0,p.Wu)([Cn.ZP],(function(){var e=Cn.ZP.getEmbeddedActivitiesByChannel(),t=[],n=!0,r=!1,i=void 0;try{for(var a,l=o[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u,c,s,f=a.value;(u=t).push.apply(u,Bn(null!==(s=null===(c=e.get(f))||void 0===c?void 0:c.flatMap((function(e){return Array.from(e.connections.keys())})))&&void 0!==s?s:[]))}}catch(e){r=!0;i=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}return t}),[o]),h=(0,p.Wu)([T.default],(function(){
|
||
return d.map((function(e){return T.default.getUser(e)}))}),[d]),y=(0,p.Wu)([T.default],(function(){return f.map((function(e){return T.default.getUser(e)}))}),[f]),v=Fn(nt.Z,l.filter((function(e){return!f.includes(e.id)&&!d.includes(e.id)}))),m=(t=s,0===(e=c).length?null:(0,r.jsxs)("div",{className:Mn().row,children:[(0,r.jsx)(rt.Z,{className:Mn().activityIcon}),(0,r.jsx)(An.Z,{guildId:void 0,users:e,max:3}),(0,r.jsxs)("div",{className:Mn().stageListenerPill,children:[(0,r.jsx)(Pn.Z,{width:16,height:16}),(0,r.jsx)(b.xvT,{className:Mn().stageListenerCount,color:"text-normal",variant:"text-xs/medium",children:t})]})]})),g=Fn(Nn.Z,y.filter((function(e){return null!=e&&!d.includes(e.id)}))),O=Fn(tt.Z,h);return(0,r.jsxs)(r.Fragment,{children:[m,v,g,O]})}function Hn(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:a()(Mn().row,Mn().rowGuildName),children:(0,r.jsx)("span",{className:a()(Mn().guildNameText,Mn().guildNameTextLimitedSize),
|
||
children:ee.Z.Messages.FAVORITES_GUILD_NAME})}),(0,r.jsx)(Gn,{})]})}function Vn(e){var t=e["aria-label"],n=void 0!==t&&t,o=e.children;return(0,r.jsx)(b.ua7,{hideOnClick:!0,spacing:20,position:"right",text:(0,r.jsx)(Hn,{}),"aria-label":n,tooltipClassName:Ln().listItemTooltip,children:function(e){return(0,r.jsx)("div",Un(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){kn(e,t,n[t])}))}return e}({},e),{children:o}))}})}var Wn=n(407561),zn=n(71236),Yn=n(893263),Kn=n(961355),qn=n.n(Kn);function Qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xn(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Jn(e){return function(){
|
||
var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Xn(i,r,o,a,l,"next",e)}function l(e){Xn(i,r,o,a,l,"throw",e)}a(void 0)}))}}function $n(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function er(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){$n(e,t,n[t])}))}return e}function tr(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function nr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||or(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rr(e){return function(e){if(Array.isArray(e))return Qn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||or(e)||function(){
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function or(e,t){if(e){if("string"==typeof e)return Qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qn(e,t):void 0}}var ir=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++
|
||
;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},ar={analyticsSource:{page:_.ZY5.GUILD_CHANNEL,section:_.jXE.CHANNEL_LIST,object:_.qAy.CHANNEL}};function lr(){var e=(0,f.Ie)("favorites"),t=nr(o.useState(!1),2),i=t[0],a=t[1],l=(0,p.cj)([jn.Z],(function(){return{favoriteChannels:jn.Z.getFavoriteChannels(),favoriteServerMuted:jn.Z.favoriteServerMuted}})),u=l.favoriteServerMuted,c=l.favoriteChannels,s=(0,p.e7)([Oe.Z],(function(){return Oe.Z.getChannelId(_.I_8)})),d=(0,p.e7)([de.Z],(function(){return de.Z.getChannel(s)})),h=(0,
|
||
P.Z)((function(e){return e.guildId}))===_.I_8,y=function(e){return(0,p.cj)([de.Z,ge.ZP,Sn.Z],(function(){return Object.keys(e).reduce((function(e,t){var n=de.Z.getChannel(t),r=null==n?void 0:n.isGuildVocal();e.badge=e.badge+ge.ZP.getMentionCount(t);e.unread=e.unread||!r&&Sn.Z.can(In.Pl.VIEW_CHANNEL,n)&&ge.ZP.hasUnread(t);return e}),{badge:0,unread:!1})}))}(c),v=y.badge,m=y.unread,g=function(e){var t=(0,p.e7)([Oe.Z],(function(){return Oe.Z.getVoiceChannelId()})),n=null!=t&&null!=e[t],r=(0,p.e7)([me.Z],(function(){if(!n)return!1;var t=me.Z.getCurrentUserActiveStream();return null!=t&&null!=e[t.channelId]})),o=(0,p.e7)([me.Z],(function(){return me.Z.getAllApplicationStreams().some((function(t){return null!=e[t.channelId]}))})),i=(0,p.e7)([Wn.Z],(function(){return n&&null!=t&&Wn.Z.hasVideo(t)}),[n,t]),a=(0,p.Wu)([Cn.ZP],(function(){return Object.keys(e).reduce((function(e,t){var n;(n=e).push.apply(n,rr(Cn.ZP.getEmbeddedActivitiesForChannel(t)));return e}),[])})),l=(0,
|
||
p.e7)([Cn.ZP],(function(){return Array.from(Cn.ZP.getSelfEmbeddedActivities().values()).some((function(t){var n=t.channelId;return null!=e[n]}))})),u=a.length>0,c=!1,s=!1,f=!1,d=!1;if(n){c=!i;s=i;f=r;d=l}else{f=o;d=u}return ut({audio:c,video:s,screenshare:f,liveStage:!1,participating:n,participatingInStage:!1,activity:d})}(c),O=v>0?(0,Yn.Ne)(v):null;return Ve((0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Ie,{selected:h,hovered:i,unread:m&&!u,className:qn().pill}),(0,r.jsx)(Vn,{children:(0,r.jsx)(b.aRk,{selected:h||i,upperBadge:g,lowerBadge:O,children:(0,r.jsx)(Re,tr(er({},e),{ariaLabel:ee.Z.Messages.GUILD_TOOLTIP_A11Y_LABEL.format({guildName:ee.Z.Messages.FAVORITES_GUILD_NAME,mentions:v}),to:{pathname:_.Z5c.CHANNEL(_.I_8,s),state:ar},selected:h||i,onMouseEnter:function(){return a(!0)},onMouseLeave:function(){return a(!1)},onMouseDown:function(){null!=d&&En.Z.preload(d.guild_id,d.id)},onContextMenu:function(e){(0,ye.jW)(e,Jn((function(){var e,t;return ir(this,(function(o){switch(o.label){
|
||
case 0:return[4,n.e(29375).then(n.bind(n,429375))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,er({},e))}]}}))})))},children:(0,r.jsx)(zn.Z,{className:qn().favoriteIcon,width:20,height:20})}))})})]}))}var ur=n(336194),cr=n(366007),sr=n(95891),fr=n(795909),dr=n(203600),pr=n(980771),hr=n.n(pr);function yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function br(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name)
|
||
;if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vr(){var e=(0,Wt.Z)().analyticsLocations,t=br(o.useState(!1),2),n=t[0],i=t[1];o.useEffect((function(){S.default.track(_.rMx.PREMIUM_UPSELL_VIEWED,{type:dr.cd.GUILD_CAP_INLINE_SERVER_LIST,location:{page:_.ZY5.GUILD_LIST},location_stack:e})}),[e]);return(0,r.jsx)(kt,{id:"nitro-guild-cap-upsell",className:hr().nitroUpsell,tooltip:(0,r.jsxs)("div",{className:hr().upsellTooltip,children:[(0,r.jsx)(sr.Z,{width:22,height:22,className:hr().upsellIcon,color:cr.JX.PREMIUM_TIER_2}),(0,r.jsx)("span",{className:hr().upsellText,children:ee.Z.Messages.GUILD_CAP_UPSELL_TOOLTIP})]}),"aria-label":ee.Z.Messages.GUILD_CAP_UPSELL_TOOLTIP,upperBadge:(0,r.jsx)(_e.G2,{icon:Ye.Z,
|
||
color:ur.Z.unsafe_rawColors.PREMIUM_TIER_2_PURPLE.css}),onClick:function(){i(!n);n||(0,Kt.Z)({analyticsSource:{page:_.ZY5.GUILD_LIST},analyticsLocation:{page:_.ZY5.GUILD_LIST,section:_.jXE.GUILD_CAP_UPSELL_MODAL},onCloseCallback:function(){(0,Yt.Lx)();i(!1)},analyticsLocations:e})},selected:n,icon:function(e){var t=e.className;return(0,r.jsx)(fr.Z,{className:t,foreground:hr().nitroUpsellIcon})}})}const mr=o.memo((function(){return(0,Yt.Gn)()?(0,r.jsx)(vr,{}):null}));var gr=n(106750),Or=n(784426),Er=n(794547);function Cr(){if(window.location.pathname.startsWith(_.Z5c.GUILD_DISCOVERY)){(0,gr.AQ)();(0,gr.uY)(w.Hk,!0)}var e=(0,Or.s1)().location.search;(0,Or.uL)(_.Z5c.GUILD_DISCOVERY,{search:e})}const jr=o.forwardRef((function(e,t){var n=e.selected,o=e.tooltip;return(0,r.jsx)(kt,{id:"guild-discover-button",ref:t,onClick:Cr,selected:n,tooltip:null!=o?o:ee.Z.Messages.GUILD_DISCOVERY_TOOLTIP,icon:Er.Z})}))
|
||
;var Sr=n(630631),Ir=n(576725),_r=n(544488),wr=n(840922),xr=n(432065),Pr=n(493221),Nr=n(713094),Ar=n(454708),Tr=n(336117),Zr=n(954419),Mr=n(716118),Rr=n(169071),Lr=n(980341),Dr=n.n(Lr);function kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ur(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ur(e,t,n[t])}))}return e}function Fr(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e)
|
||
;t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Gr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return kr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kr(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Hr={origin:{x:-16,y:0},targetWidth:48,targetHeight:48,offset:{x:0,y:0}};function Vr(e){var t=e.selected,n=e.user,i=e.badge,a=e.link,l=e.showProgressBadge,u=Gr(o.useState(!1),2),c=u[0],s=u[1],d=Gr(o.useState(!1),2),p=d[0],h=d[1],y=Gr(o.useState(null),2),v=y[0],m=y[1],g=Gr(o.useState(0),2),O=g[0],E=g[1],C=(0,f.Ie)("home"),j=function(){m(null);E(0);clearTimeout(v)};if(null==n)return null;var S=ee.Z.Messages.DIRECT_MESSAGES;p&&(S=Sr.Z.get(_.wli)?ee.Z.Messages.DISCODO_ENABLED:ee.Z.Messages.DISCODO_DISABLED);return(0,r.jsx)("div",{className:Dr().tutorialContainer,children:(0,r.jsx)(qt.Z,{inlineSpecs:Hr,tutorialId:"friends-list",position:"right",children:Ve((0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(Ie,{selected:t,hovered:c,className:Dr().pill}),(0,r.jsx)(Fe,{color:b.ua7.Colors.PRIMARY,hideOnClick:!0,text:S,selected:t,
|
||
children:(0,r.jsx)(b.aRk,{selected:t||c,lowerBadge:i>0?lt(i):null,upperBadge:!t&&l?(0,r.jsx)(Ir.Z,{className:Dr().downloadProgress,determineOwnVisibility:!1}):null,lowerBadgeWidth:(0,_e.OV)(i),children:(0,r.jsx)(Re,Fr(Br({onMouseEnter:function(){return s(!0)},onMouseLeave:function(){return s(!1)},onClick:function(){if(!__OVERLAY__){null!=v&&clearTimeout(v);m(setTimeout(j,500));E(O+1);if(15===O){j();var e=!Sr.Z.get(_.wli);Sr.Z.set(_.wli,e);e?(0,Mr.GN)("discodo"):(0,Mr.GN)("user_leave");h(!0);setTimeout((function(){h(!1)}),1e3)}}},selected:t||c,ariaLabel:ee.Z.Messages.DIRECT_MESSAGES},C),{to:{pathname:a,state:{analyticsSource:{page:_.ZY5.GUILD_CHANNEL,section:_.jXE.NAVIGATION,object:_.qAy.BUTTON_HOME}}},children:(0,r.jsx)(Tr.Z,{className:Dr().homeIcon})}))})})]}))})})}function Wr(){var e=(0,Rr.n)(),t=(0,p.e7)([Ar.Z,Nr.Z],(function(){var e=(0,Ir.E)(Ar.Z.activeItems,Nr.Z),t=Zr.lK(e),n=t.total,r=t.progress,o=Zr.xI(r,n);return o>0&&o<100})),n=(0,p.e7)([wr.Z],(function(){
|
||
return wr.Z.getPendingCount()})),o=Object.keys(dr.nG),i=(0,p.e7)([xr.Z],(function(){return xr.Z.getUnacknowledgedOffers(o).length})),a=(0,p.e7)([T.default],(function(){return T.default.getCurrentUser()})),l=n+i+(0,_r.q)();return(0,r.jsx)(Vr,{selected:e,user:a,selectedChannelId:Oe.Z.getChannelId(_.ME),badge:l,link:Pr.Z.getHomeLink(),showProgressBadge:t})}var zr=n(848285),Yr=n(757753),Kr=n(348311),qr=n(97641),Qr=n(944010),Xr=n(934870),Jr=n(124251),$r=n(211482),eo=n(954938),to=n.n(eo);function no(e){var t=e.className;return(0,r.jsx)($r.ZP,{mask:$r.ZP.Masks.SQUIRCLE,className:a()(t,to().placeholderMask),width:48,height:48,style:{display:"block"},children:(0,r.jsx)("div",{className:to().dragInner})})}var ro=n(550262),oo=n.n(ro);function io(e){var t=e.guild,n=e.show,o=e.active,i=e.onAnimationStart,l=e.onAnimationRest,u={},c={};u.transform="translate3d(10px, 10px, 0) scale3d(3, 3, 1)";c.transform="translate3d(0, 0, 0) scale3d(1, 1, 1)";var s=(0,
|
||
b.dQu)(ur.Z.unsafe_rawColors.BRAND_500).hex(),f=(0,b.dQu)(ur.Z.unsafe_rawColors.PRIMARY_630).hex();if(o&&null==t.icon){u.backgroundColor=s;c.backgroundColor=f}var d=(0,he.useTransition)(n,{from:u,enter:c,leave:u,config:{duration:100},onStart:i,onRest:l});return(0,r.jsx)(r.Fragment,{children:d((function(e,n,o){return n&&(0,r.jsx)("div",{className:a()(oo().folder,oo().hover),children:(0,r.jsx)("div",{className:oo().folderIconWrapper,children:(0,r.jsxs)("div",{className:oo().closedFolderIconWrapper,children:[(0,r.jsx)(he.animated.div,{className:oo().folderIconPreview,style:e,children:(0,r.jsx)(Jr.Z,{guild:t,size:Jr.Z.Sizes.SMOL,className:oo().guildIcon})}),(0,r.jsx)(no,{className:oo().miniPlaceholder})]})})},o.key)}))})}var ao=n(385563),lo=n(912665),uo=n.n(lo);function co(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function so(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}
|
||
function fo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){so(i,r,o,a,l,"next",e)}function l(e){so(i,r,o,a,l,"throw",e)}a(void 0)}))}}function po(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ho(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){po(e,t,n[t])}))}return e}function yo(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n
|
||
}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function bo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return co(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return co(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
var vo=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}
|
||
if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},mo={analyticsSource:{page:_.ZY5.GUILD_CHANNEL,section:_.jXE.CHANNEL_LIST,object:_.qAy.CHANNEL}};function go(e,t){(0,ye.jW)(e,fo((function(){var e,o;return vo(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(92224),n.e(46194),n.e(7421),n.e(86502),n.e(76003),n.e(19669),n.e(77357),n.e(9907),n.e(66240),n.e(55325)]).then(n.bind(n,166240))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,yo(ho({},e),{guild:t}))}]}}))})))}const Oo=o.memo((function(e){
|
||
var t,n,i,l=e.guildNode,u=e.setRef,c=e.onDragStart,s=e.onDragEnd,d=e.route,p=e.guild,h=e.animatable,v=e.selected,m=void 0!==v&&v,g=e.unread,O=void 0!==g&&g,E=e.muted,C=void 0!==E&&E,j=e.mediaState,S=e.unavailable,I=void 0!==S&&S,_=e.badge,w=void 0===_?0:_,x=e.contextMenu,P=void 0===x?go:x,N=e.draggable,T=void 0!==N&&N,Z=e.sorting,M=void 0!==Z&&Z,D=e.preloadOnClick,k=void 0===D||D,U=e.guildJoinRequestStatus,B=l.id,F=l.parentId,G=null!==(t=e.upperBadge)&&void 0!==t?t:I?(0,r.jsx)(_e.G2,{icon:Ye.Z,disableColor:!0,className:He().unavailableBadge}):null!=j?ut(j):void 0,H=null!==(n=e.lowerBadge)&&void 0!==n?n:void 0;if(null==H&&w>0){var V;H=null!==(V=lt(w))&&void 0!==V?V:void 0}else if(null==H&&null!=U){var W;H=null!==(W=ct({guildJoinRequestStatus:U}))&&void 0!==W?W:void 0}var z=null!==(i=e.lowerBadgeWidth)&&void 0!==i?i:(0,_e.OV)(w),Y=bo((0,qr.c)({type:R.eD.GUILD,item:function(){requestAnimationFrame((function(){null==c||c()}));return{type:l.type,nodeId:l.id}},end:function(){null==s||s();(0,
|
||
Qr.V1)(A.Z.getCompatibleGuildFolders())},collect:function(e){return{dragging:e.isDragging()}}}),2),K=Y[0].dragging,q=Y[1],Q=(0,f.Ie)(null!=B?B:""),X=bo(o.useState(!1),2),J=X[0],$=X[1],te=!M&&J,ne=bo(o.useState(!1),2),re=ne[0],oe=ne[1],ie=bo(o.useState(!1),2),ae=ie[0],le=ie[1],ue=bo(o.useState((function(){return new y.sW(70,(function(){return le(!0)}))})),1)[0];o.useEffect((function(){return function(){return ue.cancel()}}),[ue]);var ce=o.useCallback((function(){null==d?(0,Xr.X)(B,{state:mo}):(0,Or.uL)(d,{state:mo})}),[B,d]),se=o.useCallback((function(){if(null==d&&null!=p&&!I&&k){var e=(0,Xr.V)(p.id);null!=e&&En.Z.preload(p.id,e)}}),[d,p,I,k]),fe=o.useCallback((function(e){null!=p&&P(e,p)}),[p,P]),de=o.useCallback((function(e){if("ArrowLeft"===e.key&&null!=F){var t;null===(t=document.querySelector("[aria-owns=folder-items-".concat(F,"]")))||void 0===t||t.focus()}}),[F]),pe=o.useCallback((function(e){if(e)ue.delay();else{ue.cancel();le(!1)}}),[ue]),he=o.useCallback((function(e){
|
||
null==u||u(B,e)}),[B,u]);if(null==p)return null;var ye,be=ae||re?(0,r.jsx)(io,{guild:p,show:ae,active:m,onAnimationStart:function(){oe(ae)},onAnimationRest:function(){!ae&&oe(!1)}}):(0,r.jsx)(Re,yo(ho({ariaLabel:ee.Z.Messages.GUILD_TOOLTIP_A11Y_LABEL.format({guildName:p.toString(),mentions:w}),name:p.toString(),onClick:ce,onMouseEnter:function(){!M&&$(!0)},onMouseLeave:function(){!M&&$(!1)},onMouseDown:se,onContextMenu:fe,onKeyDown:de,icon:p.getIconURL(96,te&&h),selected:m||te},Q),{role:"treeitem"})),ve=K?(0,r.jsx)(dn,{children:(0,r.jsx)(no,{})}):(0,r.jsx)("div",{ref:T?q:void 0,"data-dnd-name":p.toString(),className:a()(uo().blobContainer,(ye={},po(ye,uo().sorting,M),po(ye,uo().wobble,ae),po(ye,uo().selected,ae||m),ye)),children:(0,r.jsx)(b.aRk,{selected:ae||m||te,innerClassName:C&&(0,L.c)()?uo().muted:void 0,upperBadge:G,lowerBadge:H,lowerBadgeWidth:z,children:be})});return Ve((0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(Ie,{hovered:!K&&te,selected:!K&&m,unread:!K&&O,className:uo().pill
|
||
}),(0,r.jsx)(ao.Z,{guild:p,disabled:M,children:ve}),T?(0,r.jsx)(sn,{name:p.name,targetNode:l,onDragOverChanged:pe}):null]}),he)}));function Eo(e){var t=e.guild,n=e.invite,i=o.useMemo((function(){return(0,R.Mg)(t.id)}),[t.id]),a=(0,p.e7)([X.Z],(function(){return X.Z.isFocused()}));return null==t?null:(0,r.jsx)(Oo,{guildNode:i,guild:t,animatable:a,draggable:!1,contextMenu:function(){},selected:!0,route:_.Z5c.GUILD_MEMBER_VERIFICATION_FOR_HUB(t.id,n.code)})}function Co(e){var t,n=e.isOnHubVerificationRoute,o=(0,s.LX)(null!==(t=window.location.pathname)&&void 0!==t?t:"",{path:_.Z5c.GUILD_MEMBER_VERIFICATION_FOR_HUB(":guildId",":inviteCode")}),i=(0,p.e7)([Yr.Z],(function(){if(null==o)return null;var e=o.params.inviteCode;return null!=e?Yr.Z.getInvite(e):null})),a=null!=(null==i?void 0:i.guild)?new zr.Z(null==i?void 0:i.guild):null;return n?null!=a&&null!=i?(0,r.jsx)(Eo,{guild:a,invite:i}):(0,r.jsx)(kt,{tooltip:ee.Z.Messages.HUB_DISCORD_HUBS,id:"guild-hub-button",icon:Kr.Z}):null}
|
||
var jo=n(853168),So=n.n(jo);function Io(){return Ve((0,r.jsx)("div",{className:So().guildSeparator}))}var _o=n(112184),wo=n(837067),xo=n(911345),Po=n.n(xo);function No(){var e=(0,p.e7)([wo.Z,C.Z],(function(){return wo.Z.unavailableGuilds.filter((function(e){return null==C.Z.getGuild(e)})).length}));return e>0?Ve((0,r.jsx)(Fe,{text:ee.Z.Messages.PARTIAL_OUTAGE.format({count:e}),color:b.ua7.Colors.RED,children:(0,r.jsx)(b.eee,{href:(0,_o.Z)(_.RK.TWITTER),target:"_blank",className:Po().guildsError,"aria-label":ee.Z.Messages.PARTIAL_OUTAGE_A11Y.format({count:e}),children:(0,r.jsx)("span",{"aria-hidden":!0,className:Po().errorInner,children:"!"})})})):null}var Ao=n(547308),To=n(9430),Zo=n(551069);function Mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ro(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Lo(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ro(e,t,n[t])}))}return e}function Do(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ko(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e)
|
||
;for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Uo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Mo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
var Bo=(0,we.Mg)(oo().animationDuration),Fo=(0,we.Mg)(oo().guildIconSize);function Go(e){var t=e.guildId,n=e.animate,o=(0,p.e7)([C.Z],(function(){return C.Z.getGuild(t)}),[t]),i=(0,p.e7)([To.Z],(function(){return To.Z.isMuted(t)}));return null==o?(0,r.jsx)("div",{className:oo().guildIconUnavailable,children:"!"}):(0,r.jsx)(Jr.Z,{guild:o,animate:n,size:Jr.Z.Sizes.SMOL,className:a()(oo().guildIcon,i&&(0,L.c)()&&oo().guildIconMuted),tabIndex:-1})}function Ho(e){var t,n,i=e.folderNode,a=e.hovered,l=e.expanded,u=i.color,c=i.children,s=null!=u?u:_.Wyy,f=c.map((function(e){return e.id})),d=Uo(o.useState(!1),2),p=d[0],h=d[1],y=Uo(o.useState(l),2),b=y[0],v=y[1],m=l?0:-Fo,g=(0,he.useSpring)({transform:"translate3d(0, ".concat(m,"px, 0)"),config:{duration:Bo},onStart:function(){h(!0);v(l)},onRest:function(){h(!1);v(l)}}),O=p?g:void 0;(p||b)&&(t=(0,r.jsx)(he.animated.div,{style:O,className:oo().expandedFolderIconWrapper,children:(0,r.jsx)(Zo.Z,{style:{color:(0,Ao.Rf)(s)}})}));!p&&b||(n=(0,
|
||
r.jsx)(he.animated.div,{style:O,className:oo().closedFolderIconWrapper,children:f.slice(0,4).map((function(e){return(0,r.jsx)(Go,{guildId:e,animate:a},e)}))}));return(0,r.jsxs)("div",{"aria-hidden":!0,style:l?void 0:{backgroundColor:(0,Ao.br)(s,.4)},className:oo().folderIconWrapper,children:[t,n]})}function Vo(e){var t=e.folderNode,n=e.forceCircular,i=e.expanded,l=e.sorting,u=e.mediaState,c=e.mentionCount,s=void 0===c?0:c,f=e.tooltipName,d=e.folderGroupId,p=e.folderIconContent,h=e.onClick,y=e.onContextMenu,v=e.onHoverChange,m=e.onKeyDown,g=e.treeItemProps.onFocus,O=ko(e.treeItemProps,["onFocus"]),E=Uo(o.useState(!1),2),C=E[0],j=E[1],S=o.useCallback((function(){!l&&j(!0);null==v||v(!0)}),[l,v]),I=o.useCallback((function(){!l&&j(!1);null==v||v(!1)}),[l,v]),_=i||null==u?null:ut(u),w=!i&&s>0?lt(s):null;return(0,r.jsx)(b.aRk,{selected:!n,upperBadge:_,lowerBadge:w,lowerBadgeWidth:(0,_e.OV)(s),children:(0,r.jsx)(b.P3F,Do(Lo({className:a()(oo().folder,Ro({},oo().hover,C)),onClick:h,
|
||
onContextMenu:y,onMouseEnter:S,onMouseLeave:I,onKeyDown:m,onFocus:g,"aria-label":ee.Z.Messages.GUILD_FOLDER_TOOLTIP_A11Y_LABEL.format({folderName:f,mentions:s}),"aria-expanded":i,"aria-owns":d,focusProps:{enabled:!1}},O),{role:"treeitem",children:null!=p?(0,r.jsx)("div",{className:oo().expandedFolderIconWrapper,children:p}):(0,r.jsx)(Ho,{folderNode:t,hovered:C,expanded:i})}))})}function Wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Yo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}
|
||
}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ko=(0,we.Mg)(oo().animationDuration),qo=(0,we.Mg)(oo().guildIconSize),Qo=(0,we.Mg)(oo().guildIconMargin);function Xo(e){
|
||
var t=e.folderNode,n=e.setNodeRef,i=e.selected,l=e.expanded,u=e.mediaState,c=e.mentionCount,s=void 0===c?0:c,d=e.unread,p=void 0!==d&&d,h=e.defaultFolderName,y=e.useCircleMask,b=void 0!==y&&y,v=e.draggable,m=void 0!==v&&v,g=e.sorting,O=void 0!==g&&g,E=e.onDragStart,C=e.onDragEnd,j=e.onExpandCollapse,S=e.onContextMenu,I=e.renderChildNode,_=e.folderIconContent,w=t.id,x=t.name,P=t.children,N=Yo(o.useState(!1),2),T=N[0],Z=N[1],M=Yo(o.useState(!1),2),L=M[0],D=M[1],k=T||L;o.useEffect((function(){O&&Z(!1)}),[O]);var U,B=Yo((0,qr.c)({type:R.eD.FOLDER,item:function(){null==E||E();return{type:R.eD.FOLDER,nodeId:t.id}},end:function(){null==C||C();(0,Qr.V1)(A.Z.getCompatibleGuildFolders())},collect:function(e){return{dragging:e.isDragging()}}}),2),F=B[0].dragging,G=B[1],H=o.useCallback((function(e){D(e)}),[]),V=o.useCallback((function(e){("ArrowRight"===e.key&&!l||"ArrowLeft"===e.key&&l)&&j()}),[j,l]),W=null!=x&&""!==x?x:null!=h&&""!==h?h:ee.Z.Messages.SERVER_FOLDER_PLACEHOLDER,z=(0,
|
||
f.Ie)("".concat(w)),Y="folder-items-".concat(w),K=P.length*(qo+Qo),q=(0,he.useTransition)(!F&&l,{from:{height:0},enter:{height:1},leave:{height:0},config:{duration:Ko}}),Q=o.useCallback((function(e){return null==n?void 0:n(w,e)}),[n,w]),X=Ve((0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(Ie,{disabled:F||l,hovered:T,selected:i,unread:p,className:uo().pill}),(0,r.jsx)(Fe,{text:W,disabled:O,selected:i,disableWrapper:!0,children:(0,r.jsx)("div",{ref:m?G:void 0,className:a()(zo({},uo().wobble,!F&&L&&!l)),"data-dnd-name":W,children:F?(0,r.jsx)(no,{}):(0,r.jsx)(Vo,{folderNode:t,expanded:l,forceCircular:b,sorting:O,mediaState:u,mentionCount:s,tooltipName:W,folderGroupId:Y,onClick:j,onContextMenu:S,onHoverChange:Z,onKeyDown:V,treeItemProps:z,folderIconContent:_})})}),m?(0,r.jsx)(sn,{name:W,targetNode:t,onDragOverChanged:H}):null]}));return(0,r.jsxs)("div",{ref:Q,className:oo().wrapper,children:[!F&&(0,r.jsx)("span",{className:a()(oo().expandedFolderBackground,(U={},zo(U,oo().collapsed,!l),
|
||
zo(U,oo().hover,k),U))}),X,q((function(e,t,n){var o=n.key;return t&&(0,r.jsx)(he.animated.ul,{id:Y,style:{height:e.height.to((function(e){return e*K}))},className:oo().expandedGuilds,role:"group",children:P.map(I)},o)})),m&&l?(0,r.jsx)(fn,{name:W,targetNode:t}):null]})}function Jo(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function $o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Jo(i,r,o,a,l,"next",e)}function l(e){Jo(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ei(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ti(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
|
||
;r.forEach((function(t){ei(e,t,n[t])}))}return e}function ni(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ri(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var oi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]}
|
||
;return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};const ii=o.memo((function(e){
|
||
var t=e.folderNode,i=ri(e,["folderNode"]),a=t.id,l=t.name,u=t.color,c=t.children.map((function(e){return e.id})),s=(0,P.Z)((function(e){return e.guildId})),f=(0,p.e7)([D.Z],(function(){return D.Z.isFolderExpanded(a)})),d=function(e){var t=e.children.map((function(e){var t=e.id,n=C.Z.getGuild(t);return null!=n?n.name:null})).filter(Tn.lm),n=2*_.dYL,r=[],o=!0,i=!1,a=void 0;try{for(var l,u=t[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value;if(c.length<n||0===r.length){r.push(c);n-=c.length}}}catch(e){i=!0;a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}return"".concat(r.join(", ")).concat(r.length<t.length?", ...":"")}(t),h=function(e){var t,n=(0,p.e7)([pe.Z],(function(){return pe.Z.getGuildId()})),r=e.children.map((function(e){return e.id})),i=null!=n&&r.includes(n),a=!1,l=!1,u=!1,c=(0,p.e7)([pe.Z],(function(){return pe.Z.getChannelId()})),s=(0,p.e7)([de.Z],(function(){return de.Z.getChannel(c)}),[c]),f=(0,p.e7)([Wn.Z],(function(){
|
||
return null!=c&&Wn.Z.hasVideo(c)}),[c]),d=(0,p.e7)([me.Z],(function(){return me.Z.getCurrentUserActiveStream()}));if(i){a=!f;l=f;u=null!=d&&null!=d.guildId&&r.includes(d.guildId);t=null==s?void 0:s.type}return o.useMemo((function(){return{audio:a,video:l,screenshare:u,currentActiveVoiceType:t}}),[a,l,u,t])}(t),y=(0,p.cj)([k.Z],(function(){return{mentionCount:c.map((function(e){return k.Z.getMentionCount(e)})).reduce((function(e,t){return e+t}),0),unread:c.some((function(e){return k.Z.hasUnread(e)}))}})),b=y.mentionCount,v=y.unread,m=o.useCallback((function(){en.Z.toggleGuildFolderExpand(a)}),[a]),g=o.useCallback((function(e){(0,ye.jW)(e,$o((function(){var e,t;return oi(this,(function(o){switch(o.label){case 0:return[4,n.e(3824).then(n.bind(n,103824))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,ni(ti({},e),{folderId:a,folderName:l,folderColor:u,unread:v||b>0}))}]}}))})))}),[a,l,u,v,b]);return(0,r.jsx)(Xo,ni(ti({},i),{folderNode:t,expanded:f,
|
||
selected:null!=s&&c.includes(s),mentionCount:b,unread:v,mediaState:h,defaultFolderName:d,onExpandCollapse:m,onContextMenu:g}))}));var ai=n(885073),li=n(85039),ui=n(633878);function ci(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function si(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function fi(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){
|
||
var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function di(e){var t=e.width,n=void 0===t?48:t,o=e.height,i=void 0===o?48:o,a=e.color,l=void 0===a?"currentColor":a,u=fi(e,["width","height","color"]);return(0,r.jsxs)("svg",si(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ci(e,t,n[t])}))}return e}({},(0,ui.Z)(u)),{width:n,height:i,fill:l,viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M19 6H13C11.9 6 11 6.9 11 8V40C11 41.1 11.9 42 13 42H19C20.1 42 21 41.1 21 40V8C21 6.9 20.1 6 19 6Z",fill:"white"}),(0,r.jsx)("path",{
|
||
d:"M35 6H29C27.9 6 27 6.9 27 8V40C27 41.1 27.9 42 29 42H35C36.1 42 37 41.1 37 40V8C37 6.9 36.1 6 35 6Z",fill:"white"})]}))}var pi=n(201441),hi=n(886077),yi=n(499219),bi=n(736818);function vi(e){var t,n,r=(0,p.e7)([To.Z],(function(){return To.Z.isMuted(e)})),i=(null===(t=(0,hi.ZP)(e))||void 0===t?void 0:t.length)>0,a=null!=(0,pi.k5)(e),l=(null===(n=(0,yi.Z)())||void 0===n?void 0:n.guild_id)===e,u=(0,p.e7)([bi.default],(function(){return bi.default.getId()})),c=(0,p.cj)([pe.Z],(function(){return{selectedVoiceGuildId:pe.Z.getGuildId(),selectedVoiceChannelId:pe.Z.getChannelId()}})),s=c.selectedVoiceGuildId,f=c.selectedVoiceChannelId,d=s===e,h=(0,p.e7)([me.Z],(function(){return!!d&&null!=me.Z.getActiveStreamForUser(u,e)})),y=(0,p.e7)([me.Z],(function(){return me.Z.getAllApplicationStreams().some((function(t){return t.guildId===e}))})),b=(0,p.e7)([Wn.Z],(function(){return d&&null!=f&&Wn.Z.hasVideo(f)}),[d,f]),v=(0,p.e7)([Cn.ZP],(function(){return Cn.ZP.getEmbeddedActivitiesForGuild(e)
|
||
})),m=(0,p.e7)([Cn.ZP],(function(){return Array.from(Cn.ZP.getSelfEmbeddedActivities().values()).some((function(t){return t.guildId===e}))})),g=v.length>0,O=!1,E=!1,C=!1,j=!1;if(d){O=!b;E=b;C=h;j=m}else{C=!r&&y;j=!r&&g}return o.useMemo((function(){return{audio:O,video:E,screenshare:C,liveStage:i,hasActiveEvent:a,participating:d,participatingInStage:l,activity:j}}),[i,d,a,l,O,E,C,j])}var mi=n(827694),gi=n.n(mi);function Oi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ei(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}
|
||
const Ci=o.memo((function(e){var t=e.guildNode,n=e.lowerBadge,i=t.id,a=(0,p.e7)([C.Z],(function(){return C.Z.getGuild(i)})),l=(0,ai.E)(i),u=(0,p.e7)([X.Z],(function(){return X.Z.isFocused()})),c=(0,p.e7)([wo.Z],(function(){return wo.Z.isUnavailable(i)})),s=(0,p.e7)([To.Z],(function(){return To.Z.isMuted(i)})),f=(0,P.Z)((function(e){return e.guildId})),d=vi(i),h=(0,p.cj)([k.Z],(function(){return{badge:k.Z.getMentionCount(i),unread:k.Z.hasUnread(i)}})),y=h.badge,b=h.unread,v=(0,li.Ij)(a)&&0===y,m=o.useMemo((function(){return null!=n?n:v?(0,r.jsx)("div",{className:gi().pauseBackground,children:(0,r.jsx)(di,{className:gi().pause,width:10,height:10})}):null}),[n,v]);return(0,r.jsx)(Oo,Ei(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){
|
||
Oi(e,t,n[t])}))}return e}({},e),{guild:a,unavailable:c,animatable:u,selected:f===i,badge:y,lowerBadge:m,unread:b,muted:s,mediaState:d,guildJoinRequestStatus:l}))}));function ji(e){var t=e.guildId,n=o.useMemo((function(){return(0,R.Mg)(t)}),[t]),i=(0,p.e7)([C.Z],(function(){return C.Z.getGuild(t)})),a=(0,p.e7)([X.Z],(function(){return X.Z.isFocused()})),l=t===(0,P.Z)((function(e){return e.guildId})),u=vi(t);return null==i?null:(0,r.jsx)(Oo,{guildNode:n,guild:i,animatable:a,selected:l,draggable:!1,mediaState:u})}var Si,Ii=n(153771),_i=n(201615),wi=n(464187);function xi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Pi(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable
|
||
})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ni(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ai(e){var t=e.width,n=void 0===t?16:t,o=e.height,i=void 0===o?16:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Ni(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",Pi(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
|
||
;r.forEach((function(t){xi(e,t,n[t])}))}return e}({},(0,ui.Z)(c)),{width:n,height:i,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{className:u,fill:l,d:"M7 1C6.73479 1.00003 6.48045 1.10539 6.29292 1.29292C6.10539 1.48045 6.00003 1.73479 6 2V6C6.00009 6.23417 6.08234 6.46088 6.23242 6.64062L10.6992 12L6.23242 17.3594C6.08234 17.5391 6.00009 17.7658 6 18V22C6.00003 22.2652 6.10539 22.5195 6.29292 22.7071C6.48045 22.8946 6.73479 23 7 23H17C17.2652 23 17.5195 22.8946 17.7071 22.7071C17.8946 22.5195 18 22.2652 18 22V18C17.9999 17.7658 17.9177 17.5391 17.7676 17.3594L13.3008 12L17.7676 6.64062C17.9177 6.46088 17.9999 6.23417 18 6V2C18 1.73479 17.8946 1.48045 17.7071 1.29292C17.5195 1.10539 17.2652 1.00003 17 1H7ZM12 13.5625L16 18.3613V21H8V18.3613L12 13.5625Z"})}))}!function(e){e[e.PENDING_JOIN_REQUESTS_FOLDER=1]="PENDING_JOIN_REQUESTS_FOLDER"}(Si||(Si={}));function Ti(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Zi(e){
|
||
return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ti(i,r,o,a,l,"next",e)}function l(e){Ti(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Mi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ri(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var Li=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i
|
||
;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Di(e,t){(0,ye.jW)(e,Zi((function(){var e,o;return Li(this,(function(i){switch(i.label){case 0:return[4,n.e(63411).then(n.bind(n,963411))];case 1:
|
||
e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,Ri(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Mi(e,t,n[t])}))}return e}({},e),{guild:t}))}]}}))})))}function ki(e){var t=e.guildNode,n=t.id,o=(0,ai.E)(n),i=(0,p.e7)([_i.Z],(function(){return _i.Z.getJoinRequestGuild(n)}),[n]),a=(0,p.e7)([X.Z],(function(){return X.Z.isFocused()})),l=(0,p.e7)([wi.Z],(function(){return wi.Z.getGuildId()}));return null==i?null:(0,r.jsx)(Oo,{guildNode:t,guild:i,animatable:a,draggable:!1,selected:n===l,preloadOnClick:!1,contextMenu:Di,lowerBadge:null!=o?ct({guildJoinRequestStatus:o}):void 0,route:_.Z5c.GUILD_MEMBER_VERIFICATION(n)})}var Ui=n(793055),Bi=n.n(Ui);function Fi(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Fi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hi(){var e=Gi(o.useState(!1),2),t=e[0],n=e[1],i=(0,
|
||
p.e7)([wi.Z],(function(){return wi.Z.getGuildId()})),a=(0,p.e7)([_i.Z],(function(){return _i.Z.hasFetchedRequestToJoinGuilds})),l=(0,p.Wu)([_i.Z,C.Z],(function(){var e=_i.Z.computeGuildIds(),t=C.Z.getGuilds();return e.filter((function(e){return null==t[e]}))})),u=o.useMemo((function(){var e=(0,R.qQ)({folderId:Si.PENDING_JOIN_REQUESTS_FOLDER,folderName:ee.Z.Messages.MEMBER_VERIFICATION_FOLDER_NAME,expanded:t,guildIds:[]}),n=!0,r=!1,o=void 0;try{for(var i,a=l[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value;e.children.push((0,R.Mg)(u,e.id))}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return e}),[l,t]);o.useEffect((function(){t&&!a&&Ii.Z.fetchRequestToJoinGuilds()}),[t,a]);if(0===l.length)return null;var c=null!=i&&l.includes(i);return(0,r.jsx)(Xo,{folderNode:u,expanded:t,useCircleMask:!t&&!c,selected:c,draggable:!1,sorting:!1,onExpandCollapse:function(){return n(!t)},folderIconContent:(0,r.jsx)("div",{
|
||
className:Bi().expandedFolderIconWrapper,children:(0,r.jsx)(Ai,{width:24,height:24,className:Bi().pendingIcon})}),renderChildNode:function(e){return e.type!==R.eD.GUILD?null:(0,r.jsx)(ki,{guildNode:e})}})}var Vi=n(174866),Wi=n.n(Vi);function zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ki(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Yi(e,t,n[t])}))}return e}function qi(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){
|
||
var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Qi(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Xi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{
|
||
if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ji=(0,Z.ED)()?4:(0,Z.id)()?0:12,$i=Ji+10,ea=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.guildsTree=t;this.setScrolling=n;this.onScroll=r;this.scrollerRef=o.createRef();this.guildDiscoveryRef=o.createRef();this.nodeRefs={};this.timeout=new y.V7;this.isScrolling=!1;this.scrollToGuild=function(e,t){var n=i.scrollerRef.current
|
||
;if(null!=n)if(null==e&&window.location.pathname.startsWith(_.Z5c.GUILD_DISCOVERY)||e===_.x8Z.SERVER_DISCOVERY_BADGE||e===_.x8Z.E3_SERVER_DISCOVERY_BADGE){var r=(0,c.findDOMNode)(i.guildDiscoveryRef.current);(0,d.k)(r,HTMLElement)?n.scrollIntoViewNode({node:r,animate:t,padding:8}):n.scrollTo({to:0,animate:t})}else if(null!=e){for(var o=i.nodeRefs[e];null==o;){var a=i.guildsTree.getNode(e);if(null==(null==a?void 0:a.parentId))break;o=i.nodeRefs[a.parentId]}null!=o&&(0,d.k)(o)?n.scrollIntoViewNode({node:o,animate:t,padding:8}):n.scrollTo({to:0,animate:t})}else n.scrollTo({to:0,animate:t})};this.handleJumpToGuild=function(e){i.scrollToGuild(e,!0)};this.scrollTo=function(e){var t;null===(t=i.scrollerRef.current)||void 0===t||t.scrollTo(e)};this.isItemVisible=function(e,t,n){var r=i.scrollerRef.current;if(null==r)return!1;var o=n.findIndex((function(t){return"string"==typeof t||null==t?t===e:t.includes(e)}));if(o<0)return!1;var a=56*o+$i;t||(a+=40);var l=r.getScrollerState()
|
||
;return!!(!t&&a>=l.scrollTop||t&&a+56<=l.scrollTop+l.offsetHeight)};this.handleScroll=function(){i.isScrolling||i.setScrolling(!0);i.timeout.start(200,(function(){return i.setScrolling(!1)}));i._handleScroll()};this._handleScroll=u().debounce((function(){var e=i.scrollerRef.current;if(null!=e){var t=e.getScrollerState().scrollTop;v.Z.updateGuildListScrollTo(t);i.onScroll()}}),200);this.setNodeRef=function(e,t){i.nodeRefs[e]=t}}e.prototype.setGuildsTree=function(e){this.guildsTree=e};return e}();function ta(e){var t=e.disableAppDownload,n=void 0===t?Z.FB:t,i=e.isOverlay,l=void 0!==i&&i,u=e.className,c=e.themeOverride,d=Xi((0,p.Wu)([A.Z],(function(){var e=A.Z.getGuildsTree();return[e,e.version]})),1)[0],h=(0,p.e7)([x.Z],(function(){return x.Z.lurkingGuildIds()})),v=o.useMemo((function(){return l?[]:h}),[h,l]),m=(0,p.e7)([T.default],(function(){var e;return null===(e=T.default.getCurrentUser())||void 0===e?void 0:e.isStaff()})),S=(0,p.e7)([g.Z],(function(){
|
||
return g.Z.isFullscreenInContext()})),w=Xi(o.useState(!1),2),L=w[0],D=w[1],k=o.useCallback((function(){return D(!0)}),[]),U=o.useCallback((function(){return D(!1)}),[]),B=o.useRef(!1),F=Xi(o.useState((function(){return new y.V7})),1)[0],G=o.useRef(null),H=o.useRef(null),V=(0,f.OP)(),W=V.ref,z=Qi(V,["ref"]),Y=(0,b.mFp)(),K=Xi(o.useState(!1),2),q=K[0],Q=K[1],X=Xi(o.useState((function(){return new ea(d,Q,(function(){var e,t;null===(e=G.current)||void 0===e||e.calculateState();null===(t=H.current)||void 0===t||t.calculateState()}))})),1),J=X[0],$=(0,s.TH)().pathname,te=$.startsWith(_.Z5c.GUILD_DISCOVERY),ne=$.startsWith(_.Z5c.GUILD_MEMBER_VERIFICATION_FOR_HUB(""));o.useLayoutEffect((function(){if(!B.current&&0!==d.size){if(te)J.scrollToGuild(null,!1);else{var e=N.Z.getGuildListDimensions().scrollTop;J.scrollTo({to:e,animate:!1})}B.current=!0;return function(){return F.stop()}}}),[]);o.useEffect((function(){J.setGuildsTree(d);if(!B.current&&0!==d.size){var e=P.Z.getState().guildId
|
||
;J.scrollToGuild(e,!1);var t=null,n=P.Z.subscribe((function(e){var n=e.guildId;if(n!==t){t=n;J.scrollToGuild(t,!1)}}));return n}}),[d,J]);var re,oe,ie,ae,le,ue=(re=(0,p.e7)([C.Z],(function(){return C.Z.getGuildCount()})),oe=(0,p.e7)([j.ZP],(function(){return j.ZP.getGamesSeen(!1).filter((function(e){return(0,j.Zs)(e)})).length}),[]),ie=(0,p.e7)([E.Z],(function(){return E.Z.hasConsented(_.pjP.PERSONALIZATION)})),ae=I.useExperiment({}).showRecs,ie&&ae&&re<4&&oe>=2),ce=d.getRoots(),fe=(0,O.Z)();return(0,r.jsx)("nav",{className:a()(Wi().wrapper,u,(0,M.Q)(c),Yi({},Wi().hidden,S)),"aria-label":ee.Z.Messages.GUILDS_BAR_A11Y_LABEL,children:(0,r.jsxs)("ul",qi(Ki({ref:W},z,Y),{role:"tree",className:Wi().tree,children:[(0,r.jsx)(se,{ref:G,isVisible:J.isItemVisible,onJumpTo:J.handleJumpToGuild,className:Wi().unreadMentionsIndicatorTop,barClassName:Wi().unreadMentionsBar}),(0,r.jsxs)(b.xVE,{className:a()((le={},Yi(le,Wi().scroller,!0),Yi(le,Wi().scrolling,q),le)),ref:J.scrollerRef,
|
||
onScroll:J.handleScroll,children:[(0,r.jsx)(Wr,{}),fe?(0,r.jsx)(lr,{}):null,(0,r.jsx)(Co,{isOnHubVerificationRoute:ne}),(0,r.jsx)(Pt,{}),v.map((function(e){return(0,r.jsx)(ji,{guildId:e},e)})),m?(0,r.jsx)(Hi,{}):null,(0,r.jsx)(mr,{}),!l&&ue?(0,r.jsx)(jr,{ref:J.guildDiscoveryRef,selected:te,tooltip:ee.Z.Messages.GUILD_DISCOVERY_TOOLTIP}):null,(0,r.jsx)(Io,{}),(0,r.jsx)("div",{"aria-label":ee.Z.Messages.SERVERS,children:ce.map((function e(t){switch(t.type){case R.eD.FOLDER:return(0,r.jsx)(ii,{folderNode:t,setNodeRef:J.setNodeRef,draggable:!0,sorting:L,onDragStart:k,onDragEnd:U,renderChildNode:e},t.id);case R.eD.GUILD:return(0,r.jsx)(Ci,{guildNode:t,setRef:J.setNodeRef,draggable:!0,sorting:L,onDragStart:k,onDragEnd:U},t.id);default:return null}}))}),l?null:(0,r.jsx)(On,{disableTooltip:v.length>0,lastTargetNode:ce[ce.length-1]}),l||ue?null:(0,r.jsx)(jr,{ref:J.guildDiscoveryRef,selected:te}),(0,r.jsx)(No,{}),n?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Io,{}),(0,r.jsx)(Vt,{})]})]}),(0,
|
||
r.jsx)(se,{reverse:!0,ref:H,isVisible:J.isItemVisible,onJumpTo:J.handleJumpToGuild,className:Wi().unreadMentionsIndicatorBottom,barClassName:Wi().unreadMentionsBar})]}))})}const na=o.memo((function(e){var t=(0,m.Z)("guildsnav");return(0,r.jsx)(f.bG,{navigator:t,children:(0,r.jsx)(ta,Ki({},e))})}),(function(e,t){return!1===t.isVisible||(0,h.Z)(e,t)}))},893263:(e,t,n)=>{"use strict";n.d(t,{Ne:()=>i});var r=n(785893),o=(n(667294),n(294184),n(795470),n(886391),n(3219),n(570202),n(542231),n(621329),n(189865),n(449401),n(425454),n(472034),n(796938),n(516909),n(531441));n(2590),n(212515);function i(e){return(0,r.jsx)(o.mA,{count:e})}},25410:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(785893),o=n(667294),i=n(202351),a=n(707961),l=n(201459),u=n(9430),c=n(312682),s=n(105538),f=n(373438),d=n(930948),p=n(140567),h=n(2590),y=n(473708),b=n(180362),v=n.n(b);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){g(e,t,n[t])}))}return e}function E(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e){var t=e.channel,n=C((0,i.Wu)([u.Z],(function(){return[u.Z.isChannelMuted(t.getGuildId(),t.id),u.Z.resolvedMessageNotifications(t)]}),[t]),2),b=n[0],m=n[1],g=C(o.useState(!1),2),j=g[0],S=g[1]
|
||
;o.useEffect((function(){var e=function(){return S(!0)};d.S.subscribe(h.CkL.OPEN_THREAD_NOTIFICATION_SETTINGS,e);return function(){d.S.unsubscribe(h.CkL.OPEN_THREAD_NOTIFICATION_SETTINGS,e)}}),[]);var I=function(e){e.shiftKey?l.Z.updateChannelOverrideSettings(t.guild_id,t.id,{muted:!b}):S((function(e){return!e}))},_=y.Z.Messages.NOTIFICATION_SETTINGS;return(0,r.jsx)(a.yRy,{shouldShow:j,animation:a.yRy.Animation.NONE,position:"bottom",align:"right",autoInvert:!1,onRequestClose:function(){return S(!1)},renderPopout:function(e){return(0,r.jsx)(p.Z,E(O({},e),{channel:t,navId:"channel-context",label:y.Z.Messages.CHANNEL_ACTIONS_MENU_LABEL}))},children:function(e,t){var n=t.isShown;return(0,r.jsx)(f.ZP.Icon,E(O({},e),{onClick:I,tooltip:n?null:_,icon:b||m!==h.bL.ALL_MESSAGES?s.Z:c.Z,foreground:b?v().strikethrough:null,"aria-label":_,selected:n}))}})}},684412:(e,t,n)=>{"use strict";n.d(t,{MA:()=>at,TS:()=>it,ud:()=>tt,v0:()=>rt})
|
||
;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(77413),s=n(503370),f=n(491260),d=n(749565),p=n(310126),h=n(539116),y=n.n(h);function b(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function v(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var m=p.default.getEnableHardwareAcceleration()?u.P5S:u.qbd;const g=l.ZP.connectStores([f.Z],(function(e){var t=e.userId,n=e.defaultStatus;return{status:null!=t?f.Z.getStatus(t,null,n):null,streaming:null!=t&&(0,s.Z)(f.Z.getActivities(t))}}))((function(e){
|
||
var t=e.streaming,n=e.status,o=e.hideTooltip,i=e.className,l=e.style,c=e.isMobile,s=e.size,f=e.defaultStatus,p=e.position,h=void 0===p?"top":p,g=t?u.Skl.STREAMING:null!=n?n:f;return(0,r.jsx)(u.ua7,{text:o?null:(0,d.u5)(g),position:h,children:function(e){return(0,r.jsx)("div",v(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){b(e,t,n[t])}))}return e}({},e),{className:a()(i,y().disableFlex),style:l,children:(0,r.jsx)(m,{isMobile:c,status:g,size:s})}))}})}))
|
||
;var O=n(621647),E=n(773011),C=n(469023),j=n(784426),S=n(725691),I=n(784686),_=n(840922),w=n(464187),x=n(793461),P=n(473903),N=n(609853),A=n(124251),T=n(362660),Z=n(496486),M=n.n(Z),R=n(357920),L=n(762423),D=n(21372),k=n(567403),U=n(971611),B=n(553480),F=n(531441),G=n(373438),H=n(96606),V=n(295652),W=n(72580),z=n(2590),Y=n(448898),K=n(473708),q=n(119617),Q=n.n(q);function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return X(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
|
||
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var $=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.generateNicknameGuildPairs=(0,V.oH)((function(e){var t;return M()(D.ZP.getNicknameGuildsMapping(null!==(t=null==e?void 0:e.id)&&void 0!==t?t:o.userId)).toPairs().map((function(e){var t=J(e,2);return[t[0],t[1].map((function(e){var t;return null===(t=k.Z.getGuild(e))||void 0===t?void 0:t.name})).filter(W.lm)]})).value()}));this.renderMoreAvatars=function(){return(0,r.jsx)(u.DY3,{text:K.Z.Messages.AKA_MORE_AVATARS_OVERFLOW,position:"bottom",children:(0,r.jsx)(u.P3F,{
|
||
className:Q().moreAvatars,onClick:o.handleClick,children:(0,r.jsx)(B.Z,{className:Q().plusIcon})})},"more-avatars")};this.handleClick=function(){(0,L.m)({userId:o.userId,section:Y.oh.MUTUAL_GUILDS,analyticsLocation:{section:z.jXE.CHANNEL_HEADER}})};this.userId=t;this.user=n}var t=e.prototype;t.updateData=function(e,t){this.userId=e;this.user=t};t.getNicknameGuildPairs=function(){return this.generateNicknameGuildPairs(this.user)};t.renderNicknamePairs=function(){var e=this;return this.getNicknameGuildPairs().map((function(t,n){var i=J(t,2),a=i[0],l=i[1],c=(0,r.jsx)(u.P3F,{tag:"span",onClick:e.handleClick,children:a});l.length>0&&(c=(0,r.jsx)(u.DY3,{className:Q().tooltip,text:l.join(", "),position:"bottom",children:c}));return(0,r.jsxs)(o.Fragment,{children:[0!==n?", ":null,c]},n)}))};return e}();function ee(e){var t=e.channel.getRecipientId(),n=(0,R.gc)(t),i=new Array(n.length).fill(null),a=function(e){var t=(0,l.e7)([P.default],(function(){return P.default.getUser(e)
|
||
}),[e]),n=J(o.useState((function(){return new $(e,null!=t?t:void 0)})),1)[0];n.updateData(e,null!=t?t:void 0);return n}(t);return 0===a.getNicknameGuildPairs().length&&0===n.length?(0,r.jsx)("div",{className:Q().spacer}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(G.iz,{}),(0,r.jsx)(F.IG,{text:K.Z.Messages.AKA,disableColor:!0,className:Q().akaBadge}),n.length>0?(0,r.jsx)(H.Z,{size:16,users:i,showUserPopout:!1,renderUser:function(e,t,o){var i,l=a.user,c=n[o];return null==c||null==l?null:(0,r.jsx)(u.DY3,{text:null===(i=k.Z.getGuild(c))||void 0===i?void 0:i.name,position:"bottom",children:(0,r.jsx)("img",{alt:"",className:Q().avatar,onClick:a.handleClick,src:l.getAvatarURL(c,16),"aria-hidden":!0})},c[1])},renderMoreUsers:a.renderMoreAvatars,guildId:void 0,max:3,className:Q().avatars}):null,a.getNicknameGuildPairs().length>0?(0,r.jsx)(U.Z,{position:"bottom",className:Q().nicknames,children:a.renderNicknamePairs()}):null]})}var te=n(761953),ne=n(619941),re=n.n(ne);function oe(e,t){
|
||
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ie(e){ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return ie(e)}function ae(e,t){return!t||"object"!==ue(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function le(e,t){le=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return le(e,t)}var ue=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=ie(e);if(t){var o=ie(this).constructor;n=Reflect.construct(r,arguments,o)
|
||
}else n=r.apply(this,arguments);return ae(this,n)}}var se=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&le(e,t)}(n,e);var t=ce(n);function n(){oe(this,n);var e;(e=t.apply(this,arguments)).inputRef=o.createRef();e.state={focused:!1,lastGoodValue:e.props.value,value:e.props.value};e.handleChange=function(t){var n=e.props.onChange;e.setState({value:t.currentTarget.value});null==n||n(t)};e.handleFocus=function(t){var n=e.props.onFocus;e.setState({focused:!0,lastGoodValue:t.currentTarget.value});null==n||n(t)};e.handleBlur=function(t){if(fe("",e.props,e.state)){e.setState({focused:!1});var n=e.props.onBlur;null==n||n(t)}else e.setState({focused:!1,value:e.state.lastGoodValue})};e.handleKeyPress=function(t){if(t.which===z.yXg.ENTER){var n;null===(n=e.inputRef.current)||void 0===n||n.blur()}};return e}
|
||
var i=n.prototype;i.componentDidUpdate=function(e,t){if(t.focused!==this.state.focused&&this.state.focused){var n;null===(n=this.inputRef.current)||void 0===n||n.focus()}null!==this.props.value&&this.props.value!==e.value&&this.props.value!==this.state.value&&fe(this.props.value,this.props,this.state)&&this.setState({value:this.props.value})};i.render=function(){var e,t=this.props,n=t.className,o=t.name,i=t.autoComplete,l=t.maxLen,u={position:"absolute",left:0,width:"100%",opacity:1};this.state.focused?e={visibility:"hidden",pointerEvents:"none"}:u.opacity=0;return(0,r.jsx)("div",{className:a()(re().outer,n),children:(0,r.jsxs)("div",{className:re().container,children:[(0,r.jsx)("input",{type:"text",className:re().input,ref:this.inputRef,style:u,value:this.state.value,name:o,maxLength:l,autoComplete:i,onKeyPress:this.handleKeyPress,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur}),(0,r.jsx)("div",{className:re().input,style:e,children:this.state.value})]})})}
|
||
;return n}(o.Component);function fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=""!==e?e:null!=n.value&&""!==n.value?n.value:"";return!(null!=t.minLen&&r.length<t.minLen||null!=t.maxLen&&r.length>t.maxLen)}var de=n(483701),pe=n.n(de);const he=function(e){var t=e.channel,n=(0,E.ZP)(t);return(0,r.jsx)("div",{className:pe().container,onDoubleClick:function(e){return e.stopPropagation()},children:(0,r.jsx)(se,{minLen:1,maxLen:z.HN8,className:pe().channelName,name:"channel_name",autoComplete:"off",value:null!=n?n:"",onBlur:function(e){n!==e.currentTarget.value&&te.Z.setName(t.id,e.currentTarget.value)}})})};var ye=n(809784),be=n(971402),ve=n(107364),me=n(214468),ge=n.n(me);function Oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ee(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}
|
||
function Ce(e){Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Ce(e)}function je(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Se(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ie(e,t){
|
||
return!t||"object"!==we(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _e(e,t){_e=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return _e(e,t)}var we=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var o=Ce(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ie(this,n)}}var Pe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{
|
||
value:e,writable:!0,configurable:!0}});t&&_e(e,t)}(n,e);var t=xe(n);function n(){Oe(this,n);var e;(e=t.apply(this,arguments)).scrollerRef=o.createRef();e.handleScroll=function(){var t=e.scrollerRef.current;if(null!=t){var n,r;null===(r=(n=e.props).onScroll)||void 0===r||r.call(n,t)}};return e}n.prototype.render=function(){var e,t=this,n=this.props,o=n.renderFooter,i=n.selectable,l=n.renderHeader,c=n.className,s=n.onClose,f=n.children;null!=o&&(e=(0,r.jsx)(u.mzw,{direction:ve.Z.Direction.HORIZONTAL,children:o()}));return(0,r.jsx)(u.u_l,{onCloseRequest:s,renderModal:function(n){var o=n.onClose,d=Se(n,["onClose"]);return(0,r.jsxs)(u.Y0X,je(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ee(e,t,n[t])}))}return e}({className:ge().modal},d),{
|
||
children:[(0,r.jsxs)(u.xBx,{align:ve.Z.Justify.BETWEEN,separator:!1,children:[l(),(0,r.jsx)(ve.Z.Child,{grow:0,children:(0,r.jsx)(u.olH,{onClick:function(){null!=s&&s();o()}})})]}),(0,r.jsx)(u.hzk,{className:a()(c,ge().content,{selectable:i}),scrollerRef:t.scrollerRef,onScroll:t.handleScroll,children:f}),e]}))}})};return n}(o.PureComponent);Pe.defaultProps={selectable:!1};const Ne=Pe;var Ae=n(883064),Te=n(283099),Ze=n(146186),Me=n.n(Ze);function Re(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Le(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Re(i,r,o,a,l,"next",e)}function l(e){Re(i,r,o,a,l,"throw",e)}a(void 0)}))}}function De(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ke(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ue(e){
|
||
Ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Ue(e)}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ke(e,t,n[t])}))}return e}function Fe(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ge(e,t){return!t||"object"!==Ve(t)&&"function"!=typeof t?function(e){
|
||
if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function He(e,t){He=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return He(e,t)}var Ve=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function We(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ue(e);if(t){var o=Ue(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ge(this,n)}}var ze=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){
|
||
return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Ye(e){var t=e.channel,n=e.onClose,o=e.transitionState,i=(0,E.ZP)(t,!0);return(0,r.jsx)(u.Y0X,{transitionState:o,"aria-label":K.Z.Messages.FORM_LABEL_CHANNEL_TOPIC,children:(0,
|
||
r.jsx)(u.hzk,{children:(0,r.jsx)(Ne,{selectable:!0,onClose:n,renderHeader:function(){return(0,r.jsx)(u.X6q,{variant:"heading-lg/semibold",children:i})},children:(0,r.jsx)(u.xvT,{selectable:!0,variant:"text-md/normal",className:Me().content,children:Ae.Z.parseTopic(t.topic,!0,{channelId:t.id})})})})})}function Ke(e){return e.matches("a")||"highlight"===e.className||e.className.includes("mention")}const qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&He(e,t)}(i,e);var t=We(i);function i(){De(this,i);var e;(e=t.apply(this,arguments))._mouseDown=!1;e._mouseUp=!1;e.handleOpenTopic=function(t){var n=t.target;if((0,ye.k)(n)){if(Ke(n))return;var o=n.parentNode;if((0,ye.k)(o)&&Ke(o))return}(0,u.h7j)((function(t){return(0,r.jsx)(Ye,Be({},t,e.props))}))};e.onMouseDown=function(){e._mouseDown=!0}
|
||
;e.onMouseMove=function(){e._mouseDown&&(e._mouseDown=!1)};e.onMouseUp=function(t){e._mouseDown&&t.button!==z.AeJ.SECONDARY&&e.handleOpenTopic(t);e._mouseUp=!0;e._mouseDown=!1};e.handleContextMenu=function(t){var o=e.props,i=o.channel,a=o.guild;(0,be.jW)(t,Le((function(){var e,t;return ze(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(84663),n.e(59295)]).then(n.bind(n,359295))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,Fe(Be({},e),{channel:i,guild:a,includeTopic:!0}))}]}}))})))};e.handleClick=function(t){e._mouseUp?e._mouseUp=!1:e.handleOpenTopic(t)};return e}i.prototype.render=function(){var e=this.props.channel;return e.isMultiUserDM()||null==e.topic||0===e.topic.length?null:(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(Te.Z.Divider,{}),(0,r.jsxs)("div",{className:a()(Me().topic,Me().expandable),onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseUp:this.onMouseUp,onContextMenu:this.handleContextMenu,onClick:this.handleClick,
|
||
children:[(0,r.jsx)(u.P3F,{onClick:this.handleClick,"aria-label":K.Z.Messages.OPEN_CHANNEL_TOPIC,className:Me().topicClickTarget}),Ae.Z.parseTopic(e.topic,!0,{channelId:e.id})]})]})};return i}(o.Component);var Qe=n(318715),Xe=n(258875),Je=n.n(Xe);function $e(e){var t=e.channel.getRecipientId(),n=e.channel.isSystemDM(),o=(0,Qe.ZP)([P.default],(function(){return P.default.getUser(t)})),i=(0,Qe.ZP)([f.Z],(function(){return f.Z.getStatus(t)})),a=(0,Qe.ZP)([f.Z],(function(){return f.Z.isMobileOnline(t)})),l=(0,Qe.ZP)([_.Z],(function(){return _.Z.getNickname(t)})),c=d.ZP.useUserTag(o);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.nn4,{children:K.Z.Messages.DIRECT_MESSAGE}),null!=o&&!n&&(0,r.jsx)("div",{children:(0,r.jsx)(u.qEK,{status:i,isMobile:a,className:Je().avatar,size:u.EFr.SIZE_24,"aria-label":d.ZP.getName(o),src:o.getAvatarURL(void 0,24)})}),(0,r.jsx)(Te.Z.Title,{level:e.level,onClick:e.handleClick,onContextMenu:e.handleContextMenu,
|
||
className:null!=e.handleClick?Je().cursorPointer:null,children:(0,r.jsx)(u.DY3,{text:c,position:"bottom",children:null!=l?l:d.ZP.getName(o)})})]})}function et(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function tt(e){var t=e.channel,n=e.channelName,i=e.parentChannel,l=e.guild,c=e.isMobile,s=void 0!==c&&c,f=e.inSidebar,d=void 0!==f&&f,p=e.handleClick,h=e.handleContextMenu,y=e.handleParentClick,b=e.handleParentContextMenu,v=e.renderFollowButton,m=e.emojiAndColor,j=e.channelEmojiLeftOfIcon,S=(0,C.Z)(t,l),w=function(e,t){switch(e){case z.d4z.DM:return{prefix:K.Z.Messages.DIRECT_MESSAGE,level:1};case z.d4z.GROUP_DM:return{prefix:K.Z.Messages.GROUP_DM,level:1};case z.d4z.GUILD_DIRECTORY:var n;return{prefix:null!==(n=null==t?void 0:t.name)&&void 0!==n?n:"",level:1};case z.d4z.GUILD_ANNOUNCEMENT:case z.d4z.GUILD_TEXT:case z.d4z.GUILD_FORUM:case z.d4z.GUILD_STAGE_VOICE:case z.d4z.GUILD_VOICE:var r;return{
|
||
prefix:null!==(r=null==t?void 0:t.name)&&void 0!==r?r:"",level:1};case z.d4z.ANNOUNCEMENT_THREAD:case z.d4z.PUBLIC_THREAD:case z.d4z.PRIVATE_THREAD:return{prefix:K.Z.Messages.THREAD,level:2};default:return{prefix:null,level:1}}}(t.type,l),N=w.prefix,A=w.level,T=(0,r.jsxs)(r.Fragment,{children:[null!=N?(0,r.jsxs)(u.nn4,{children:[N,":"]}):null," ",n]});switch(t.type){case z.d4z.DM:var Z,M;if((0,I.IR)())return(0,r.jsx)($e,{level:A,channel:t,handleClick:p,handleContextMenu:h});var R=t.getRecipientId(),L=t.isSystemDM(),D=x.Z.hidePersonalInformation?null===(Z=P.default.getUser(R))||void 0===Z?void 0:Z.username:null===(M=P.default.getUser(R))||void 0===M?void 0:M.tag,k=null!=_.Z.getNickname(R)?D:null,U=(0,r.jsx)(Te.Z.Title,{level:A,onContextMenu:h,onClick:p,className:null!=p?Je().cursorPointer:null,children:T});return(0,r.jsxs)(r.Fragment,{children:[ot(S,K.Z.Messages.DIRECT_MESSAGE),null!=k?(0,r.jsx)(u.DY3,{text:k,position:"bottom",children:U}):U,L?null:(0,r.jsx)(g,{size:10,userId:R,
|
||
className:Je().status,isMobile:s,position:"bottom"},R)]});case z.d4z.GROUP_DM:return t.isManaged()?T:(0,I.IR)()?(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(u.nn4,{children:K.Z.Messages.GROUP_DM}),(0,r.jsx)("div",{children:(0,r.jsx)(u.qEK,{"aria-hidden":!0,className:Je().avatar,size:u.EFr.SIZE_24,src:(0,O.x)(t,80,!1)})}),(0,r.jsx)(he,{channel:t},"channel-".concat(t.id))]}):(0,r.jsxs)(o.Fragment,{children:[ot(S,K.Z.Messages.GROUP_DM),(0,r.jsx)(he,{channel:t},"channel-".concat(t.id))]});case z.d4z.GUILD_ANNOUNCEMENT:case z.d4z.GUILD_TEXT:case z.d4z.GUILD_FORUM:return(0,r.jsxs)(o.Fragment,{children:[null!=m&&j?(0,r.jsx)(at,{emojiAndColor:m,channelEmojiLeftOfIcon:j}):null,ot(S,t.type===z.d4z.GUILD_ANNOUNCEMENT?K.Z.Messages.NEWS_CHANNEL:K.Z.Messages.TEXT_CHANNEL),null==m||j?null:(0,r.jsx)(at,{emojiAndColor:m,channelEmojiLeftOfIcon:j}),(0,r.jsx)(Te.Z.Title,{level:A,onContextMenu:h,onClick:p,children:T}),null!=v?v():null]});case z.d4z.GUILD_VOICE:return(0,r.jsxs)(o.Fragment,{
|
||
children:[null!=m&&j?(0,r.jsx)(at,{emojiAndColor:m,channelEmojiLeftOfIcon:j}):null,ot(S,K.Z.Messages.VOICE_CHANNEL),null==m||j?null:(0,r.jsx)(at,{emojiAndColor:m,channelEmojiLeftOfIcon:j}),(0,r.jsx)(Te.Z.Title,{level:A,onContextMenu:h,onClick:p,children:T})]});case z.d4z.GUILD_STAGE_VOICE:return(0,r.jsxs)(o.Fragment,{children:[null!=m&&j?(0,r.jsx)(at,{emojiAndColor:m,channelEmojiLeftOfIcon:j}):null,ot(S,K.Z.Messages.STAGE_CHANNEL),null==m||j?null:(0,r.jsx)(at,{emojiAndColor:m,channelEmojiLeftOfIcon:j}),(0,r.jsx)(Te.Z.Title,{level:A,onContextMenu:h,onClick:p,children:T})]});case z.d4z.ANNOUNCEMENT_THREAD:case z.d4z.PUBLIC_THREAD:case z.d4z.PRIVATE_THREAD:var B=null;if(!d&&null!=i){var F=(0,C.Z)(i,l);B=(0,r.jsxs)(o.Fragment,{children:[ot(F,K.Z.Messages.TEXT_CHANNEL),(0,r.jsx)(Te.Z.Title,{level:A,onContextMenu:b,onClick:y,className:a()(Je().parentChannelName,Je().cursorPointer),children:(0,E.F6)(i,P.default,_.Z)}),(0,r.jsx)(Te.Z.Caret,{})]})}
|
||
var G,H=(null==i?void 0:i.type)===z.d4z.GUILD_FORUM;return(0,r.jsxs)(o.Fragment,{children:[B,ot(H?null:S,K.Z.Messages.THREAD),(0,r.jsx)(Te.Z.Title,{level:A,onContextMenu:h,onClick:p,className:a()((G={},et(G,Je().cursorPointer,d),et(G,Je().forumPostTitle,H),G)),children:T})]});case z.d4z.GUILD_DIRECTORY:var V=(null==l?void 0:l.hasFeature(z.oNc.HUB))?K.Z.Messages.HUB_DIRECTORY_CHANNEL_TITLE.format({guildName:n}):n;return(0,r.jsxs)(o.Fragment,{children:[null!==S?(0,r.jsx)(Te.Z.Icon,{iconClassName:Je().icon,icon:S,"aria-hidden":!0}):null,(0,r.jsxs)(Te.Z.Title,{level:A,onContextMenu:h,onClick:p,children:[null!=N?(0,r.jsxs)(u.nn4,{children:[N,":"]}):null," ",V]})]});default:return null}}var nt=function(e){var t=e.channel,n=(0,l.e7)([P.default],(function(){return P.default.getCurrentUser()})),i=(0,l.e7)([P.default],(function(){return P.default.getUser(t.getRecipientId())}));o.useEffect((function(){(null==n?void 0:n.isStaff())&&(0,S.Z)(i.id,i.getAvatarURL(void 0,80),{dispatchWait:!0,
|
||
withMutualGuilds:!0,withMutualFriendsCount:!0})}),[n,i]);return t.isDM()&&(null==n?void 0:n.isStaff())&&(null==i?void 0:i.isStaff())?(0,r.jsx)(N.Z,{type:N.Z.Types.STAFF_ONLY_DM}):null};function rt(e,t){switch(e.type){case z.d4z.DM:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(nt,{channel:e}),(0,r.jsx)(ee,{channel:e},e.id)]});case z.d4z.GUILD_ANNOUNCEMENT:case z.d4z.GUILD_TEXT:case z.d4z.GUILD_VOICE:case z.d4z.GUILD_STAGE_VOICE:case z.d4z.GROUP_DM:return null!=t?(0,r.jsx)(qe,{channel:e,guild:t},e.id):null;default:return null}}function ot(e,t){return(0,r.jsxs)(r.Fragment,{children:[null!==e&&(0,r.jsx)(Te.Z.Icon,{iconClassName:Je().icon,icon:e,"aria-hidden":!0}),(0,r.jsx)(u.nn4,{children:t})]})}function it(e){var t=e.guild,n=e.channel;if((0,l.e7)([w.Z],(function(){return w.Z.getGuildId()}))!==z.I_8)return null;if(null==t)return null;return(0,r.jsxs)("div",{className:Je().guildBreadcrumbContainer,children:[(0,r.jsx)(Te.Z.Caret,{direction:"left"}),(0,r.jsx)(A.Z,{guild:t,
|
||
size:A.Z.Sizes.SMALLER,className:Je().guildBreadcrumbIcon,active:!0}),(0,r.jsx)(Te.Z.Title,{onClick:function(){(0,j.XU)(t.id,n.id)},className:a()(Je().parentChannelName,Je().cursorPointer),children:t.name})]})}var at=o.memo((function(e){var t=e.emojiAndColor,n=e.channelEmojiLeftOfIcon;return(0,r.jsx)("div",{className:a()(Je().channelEmoji,n?Je().channelEmojiLeftOfIcon:Je().channelEmojiRightOfIcon),style:{backgroundColor:(0,T.Cj)(t[1],.16)},children:(0,r.jsx)(c.Z,{className:Je().twemoji,emojiName:t[0]})})}))},76107:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ve});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n.n(l),c=n(730381),s=n.n(c),f=n(289283),d=n(842227),p=n(202351),h=n(707961),y=n(744564),b=n(997244),v=n(761953),m=n(299192),g=n(224813);const O=function(e,t){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_INVITE_QUERY",query:e,channelId:t})},E=function(e){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_INVITE_QUERY",query:"",channelId:e})},C=function(e){y.Z.dispatch({
|
||
type:"PRIVATE_CHANNEL_RECIPIENTS_INVITE_SELECT",row:e})},j=function(e){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_ADD_USER",userId:e})},S=function(e){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_REMOVE_USER",userId:e})},I=function(e){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_INVITE_OPEN",channelId:e})},_=function(){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_INVITE_CLOSE"})};var w=n(864928),x=n(72831),P=n(650332),N=n(26468),A=n(396043),T=n(621647),Z=n(773011),M=n(625751),R=n(784426),L=n(382060),D=n(61209),k=n(869160),U=n(876296),B=n(563367),F=n(717091),G=n(840922),H=n(793461),V=n(473903),W=n(107364),z=n(443812),Y=n(633878);function K(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function q(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e)
|
||
;t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Q(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function X(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Q(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",q(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){K(e,t,n[t])}))}return e}({},(0,Y.Z)(c)),{width:n,height:i,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{className:u,fill:l,fillRule:"evenodd",clipRule:"evenodd",d:"M20.998 0V3H23.998V5H20.998V8H18.998V5H15.998V3H18.998V0H20.998ZM2.99805 20V24L8.33205 20H14.998C16.102 20 16.998 19.103 16.998 18V9C16.998 7.896 16.102 7 14.998 7H1.99805C0.894047 7 -0.00195312 7.896 -0.00195312 9V18C-0.00195312 19.103 0.894047 20 1.99805 20H2.99805Z"})}))}var J=n(226919),$=n(373438),ee=n(652591),te=n(691797),ne=n(930948),re=n(72580);const oe=(0,n(260561).B)({kind:"user",id:"2021-04_longer_group_dm_invites",label:"Longer Group DM Invites",defaultConfig:{inviteMaxAgeSeconds:86400},treatments:[{id:1,label:"Makes group DM invites expire after 1 week.",config:{inviteMaxAgeSeconds:604800}}]})
|
||
;var ie=n(457217),ae=n(334835),le=n(657539),ue=n(491260),ce=n(749565),se=n(603258),fe=n.n(se);function de(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function pe(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function he(e){var t=e.user,n=e.row,o=e.hideDiscriminator,i=e.comparator,l=e.selected,u=e.checked,c=e.onClick,s=e.onMouseEnter,f=e["aria-setsize"],d=e["aria-posinset"],y=(0,p.e7)([ue.Z],(function(){return ue.Z.getStatus(t.id)})),b=(0,ie.JA)(String(t.id));return(0,r.jsx)(h.P3F,pe(function(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){de(e,t,n[t])}))}return e}({id:"user-row-".concat(n),className:fe().friendWrapper,onClick:function(){null!=c&&c(t.id)},onMouseEnter:function(){null!=s&&s(n)}},b),{role:"option","aria-selected":u,"aria-setsize":f,"aria-posinset":d,children:(0,r.jsxs)(W.Z,{align:W.Z.Align.CENTER,className:a()(fe().friend,de({},fe().friendSelected,l)),children:[(0,r.jsx)(le.Z,{user:t,status:y,className:fe().avatar}),(0,r.jsxs)(W.Z,{className:fe().match,align:W.Z.Align.BASELINE,children:[(0,r.jsx)(h.xvT,{tag:"strong",className:fe().nickname,"aria-hidden":!0,variant:"text-md/medium",children:null!=i&&i===t.tag?ce.ZP.getName(t):null!=i&&""!==i?i:ce.ZP.getName(t)}),(0,r.jsx)(ae.Z,{user:t,hideDiscriminator:o,className:fe().discordTag,
|
||
usernameClass:fe().weightMedium,discriminatorClass:fe().weightMedium,forceUsername:!0})]}),(0,r.jsx)(h.XZJ,{displayOnly:!0,size:22,value:u,className:fe().checkbox})]})}))}var ye=n(2590),be=n(473708),ve=n(64704),me=n.n(ve),ge=n(103468),Oe=n.n(ge),Ee=n(518280),Ce=n.n(Ee);function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _e(e){_e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return _e(e)}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ie(e,t,n[t])}))}return e}function xe(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Pe(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ne(e,t){
|
||
return!t||"object"!==Me(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ae(e,t){Ae=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ae(e,t)}function Te(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||Re(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ze(e){return function(e){if(Array.isArray(e))return je(e)}(e)||function(e){
|
||
if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Re(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Me=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Re(e,t){if(e){if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=_e(e);if(t){
|
||
var o=_e(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ne(this,n)}}var De=(0,z.hQ)(),ke=(0,z.hQ)();function Ue(e){var t=e.className,n=e.children;return(0,r.jsxs)(W.Z,{align:W.Z.Align.CENTER,justify:W.Z.Justify.CENTER,direction:W.Z.Direction.VERTICAL,className:a()(me().errorState,t),children:[(0,r.jsx)("div",{className:a()(me().errorStateIcon,Ce().marginBottom20)}),n]})}var Be=function(e){var t,n,o=e.channel,i=e.onClose,a=null!==(t=(0,Z.ZP)(o))&&void 0!==t?t:"",l=(0,p.e7)([F.ZP],(function(){return null!==(n=F.ZP.lastMessageId(o.id))&&void 0!==n?n:o.id}));return(0,r.jsx)(h.P3F,{onClick:function(){(0,R.XU)(ye.ME,o.id);i()},children:(0,r.jsxs)("div",{className:me().confirmChannelItemContainer,children:[(0,r.jsx)(h.qEK,{src:(0,T.x)(o),size:h.EFr.SIZE_24,"aria-label":a}),(0,r.jsx)("span",{className:me().confirmChannelName,children:a}),(0,r.jsx)("span",{className:me().lastActiveTimestamp,children:s()(d.default.extractTimestamp(l)).fromNow()})]})})
|
||
},Fe=function(e){var t=e.onConfirm,n=e.channelIds,o=Pe(e,["onConfirm","channelIds"]),i=(0,p.e7)([D.Z],(function(){return Array.from(n).map(D.Z.getChannel)}),[n]);return(0,r.jsxs)(h.sm4,xe(we({header:be.Z.Messages.GROUP_DM_INVITE_CONFIRM,confirmText:be.Z.Messages.GROUP_DM_INVITE_CONFIRM_BUTTON,cancelText:be.Z.Messages.CANCEL,onConfirm:t,confirmButtonColor:h.zxk.Colors.BRAND},o),{children:[(0,r.jsx)(h.xvT,{variant:"text-md/normal",children:be.Z.Messages.GROUP_DM_INVITE_CONFIRM_DESCRIPTION}),(0,r.jsx)(h.vwX,{className:me().selectExistingFormHeader,children:be.Z.Messages.GROUP_DM_INVITE_SELECT_EXISTING}),(0,r.jsx)(h.Ttm,{className:me().confirmInviteScroller,children:i.filter(re.lm).sort((function(e,t){var n,r,o=null!==(n=e.lastMessageId)&&void 0!==n?n:e.id,i=null!==(r=t.lastMessageId)&&void 0!==r?r:t.id;return d.default.compare(i,o)})).map((function(e){return(0,r.jsx)(Be,{onClose:o.onClose,channel:e},e.id)}))})]}))},Ge=function(e){!function(e,t){
|
||
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Ae(e,t)}(n,e);var t=Le(n);function n(){Se(this,n);var e;(e=t.apply(this,arguments)).state={separator:!1,copied:!1};e.scrollerRef=o.createRef();e.searchBarRef=o.createRef();e._mobileCloseRef=o.createRef();e.scrollPageUp=function(){var t;null===(t=e.scrollerRef.current)||void 0===t||t.scrollPageUp({animate:!0})};e.scrollPageDown=function(){var t;null===(t=e.scrollerRef.current)||void 0===t||t.scrollPageDown({animate:!0})};e.renderMobileCloseButton=function(){return(0,r.jsx)("div",{className:a()(me().mobileToolsContainer),ref:e._mobileCloseRef,children:(0,r.jsx)(h.JcV,{containerRef:e._mobileCloseRef,children:(0,r.jsx)("div",{children:(0,r.jsx)(x.Z,{className:me().mobileToolsCloseIcon,closeAction:e.props.onClose,keybind:"ESC"})})})})};e.getRowHeight=function(t,n){
|
||
return t>0?0:null!=e.props.results[n]?42:0};e.renderRow=function(t){var n=t.section,o=t.row;if(n>0)return null;var i=e.props,a=i.results,l=i.selectedUsers,u=i.selectedRow,c=i.hideDiscriminator,s=a[o];if(null==s)return null;var f=s.user,d=s.comparator,p=l.has(f.id);return(0,r.jsx)(he,{row:o,user:f,hideDiscriminator:c,comparator:d,checked:p,selected:o===u,onClick:e.handleClick,onMouseEnter:e.focusResult,"aria-posinset":o+1,"aria-setsize":a.length},f.id)};e.forceFocus=function(){var t=e.searchBarRef.current;null==t||t.focus()};e.focusResult=function(e){C(e)};e.handleSelect=function(t,n){var r=e.props,o=r.results,i=r.channel;null==n?E(null==i?void 0:i.id):null!=o&&e.handleClick(o[n].user.id)};e.handleSelectionChange=function(t,n){C(n);var r=e.scrollerRef.current;null!=r&&r.scrollToIndex({section:t,row:n,padding:8})};e.handleQueryChange=function(t){var n=e.props.channel;O(t,null==n?void 0:n.id)};e.handleRemoveUser=function(t){var n=Array.from(e.props.selectedUsers);S(n[t]);e.forceFocus()}
|
||
;e.handleClick=function(t){var n=e.props,r=n.selectedUsers,o=n.query,i=n.channel;if(!r.has(t)){j(t);o.length>0&&E(null==i?void 0:i.id)}else S(t);e.forceFocus()};e.handleAddFriendNavigation=function(){(0,R.uL)(ye.Z5c.FRIENDS);m.Z.setSection(ye.pJs.ADD_FRIEND);e.props.onClose()};e.handleScroll=function(){var t=e.scrollerRef.current;null!=t&&e.setState({separator:!t.isScrolledToTop()})};e.createNewDM=function(e){v.Z.openPrivateChannel(e,!1,!1,"New Group DM")};e.pushToExistingDM=function(e,t){var n=B.Z.getChannelId()===e.id;v.Z.addRecipients(e.id,t,ye.Sbl.ADD_FRIENDS_TO_DM).then((function(r){n&&(e.isDM()&&r!==e.id?b.Z.call(r,!1,!0):b.Z.ring(r,t))}))};e.handleInviteUsers=function(){var t=e.props,n=t.channel,o=t.selectedUsers,i=t.onClose,a=Array.from(o);if(null!=n){var l=We(Array.from(new Set(Ze(n.recipients).concat(Ze(a)))));l.size>0?(0,h.h7j)((function(t){return(0,r.jsx)(Fe,xe(we({},t),{onConfirm:function(){return e.pushToExistingDM(n,a)},channelIds:l}))}),{},(0,
|
||
h.VnL)(e.context.appContext)):e.pushToExistingDM(n,a)}else{var u=We(a);a.length>1&&u.size>0?(0,h.h7j)((function(t){return(0,r.jsx)(Fe,xe(we({},t),{onConfirm:function(){return e.createNewDM(a)},channelIds:u}))}),{},(0,h.VnL)(e.context.appContext)):e.createNewDM(a)}i()};e.handleCopyInvite=function(t){var n=e.props,r=n.channel,o=n.invite;null!=o&&(0,te.JG)(t);null!=e.copyTimeout&&clearTimeout(e.copyTimeout);e.setState({copied:!0});e.copyTimeout=setTimeout((function(){e.setState({copied:!1})}),1e3);ee.default.track(ye.rMx.COPY_INSTANT_INVITE,{server:null,channel:null!=r?r.id:null,channel_type:null!=r?r.type:null,location:ye.Sbl.ADD_FRIENDS_TO_DM,code:null!=o?o.code:null})};return e}var i=n.prototype;i.componentDidMount=function(){var e=this.props.channel;y.Z.wait((function(){return I(null==e?void 0:e.id)}));var t=(0,A.v_)(e);null!=e?e.isDM()?ee.default.track(ye.rMx.OPEN_POPOUT,xe(we({},t),{type:"Add Friends to DM",source:"DM",is_friend:!this.isNotFriends()
|
||
})):ee.default.track(ye.rMx.OPEN_POPOUT,xe(we({},t),{type:"Add Friends to DM",source:"Group DM"})):ee.default.track(ye.rMx.OPEN_POPOUT,xe(we({},t),{type:"New Group DM",source:"Friends List"}));ne.S.subscribe(ye.CkL.SCROLL_PAGE_UP,this.scrollPageUp);ne.S.subscribe(ye.CkL.SCROLL_PAGE_DOWN,this.scrollPageDown)};i.componentWillUnmount=function(){ne.S.unsubscribe(ye.CkL.SCROLL_PAGE_UP,this.scrollPageUp);ne.S.unsubscribe(ye.CkL.SCROLL_PAGE_DOWN,this.scrollPageDown);null!=this.copyTimeout&&clearTimeout(this.copyTimeout);y.Z.wait((function(){return _()}))};i.isNotFriends=function(){var e=this.props.channel;if(null==e||!e.isDM())return!1;var t=e.getRecipientId();if(null==t)throw new Error("no recipient in DM");return!G.Z.isFriend(t)};i.createInvite=function(){var e=this.props.channel;if(null!=e&&e.isMultiUserDM()&&!this.isPartyFull()){var t=oe.getCurrentConfig({}).inviteMaxAgeSeconds;g.Z.createInvite(e.id,{max_age:t},ye.t4x.GROUP_DM)}};i.isPartyFull=function(){var e=this.props.channel
|
||
;return null!=e&&e.recipients.length+1>=this.getMaxParticipants()};i.getMaxParticipants=function(){var e=this.props.channel,t=V.default.getCurrentUser();return null!=t&&t.isStaff()?ye.p3w:null!=e&&e.userLimit>0?e.userLimit:ye.pAY};i.getRemaining=function(){var e=this.props,t=e.channel,n=e.selectedUsers,r=(null==t?0:t.recipients.length)+1;return this.getMaxParticipants()-n.size-r};i.renderCreateGroupButton=function(){var e=this.props,t=e.channel,n=e.selectedUsers,o=this.getRemaining(),i=null!=t&&0===n.size||o<0,a=n.size>1?be.Z.Messages.CREATE_GROUP_DM:be.Z.Messages.CREATE_DM;return(0,r.jsx)(h.zxk,{fullWidth:!0,disabled:i,onClick:this.handleInviteUsers,children:a})};i.renderAddUsersButton=function(){var e=this.props,t=e.channel,n=e.selectedUsers;if(null!=t&&!t.isDM()){var o=this.getRemaining(),i=0===n.size||o<0;return(0,r.jsx)("div",{className:me().addButton,children:(0,r.jsx)(h.zxk,{size:h.zxk.Sizes.SMALL,disabled:i,onClick:this.handleInviteUsers,children:be.Z.Messages.ADD})})}}
|
||
;i.renderSubtitle=function(){if(!this.props.hasFriends||this.isNotFriends()||this.isPartyFull())return null;var e=this.getRemaining(),t=e<=0?be.Z.Messages.GROUP_DM_INVITE_FULL_SUB2.format({number:this.getMaxParticipants()}):be.Z.Messages.GROUP_DM_INVITE_REMAINING.format({number:e});return(0,r.jsx)(h.xvT,{variant:"text-xs/normal",className:a()(me().subtitle,Ie({},me().subtitleWarning,e<0),Ce().marginTop4),children:t})};i.renderSearchBar=function(){var e=this.props,t=e.query,n=e.hasFriends,o=e.results,i=e.selectedRow,l=e.selectedUsers;if(!n||this.isNotFriends())return null;var u,c=[];l.forEach((function(e){var t=V.default.getUser(e);null!=t&&c.push(t.username)}));return(0,r.jsxs)(W.Z,{className:a()(me().searchBar,Ce().marginTop20),children:[(0,r.jsx)(P.ZP,{ref:this.searchBarRef,className:me().searchBarComponent,autoFocus:!0,placeholder:0===l.size?be.Z.Messages.GROUP_DM_SEARCH_PLACEHOLDER:void 0,disabled:this.isPartyFull(),size:P.ZP.Sizes.MEDIUM,query:t,selectedRow:i,
|
||
sections:[null!==(u=null==o?void 0:o.length)&&void 0!==u?u:0],tags:c,onSelect:this.handleSelect,onSelectionChange:this.handleSelectionChange,onQueryChange:this.handleQueryChange,onRemoveTag:this.handleRemoveUser,inputProps:{"aria-labelledby":De,"aria-controls":ke,"aria-expanded":!0,"aria-activedescendant":"user-row-".concat(i)}}),this.renderAddUsersButton()]})};i.renderHeader=function(){var e=null!=this.scrollerRef.current&&this.state.separator,t=this.isNotFriends()?be.Z.Messages.GROUP_DM_ADD_FRIENDS:be.Z.Messages.GROUP_DM_HEADER;return(0,r.jsxs)(h.xBx,{direction:W.Z.Direction.VERTICAL,align:W.Z.Align.STRETCH,className:me().header,separator:e,children:[f.tq?this.renderMobileCloseButton():null,(0,r.jsx)(h.X6q,{id:De,variant:"heading-lg/semibold",children:t}),this.renderSubtitle(),this.renderSearchBar()]})};i.renderBody=function(){var e=this,t=this.props,n=t.channel,o=t.hasFriends,i=t.results;if(this.isNotFriends()){var l=null!=n?n.getRecipientId():null
|
||
;if(null==l)throw new Error("no recipient in DM");var u=V.default.getUser(l),c=null!=u?u.username:"",s=null!=u&&G.Z.getRelationshipType(u.id)===ye.OGo.PENDING_OUTGOING;return(0,r.jsxs)(Ue,{className:me().notFriends,children:[(0,r.jsx)("div",{children:be.Z.Messages.GROUP_DM_INVITE_NOT_FRIENDS.format({username:c})}),(0,r.jsx)(h.zxk,{disabled:s,size:h.zxk.Sizes.SMALL,onClick:function(){return null!=u?e.handleAddFriend(u):null},className:Ce().marginTop20,children:s?be.Z.Messages.ADD_FRIEND_BUTTON_AFTER:be.Z.Messages.ADD_FRIEND_BUTTON})]})}return o?this.isPartyFull()?(0,r.jsxs)(Ue,{className:me().partyFull,children:[(0,r.jsx)("div",{children:be.Z.Messages.GROUP_DM_INVITE_FULL_MAIN}),(0,r.jsx)("div",{children:be.Z.Messages.GROUP_DM_INVITE_FULL_SUB2.format({number:this.getMaxParticipants()})})]}):0===i.length?(0,r.jsx)(Ue,{className:a()(me().noResults,Ce().marginBottom20),children:(0,r.jsx)("div",{children:be.Z.Messages.GROUP_DM_INVITE_EMPTY})}):(0,r.jsx)(h.aVo,{ref:this.scrollerRef,
|
||
sections:[i.length],className:me().scroller,renderRow:this.renderRow,rowHeight:this.getRowHeight,renderSection:this.renderSection,sectionHeight:0,onScroll:this.handleScroll,paddingTop:0,paddingBottom:14,fade:!0,role:void 0,innerRole:"listbox",innerId:ke,innerAriaMultiselectable:!0,innerAriaOrientation:"vertical"}):(0,r.jsxs)(Ue,{className:me().noFriends,children:[(0,r.jsx)("div",{children:be.Z.Messages.GROUP_DM_INVITE_NO_FRIENDS}),(0,r.jsx)(h.zxk,{autoFocus:!0,color:h.zxk.Colors.GREEN,fullWidth:!0,size:h.zxk.Sizes.SMALL,onClick:this.handleAddFriendNavigation,className:Ce().marginTop20,children:be.Z.Messages.ADD_FRIEND})]})};i.renderSection=function(){return null};i.renderInviteLink=function(){var e=this,t=this.props,n=t.channel,i=t.invite,l=t.hideInstantInvites,u=this.state.copied;if(null==n||!n.isMultiUserDM()||this.isPartyFull())return null;var c=null!=i?(0,M.Z)(i.code):"";return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(h.vwX,{tag:"h5",className:Ce().marginBottom8,
|
||
children:be.Z.Messages.GROUP_DM_INVITE_LINK_TITLE}),(0,r.jsxs)(W.Z,{className:a()(Oe().input,Ie({},Oe().success,u)),justify:W.Z.Justify.BETWEEN,align:W.Z.Align.CENTER,children:[c.length>0?(0,r.jsx)(h.oil,{className:me().copyInput,name:"invite",value:l?be.Z.Messages.INSTANT_INVITE_HIDDEN:c,editable:!1,inputClassName:me().noBorder,spellCheck:"false",onClick:function(e){return e.currentTarget.select()}}):(0,r.jsx)(h.oil,{className:me().copyInput,name:"invite",value:c,placeholder:(0,M.Z)(be.Z.Messages.GROUP_DM_INVITE_LINK_EXAMPLE),editable:!1,inputClassName:me().noBorder,spellCheck:"false",onClick:function(){return e.createInvite()}}),te.wS&&c.length>0?(0,r.jsx)(h.zxk,{size:h.zxk.Sizes.SMALL,color:u?h.zxk.Colors.GREEN:h.zxk.Colors.BRAND,className:me().copyButton,onClick:function(){return e.handleCopyInvite(c)},children:u?be.Z.Messages.INVITE_COPIED:be.Z.Messages.COPY}):null,0===c.length?(0,r.jsx)(h.zxk,{size:h.zxk.Sizes.SMALL,color:h.zxk.Colors.BRAND,className:me().copyButton,
|
||
onClick:function(){return e.createInvite()},children:be.Z.Messages.GROUP_DM_INVITE_LINK_CREATE}):null]}),c.length>0?(0,r.jsx)(h.xvT,{variant:"text-xs/normal",className:a()(Ce().marginTop8,me().footerText),children:be.Z.Messages.INVITE_EXPIRES_HOURS.format({numHours:"".concat(24)})}):null]})};i.renderFooter=function(){var e=this.props,t=e.hasFriends,n=e.channel;if(this.isNotFriends()||!t||this.isPartyFull())return null;var i=null==n||n.isDM()?this.renderCreateGroupButton():this.renderInviteLink();return null!=i?(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)("div",{className:me().footerSeparator}),(0,r.jsx)(W.Z,{direction:W.Z.Direction.VERTICAL,className:me().footer,children:i})]}):void 0};i.render=function(){var e=this.props.transitionState;return(0,r.jsxs)(h.Y0X,{transitionState:null!=e?e:h.Dvm.ENTERED,className:me().popout,children:[this.renderHeader(),this.renderBody(),this.renderFooter()]})};i.handleAddFriend=function(e){this.props.onClose();w.Z.sendRequest(e.tag,{location:"Group DM"})}
|
||
;return n}(o.PureComponent);Ge.contextType=N.ZP;var He=p.ZP.connectStores([U.Z,k.Z,H.Z],(function(e){var t,n=e.channel;null!=n&&null!=(t=k.Z.getInvite(n.id))&&t.isExpired()&&(t=null);return xe(we({},U.Z.getState()),{invite:t,hideDiscriminator:H.Z.hidePersonalInformation,hideInstantInvites:H.Z.hideInstantInvites})}))(Ge);function Ve(e){var t=e.channel,n=e.iconClassName,i=e.icon,a=e.tooltip,l=e.tooltipPosition,u=void 0===l?"bottom":l,c=e.popoutPosition,s=void 0===c?"bottom":c,f=e.popoutAlign,d=void 0===f?"right":f,p=e.subscribeToGlobalHotkey,y=void 0!==p&&p,b=Te(o.useState(null!=t&&t.isGroupDM()&&0===t.recipients.length),2),v=b[0],m=b[1],g=function(){return m((function(e){return!e}))};o.useEffect((function(){y&&ne.S.subscribe(ye.CkL.TOGGLE_DM_CREATE,g);return function(){ne.S.unsubscribe(ye.CkL.TOGGLE_DM_CREATE,g)}}),[y]);return(0,r.jsx)(h.yRy,{renderPopout:function(e){return(0,r.jsx)(He,xe(we({},e),{onClose:e.closePopout,channel:t}))},position:s,shouldShow:v,align:d,
|
||
onRequestClose:function(){return m(!1)},animation:h.yRy.Animation.NONE,children:function(e){return(0,r.jsx)($.ZP.Icon,xe(we({},e),{onClick:g,icon:null!=i?i:null==t?X:J.Z,className:n,iconClassName:n,tooltip:a,tooltipPosition:u}))}})}function We(e){var t=ze(e);return new Set(u()(D.Z.getMutablePrivateChannels()).values().filter((function(e){return(0,L.bc)(e.type)})).filter((function(e){return ze(e.recipients)===t})).map((function(e){return e.id})).value())}function ze(e){return JSON.stringify(e.sort())}},198325:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T});var r=n(785893),o=n(667294),i=n(202351),a=n(707961),l=n(201441),u=n(893263),c=n(784426),s=n(715107),f=n(570202),d=n(794547),p=n(226919),h=n(933850),y=n(651034),b=n(172028),v=n(842227),m=n(876186),g=n(549331),O=n(717091);var E=n(2590),C=n(473708),j=n(670331),S=n.n(j);function I(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function _(e){return function(){var t=this,n=arguments
|
||
;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){I(i,r,o,a,l,"next",e)}function l(e){I(i,r,o,a,l,"throw",e)}a(void 0)}))}}function w(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){w(e,t,n[t])}))}return e}function P(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var N=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}
|
||
o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},A=[{icon:(0,r.jsx)(f.Z,{className:S().icon}),key:"EVENTS",getName:function(e){var t=e.numEvents;return t>0?C.Z.Messages.GUILD_EVENTS_PLURAL.format({number:t}):C.Z.Messages.GUILD_EVENTS},handler:function(e){return(0,a.ZDy)(_((function(){var t,o;return N(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(40706),n.e(89853)]).then(n.bind(n,389853))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,P(x({},t),{guildId:e.id}))}]}}))})))}},{icon:(0,r.jsx)(d.Z,{className:S().icon}),key:"JOIN_SERVERS",getName:function(){return C.Z.Messages.HUB_SIDEBAR_JOIN_SERVERS},handler:function(e,t){return(0,c.XU)(e.id,t.id)}},{icon:(0,r.jsx)(h.Z,{className:S().icon}),key:"ADD_SERVERS",getName:function(){return C.Z.Messages.HUB_SIDEBAR_ADD_SERVERS},handler:function(e,t){return(0,a.ZDy)(_((function(){
|
||
var o,i;return N(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(95599),n.e(47035)]).then(n.bind(n,647035))];case 1:o=a.sent(),i=o.default;return[2,function(n){return(0,r.jsx)(i,P(x({},n),{directoryGuildName:e.name,directoryGuildId:e.id,directoryChannelId:t.id}))}]}}))})))}},{icon:(0,r.jsx)(p.Z,{className:S().icon}),key:"INVITE_MEMBERS",getName:function(){return C.Z.Messages.HUB_SIDEBAR_INVITE_MEMBERS},handler:function(e,t){return(0,a.ZDy)(_((function(){var o,i;return N(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:o=a.sent(),i=o.default;return[2,function(n){return(0,r.jsx)(i,P(x({},n),{guild:e,channel:t,source:E.t4x.HUB_SIDEBAR}))}]}}))})))}}];const T=function(e){var t=e.guild,n=e.channel,a=(0,l.ZP)(t.id);o.useEffect((function(){b.Z.trackExposure({guildId:t.id})}),[t.id]);var c=b.Z.useExperiment({guildId:t.id}).showHubEventsList,f=(0,i.e7)([s.Z],(function(){
|
||
return null!=n&&s.Z.getChannelId()===n.id})),d=o.useMemo((function(){return{numEvents:a.length}}),[a.length]),p=function(e){return(0,i.e7)([m.Z,O.ZP],(function(){if(null==e)return 0;var t,n=O.ZP.ackMessageId(e.id);if(null==n)return 0;var r=Object.values(null!==(t=m.Z.getDirectoryEntries(e.id))&&void 0!==t?t:{}).filter((function(e){var t=v.default.fromTimestamp(new Date(e.createdAt).getTime());return(0,g.gX)(e)&&t>n}));return Math.min(g._N,r.length)}),[e])}(n);return(0,r.jsx)("div",{children:A.map((function(e){if(!c&&"EVENTS"===e.key)return null;var o=f&&"JOIN_SERVERS"===e.key;return(0,r.jsx)(y.Z,{avatar:e.icon,name:e.getName(d),focusProps:{offset:{right:4,top:1,bottom:1}},onClick:function(){return function(e){if(null!=n){var r=A.find((function(t){return t.key===e}));null==r||r.handler(t,n)}}(e.key)},selected:o,className:S().optionItem,selectedClassName:S().selected,innerClassName:S().itemInner,avatarClassName:S().avatar,children:"JOIN_SERVERS"===e.key&&p>0?(0,u.Ne)(p):null},e.key)}))})
|
||
}},668403:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ve});var r=n(785893),o=n(667294),i=n(707961),a=n(744564),l=n(301928),u=n(294184),c=n.n(u),s=n(441143),f=n.n(s),d=n(496486),p=n.n(d),h=n(853158),y=n(202351),b=n(443660),v=n(344524),m=n(442921),g=n(241166),O=n(316878),E=n(930948),C=n(716118),j=n(2590),S=n(814873),I=n.n(S);function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function x(e){x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return x(e)}function P(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&A(e,t)}function N(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?function(e){
|
||
if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e,t){A=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return A(e,t)}var T=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=x(e);if(t){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}var M=function(){return!0},R=function(){return!0},L=function(){return(0,r.jsxs)("div",{className:I().symbol,children:[(0,r.jsx)("div",{className:I().symbolBackground}),(0,r.jsx)("img",{alt:"",src:n(492137)})]},"symbol")},D=140,k=function(e){P(o,e);var t=Z(o);function o(){
|
||
_(this,o);var e;(e=t.apply(this,arguments))._renderSecondaryTimeout=null;e._doneTimeout=null;e.state={animating:!1,renderSecondary:!1,scale:p().random(.6,1,!0),offsetX:p().random(0,D,!1)-70,offsetY:p().random(0,D,!1)-70};e.done=function(){e.props.onAnimationComplete(e.props.componentId)};return e}var i=o.prototype;i.componentDidMount=function(){var e=this;this.setState({animating:!0});this._renderSecondaryTimeout=setTimeout((function(){e.setState({renderSecondary:!0})}),120);this._doneTimeout=setTimeout(this.done,1e3);M()};i.componentDidUpdate=function(e,t){this.state.renderSecondary&&!t.renderSecondary&&R()};i.componentWillUnmount=function(){clearTimeout(this._renderSecondaryTimeout);clearTimeout(this._doneTimeout)};i.renderPrimary=function(){return(0,r.jsxs)("div",{className:I().primaryExplosion,children:[(0,r.jsx)("img",{alt:"",className:I().circleInner,src:n(800193),width:70,height:69}),(0,r.jsx)("img",{alt:"",className:I().circleOuter,src:n(537687),width:96,height:95}),(0,
|
||
r.jsx)("img",{alt:"",className:I().linesSecondary,src:n(806956),width:183,height:104}),(0,r.jsx)("img",{alt:"",className:I().linesMain,src:n(138e3),width:69,height:180})]},"primary-explosion")};i.renderSecondary=function(e,t){return(0,r.jsxs)("div",{className:I().secondaryExplosion,style:{top:t,left:e},children:[(0,r.jsx)("img",{alt:"",className:I().circleInner,src:n(166682),width:61,height:58},"circle-inner"),(0,r.jsx)("img",{alt:"",className:I().circleOuter,src:n(532958),width:85,height:85},"circle-outer"),(0,r.jsx)("img",{alt:"",className:I().linesSecondary,src:n(94672),width:162,height:173},"lines-secondary"),(0,r.jsx)("img",{alt:"",className:I().linesMain,src:n(529753),width:156,height:306},"lines-main")]},"secondary-explosion")};i.render=function(){var e=this.state,t=e.renderSecondary,n=e.offsetX,o=e.offsetY,i=e.animating,a=e.scale,l=[this.renderPrimary()];t&&l.push(this.renderSecondary(n,o));return(0,r.jsx)("div",{className:c()(I().container,w({},I().animate,i)),style:{
|
||
top:this.props.top,left:this.props.left,transform:"scale(".concat(a,")")},children:l})};return o}(o.PureComponent);const U=function(e){P(n,e);var t=Z(n);function n(){_(this,n);var e;(e=t.apply(this,arguments))._timeouts=[];e.children=[];e.state={explosions:0,visible:!1};e.setTimeout=function(t,n){var r=setTimeout(t,n);e._timeouts.push(r);return r};e.removeExplosion=function(t){var n=e.children,r=n.findIndex((function(e){if(e.type!==k)return!1;var n=e.props;return null!=n.componentId&&n.componentId===t}));r>=0&&n.splice(r,1);e.forceUpdate()};e.createExplosion=function(){var t=e.children,n=window.innerWidth/2>>0,o=window.innerHeight/2>>0;if(e.state.explosions<8){var i="expl-".concat(e.state.explosions);t.push((0,r.jsx)(k,{componentId:i,top:p().random(o-100,o+100,!1),left:p().random(n-200,n+200,!1),onAnimationComplete:e.removeExplosion},i));e.setTimeout(e.createExplosion,240);e.setState({explosions:e.state.explosions+1})}else e.setTimeout(e.addSymbol,750)};e.addSymbol=function(){
|
||
e.children=[(0,r.jsx)(L,{},"symbol")];e.forceUpdate();e.setTimeout(e.delayedClose,3e3)};e.delayedClose=function(){e.props.onClose()};return e}var o=n.prototype;o.componentDidMount=function(){var e=this;this.setTimeout((function(){e.setState({visible:!0});E.S.dispatch(j.CkL.SHAKE_APP,{duration:2400})}),1800);this.setTimeout(this.createExplosion,1800)};o.componentWillUnmount=function(){g.Z.enable();this.children.length=0;var e=!0,t=!1,n=void 0;try{for(var r,o=this._timeouts[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value;clearTimeout(i)}}catch(e){t=!0;n=e}finally{try{e||null==o.return||o.return()}finally{if(t)throw n}}};o.render=function(){return(0,r.jsx)("div",{className:c()(I().ragingDemon,w({},I().visible,this.state.visible)),children:this.children})};return n}(o.PureComponent);var B=n(473708),F=n(539430),G=n.n(F);function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V(e,t){
|
||
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function z(e){z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return z(e)}function Y(e,t){return!t||"object"!==Q(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function K(e,t){K=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return K(e,t)}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}
|
||
}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return H(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Q=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=z(e);if(t){var o=z(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments)
|
||
;return Y(this,n)}}var J,$=100,ee=(W(J={},j.kir.UP,p().throttle((function(){return(0,C.GN)("ddr-up")}),$)),W(J,j.kir.DOWN,p().throttle((function(){return(0,C.GN)("ddr-down")}),$)),W(J,j.kir.LEFT,p().throttle((function(){return(0,C.GN)("ddr-left")}),$)),W(J,j.kir.RIGHT,p().throttle((function(){return(0,C.GN)("ddr-right")}),$)),J),te=p()((0,v.Rv)()).groupBy((function(e){return e.group})).value();function ne(e){switch(e.keyCode){case j.yXg.ARROW_UP:return j.kir.UP;case j.yXg.ARROW_DOWN:return j.kir.DOWN;case j.yXg.ARROW_LEFT:return j.kir.LEFT;case j.yXg.ARROW_RIGHT:return j.kir.RIGHT;default:return null}}var re=1e3/60;function oe(){var e=[v.Q2.MESSAGE,v.Q2.NAVIGATION,v.Q2.VOICE_AND_VIDEO,v.Q2.CHAT,v.Q2.MISCELLANEOUS];return(0,r.jsx)("div",{className:G().keyboardShortcutList,children:e.map((function(t,n){var o=n===e.length-1,a=0===n,l=te[t],u=(0,v.UD)(t),s=(0,v.U6)(t);return(0,r.jsxs)("div",{className:c()(G().keyboardShortcutListGroup,W({},G().firstGroup,a)),children:[(0,r.jsxs)("div",{
|
||
className:c()(G().keybindGroup),children:[(0,r.jsx)(i.X6q,{variant:"heading-md/semibold",children:u}),null!=s&&(0,r.jsx)(i.xvT,{className:G().keybindGroupDescription,variant:"text-sm/normal",children:s})]},t),l.map((function(e,t){var n;return!1===(null===(n=e.predicate)||void 0===n?void 0:n.call(e))?null:(0,r.jsxs)("div",{className:c()(G().keybindGroup),children:[(0,r.jsx)("div",{className:G().keybindDescription,children:e.description}),(0,r.jsx)("div",{className:"keybind-shortcuts",children:e.binds.map((function(e){return(0,r.jsx)(i.M2$,{className:G().keybindKey,shortcut:e},e)}))})]},t)})),!o&&(0,r.jsx)(i.$i$,{className:G().keybindGroupDivider})]},t)}))})}var ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&K(e,t)}(n,e);var t=X(n);function n(){V(this,n);var e;(e=t.apply(this,arguments)).state={UP:!1,
|
||
DOWN:!1,LEFT:!1,RIGHT:!1,opacity:new h.Z.Value(1),scaleX:new h.Z.Value(1),scaleY:new h.Z.Value(0),animating:!1};e.scrollerRef=o.createRef();e.lastInputedKeys=[];e.scrollPageUp=function(){var t=e.scrollerRef.current;f()(null!=t,"Scroller is pagedUp when not mounted");t.scrollPageUp({animate:!0})};e.scrollPageDown=function(){var t=e.scrollerRef.current;f()(null!=t,"Scroller is pagedDown when not mounted");t.scrollPageDown({animate:!0})};e.arrowUp=function(t){var n=t.direction;e.setState(W({},n,!1))};e.arrowDown=function(t){var n=t.direction;ee[n]();e.setState(W({},n,!0))};e.componentWillLeave=function(t){e.setState({animating:!0});e.state.opacity.setValue(1);e.state.scaleX.setValue(.5);e.state.scaleY.setValue(1);h.Z.sequence([h.Z.timing(e.state.opacity,{toValue:.7,duration:2*re}),h.Z.timing(e.state.opacity,{toValue:1,duration:2*re}),h.Z.timing(e.state.opacity,{toValue:.7,duration:2*re}),h.Z.timing(e.state.opacity,{toValue:1,duration:2*re}),h.Z.timing(e.state.opacity,{delay:300,
|
||
toValue:.7,duration:2*re}),h.Z.timing(e.state.opacity,{toValue:1,duration:2*re}),h.Z.timing(e.state.opacity,{toValue:.7,duration:2*re}),h.Z.timing(e.state.opacity,{toValue:1,duration:2*re}),h.Z.timing(e.state.opacity,{toValue:.7,duration:2*re}),h.Z.timing(e.state.opacity,{toValue:1,duration:2*re}),h.Z.timing(e.state.opacity,{toValue:.7,duration:2*re}),h.Z.timing(e.state.opacity,{toValue:1,duration:2*re}),h.Z.timing(e.state.scaleY,{delay:100,toValue:.005,duration:8*re,easing:h.Z.Easing.in(h.Z.Easing.ease)}),h.Z.parallel([h.Z.timing(e.state.scaleX,{toValue:1,duration:10*re,easing:h.Z.Easing.out(h.Z.Easing.ease)}),h.Z.timing(e.state.opacity,{toValue:0,duration:200})])]).start(t)};e.toggleOpacity=function(){1===e.state.opacity._value?e.state.opacity.setValue(0):e.state.opacity.setValue(1)};e.getStyles=function(){return{opacity:e.state.opacity.interpolate({inputRange:[0,1],outputRange:[0,1]}),transform:[{scaleX:e.state.scaleX.interpolate({inputRange:[0,1],outputRange:[0,2]})},{
|
||
scaleY:e.state.scaleY.interpolate({inputRange:[0,1],outputRange:[0,1]})}]}};e.handleKeyDown=function(t){e.lastInputedKeys.push(t.keyCode);e.lastInputedKeys=e.lastInputedKeys.slice(-5);e.lastInputedKeys[0]===j.yXg.H&&e.lastInputedKeys[1]===j.yXg.H&&e.lastInputedKeys[2]===j.yXg.ARROW_RIGHT&&e.lastInputedKeys[3]===j.yXg.N&&e.lastInputedKeys[4]===j.yXg.K&&e.props.activateRagingDemon();if(!e.props.keyboardModeEnabled){var n=ne(t);if(null!==n){t.stopPropagation();t.preventDefault();e.arrowDown({direction:n})}}};e.handleKeyUp=function(t){if(!e.props.keyboardModeEnabled){var n=ne(t);if(null!==n){t.stopPropagation();t.preventDefault();e.arrowUp({direction:n})}}};e.onArrowClick=function(t){e.arrowDown({direction:t})};return e}var a=n.prototype;a.componentDidMount=function(){this.lastInputedKeys=[];E.S.subscribe(j.CkL.SCROLL_PAGE_UP,this.scrollPageUp);E.S.subscribe(j.CkL.SCROLL_PAGE_DOWN,this.scrollPageDown);window.addEventListener("keydown",this.handleKeyDown,{capture:!0})
|
||
;window.addEventListener("keyup",this.handleKeyUp,{capture:!0})};a.componentWillUnmount=function(){E.S.unsubscribe(j.CkL.SCROLL_PAGE_UP,this.scrollPageUp);E.S.unsubscribe(j.CkL.SCROLL_PAGE_DOWN,this.scrollPageDown);window.removeEventListener("keydown",this.handleKeyDown,{capture:!0});window.removeEventListener("keyup",this.handleKeyUp,{capture:!0})};a.render=function(){var e=this.state,t=e.UP,n=e.DOWN,o=e.LEFT,a=e.RIGHT;return(0,r.jsxs)(h.Z.div,{className:G().keyboardShortcutsModal,style:this.getStyles(),children:[(0,r.jsxs)(i.H,{className:G().modalTitle,children:[(0,r.jsx)("div",{className:G().content,children:B.Z.Messages.KEYBIND_DESCRIPTION_MODAL_TITLE}),(0,r.jsx)(i.M2$,{shortcut:"mod+/"})]}),(0,r.jsx)("div",{className:G().modalSubtitle,children:B.Z.Messages.KEYBIND_DESCRIPTION_MODAL_SUBTITLE}),(0,r.jsxs)("div",{className:G().ddrArrows,children:[(0,r.jsx)(ae,{arrow:j.kir.LEFT,isActive:o,className:G().left,children:"left"}),(0,r.jsx)(ae,{arrow:j.kir.DOWN,isActive:n,
|
||
className:G().down,children:"down"}),(0,r.jsx)(ae,{arrow:j.kir.UP,isActive:t,className:G().up,children:"up"}),(0,r.jsx)(ae,{arrow:j.kir.RIGHT,isActive:a,className:G().right,children:"right"})]}),(0,r.jsx)(i.yWw,{ref:this.scrollerRef,fade:!0,children:(0,r.jsx)(i.y5t,{children:(0,r.jsx)(oe,{})})})]})};return n}(o.PureComponent);function ae(e){var t=e.isActive,n=e.arrow,a=e.className,l=e.children,u=q(o.useState(t),2),s=u[0],f=u[1],d=o.useCallback((function(){ee[n]();f(!0)}),[n]);o.useEffect((function(){if(s){var e=setTimeout((function(){return f(!1)}),500);return function(){return clearTimeout(e)}}}),[s]);return(0,r.jsx)(i.P3F,{onClick:d,className:c()(G().arrow,a,W({},G().active,t||s)),children:l})}function le(e){var t=e.transitionState,n=e.onClose,a=q(o.useState(!1),2),l=a[0],u=a[1],s=o.useMemo((function(){return __OVERLAY__?(0,m.Zg)():(0,v.Rv)()}),[]),f=(0,y.e7)([O.Z],(function(){return O.Z.keyboardModeEnabled}));return(0,r.jsx)(i.Y0X,{
|
||
className:c()(G().noBackground,W({},G().noShadow,l)),size:i.CgR.DYNAMIC,"aria-label":B.Z.Messages.KEYBINDS,transitionState:t,children:(0,r.jsx)(b.Z,{component:"div",children:l?(0,r.jsx)(U,{onClose:n},"raging-demo"):(0,r.jsx)(ie,{content:s,keyboardModeEnabled:f,activateRagingDemon:function(){g.Z.disable();u(!0)}},"modal")})})}var ue=n(162341);function ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function se(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function fe(e){fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return fe(e)}function de(e,t){return!t||"object"!==he(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pe(e,t){pe=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return pe(e,t)}
|
||
var he=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=fe(e);if(t){var o=fe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return de(this,n)}}var be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&pe(e,t)}(n,e);var t=ye(n);function n(){ce(this,n);return t.apply(this,arguments)}var o=n.prototype;o._initialize=function(){a.Z.subscribe("SHOW_KEYBOARD_SHORTCUTS",this.showKeyboardShortcuts)
|
||
;a.Z.subscribe("HIDE_KEYBOARD_SHORTCUTS",this.hideKeyboardShortcuts)};o._terminate=function(){a.Z.unsubscribe("SHOW_KEYBOARD_SHORTCUTS",this.showKeyboardShortcuts);a.Z.unsubscribe("HIDE_KEYBOARD_SHORTCUTS",this.hideKeyboardShortcuts)};o.showKeyboardShortcuts=function(){(0,i.h7j)((function(e){return(0,r.jsx)(le,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){se(e,t,n[t])}))}return e}({},e))}),{modalKey:ue.J})};o.hideKeyboardShortcuts=function(){(0,i.Mr3)(ue.J)};o.__getLocalVars=function(){return{}};return n}(l.Z);const ve=new be},562205:(e,t,n)=>{"use strict";n.d(t,{e4:()=>f,qR:()=>p,hi:()=>v,Xy:()=>h,gN:()=>y,r_:()=>b});var r,o=n(281110),i=n(744564),a=n(84441);!function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED";e[e.PENDING=1]="PENDING"
|
||
;e[e.ACCEPTED=2]="ACCEPTED";e[e.REJECTED=3]="REJECTED"}(r||(r={}));var l=n(2590);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}var s=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0]
|
||
;continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function f(e){return d.apply(this,arguments)}function d(){return(d=c((function(e){return s(this,(function(t){switch(t.label){case 0:return[4,o.Z.put({url:l.ANM.CHANNEL_RECIPIENT_CONSENT(e),body:{consent_status:r.ACCEPTED}})];case 1:t.sent();i.Z.dispatch({type:"MESSAGE_REQUEST_ACCEPT_OPTIMISTIC",channelId:e});return[2]}}))}))).apply(this,arguments)}function p(e){return o.Z.put({url:l.ANM.CHANNEL_RECIPIENT_CONSENT(e),body:{consent_status:r.UNSPECIFIED}})}function h(e){return o.Z.put({url:l.ANM.CHANNEL_RECIPIENT_CONSENT(e),body:{
|
||
consent_status:r.PENDING}})}function y(e){return o.Z.delete({url:l.ANM.CHANNEL_RECIPIENT_CONSENT(e)})}function b(e){return o.Z.put({url:l.ANM.CHANNEL_RECIPIENT_REJECT_BATCH(),body:{channel_ids:e}})}function v(){a.Z.getLocationMetadata()}},234594:(e,t,n)=>{"use strict";n.d(t,{t9:()=>o,cl:()=>r,WN:()=>a,oi:()=>l,t$:()=>u,pS:()=>i});var r,o="Message Request Accept Confirmation";!function(e){e[e.ACCEPT=0]="ACCEPT";e[e.REJECT=1]="REJECT";e[e.ACCEPT_CONFIRMATION_PROMPT=2]="ACCEPT_CONFIRMATION_PROMPT";e[e.DISMISS_CONFIRMATION_PROMPT=3]="DISMISS_CONFIRMATION_PROMPT";e[e.ACCEPT_HAM_CONFIRMATION_PROMPT=4]="ACCEPT_HAM_CONFIRMATION_PROMPT";e[e.DISMISS_HAM_CONFIRMATION_PROMPT=5]="DISMISS_HAM_CONFIRMATION_PROMPT"}(r||(r={}));var i,a=73,l=26,u=100;!function(e){e.REQUESTS="REQUESTS";e.SPAM="SPAM"}(i||(i={}))},206932:(e,t,n)=>{"use strict";n.d(t,{Z:()=>S});var r=n(202351),o=n(744564),i=n(649536),a=n(473903),l=n(996344),u=n(48315);function c(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e){d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return d(e)}function p(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function h(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){
|
||
if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e,t){y=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return y(e,t)}function b(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function m(e){var t=function(){
|
||
if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var g={},O=new Set;function E(e){return l.Z.isMessageRequest(e)||u.Z.isSpam(e)}function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(E(e)&&(null==t||e===(null==t?void 0:t.channel_id))){var r=null==t?null:(0,i.e5)(t);g[e]={loaded:!0,error:n,message:r}}}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&y(e,t)}(n,e);var t=m(n);function n(){s(this,n);return t.apply(this,arguments)}
|
||
var r=n.prototype;r.initialize=function(){this.waitFor(l.Z,u.Z,a.default)};r.shouldLoadMessageRequestPreview=function(e){return!O.has(e)};r.getMessageRequestPreview=function(e){e in g||(g[e]={loaded:!1,error:!1,message:null});return g[e]};r.__getLocalVars=function(){return{messageRequestPreviews:g,shouldReceivePreviewStateFromGateway:O}};return n}(r.ZP.Store);j.displayName="MessageRequestPreviewStore";const S=new j(o.Z,{CONNECTION_OPEN:function(){g={};O.clear()},CHANNEL_CREATE:function(e){var t=e.channel;E(t.id)&&O.add(t.id)},CHANNEL_UPDATES:function(e){var t=e.updates,n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value.channel;if(!E(l.id)){O.delete(l.id);delete g[l.id]}}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},CHANNEL_DELETE:function(e){var t=e.channel;O.delete(t.id);delete g[t.id]},MESSAGE_CREATE:function(e){if(e.isPushNotification)return!1;C(e.message.channel_id,e.message)},
|
||
MESSAGE_UPDATE:function(e){var t=e.message.channel_id;if(null==t)return!1;var n=g[t];if(null==n)return!1;if(null==n.message)return!1;g[t]=p(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}({},n),{message:(0,i.wi)(n.message,e.message)})},MESSAGE_DELETE:function(e){if(!E(e.channelId))return!1;g[e.channelId]={loaded:!0,error:!1,message:null}},LOAD_MESSAGE_REQUESTS_SUPPLEMENTAL_DATA_SUCCESS:function(e){var t=e.requestedChannelIds,n=e.supplementalData,r=new Set(b(t));n.forEach((function(e){C(e.channel_id,e.message_preview);r.delete(e.channel_id)}));var o=!0,i=!1,a=void 0;try{for(var l,u=Array.from(r)[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){C(l.value,null)}}catch(e){i=!0;a=e}finally{try{
|
||
o||null==u.return||u.return()}finally{if(i)throw a}}},LOAD_MESSAGE_REQUESTS_SUPPLEMENTAL_DATA_ERROR:function(e){e.requestedChannelIds.forEach((function(e){C(e,null,!0)}))}})},652119:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(667294),o=n(202351),i=n(473903),a=n(562205),l=n(996344),u=new Set(["GB"]);function c(){var e=(0,o.e7)([l.Z],(function(){return l.Z.getUserCountryCode()})),t=!1===(0,o.e7)([i.default],(function(){var e;return null===(e=i.default.getCurrentUser())||void 0===e?void 0:e.nsfwAllowed}));r.useEffect((function(){null==e&&(0,a.hi)()}),[e]);return!(null==e||!u.has(e.alpha2))&&!!t}},525008:(e,t,n)=>{"use strict";n.d(t,{m:()=>x});var r=n(667294),o=n(8400),i=n.n(o),a=n(347365),l=n(424871),u=n(924308),c=n(725691),s=n(769321),f=n(652591),d=n(562205),p=n(785893),h=n(707961),y=n(234594),b=n(2590);function v(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function m(e){return function(){var t=this,n=arguments
|
||
;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,l,"next",e)}function l(e){v(i,r,o,a,l,"throw",e)}a(void 0)}))}}function g(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){g(e,t,n[t])}))}return e}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,
|
||
r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};var C=n(652119);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function I(e){return function(){
|
||
var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){S(i,r,o,a,l,"next",e)}function l(e){S(i,r,o,a,l,"throw",e)}a(void 0)}))}}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var w=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){
|
||
a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function x(e){var t,o=e.user,v=e.onAcceptSuccess,g=e.onRejectSuccess,j=e.onError,S=(0,C.Z)(),x=_(r.useState(!1),2),P=x[0],N=x[1],A=_(r.useState(!1),2),T=A[0],Z=A[1],M=_(r.useState(!1),2),R=M[0],L=M[1],D=_(r.useState(!1),2),k=D[0],U=D[1],B=_(r.useState(!1),2),F=B[0],G=B[1],H=P||T||R,V=r.useCallback((t=I((function(e){var t,n;return w(this,(function(r){switch(r.label){case 0:if(H)return[2];N(!0);r.label=1;case 1:r.trys.push([1,3,4,5]);return[4,(0,d.e4)(e)];case 2:r.sent();U(!0);null==v||v();return[3,5];case 3:t=r.sent();n=new a.Hx(t);null==j||j(n);return[3,5];case 4:N(!1);return[7];case 5:return[2]}}))})),function(e){return t.apply(this,arguments)}),[H,v,j]),W=r.useCallback(function(){var e=I((function(e){var t,n;return w(this,(function(r){switch(r.label){
|
||
case 0:if(H)return[2];Z(!0);r.label=1;case 1:r.trys.push([1,3,4,5]);return[4,(0,d.gN)(e)];case 2:r.sent();G(!0);null==g||g();return[3,5];case 3:t=r.sent();n=new a.Hx(t);null==j||j(n);return[3,5];case 4:Z(!1);return[7];case 5:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),[H,g,j]),z=r.useCallback(function(){var e=I((function(e){var t,n,r,o,l,u,c,s,f,p;return w(this,(function(h){switch(h.label){case 0:if(H)return[2];Z(!0);t=i()(e,y.t$);h.label=1;case 1:h.trys.push([1,10,11,12]);n=!0,r=!1,o=void 0;h.label=2;case 2:h.trys.push([2,7,8,9]);l=t[Symbol.iterator]();h.label=3;case 3:if(n=(u=l.next()).done)return[3,6];c=u.value;return[4,(0,d.r_)(c)];case 4:h.sent();h.label=5;case 5:n=!0;return[3,3];case 6:return[3,9];case 7:s=h.sent();r=!0;o=s;return[3,9];case 8:try{n||null==l.return||l.return()}finally{if(r)throw o}return[7];case 9:G(!0);null==g||g();return[3,12];case 10:f=h.sent();p=new a.Hx(f);null==j||j(p);return[3,12];case 11:Z(!1);return[7];case 12:return[2]}}))}))
|
||
;return function(t){return e.apply(this,arguments)}}(),[H,g,j]),Y=r.useCallback(function(){var e=I((function(e){var t,r;return w(this,(function(i){switch(i.label){case 0:if(H)return[2];if(null==o||null!=u.Z.getMutualGuilds(o.id))return[3,5];L(!0);i.label=1;case 1:i.trys.push([1,3,4,5]);return[4,(0,c.Z)(o.id,o.getAvatarURL(void 0,80),{withMutualGuilds:!0,withMutualFriendsCount:!0})];case 2:i.sent();return[3,5];case 3:i.sent();return[3,5];case 4:L(!1);return[7];case 5:t=function(){var t,n=null!=o?null===(t=u.Z.getMutualGuilds(o.id))||void 0===t?void 0:t.map((function(e){return e.guild.id})):[];f.default.track(b.rMx.MESSAGE_REQUEST_ACTION,{action:y.cl.DISMISS_CONFIRMATION_PROMPT,channel_id:e,mutual_guild_ids:null!=n?n:[],other_user_id:null==o?void 0:o.id})};r=function(){var t=I((function(){var t,n;return w(this,(function(r){switch(r.label){case 0:n=null!=o?null===(t=u.Z.getMutualGuilds(o.id))||void 0===t?void 0:t.map((function(e){return e.guild.id})):[]
|
||
;f.default.track(b.rMx.MESSAGE_REQUEST_ACTION,{action:y.cl.ACCEPT_CONFIRMATION_PROMPT,channel_id:e,mutual_guild_ids:null!=n?n:[],other_user_id:null==o?void 0:o.id});return[4,V(e)];case 1:r.sent();return[2]}}))}));return function(){return t.apply(this,arguments)}}();!function(e){var t=e.channelId,r=e.onConfirm,o=e.onCancel;f.default.track(b.rMx.OPEN_MODAL,{type:y.t9,channel_id:t});(0,h.ZDy)(m((function(){var e,t;return E(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(26719)]).then(n.bind(n,126719))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,p.jsx)(t,O({onConfirm:r,onDismiss:o},e))}]}}))})))}({channelId:e,onConfirm:r,onCancel:t});return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),[V,H,o]),K=r.useCallback((function(e,t){var r=function(n,r){r&&s.kJ.updateSetting(n);n&&null!=t&&(0,l.zd)(t);V(e.id);f.default.track(b.rMx.MESSAGE_REQUEST_ACTION,{action:y.cl.ACCEPT_HAM_CONFIRMATION_PROMPT,channel_id:e.id,
|
||
is_dont_show_again_checked:r,non_spam_retraining_opt_in:n})},o=s.kJ.getSetting();null==o?function(e){var t=e.onConfirm,r=e.onCancel;(0,h.ZDy)(m((function(){var e,o;return E(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(28746)]).then(n.bind(n,528746))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,p.jsx)(o,O({onConfirm:t,onDismiss:r},e))}]}}))})))}({channel:e,onConfirm:r,onCancel:function(){f.default.track(b.rMx.MESSAGE_REQUEST_ACTION,{action:y.cl.DISMISS_HAM_CONFIRMATION_PROMPT,channel_id:e.id})}}):r(o)}),[V]);return{acceptMessageRequest:S?Y:V,rejectMessageRequest:W,rejectAll:z,markAsNotSpam:K,isAcceptLoading:P,isRejectLoading:T,isUserProfileLoading:R,isOptimisticAccepted:k,isOptimisticRejected:F}}},761465:(e,t,n)=>{"use strict";n.d(t,{a:()=>v});var r=n(496486),o=n.n(r),i=n(202351),a=n(281110),l=n(744564),u=n(598123),c=n(717091),s=n(206932),f=n(2590);function d(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}
|
||
l.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,l,"next",e)}function l(e){d(i,r,o,a,l,"throw",e)}a(void 0)}))}}var h=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}
|
||
if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},y=new Set,b=null;function v(e){var t=e.id,n=(0,i.cj)([s.Z,u.Z,c.ZP],(function(){var e=c.ZP.lastMessageId(t),n=s.Z.getMessageRequestPreview(t);if(null==n.message&&null!=e){var r=u.Z.getMessage(t,e);if(null!=r)return{loaded:!0,error:!1,message:r}}return n}),[t]),r=n.loaded,o=n.message,a=n.error,l=(0,i.e7)([s.Z],(function(){return s.Z.shouldLoadMessageRequestPreview(t)}),[t]);!r&&null==o&&l&&function(e){y.add(e);null==b&&(b=setTimeout(m,0))}(t);return{loaded:r,error:a,message:o}}function m(){return g.apply(this,arguments)}function g(){return(g=p((function(){return h(this,(function(e){switch(e.label){case 0:e.trys.push([0,,3,4]);return o().isEmpty(y)?[3,2]:[4,O()];case 1:
|
||
e.sent();return[3,0];case 2:return[3,4];case 3:b=null;return[7];case 4:return[2]}}))}))).apply(this,arguments)}function O(){return E.apply(this,arguments)}function E(){return(E=p((function(){var e,t,n,r,o,i,u,c;return h(this,(function(s){switch(s.label){case 0:e=Array.from(y).slice(0,25);s.label=1;case 1:s.trys.push([1,3,4,5]);return[4,a.Z.get({url:f.ANM.MESSAGE_REQUESTS_SUPPLEMENTAL_DATA,query:{channel_ids:e}})];case 2:t=s.sent();l.Z.dispatch({type:"LOAD_MESSAGE_REQUESTS_SUPPLEMENTAL_DATA_SUCCESS",requestedChannelIds:e,supplementalData:t.body});return[3,5];case 3:s.sent();l.Z.dispatch({type:"LOAD_MESSAGE_REQUESTS_SUPPLEMENTAL_DATA_ERROR",requestedChannelIds:e});return[3,5];case 4:n=!0,r=!1,o=void 0;try{for(i=e[Symbol.iterator]();!(n=(u=i.next()).done);n=!0){c=u.value;y.delete(c)}}catch(e){r=!0;o=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}return[7];case 5:return[2]}}))}))).apply(this,arguments)}},132167:(e,t,n)=>{"use strict";n.d(t,{_:()=>a})
|
||
;var r=n(202351),o=n(841800),i=n(804185);function a(){var e=(0,r.e7)([i.ZP],(function(){return i.ZP.getSidebarState(i.uZ)})),t=(null==e?void 0:e.type)===o.t.VIEW_MESSAGE_REQUEST?e:null;return{channelId:null==t?void 0:t.channelId,hasSingleMessageRequest:null!=(null==t?void 0:t.details)&&t.details.type===o.F.MESSAGE_REQUEST&&t.details.hasSingleMessageRequest}}},544488:(e,t,n)=>{"use strict";n.d(t,{q:()=>i});var r=n(202351),o=n(996344);function i(){return(0,r.e7)([o.Z],(function(){return o.Z.getMessageRequestsCount()}))}},986923:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(707961)),i=n(761953),a=n(424871),l=n(761465),u=n(473708);function c(e){var t=e.channel,n=e.buttonSize,c=void 0===n?o.PhG.TINY:n,s=e.className,f=e.onReportClick,d=e.onReportSubmit,p=e.onMouseEnter,h=e.onMouseLeave,y=(0,l.a)(t),b=y.message,v=y.error,m=y.loaded;if(null==b&&(m||v))return null;var g=function(){null==d||d();i.Z.closePrivateChannel(t.id)};return(0,r.jsx)(o.zxk,{className:s,size:c,
|
||
color:o.zxk.Colors.RED,disabled:null==b,onClick:function(e){e.stopPropagation();null==f||f();null!=b&&(0,a.WL)(b,g)},onMouseEnter:p,onMouseLeave:h,children:u.Z.Messages.REPORT})}},944928:(e,t,n)=>{"use strict";n.d(t,{g:()=>g});var r=n(120053),o=n.n(r),i=n(156824),a=n(665472),l=n(396043),u=n(920724),c=n(330768),s=n(769321),f=n(797815),d=n(598123),p=n(2590);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
|
||
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var b=/\\([*?+/])/g,v={tts:{action:function(){return{tts:s.OW.getSetting()}}},me:{action:function(e){return{content:"_".concat(e,"_")}}},tableflip:{action:function(e){return{content:"".concat(e," (╯°□°)╯︵ ┻━┻").trim()}}},unflip:{action:function(e){return{content:"".concat(e," ┬─┬ノ( º _ ºノ)").trim()}}},shrug:{action:function(e){return{content:"".concat(e," ¯\\_(ツ)_/¯").trim()}}},nick:{action:function(e,t){var n=t.channel;if(null!=n.guild_id){i.Z.changeNickname(n.guild_id,n.id,p.ME,e);return{content:""}}}},reaction:{match:o().anyScopeRegex(/^\+:(.+?): *$/),action:function(e,t){var n=t.isEdit,r=t.channel
|
||
;if(!n&&d.Z.hasPresent(r.id)){var o=d.Z.getMessages(r.id).last();if(null!=o&&null!=o.id){var i=f.Z.getDisambiguatedEmojiContext(r.guild_id).getByName(e.trim().slice(2,-1));if(null!=i){(0,u.rU)(r.id,o.id,(0,c.g1)(i));return{content:""}}}}}},searchReplace:{match:o().anyScopeRegex(/^s\/((?:.+?)[^\\]|.)\/(.*)/),action:function(e,t){var n=t.isEdit,r=t.channel;if(!n){var o,i=d.Z.getLastEditableMessage(r.id);if(null==i||null==i.id)return{content:""};var l=y(Array.from(null!==(o=e.match(this.match.regex))&&void 0!==o?o:[]),3),u=l[1],c=l[2];u=u.replace(b,(function(e,t){return t}));c=c.replace(b,(function(e,t){return t}));var s=i.content.replace(u,c);null!=s&&""!==s||0!==i.attachments.length?e!==i.content&&a.Z.editMessage(r.id,i.id,{content:s}):a.Z.deleteMessage(r.id,i.id);return{content:""}}}},spoiler:{action:function(e){return{content:(0,p.XmY)(e).trim()}}}};Object.setPrototypeOf(v,null);function m(e,t,n,r){l.ZP.trackWithMetadata(p.rMx.SLASH_COMMAND_USED,{command:e});return t.action(n,r)}
|
||
function g(e,t){for(var n in v){var r=v[n];if(null==r.match){if(s.dN.getSetting()&&"/"===e[0]){var o=e.split(" ");if(n===o[0].slice(1)&&null!=r.action)return m(n,r,o.slice(1).join(" "),t)}}else{var i;if(null===(i=r.match.regex)||void 0===i?void 0:i.test(e))return m(n,r,e,t)}}}},896656:(e,t,n)=>{"use strict";n.d(t,{W:()=>r,p:()=>o});var r="chat-messages";function o(e,t){return"".concat(r,"-").concat(e,"-").concat(t)}},771344:(e,t,n)=>{"use strict";n.d(t,{V:()=>i});var r=n(202351),o=n(598123);function i(e,t){return(0,r.e7)([o.Z],(function(){var n=o.Z.getMessages(e),r=n.findOldest((function(e){return e.author.id===t}));if(null!=r){var i=n.toArray(),a=!0,l=!1,u=void 0;try{for(var c,s=i[Symbol.iterator]();!(a=(c=s.next()).done);a=!0){var f=c.value;if(f.author.id!==t)break;f.content.length>(null==r?void 0:r.content.length)&&(r=f)}}catch(e){l=!0;u=e}finally{try{a||null==s.return||s.return()}finally{if(l)throw u}}return r}}),[e,t])}},715919:(e,t,n)=>{"use strict";n.d(t,{$:()=>u})
|
||
;var r=n(202351),o=n(996344),i=n(598123),a=n(840922),l=n(2590);function u(e){var t=e.isDM()&&!e.isSystemDM()&&!e.rawRecipients.some((function(e){return e.bot})),n=t?e.getRecipientId():null;return(0,r.e7)([i.Z,o.Z,a.Z],(function(){if(!t)return!1;if(o.Z.isMessageRequest(e.id))return!1;if(null!=n&&a.Z.getRelationshipType(n)===l.OGo.BLOCKED)return!1;var r=i.Z.getMessages(e.id);return r.ready&&!r.hasMoreBefore&&!r.hasMoreAfter&&r.length<25&&!i.Z.hasCurrentUserSentMessage(e.id)}),[e.id,n,t])}},219369:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(4361),u=n(508754),c=n(283285),s=n(323725),f=n(545516),d=n(13489),p=n.n(d);function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){h(e,t,n[t])}))}return e}function b(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function v(e){var t,n,o=e.message,i=e.channel,d=e.compact,v=e.className,m=e.isGroupStart,g=e.hideSimpleEmbedContent,O=void 0===g||g,E=e.disableInteraction,C=(0,l.dj)(o.id),j=(0,l.tu)(null!==(t=null==i?void 0:i.guild_id)&&void 0!==t?t:"",o.id),S=C||j,I=(0,c.Z)(o,{hideSimpleEmbedContent:O,allowHeading:S,allowList:S,
|
||
allowLinks:S,previewLinkTarget:S}).content;return(0,r.jsx)(u.Z,{compact:d,className:a()(v,(n={},h(n,p().message,!0),h(n,p().cozyMessage,!d),h(n,p().groupStart,m),n)),childrenHeader:(0,f.Z)(b(y({},e),{channel:i,guildId:void 0})),childrenMessageContent:(0,s.Z)(e,I),disableInteraction:E})}const m=o.memo(v)},627027:(e,t,n)=>{"use strict";n.d(t,{Rr:()=>p,aJ:()=>h,ZP:()=>y});var r=n(785893),o=n(667294),i=n(496486),a=n.n(i),l=n(941498),u=n(2590),c=n(296133),s=n.n(c);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(){return{width:a().random(140,400),height:a().random(100,320)}}function h(e){var t=e.compact,n=e.messageGroups,r=e.groupRange,o=e.attachments,i=e.fontSize,c=e.groupSpacing;if(o>n)throw new Error("generateMessageSpecs: too many attachments relative to messageGroups: ".concat(n,", ").concat(o));for(var s=i/u.yqN.FONT_SIZE_DEFAULT,f=t?l.iv:l.pk,d=t?l.Pb:l.XX,h=0,y=new Array(n).fill(null).map((function(){var e=a().random(1,r);h+=c*s;h+=f*s;h+=(e-1)*d*s;return e})),b=y.map((function(e,t){return t})),v=[];v.length<o;){var m=p()
|
||
;v.push([b.splice(a().random(0,b.length-1),1)[0],m]);h+=m.height+l.M9*s}return{messages:y,attachmentSpecs:v,totalHeight:h,groupSpacing:c}}function y(e){var t=e.compact,n=e.messages,i=e.attachmentSpecs,a=e.totalHeight,u=e.groupSpacing;return o.useMemo((function(){var e=new Array(n.length).fill(void 0),o=!0,c=!1,f=void 0;try{for(var p,h=i[Symbol.iterator]();!(o=(p=h.next()).done);o=!0){var y=d(p.value,2),b=y[0],v=y[1];e[b]=v}}catch(e){c=!0;f=e}finally{try{o||null==h.return||h.return()}finally{if(c)throw f}}return(0,r.jsx)("div",{className:s().wrapper,style:{height:a},children:n.map((function(n,o){return(0,r.jsx)(l.ZP,{groupSpacing:u,compact:t,messages:n,attachmentSpecs:e[o]},o)}))})}),[t,n,i,a,u])}},259135:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Pl})
|
||
;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(457217),u=n(202351),c=n(707961),s=n(665472),f=n(316878),d=n(439683),p=n(385983),h=n(861426),y=n(489610),b=n(769321),v=n(736818),m=n(481056),g=n(746477),O=n(598123),E=n(682776),C=n(717091),j=n(107403),S=n(473903),I=n(507488),_=n(194212),w=n(916286),x=n(549995),P=n.n(x),N=n(141780),A=n(70145),T=n(102921),Z=n(101609),M=n(349658),R=n(493254),L=n(2590);function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return D(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e){var t,n,r,o=e.channel,i=e.messages,a=e.highlightedMessageIds,l=e.oldestUnreadMessageId,u=e.treatSpam,c=[],s=P()(a),f=!1,d=0,h=null!=l?T.Z.extractTimestamp(l):null;i.forEach((function(e){var a=(0,A.vc)(e.timestamp,"LL");if(a!==t){c.push({type:L.ys_.DIVIDER,content:a,contentKey:a});t=a}var p=c[c.length-1],y=null,b=(0,M.DQ)(e);f=f||b;var v=function(e,t,n){return N.V.NON_COLLAPSIBLE.has(t.type)?null:t.blocked?L.ys_.MESSAGE_GROUP_BLOCKED:(0,M.P1)(e)&&n?L.ys_.MESSAGE_GROUP_SPAMMER:null}(o,e,b&&u);if(null!==v){var m;m=k(function(e,t,n){var r,o=n
|
||
;if(null==n||n.type!==t){r={type:t,content:[],key:e.id,isHighlight:!1};c.push(r)}else o=(r=n).content[r.content.length-1];return[r,o]}(e,v,p),2),y=m[0],p=m[1]}if(l===e.id&&null!=h)if(null!=p&&p.type===L.ys_.DIVIDER){p.unreadId=e.id;h=null}else if(null!==y)!function(t){e.isFirstMessageInForumPost(o)||t.content.push({type:L.ys_.DIVIDER,unreadId:e.id});t.hasUnread=!0;h=null}(y);else{e.isFirstMessageInForumPost(o)||c.push({type:L.ys_.DIVIDER,unreadId:e.id});h=null}else if(null!=h&&T.Z.extractTimestamp(e.id)>h){e.isFirstMessageInForumPost(o)||c.push({type:L.ys_.DIVIDER,unreadId:e.id});h=null}var g=(null==p?void 0:p.type)===L.ys_.MESSAGE?r:p;(0,Z.J)(o,g,e)&&(n=e.id);var O={type:e.type===L.uaV.THREAD_STARTER_MESSAGE?L.ys_.THREAD_STARTER_MESSAGE:L.ys_.MESSAGE,content:e,groupId:n,isHighlight:null!=s[e.id]||n!==e.id&&(null==r?void 0:r.isHighlight)};if(n===e.id){r=O;d=c.length}var E=i.jumpSequenceId,C=i.jumpFlash,j=i.jumpTargetId;C&&e.id===j&&null!=E&&(O.flashKey=E)
|
||
;i.jumpTargetId===e.id&&(O.jumpTarget=!0);if(null!==y){y.content.push(O);O.jumpTarget&&(y.hasJumpTarget=!0)}else{if(O.isHighlight){r.isHighlight=!0;for(var S=c.length-1;S>d;S--){var I=c[S];(0,R.Yh)(I)&&(I.isHighlight=!0)}}c.push(O)}e.isFirstMessageInForumPost(o)&&c.push({type:L.ys_.FORUM_POST_ACTION_BAR})}));f&&(0,M.P1)(o)&&p.Z.trackExposure({});return c}var B=n(627027),F=n(798159),G=n(930948),H=n(896656);function V(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}
|
||
var W=n(496486),z=n.n(W),Y=n(809784),K=n(216151),q=n(496916),Q=n(26468),X=n(784426),J=n(60744),$=n(953727),ee=n(441143),te=n.n(ee),ne=n(4361),re=n(696978),oe=n(438355),ie=n(883650),ae=n(837162),le=n(798808),ue=n(490355),ce=n(61209),se=n(508754),fe=n(661123),de=n(791707),pe=n(550131),he=n(248088);function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function be(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name)
|
||
;if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ye(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(e){var t=e.children,n=e.className,i=e.flashKey,a=(0,c.dQu)(c.TVs.colors.BACKGROUND_MESSAGE_HIGHLIGHT).spring({opacity:1}),l=(0,c.dQu)(c.TVs.colors.BACKGROUND_MESSAGE_HIGHLIGHT).spring({opacity:0}),u=be((0,he.useSpring)((function(){return{immediate:!0,from:{backgroundColor:a}}})),2),s=u[0],f=u[1];o.useEffect((function(){f({reset:!0,immediate:!0,to:{backgroundColor:a}});f({delay:1e3,immediate:!1,to:{backgroundColor:l}})}),[i,f]);return(0,r.jsx)(he.animated.div,{style:s,className:n,children:t})}var me=n(834876),ge=n(855395),Oe=n(944522),Ee=n(861951),Ce=n(225386),je=n(367406),Se=n(691797),Ie=n(635012),_e=n(728521),we=n(272112);function xe(e){
|
||
return E.Z.can(L.Plq.MANAGE_MESSAGES,e)}const Pe=function(e,t,n){var r=o.useRef(n);r.current=n;return o.useCallback((function(n){if(r.current&&n.target===n.currentTarget){var o=!(n.altKey||n.ctrlKey||n.metaKey||n.shiftKey),i=n.altKey&&!(n.ctrlKey||n.metaKey||n.shiftKey),a=n.metaKey&&!(n.altKey||n.ctrlKey||n.shiftKey),l=n.shiftKey&&!(n.altKey||n.ctrlKey||n.metaKey),u=O.Z.getMessage(t,e),c=ce.Z.getChannel(t);if(null!=u&&null!=c){var f=v.default.getId(),d=u.author.id===f;switch(n.key.toLowerCase()){case"backspace":if(o&&(xe(c)||d)){n.preventDefault();(0,we.$Z)(c,u,n)}break;case"c":if(a&&Se.wS){n.preventDefault();(0,Se.JG)(u.content)}break;case"e":if(o&&function(e,t,n){return!t.isSystemDM()&&(0,Ie.Z)(n,e)}(f,c,u)){n.preventDefault();(0,we.Hd)(c,u)}break;case"p":if((o||l)&&function(e,t){return!e.isSystemDM()&&!(0,de.Z)(t)&&(xe(e)||e.isPrivate())}(c,u)){n.preventDefault();(0,we.rY)(c,u,n)}break;case"+":if((o||l)&&function(e){
|
||
var t=null==e.guild_id||g.Z.canChatInGuild(e.guild_id),n=b.nc.getSetting();return!(0,_e.Z)({channel:e,canChat:t,renderReactions:n,canAddNewReactions:t&&E.Z.can(L.Plq.ADD_REACTIONS,e),isLurking:null!=e.guild_id&&Oe.Z.isLurking(e.guild_id),isActiveChannelOrUnarchivableThread:(0,Ce.RG)(e)}).disableReactionCreates&&n}(c)){n.preventDefault();G.S.dispatchKeyed(L.LPv.TOGGLE_REACTION_POPOUT,u.id,{emojiPicker:!0})}break;case"r":if(o&&(0,Ee.Z6)(c,u,E.Z)){n.preventDefault();(0,we.HH)(c,u,n)}break;case"t":if(o&&(0,Ce.ki)(c,u)){n.preventDefault();(0,je.R6)(c,u,"Message Shortcut")}else if(u.hasFlag(L.iLy.HAS_THREAD)){var p=ce.Z.getChannel(u.id);if(null!=p&&(o||l)){n.preventDefault();(0,je.ok)(p,l)}}break;case"enter":if(i){n.preventDefault();(0,we.B8)(c,u)}break;case"escape":m.Z.isEditing(c.id,u.id)?s.Z.endEditMessage(c.id):G.S.dispatch(L.CkL.TEXTAREA_FOCUS)}}}}),[e,t])};var Ne=n(96812),Ae=n(283285),Te=n(277600),Ze=n(506907),Me=n.n(Ze),Re=n(744564)
|
||
;var Le=n(202469),De=n(348592),ke=n(354788),Ue=n(723876),Be=n(42028),Fe=n(473708),Ge=n(61092),He=n.n(Ge),Ve=n(913198),We=n.n(Ve),ze=n(468482),Ye=n.n(ze);function Ke(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var qe=o.memo((function(e){var t=e.message,n=e.notice,o=e.compact,i=void 0!==o&&o,l=e.onDismiss;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:a()(He().blockedNoticeContainer,Ke({},He().compact,i)),children:[(0,r.jsx)("div",{className:He().blockedNoticeIcon,children:(0,r.jsx)(Le.Z,{className:He().shieldIcon,width:16,height:16})}),(0,r.jsx)("div",{className:He().blockedNotice,children:(0,r.jsx)(c.xvT,{variant:"text-sm/normal",color:"interactive-normal",children:n})})]}),(0,r.jsx)("div",{className:a()(He().ephemeralAccessories,Ke({},He().compact,i)),children:(0,r.jsx)(ke.Z,{message:t,onDeleteMessage:l,children:(0,r.jsx)(c.xvT,{variant:"text-xs/normal",color:"interactive-normal",tag:"span",
|
||
className:He().learnMore,children:Fe.Z.Messages.GUILD_AUTOMOD_BLOCKED_MESSAGE_LEARN_MORE.format({helpUrl:De.Z.getArticleURL(L.BhN.GUILD_AUTOMOD_BLOCKED_MESSAGE)})})})})]})}));function Qe(e){var t,n,i,l=e.className,c=e.compact,f=e.message,d=e.children,p=e.content,h=e.onUpdate,y=null===(t=f.editedTimestamp)||void 0===t?void 0:t.toString(),b=o.useRef(!1),v=(0,u.e7)([ie.Z],(function(){return ie.Z.getMessage(f.id)}),[f.id]),m=o.useCallback((function(){(null==v?void 0:v.isBlockedEdit)?(e=f.id,Re.Z.dispatch({type:"REMOVE_AUTOMOD_MESSAGE_NOTICE",messageId:e})):s.Z.deleteMessage(f.channel_id,f.id,!0);var e}),[f,v]);o.useLayoutEffect((function(){b.current?null!=h&&h():b.current=!0}),[h,f.content,p,y,d]);return(0,r.jsxs)("div",{id:(0,me.ut)(f),className:a()(l,We().markup,(i={},Ke(i,Ye().messageContent,!0),Ke(i,Ye().markupRtl,"rtl"===Me()(f.content)),Ke(i,He().blockedEdit,null==v?void 0:v.isBlockedEdit),Ke(i,He().blockedSend,!(null==v?void 0:v.isBlockedEdit)),i)),children:[null!=d?d:(0,
|
||
Ue.L5)(f,p),(null==v?void 0:v.isBlockedEdit)&&null!=f.timestamp&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(Be.Z,{timestamp:f.timestamp,isEdited:!0,isInline:!1,children:(0,r.jsxs)("span",{className:Ye().edited,children:["(",Fe.Z.Messages.GUILD_AUTOMOD_BLOCKED_MESSAGE_EDIT_POSTFIX,")"]})})]}),(0,r.jsx)(qe,{notice:null!==(n=null==v?void 0:v.errorMessage)&&void 0!==n?n:Fe.Z.Messages.GUILD_AUTOMOD_BLOCKED_MESSAGE_SEND_NOTICE,message:f,compact:c,onDismiss:m})]})}const Xe=o.memo(Qe,Ue.HR)
|
||
;var Je=n(289283),$e=n(418705),et=n(516217),tt=n(552480),nt=n(627342),rt=n(131461),ot=n(166076),it=n(100397),at=n(722883),lt=n(114689),ut=n(38602),ct=n(920724),st=n(330768),ft=n(967825),dt=n(567403),pt=n(658728),ht=n(856450),yt=n(263725),bt=n(431089),vt=n(763933),mt=n(9506),gt=n(963881),Ot=n(475825),Et=n(777203),Ct=n(264542),jt=n(178742),St=n(186440),It=n(472034),_t=n(715173),wt=n(156146),xt=n(256827),Pt=n(890592),Nt=n(813749),At=n(668159),Tt=n(652591),Zt=n(850841),Mt=n(254082),Rt=n(833589),Lt=n(618738),Dt=n(254807),kt=n(153556),Ut=n(343557),Bt=n(749106),Ft=n(203600),Gt=n(792712),Ht=n.n(Gt);function Vt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
|
||
;r.forEach((function(t){Vt(e,t,n[t])}))}return e}function zt(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Yt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Kt(e){e.stopPropagation()}function qt(e){
|
||
var t=e.channel,n=e.message,o=e.togglePopout,i=e.shouldShow,a=e.isFocused,l=(0,u.e7)([Rt.Z],(function(){return Rt.Z.remainingBurstCurrency})),s=(0,u.e7)([S.default],(function(){return S.default.getCurrentUser()})),f=(0,Zt.I5)(s),d=f?Fe.Z.Messages.ADD_BURST_REACTION:(0,r.jsx)(lt.X,{tooltipText:Fe.Z.Messages.ADD_BURST_REACTION}),p=(0,r.jsx)(lt.X,{tooltipText:Fe.Z.Messages.SUPER_REACTION_NITRO_TOOLTIP,textColor:"always-white"}),h=o;l<1&&(h=f?Dt.openOutOfBurstsModal:function(){return(0,ut.openBurstReactionsUpsellModal)({analytics:{type:Ft.cd.BURST_REACTION_UPSELL,page:null!=t.getGuildId()?L.ZY5.GUILD_CHANNEL:L.ZY5.DM_CHANNEL,section:(0,st.s4)(t),object:L.qAy.EMOJI_REACTION_PICKER_POPOUT_UPSELL}})});return(0,r.jsx)(nt.Z,{contentTypes:[$e.z$.BURST_REACTION_BUTTON_SPARKLE,$e.z$.BURST_REACTION_NITRO_TOOLTIP],children:function(e){var u=e.visibleContent,s=e.markAsDismissed;return(0,r.jsx)(c.yRy,{renderPopout:function(e){var r=e.closePopout;return tn(t,n,r,!0)},shouldShow:i,onRequestClose:o,
|
||
position:Je.tq?"top":"left",align:Je.tq?"center":"top",children:function(e,r){e.onClick;var o=Yt(e,["onClick"]),i=r.isShown;return Xt(Wt({key:"add-burst-reaction",label:Fe.Z.Messages.ADD_BURST_REACTION,ariaLabel:Fe.Z.Messages.ADD_BURST_REACTION_A11Y.format({n:l}),tooltipText:f||u!==$e.z$.BURST_REACTION_NITRO_TOOLTIP?d:p,tooltipColor:f||u!==$e.z$.BURST_REACTION_NITRO_TOOLTIP?c.FGA.PRIMARY:c.FGA.BRAND,sparkle:a&&u===$e.z$.BURST_REACTION_BUTTON_SPARKLE,icon:yt.Z,channel:t,selected:i,message:n,onClick:function(){s();h()}},o))}})}})}function Qt(e){var t=e.message,n=e.channel,r=e.canReport,o=e.onClose,i=e.updatePosition;return(0,kt.useMessageMenu)({message:t,channel:n,textSelection:"",favoriteableType:null,favoriteableId:null,favoriteableName:null,itemHref:void 0,itemSrc:void 0,itemTextContent:void 0,canReport:r,onHeightUpdate:i,onClose:o,navId:"message-actions",ariaLabel:Fe.Z.Messages.MESSAGE_UTILITIES_A11Y_LABEL})}function Xt(e){
|
||
var t=e.label,n=e.ariaLabel,o=e.tooltipText,i=e.tooltipColor,a=e.icon,l=e.channel,u=e.message,s=e.onClick,f=e.key,d=e.disabled,p=e.dangerous,h=e.separator,y=e.sparkle,b=Yt(e,["label","ariaLabel","tooltipText","tooltipColor","icon","channel","message","onClick","key","disabled","dangerous","separator","sparkle"]);return(0,r.jsx)(c.ua7,{text:null!=o?o:t,color:null!=i?i:c.FGA.PRIMARY,"aria-label":t,hideOnClick:!0,tooltipClassName:Ht().tooltip,children:function(e){var o=e.onMouseEnter,i=e.onMouseLeave,c=e.onClick;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(At.zx,zt(Wt({onMouseEnter:o,onMouseLeave:i,onClick:function(e){null==c||c();s(l,u,e)},"aria-label":null!=n?n:t,disabled:d,dangerous:p},b),{children:[(0,r.jsx)(a,{className:Ht().icon}),h?(0,r.jsx)(At.Z0,{}):null,y&&(0,r.jsx)(pt.Z,{})]}))})}},f)}function Jt(e){var t=function(e){var t=e.channel,n=e.message,r=e.showEmojiPicker,o=e.showEmojiBurstPicker,i=e.showMoreUtilities,a=e.setPopout,l=e.isFocused,c=n.author,s=(0,
|
||
u.e7)([dt.Z],(function(){return dt.Z.getGuild(t.guild_id)}),[t.guild_id]),d=(0,u.e7)([v.default],(function(){return v.default.getId()})),p=(0,rt.Z)(tt.t),h=(0,Ce.$R)(t),y=(0,Ce.Gu)(t),m=b.nc.useSetting(),O=b.Sb.useSetting(),C=(0,u.e7)([g.Z],(function(){return null==t.guild_id||g.Z.canChatInGuild(t.guild_id)}),[t]),j=(0,u.cj)([E.Z],(function(){return{canAddNewReactions:C&&E.Z.can(L.Plq.ADD_REACTIONS,t),canManageMessages:E.Z.can(L.Plq.MANAGE_MESSAGES,t)}}),[t,C]),S=j.canManageMessages,I=j.canAddNewReactions,_=(0,Ee.Ui)(t,n),w=(0,Ce.NE)(t,n),x=(0,u.e7)([Oe.Z],(function(){return null!=t.guild_id&&Oe.Z.isLurking(t.guild_id)}),[t]),P=c.id===d,N=(S||P)&&h&&n.type in L.HfH;n.type===L.uaV.AUTO_MODERATION_ACTION&&(N=N&&S);var A=(0,Mt.a4)(n)&&null!=p&&p===Bt.N.TREATMENT_1,T=(0,Lt.Z)(n,t,S),Z=!t.isSystemDM()&&(0,Ie.Z)(n,d)&&h&&!y,M=(0,_e.Z)({channel:t,canChat:C,renderReactions:m,canAddNewReactions:I,isLurking:x,isActiveChannelOrUnarchivableThread:h
|
||
}).disableReactionCreates,R=t.type===L.d4z.GUILD_ANNOUNCEMENT&&null!=s&&s.hasFeature(L.oNc.NEWS)&&(P||S)&&n.type===L.uaV.DEFAULT,D=t.getGuildId(),k=null!=D&&(n.type===L.uaV.USER_JOIN||n.type===L.uaV.GUILD_INVITE_REMINDER)&&E.Z.canWithPartialContext(L.Plq.MANAGE_GUILD,{guildId:D}),U=it.Z.useExperiment({}).showTODOs,B=(0,u.e7)([at.Z],(function(){return null!=at.Z.getTODOMessages().find((function(e){return e.messageId===n.id}))})),F=(0,Ut.Z)(),G=(0,u.e7)([f.Z],(function(){return f.Z.keyboardModeEnabled})),H=F&&!G&&!r&&!o&&!i;return{channel:t,message:n,canPin:T,canEdit:Z,canDelete:N,canReport:A,canReply:_,canStartThread:w,canCopy:Se.wS,hasDeveloperMode:O,canReact:!M&&m,hasReactions:n.reactions.length>0,canPublish:R,canConfigureJoin:k,isExpanded:H,showEmojiPicker:r,showEmojiBurstPicker:o,showMoreUtilities:i,showMessageTODOActions:U,isMessageTODO:B,setPopout:a,isFocused:l,isGuildInviteReminder:n.type===L.uaV.GUILD_INVITE_REMINDER}
|
||
}(e),n=t.channel,i=t.message,a=t.canCopy,l=t.canPin,s=t.canDelete,d=t.canReport,p=t.canEdit,h=t.canPublish,y=t.hasReactions,m=t.canReact,O=t.canConfigureJoin,C=t.canReply,j=t.canStartThread,S=t.isExpanded,I=t.showMoreUtilities,_=t.showEmojiPicker,w=t.showEmojiBurstPicker,x=t.showMessageTODOActions,P=t.isMessageTODO,N=t.setPopout,A=t.hasDeveloperMode,T=t.isGuildInviteReminder,Z=t.isFocused,M=o.useCallback((function(){I||Tt.default.track(L.rMx.MESSAGE_POPOUT_MENU_OPENED_DESKTOP,{message_id:i.id,channel:i.channel_id});N({moreUtilities:!I})}),[I,N,i]),R=o.useCallback((function(){N({emojiPicker:!_})}),[_,N]),D=o.useCallback((function(){N({emojiBurstPicker:!w})}),[w,N]),k=(0,et.Qd)(n.getGuildId()),U=k.enabled,B=k.hasTabUI,F=U&&!B,G=(0,Ce.$R)(n),H=i.hasFlag(L.iLy.CROSSPOSTED),V=[];U&&B&&V.push($e.z$.BURST_REACTION_BUTTON_SPARKLE);return(0,r.jsxs)(r.Fragment,{children:[S?(0,r.jsxs)(r.Fragment,{children:[a&&A?Xt({key:"copy-id",channel:n,message:i,label:Fe.Z.Messages.COPY_ID,icon:vt.Z,
|
||
onClick:we.F4}):null,a&&!T?Xt({key:"copy-link",channel:n,message:i,label:Fe.Z.Messages.COPY_LINK,icon:gt.Z,onClick:we.fB}):null,O?Xt({key:"configure",channel:n,message:i,label:Fe.Z.Messages.CONFIGURE,icon:mt.Z,onClick:we.zW}):null,x?Xt({key:"mark-todo",channel:n,message:i,label:P?Fe.Z.Messages.MESSAGE_TODOS_MARK_AS_DONE:Fe.Z.Messages.MESSAGE_TODOS_MARK_AS_TODO,icon:P?bt.Z:jt.Z,onClick:P?we.sT:we.JS}):null,G?Xt({key:"mark-unread",channel:n,message:i,label:Fe.Z.Messages.MARK_UNREAD,icon:Ot.Z,onClick:we.B8}):null,l?Xt({key:"pin",channel:n,message:i,label:i.pinned?Fe.Z.Messages.UNPIN_MESSAGE:Fe.Z.Messages.PIN_MESSAGE,icon:_t.Z,onClick:we.rY}):null,C&&p?Xt({key:"reply-self",channel:n,message:i,label:Fe.Z.Messages.MESSAGE_ACTION_REPLY,icon:wt.Z,onClick:we.HH}):null,y?Xt({key:"reactions",channel:n,message:i,label:Fe.Z.Messages.VIEW_REACTIONS,icon:Ct.Z,onClick:function(e,t){return(0,we.op)(e,t)}}):null]}):null,m&&!T?(0,r.jsx)(nt.Z,{contentTypes:V,children:function(e){
|
||
var t=e.visibleContent,o=e.markAsDismissed;return(0,r.jsx)(c.yRy,{renderPopout:function(e){var t=e.closePopout;return tn(n,i,t)},shouldShow:_,onRequestClose:R,position:Je.tq?"top":"left",align:Je.tq?"center":"top",children:function(e,r){e.onClick;var a=Yt(e,["onClick"]),l=r.isShown;return Xt(Wt({key:"add-reaction",label:Fe.Z.Messages.ADD_REACTION,icon:ht.Z,channel:n,selected:l,message:i,sparkle:Z&&t===$e.z$.BURST_REACTION_BUTTON_SPARKLE,onClick:function(){o();R()}},a))}})}}):null,m&&!T&&F?(0,r.jsx)(qt,{channel:n,message:i,togglePopout:D,shouldShow:w,isFocused:Z}):null,C&&!p?Xt({key:"reply-other",channel:n,message:i,label:Fe.Z.Messages.MESSAGE_ACTION_REPLY,icon:wt.Z,onClick:we.HH}):null,p?Xt({key:"edit",channel:n,message:i,label:Fe.Z.Messages.EDIT,icon:It.Z,onClick:we.Hd}):null,j?Xt({key:"thread",channel:n,message:i,label:Fe.Z.Messages.CREATE_THREAD,icon:Pt.Z,onClick:we.gK}):null,!j&&i.hasFlag(L.iLy.HAS_THREAD)?Xt({key:"view-thread",channel:n,message:i,label:Fe.Z.Messages.VIEW_THREAD,
|
||
icon:Pt.Z,onClick:we.qe}):null,h?Xt({key:"publish",channel:n,message:i,label:H?Fe.Z.Messages.NEWS_CHANNEL_PUBLISHED:Fe.Z.Messages.NEWS_CHANNEL_PUBLISH,icon:Et.Z,onClick:we.Xl,disabled:H,separator:!0}):null,s&&(T||S)?Xt({key:"delete",channel:n,message:i,label:Fe.Z.Messages.DELETE,icon:Nt.Z,onClick:we.$Z,dangerous:!0,separator:!S}):null,S&&s?null:(0,r.jsx)(c.yRy,{renderPopout:function(e){var t=e.updatePosition,o=e.closePopout;return(0,r.jsx)(Qt,{channel:n,message:i,canReport:d,onClose:o,updatePosition:t})},shouldShow:I,onRequestClose:M,position:"left",align:"top",animation:c.yRy.Animation.NONE,children:function(e,t){e.onClick;var r=Yt(e,["onClick"]),o=t.isShown;return Xt(Wt({key:"more",label:Fe.Z.Messages.MORE,icon:St.Z,channel:n,message:i,selected:o,onClick:M},r))}})]})}function $t(e){var t=e.channel,n=e.message,o=(0,u.e7)([ie.Z],(function(){return null!=ie.Z.getMessage(n.id)}),[n.id]),i=null==n.interaction||null!=n.interactionData&&(0,ot.$s)(n.interactionData),a=!o&&i;return(0,
|
||
r.jsxs)(r.Fragment,{children:[a&&Xt({key:"retry",label:Fe.Z.Messages.RETRY,icon:xt.Z,channel:t,message:n,onClick:we.mG}),Xt({key:"delete-usent",label:Fe.Z.Messages.DELETE,icon:Nt.Z,channel:t,message:n,onClick:we.$Z})]})}function en(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null!=e&&(0,ct.rU)(t.id,n.id,(0,st.g1)(e),void 0,{burst:r})}function tn(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=Wt({openPopoutType:"message_reaction_emoji_picker"},o&&{openPopoutType:"message_super_reaction_emoji_picker",page:null!=e.getGuildId()?L.ZY5.GUILD_CHANNEL:L.ZY5.DM_CHANNEL,section:(0,st.s4)(e),object:L.qAy.EMOJI_REACTION_PICKER_POPOUT});return(0,r.jsx)(ft.$,{channel:e,closePopout:n,onSelectEmoji:function(r,o,i){en(r,e,t,i);o&&n()},analyticsOverride:i,isBurstReaction:o})}const nn=o.memo((function(e){var t,n=e.channel,o=e.message,i=e.isHeader,l=(0,u.e7)([m.Z],(function(){return m.Z.isEditing(n.id,o.id)}),[n.id,o.id]),c=function(e){
|
||
var t=e.channel,n=e.message;return n.state===L.yb.SEND_FAILED?(0,r.jsx)($t,{channel:t,message:n}):null}(e),s=function(e){return e.message.state!==L.yb.SEND_FAILED?(0,r.jsx)(Jt,Wt({},e)):null}(e);return l||null==c&&null==s?null:(0,r.jsx)("div",{className:a()(e.className,(t={},Vt(t,Ht().container,!0),Vt(t,Ht().isHeader,i),t)),onClick:Kt,onContextMenu:Kt,role:"group","aria-label":Fe.Z.Messages.MESSAGE_UTILITIES_A11Y_LABEL,children:(0,r.jsxs)(At.ZP,{children:[c,s]})})}));var rn=n(13489),on=n.n(rn);function an(e,t,n,o){var i=e.message,a=e.channel,l=e.groupId,u=e.compact,c=void 0!==u&&u,s=n.emojiPicker,f=n.emojiBurstPicker,d=n.moreUtilities,p=i.state===L.yb.SENDING,h=i.id===l,y=(0,fe.yE)(i.flags,L.iLy.EPHEMERAL),b=i.state===L.yb.SEND_FAILED;return p||y&&!b?null:(0,r.jsx)(nn,{className:on().buttons,isHeader:!c&&h&&!(0,de.Z)(i),channel:a,message:i,setPopout:t,showEmojiPicker:s,showEmojiBurstPicker:f,showMoreUtilities:d,isFocused:o})}var ln=n(824803),un=n(62994),cn=o.memo((function(e){
|
||
var t=e.message,n=e.channel,i=e.compact,a=void 0!==i&&i,l=e.groupId,u=e.isGroupStart,c=e.usernameProfile,s=e.avatarProfile,f=e.setPopout,d=e.author,p=e.repliedMessage,h=e.roleIcon,y=(0,ge.wq)(t.author.id,n.id),b=(0,ge.XO)(t,n,c,f),v=(0,ge.R9)(s,f),m=o.useCallback((function(){return f({usernameProfile:!1,avatarProfile:!1,referencedUsernameProfile:!1})}),[f]);return(0,r.jsx)(ln.ZP,{guildId:n.guild_id,message:t,channel:n,repliedMessage:p,author:d,compact:a,subscribeToGroupId:l,showTimestampOnHover:!u&&a&&t.type!==L.uaV.REPLY,renderPopout:un.Z,showAvatarPopout:s,showUsernamePopout:c,onClickAvatar:v,onClickUsername:b,onContextMenu:y,onPopoutRequestClose:m,roleIcon:h})})),sn=o.memo(Be.Z);function fn(e){var t=e.messageProps,n=e.setPopout,o=e.messagePopouts,i=e.replyReference,a=e.author,l=e.repliedMessage,u=e.roleIcon,c=t.message,s=t.compact,f=t.channel,d=t.groupId,p=o.usernameProfile,h=o.avatarProfile;if((0,de.Z)(c))return null;var y=c.id===d;return y||s||null!=i?(0,r.jsx)(cn,{message:c,
|
||
channel:f,compact:s,subscribeToGroupId:d,isGroupStart:y,groupId:d,setPopout:n,usernameProfile:p,avatarProfile:h,author:a,repliedMessage:l,roleIcon:u}):(0,r.jsx)(sn,{compact:!0,timestamp:c.timestamp,isInline:!1,id:(0,me.Dv)(c),isVisibleOnlyOnHover:!0,cozyAlt:!0})}var dn=n(913928),pn=n(281808),hn=n(889025),yn=n(944928),bn=n(30027),vn=n(39416),mn=n.n(vn);function gn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function On(e){On=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return On(e)}function En(e,t){return!t||"object"!==jn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cn(e,t){Cn=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Cn(e,t)}var jn=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Sn(e){
|
||
var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=On(e);if(t){var o=On(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return En(this,n)}}function In(e){e.stopPropagation()}var _n=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Cn(e,t)}(n,e);var t=Sn(n);function n(){gn(this,n);var e;(e=t.apply(this,arguments)).node=o.createRef();e.onClickSave=function(){var t=e.props.textValue;e.onSubmit(t)};e.onSubmit=function(t){var n=e.props,r=n.message,o=n.channel,i=n.onConfirmDelete,a=n.onCancel,l=n.saveMessage,u=n.validateEdit;if(0===t.length){
|
||
i(o,r);a(o.id);return Promise.resolve({shouldClear:!1,shouldRefocus:!1})}return u({value:t,channel:o}).then((function(n){if(!n.valid)return Promise.resolve({shouldClear:!1,shouldRefocus:!1});var r=(0,yn.g)(t,{channel:o,isEdit:!0});null!=(null==r?void 0:r.content)&&(t=r.content);var i=bn.ZP.parse(e.props.channel,t);i.content!==e.props.message.content&&l(e.props.channel.id,e.props.message.id,i);a(o.id);return Promise.resolve({shouldClear:!0,shouldRefocus:!0})}))};e.onChange=function(t,n,r){var o=e.props,i=o.channel;(0,o.onChange)(i.id,n,r)};e.onKeyDown=function(t){if(t.keyCode===L.yXg.ESCAPE&&!t.shiftKey){var n=e.props,r=n.channel,o=n.onCancel;t.preventDefault();t.stopPropagation();o(r.id)}};return e}n.prototype.render=function(){var e=this.props,t=e.className,n=e.textValue,o=e.richValue,i=e.message,a=e.channel,l=e.onCancel,u=e.children;return(0,r.jsxs)("div",{className:t,ref:this.node,onContextMenu:In,children:[u({textValue:n,richValue:o,message:i,channel:a,onChange:this.onChange,
|
||
onSubmit:this.onSubmit,onKeyDown:this.onKeyDown}),(0,r.jsx)("div",{className:mn().operations,children:Fe.Z.Messages.EDIT_TEXTAREA_HELP.format({onCancel:function(){return l(a.id)},onSave:this.onClickSave})})]})};return n}(o.PureComponent),wn=n(476770);function xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Nn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function An(e,t){return function(e){if(Array.isArray(e))return e
|
||
}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tn(e){var t=e.value,n=e.channel;return(0,wn.v)({type:pn.I.EDIT,content:t,channel:n,restrictMentions:!1,respectCooldown:!1})}function Zn(e){
|
||
var t=e.channel,n=e.message,i=t.id,a=n.id,l=t.getGuildId(),c=(0,u.e7)([dt.Z],(function(){return dt.Z.getGuild(l)}),[l]),f=t.type===L.d4z.GUILD_ANNOUNCEMENT,d=null!=c&&c.hasFeature(L.oNc.NEWS),p=f&&d,h=(0,u.cj)([m.Z],(function(){return{editingMessage:m.Z.getEditingMessage(i),editingTextValue:m.Z.getEditingTextValue(i),editingRichValue:m.Z.getEditingRichValue(i)}}),[i,a]),y=h.editingMessage,b=h.editingTextValue,g=h.editingRichValue,O=(0,u.e7)([v.default],(function(){return v.default.getId()})),C=o.useCallback((function(e,n,r){var o=r.content,i=E.Z.can(L.Plq.MANAGE_MESSAGES,t),a=null!=y&&null!=y.author?y.author.id:null;p&&(a===O||i)&&null!=y&&(0,fe.yE)(y.flags,L.iLy.CROSSPOSTED)?dn.Z.confirmEdit(e,n,o):s.Z.editMessage(e,n,{content:o});return Promise.resolve()}),[y,p,O,t]),j=o.useCallback((function(e){return(0,o.createElement)(Mn,Nn(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Pn(e,t,n[t])}))}return e}({},e),{className:on().channelTextArea,key:a}))}),[a]);return null!=b&&null!=g?(0,r.jsx)(_n,{ref:void 0,channel:t,message:n,textValue:b,richValue:g,onCancel:s.Z.endEditMessage,onChange:s.Z.updateEditMessage,onConfirmDelete:dn.Z.confirmDelete,saveMessage:C,validateEdit:Tn,children:j}):null}function Mn(e){var t=e.textValue,n=e.richValue,i=e.message,a=e.channel,l=e.onChange,u=e.onSubmit,c=e.onKeyDown,s=An(o.useState(!0),2),f=s[0],d=s[1],p=o.useCallback((function(){return d(!0)}),[]),h=o.useCallback((function(){return d(!1)}),[]);o.useEffect((function(){G.S.subscribe(L.CkL.TEXTAREA_FOCUS,p);G.S.subscribe(L.CkL.TEXTAREA_BLUR,h);return function(){G.S.unsubscribe(L.CkL.TEXTAREA_FOCUS,p);G.S.unsubscribe(L.CkL.TEXTAREA_BLUR,h)}}),[p,h]);return(0,r.jsx)(hn.Z,{
|
||
className:on().channelTextArea,textValue:t,richValue:n,channel:a,type:pn.I.EDIT,onChange:l,onSubmit:function(e){var t=e.value;return u(t)},onKeyDown:c,focused:f,onFocus:p,onBlur:h},i.id)}function Rn(e,t,n){var o=e.message,i=e.channel;return n?(0,r.jsx)(Zn,{channel:i,message:o}):(0,r.jsx)(Ue.ZP,{message:o,content:t})}var Ln=n(840922),Dn=n(550776),kn=o.memo((function(e){var t,n=e.message,i=e.channel,a=e.compact,l=void 0!==a&&a,c=e.interactionUsernameProfile,s=e.interactionAvatarProfile,f=e.interactionData,d=e.setPopout,p=(0,u.e7)([Ln.Z],(function(){return null!=n.interaction&&Ln.Z.isBlocked(n.interaction.user.id)}),[n.interaction]),h=(0,ge.wq)(null===(t=n.interaction)||void 0===t?void 0:t.user.id,i.id),y=(0,ge.Nk)(n.interaction,i,c,d),b=(0,ge.NU)(s,d),v=(0,ge.Xn)(f,d),m=o.useCallback((function(){return d({interactionUsernameProfile:!1,interactionAvatarProfile:!1,interactionData:!1})}),[d]);return(0,r.jsx)(Dn.Z,{message:n,channel:i,compact:l,isInteractionUserBlocked:p,showAvatarPopout:s,
|
||
showUsernamePopout:c,showDataPopout:f,onClickAvatar:b,onClickUsername:y,onClickCommand:v,onUserContextMenu:h,onPopoutRequestClose:m})}));function Un(e,t,n){var o=e.message,i=e.channel,a=e.compact,l=n.interactionUsernameProfile,u=n.interactionAvatarProfile,c=n.interactionData;return null!=o.interaction?(0,r.jsx)(kn,{message:o,channel:i,compact:a,setPopout:t,interactionUsernameProfile:l,interactionAvatarProfile:u,interactionData:c}):null}var Bn=n(894012),Fn=n(45009),Gn=n(194934),Hn=n(535081),Vn=n(763536),Wn=n(674301),zn=n(804808),Yn=o.memo((function(e){var t=e.baseMessage,n=e.referencedMessage,i=e.channel,a=e.compact,l=void 0!==a&&a,c=e.referencedUsernameProfile,s=e.referencedAvatarProfile,f=e.setPopout,d=n.state===ue.Y.LOADED?n.message:void 0,p=(0,pe.Uj)(d),h=o.useMemo((function(){if(null==d)return null;if(d.type===L.uaV.USER_JOIN)return(0,Bn.Rp)(Wn.Z.getSystemMessageUserJoin(d.id).astFormat({username:null!=p?p.nick:d.author.username,usernameHook:function(e){return e}}))
|
||
;if(d.type===L.uaV.ROLE_SUBSCRIPTION_PURCHASE)return(0,Bn.Rp)((0,Gn.PA)({username:null!=p?p.nick:d.author.username,guildId:null==i?void 0:i.guild_id,roleSubscriptionData:d.roleSubscriptionData}));if(d.type===L.uaV.GUILD_APPLICATION_PREMIUM_SUBSCRIPTION)return(0,Bn.Rp)((0,Fn.Y)({application:null==d?void 0:d.application,username:null==p?void 0:p.nick}));if(d.type===L.uaV.PRIVATE_CHANNEL_INTEGRATION_ADDED)return(0,Bn.Rp)((0,Hn.B2)({application:null==d?void 0:d.application,username:null==p?void 0:p.nick}));if(d.type===L.uaV.PRIVATE_CHANNEL_INTEGRATION_REMOVED)return(0,Bn.Rp)((0,Hn.hj)({application:null==d?void 0:d.application,username:null==p?void 0:p.nick}));if(null!=d.content&&""!==d.content){var e=d.isFirstMessageInForumPost(i)?{formatInline:!0,noStyleAndInteraction:!0,allowHeading:!0,allowList:!0}:{formatInline:!0};return(0,zn.ZP)(d,e).content}return null}),[d,p,i]),y=(0,u.e7)([Ln.Z],(function(){return null!=d&&Ln.Z.isBlocked(d.author.id)}),[d]),b=(0,
|
||
ge.wq)(null==d?void 0:d.author.id,i.id),v=(0,ge.$3)(t,d,y),m=(0,ge.Wl)(d,i,c,f),g=(0,ge.rY)(s,f),O=o.useCallback((function(){return f({referencedUsernameProfile:!1,referencedAvatarProfile:!1})}),[f]),E=(0,pe.Uj)(t);return(0,r.jsx)(Vn.Z,{repliedAuthor:p,baseMessage:t,channel:i,baseAuthor:E,referencedMessage:n,content:h,compact:l,isReplyAuthorBlocked:y,showAvatarPopout:s,showUsernamePopout:c,renderPopout:un.Z,onClickAvatar:g,onClickUsername:m,onClickReply:v,onContextMenu:b,onPopoutRequestClose:O})}));function Kn(e,t,n,o,i){var a=e.message,l=e.channel,u=e.compact,c=n.referencedUsernameProfile,s=n.referencedAvatarProfile,f=a.type===L.uaV.REPLY&&null!=o&&(0,r.jsx)(Yn,{baseMessage:a,replyReference:o,referencedMessage:i,channel:l,compact:u,setPopout:t,referencedUsernameProfile:c,referencedAvatarProfile:s});return(0,r.jsx)(r.Fragment,{children:f})}var qn=n(566591);function Qn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}
|
||
function Xn(){Xn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return Xn.apply(this,arguments)}function Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Qn(e,t,n[t])}))}return e}function $n(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}
|
||
function er(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function tr(e){var t=e.id,n=e.message,i=e.message.id,s=e.channel,d=e.channel.id,p=e.compact,h=void 0!==p&&p,y=e.className,v=e.flashKey,g=e.groupId,O=e.isHighlight,E=e.renderContentOnly;te()(n.type!==L.uaV.THREAD_STARTER_MESSAGE,"Message must not be a thread starter message");var C,j,S,I=L.OBS.has(n.type)?n.messageReference:void 0,_=(0,l.JA)(null!==(C=e.id)&&void 0!==C?C:""),w=_.onFocus,x=er(_,["onFocus"]),P=b.RS.useSetting(),N=b.NA.useSetting(),A=P&&N,T=(0,u.e7)([ue.Z],(function(){return ue.Z.getMessageByReference(I)})),Z=(0,Ne.Z)(n.id,R.d$),M=Z.popouts,D=Z.selected,k=Z.setPopout,U=(0,ge.qo)(n,s,k),B=(0,
|
||
ge.Go)(n,s),F=(0,ge.tn)(g,n.author.id,D),G=F.handleMouseEnter,H=F.handleMouseLeave,V=F.hasHovered,W=F.isHovered,z=(0,ge.bb)(w),Y=z.isFocused,K=z.hasFocused,q=z.handleFocus,Q=z.handleBlur,X=(0,u.e7)([m.Z],(function(){return m.Z.isEditing(d,i)}),[d,i]),J=(0,u.e7)([f.Z],(function(){return f.Z.keyboardModeEnabled})),$=D||X||J&&Y,ee=$||W,he=(0,u.e7)([ce.Z],(function(){return n.hasFlag(L.iLy.HAS_THREAD)&&ce.Z.getChannel(n.id)})),ye=n.isFirstMessageInForumPost(s),be=(0,ne.dj)(n.id),Oe=(0,ne.tu)(s.guild_id,n.id),Ee=be||Oe,Ce=(0,Ae.Z)(n,{hideSimpleEmbedContent:A,isInteracting:ee,formatInline:!1,allowList:ye||Ee,allowHeading:ye||Ee,allowLinks:Ee,previewLinkTarget:Ee}),je=Ce.content,Se=Ce.hasSpoilerEmbeds,Ie=Pe(i,d,J),_e=(0,pe.ZP)(n),we=(0,u.e7)([le.Z],(function(){return le.Z.getPendingReply(d)})),xe=function(e){var t=o.useRef(e);o.useEffect((function(){t.current=null!=e?e:t.current}));return null!=e?e:t.current}(v),Ze=(0,ae.p9)({guildId:s.guild_id,roleId:_e.iconRoleId}),Me=(0,me.iG)(n,g),Re=(0,
|
||
me.Gx)(n),Le=null!=(0,u.e7)([ie.Z],(function(){return ie.Z.getMessage(i)}),[i]),De=!X&&Le?function(e,t){var n=e.message,o=e.compact;return(0,r.jsx)(Xe,{message:n,content:t,compact:o})}(e,je):Rn(e,je,X),ke=n.id===g,Ue=(0,re.A)(),Be=O&&ke?(0,r.jsxs)("div",{className:on().highlightContainer,children:[(0,r.jsx)(oe.Z,{className:on().highlightIcon,width:10,height:10}),(0,r.jsx)(c.xvT,{style:{color:Ue},variant:"text-sm/medium",children:Fe.Z.Messages.HIGHLIGHT})]}):null,Ge=(0,r.jsx)(c.tEY,{offset:{left:4,right:4},children:(0,r.jsx)("li",{id:t,className:on().messageListItem,"aria-setsize":-1,children:(0,r.jsx)(se.Z,$n(Jn({},x),{"aria-setsize":-1,"aria-roledescription":Fe.Z.Messages.MESSAGE_A11Y_ROLE_DESCRIPTION,"aria-labelledby":Me,"aria-describedby":Re,onFocus:q,onBlur:Q,onContextMenu:U,onKeyDown:Ie,onClick:B,compact:h,contentOnly:E,className:a()(y,(j={},Qn(j,on().message,!0),Qn(j,on().cozyMessage,!h),Qn(j,on().mentioned,n.mentioned&&!(0,de.Z)(n)),Qn(j,on().highlighted,O),
|
||
Qn(j,on().ephemeral,(0,fe.yE)(n.flags,L.iLy.EPHEMERAL)),Qn(j,on().systemMessage,(0,de.Z)(n)),Qn(j,on().groupStart,!E&&(ke||n.type===L.uaV.REPLY)),Qn(j,on().selected,$),Qn(j,on().replying,(null==we?void 0:we.message.id)===n.id),Qn(j,on().interactionSending,n.isCommandType()&&n.state===L.yb.SENDING),Qn(j,on().automodMessage,Le),j)),zalgo:!X,childrenHighlight:Be,childrenRepliedMessage:E?void 0:Kn(e,k,M,I,T),childrenExecutedCommand:Un(e,k,M),childrenHeader:E?void 0:fn({messageProps:e,setPopout:k,messagePopouts:M,replyReference:I,author:_e,repliedMessage:T,roleIcon:Ze}),childrenAccessories:(0,Te.Z)({channelMessageProps:e,hasSpoilerEmbeds:Se,handleContextMenu:U,isInteracting:ee}),childrenButtons:V||K?an(e,k,M,W||Y):void 0,childrenSystemMessage:(0,qn.Z)(e),childrenMessageContent:De,onMouseMove:G,onMouseLeave:H,hasThread:!E&&n.hasFlag(L.iLy.HAS_THREAD)&&null!=he,isSystemMessage:(0,de.Z)(n),hasReply:n.type===L.uaV.REPLY}))})});return null!=xe?(0,r.jsx)(ve,{flashKey:xe,className:a()((S={},
|
||
Qn(S,on().backgroundFlash,!0),Qn(S,on().groupStart,!h&&n.id===g),S)),children:Ge},"bg-flash-".concat(t)):Ge}function nr(e){var t,n=e.id,o=e.message,i=e.message.messageReference,c=e.compact,s=void 0!==c&&c,f=e.className;te()(o.type===L.uaV.THREAD_STARTER_MESSAGE,"Message must be a thread starter message");var d,p=Xn({},(0,l.JA)(null!==(t=e.id)&&void 0!==t?t:"")),h=(0,u.e7)([ue.Z],(function(){return ue.Z.getMessageByReference(i)})),y=(0,Ne.Z)(o.id,R.d$),b=y.popouts,v=y.setPopout,m=(0,pe.ZP)(o),g=(0,me.iG)(o),O=(0,me.Gx)(o);return o.type===L.uaV.THREAD_STARTER_MESSAGE&&null!=h&&h.state===ue.Y.LOADED?(0,r.jsx)(rr,$n(Jn({},e),{message:h.message,groupId:h.message.id})):(0,r.jsx)(se.Z,$n(Jn({},p),{id:n,compact:s,className:a()(f,(d={},Qn(d,on().message,!0),Qn(d,on().cozyMessage,!s),Qn(d,on().systemMessage,!0),Qn(d,on().groupStart,!0),d)),childrenHeader:fn({messageProps:e,setPopout:v,messagePopouts:b,replyReference:i,author:m}),childrenSystemMessage:(0,qn.Z)(e),childrenMessageContent:null,
|
||
"aria-labelledby":g,"aria-describedby":O,hasThread:!1}))}function rr(e){var t,n,i=e.id,s=e.message,d=e.message,p=d.id,h=d.channel_id,y=e.channel.guild_id,v=e.compact,m=void 0!==v&&v,g=e.className,O=e.groupId,E=s.type===L.uaV.REPLY?s.messageReference:void 0,C=(0,l.JA)(null!==(t=e.id)&&void 0!==t?t:""),j=C.onFocus,S=er(C,["onFocus"]),I=(0,ge.bb)(j),_=I.isFocused,w=I.handleFocus,x=I.handleBlur,P=(0,Ne.Z)(s.id,R.d$),N=P.popouts,A=P.selected,T=P.setPopout,Z=b.RS.useSetting(),M=b.NA.useSetting(),D=Z&&M,k=(0,u.e7)([ue.Z],(function(){return ue.Z.getMessageByReference(E)})),U=(0,ge.tn)(O,s.author.id,A),B=U.handleMouseEnter,F=U.handleMouseLeave,G=U.isHovered,H=(0,u.e7)([f.Z],(function(){return f.Z.keyboardModeEnabled})),V=A||H&&_,W=V||G,z=(0,Ae.Z)(s,{hideSimpleEmbedContent:D,isInteracting:W,formatInline:!1}),Y=z.content,K=z.hasSpoilerEmbeds,q=Pe(p,h,H),Q=(0,pe.ZP)(s),J=(0,me.iG)(s,O),$=(0,me.Gx)(s),ee=Rn(e,Y,!1),te=o.useCallback((function(){return(0,X.XU)(y,h,p)}),[y,h,p]),ne=(0,ae.p9)({
|
||
guildId:y,roleId:Q.iconRoleId});return(0,r.jsxs)("div",{className:on().quotedChatMessage,children:[(0,r.jsx)(c.P3F,{className:on().jump,onClick:te,"aria-label":Fe.Z.Messages.JUMP,children:Fe.Z.Messages.JUMP}),(0,r.jsx)(se.Z,$n(Jn({},S),{id:i,compact:m,className:a()(g,(n={},Qn(n,on().message,!0),Qn(n,on().cozyMessage,!m),Qn(n,on().mentioned,s.mentioned&&!(0,de.Z)(s)),Qn(n,on().ephemeral,(0,fe.yE)(s.flags,L.iLy.EPHEMERAL)),Qn(n,on().systemMessage,(0,de.Z)(s)),Qn(n,on().groupStart,s.id===O||s.type===L.uaV.REPLY),Qn(n,on().selected,V),n)),zalgo:!0,onKeyDown:q,onFocus:w,onBlur:x,childrenRepliedMessage:Kn(e,T,N,E,k),childrenHeader:fn({messageProps:e,setPopout:T,messagePopouts:N,replyReference:E,author:Q,repliedMessage:k,roleIcon:ne}),childrenAccessories:(0,Te.Z)({channelMessageProps:e,hasSpoilerEmbeds:K,isInteracting:W,renderThreadAccessory:!1,renderComponentAccessory:!1,renderSuppressEmbeds:!1}),childrenSystemMessage:(0,qn.Z)(e),childrenMessageContent:ee,onMouseMove:B,onMouseLeave:F,
|
||
"aria-labelledby":J,"aria-describedby":$,hasThread:!1}))]})}const or=o.memo(tr);function ir(e,t){for(var n=e.offsetTop,r=e.offsetParent;null!=r&&r!==t&&(0,Y.k)(r,HTMLElement);){var o;n+=null!==(o=r.offsetTop)&&void 0!==o?o:0;r=r.offsetParent}return n}function ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ur(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||sr(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cr(e){return function(e){if(Array.isArray(e))return ar(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||sr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sr(e,t){if(e){if("string"==typeof e)return ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ar(e,t):void 0}}function fr(e){s.Z.jumpToPresent(e.id,L.AQB);var t;(0,X.XU)(null!==(t=e.getGuildId())&&void 0!==t?t:L.ME,e.id)}function dr(e){if(null==e.jumpTargetId||!e.ready)return null
|
||
;var t=e.jumpTargetId,n=e.jumpTargetOffset;if(e.has(t)||!e.hasMoreBefore&&t===e.channelId){if(0===n)return t;var r,o=e.getByIndex(e.indexOf(t)+n);return null!==(r=null==o?void 0:o.id)&&void 0!==r?r:t}var i,a=[t].concat(cr(e.map((function(e){return e.id})))).sort(T.Z.compare),l=a.indexOf(t),u=null!==(i=a[l+(Math.abs(n)>0?n:1)])&&void 0!==i?i:a[l-1];return null!=u?u:null}var pr={scrollTop:0,scrollHeight:0,offsetHeight:0},hr=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.ref=o.createRef();this.automaticAnchor=null;this.messageFetchAnchor=null;this.focusAnchor=null;this.jumping=!1;this.dragging=!1;this.isAtBottom=!1;this.prevScrollTop=null;this.anchorTimeout=null;this.initialScrollTop=null;this.acking=!1;this.scrollCounter=0;this.offsetHeightCache=0;this.scrollHeightCache=0;this.scrollTopCache=-1;this._bottomAnchor=null;this._automaticAnchorCallbacks=[];this._scrollCompleteCallbacks=[]
|
||
;this.updateVisibleMessagesDebounced=z().debounce(J.JR,300);this.handleScroll=function(e){var t;if(n.isInitialized()){var r=n.getScrollerState(),o=n.isScrolledToBottom(r);if(o!==n.isAtBottom)if(o){n.isAtBottom=!0;n.props.handleScrollToBottom()}else{n.isAtBottom=!1;n.props.handleScrollFromBottom()}if(r.offsetHeight!==n.offsetHeightCache||r.scrollHeight!==n.scrollHeightCache){n.scrollCounter=0;clearTimeout(n.anchorTimeout);n.isPinned()||(null==n.automaticAnchor?n.setAutomaticAnchor(n.findAnchor()):n.updateAutomaticAnchor(r.scrollTop,!0));clearTimeout(n.anchorTimeout);n.fixScrollPosition(r.offsetHeight,r.scrollHeight);n.scrollTopCache=r.scrollTop}else{if(null!=e&&e.target!==(null===(t=n.ref.current)||void 0===t?void 0:t.getScrollerNode()))return;if(n.scrollTopCache!==r.scrollTop){n.pinned=o;n.scrollCounter=Math.min(n.scrollCounter+1,5);n.pinned?n.cleanAutomaticAnchor():null!=n.automaticAnchor?n.updateAutomaticAnchor(r.scrollTop,!0):n.setAutomaticAnchor(n.findAnchor())
|
||
;n.scrollTopCache=r.scrollTop;clearTimeout(n.anchorTimeout);n.anchorTimeout=setTimeout((function(){n.scrollCounter=0;n.anchorTimeout=null;n.prevScrollTop=null;var e=n.getScrollerState(),t=e.scrollHeight,r=e.offsetHeight;if(n.isHeightChange(r,t))n.handleScroll();else{n.cleanAutomaticAnchor();n.isPinned()||n.setAutomaticAnchor(n.findAnchor())}}),35)}}n.handleFocusAnchorScroll(r.scrollTop,r.offsetHeight);n.updateStoreDimensionsDebounced();if(n.isScrollLoadingDisabled()){n.props.canLoadMore||n.enableAutomaticAck();return n.handleScrollSpeed(r)}var i=n.isInScrollTriggerLoadingRegion(r);1===i?n.loadMore():2===i?n.loadMore(!0):n.enableAutomaticAck();n.handleScrollSpeed(r)}};this.handleResize=function(e,t){var r=n.offsetHeightCache,o=n.scrollHeightCache;"container"===t?r=e.contentRect.height:"content"===t&&(o=e.contentRect.height);n.isHeightChange(r,o)&&n.fixScrollPosition(r,o)};this.handleMouseDown=function(e){e.target===e.currentTarget&&(n.dragging=!0)};this.handleMouseUp=function(){
|
||
n.dragging=!1;n.handleScroll()};this.loadMore=function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=n.props.messages;if(r){var i=o.last();null!=i&&(t=i.id)}else{var a=o.first();null!=a&&(e=a.id)}n.messageFetchAnchor=n.findFetchAnchor(r);n.loading=!0;s.Z.fetchMessages({channelId:n.props.channel.id,before:e,after:t,limit:L.AQB,truncate:!0})};this.updateStoreDimensionsDebounced=z().debounce(this.updateStoreDimensions,200);this.props=t;this.loading=t.messages.loadingMore;var r=$.Z.getChannelDimensions(t.channel.id);if(null!=t.messages.jumpTargetId)this.pinned=!1;else{var i;this.initialScrollTop=null!==(i=null==r?void 0:r.scrollTop)&&void 0!==i?i:null;this.pinned=null==r}}var t=e.prototype;t.isReady=function(){return this.props.messages.ready};t.isLoading=function(){return this.loading||this.props.messages.loadingMore};t.isPinned=function(){return this.pinned};t.isJumping=function(){return this.jumping};t.isDragging=function(){return this.dragging}
|
||
;t.isInitialized=function(){return void 0===this.initialScrollTop};t.isScrollLoadingDisabled=function(){return this.isLoading()||!this.isInitialized()||this.isJumping()||this.isDragging()||!this.props.canLoadMore};t.isActivelyScrolling=function(){return this.scrollCounter>=5};t.getDocument=function(){var e,t;return null===(t=null===(e=this.ref.current)||void 0===e?void 0:e.getScrollerNode())||void 0===t?void 0:t.ownerDocument};t.getElementFromMessageId=function(e){var t=this.getDocument(),n=this.props.channel.id;return null==t?null:function(e,t,n){return e.getElementById((0,H.p)(t,n))}(t,n,e)};t.isScrolledToBottom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getScrollerState(),t=e.scrollTop,n=e.scrollHeight,r=e.offsetHeight;return t>=n-r-R.kQ&&!this.props.messages.hasMoreAfter};t.mergePropsAndUpdate=function(e){this.mergePropsAndUpdate_(e);this.props.messages.ready&&this.enableAutomaticAck()};t.mergePropsAndUpdate_=function(e){
|
||
var t=this.props.messages,n=this.props.focusId;this.props=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){lr(e,t,n[t])}))}return e}({},e);var r=this.getScrollerState(),o=r.offsetHeight,i=r.scrollHeight,a=this.isHeightChange(o,i);this.offsetHeightCache=o;this.scrollHeightCache=i;this.loading=e.messages.loadingMore;if(this.isInitialized()||this.isReady())if(this.isInitialized()){if(null!=e.messages.jumpTargetId){if(this.isLoading())return;var l=dr(e.messages);if(null!=l&&!this.isJumping()&&e.messages.jumpSequenceId!==t.jumpSequenceId){var u,c=t.first();null!=c&&e.messages.last()!==t.last()&&e.messages.first()!==t.first()&&(u=T.Z.extractTimestamp(c.id));this.scrollToMessage(l,!0,u);return}if(this.isJumping()){
|
||
null!=l?this.scrollToMessage(l,!0):this.jumping=!1;return}}if(e.messages.jumpedToPresent&&t.jumpSequenceId!==e.messages.jumpSequenceId){this.jumping=!0;this.scrollTo(0);this.setScrollToBottom(!0)}else{var s=e.messages.last(),f=t.last();if(null==s||s.state!==L.yb.SENDING||(null==f?void 0:f.id)===s.id){var d=this.props.focusId;if(null!=d&&n!==d){var p=this.getElementFromMessageId(d);if(null!=p){var h;null===(h=this.ref.current)||void 0===h||h.scrollIntoViewNode({node:p,padding:R.kQ,callback:this.handleScroll});return}}a&&this.fixScrollPosition(o,i)}else this.setScrollToBottom()}}else this.restoreScroll();else null==e.messages.jumpTargetId&&this.scrollTo(Number.MAX_SAFE_INTEGER)};t.getAnchorData=function(e,t,n){var r,o=this.getElementFromMessageId(e),i=null===(r=this.ref.current)||void 0===r?void 0:r.getScrollerNode();if(!(0,Y.k)(o)||null==i)return null;var a=o.offsetHeight,l=ir(o,i),u=l-t;null!=n&&(u=Math.max(-a,Math.min(n,u)));return{id:e,offsetFromTop:u,offsetTop:l,offsetHeight:a,
|
||
clamped:null!=u}};t.cleanAutomaticAnchor=function(){this.setAutomaticAnchor(null)};t.newMessageBarBuffer=function(){return this.props.channel.isForumPost()?R.R4:R.Eo};t.findAnchor=function(){for(var e=this.props,t=e.messages,n=e.hasUnreads,r=e.channel,o=this.getScrollerState(),i=o.scrollTop,a=n&&i>=this.newMessageBarBuffer()?this.newMessageBarBuffer():0,l=null,u=function(e){var n;return-1===e?r.id:null===(n=t._array[e])||void 0===n?void 0:n.id},c=-1,s=!1;;){var f=u(c);if(null==f)break;var d=this.getAnchorData(f,i);this._bottomAnchor=d;if(s&&null!=d&&d.offsetTop>i+a+o.offsetHeight)break;if(s)c++;else{if(null!=d&&(d.offsetTop>=i+a||c===t.length-1)){l=d;s=!0}c++}}return l};t.findFetchAnchor=function(e){for(var t=this.props.messages,n=this.getScrollerState().scrollTop,r=e?-1:1,o=null,i=t._array.length-1,a=e?i:0;null!=t._array[a];a+=r){var l=t._array[a],u=this.getAnchorData(l.id,n);if(null!=u){o=u;break}}return o};t.getAnchorFixData=function(){
|
||
var e=[this.focusAnchor,this.isLoading()?null:this.messageFetchAnchor,this.automaticAnchor],t=!0,n=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if(null!=a){var l=this.getElementFromMessageId(a.id);if((0,Y.k)(l)){var u=a===this.messageFetchAnchor?a.offsetHeight-l.offsetHeight:0;return{node:l,fixedScrollTop:l.offsetTop-(a.offsetFromTop+u)}}}}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return null};t.fixAnchorScrollPosition=function(){var e=this.getAnchorFixData();if(null!=e){var t=e.node,n=e.fixedScrollTop;if(null!=this.focusAnchor){var r;this.isPinned()?this.scrollTo(Number.MAX_SAFE_INTEGER,!1,this.handleScroll):this.mergeTo(n,this.handleScroll);null===(r=this.ref.current)||void 0===r||r.scrollIntoViewNode({node:t,padding:R.kQ,callback:this.handleScroll})}else this.mergeTo(n,this.handleScroll);this.isActivelyScrolling()?this.setAutomaticAnchor(null):this.setAutomaticAnchor(this.findAnchor())
|
||
;this.isLoading()||(this.messageFetchAnchor=null)}else this.handleScroll()};t.hasAnchor=function(){return null!=this.focusAnchor||null!=this.messageFetchAnchor||null!=this.automaticAnchor};t.updateFocusAnchor=function(e,t,n){var r=this.focusAnchor=null!=e?this.getAnchorData(e,t):null;null!=r&&(r.offsetFromTop>=n||t>r.offsetTop+r.offsetHeight)&&(this.focusAnchor=null)};t.handleFocusAnchorScroll=function(e,t){var n;this.updateFocusAnchor(null===(n=this.focusAnchor)||void 0===n?void 0:n.id,e,t)};t.updateFetchAnchor=function(e,t,n){var r,o=null===(r=this.ref.current)||void 0===r?void 0:r.getScrollerNode();null!=this.messageFetchAnchor&&null!=o&&(this.messageFetchAnchor=this.getAnchorData(this.messageFetchAnchor.id,e,this.isInPlaceholderRegion({scrollTop:e,offsetHeight:t,scrollHeight:n})>0?t:void 0))};t.updateAutomaticAnchor=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null===(t=this.ref.current)||void 0===t?void 0:t.getScrollerNode()
|
||
;if(null!=this.automaticAnchor&&null!=r){var o=this.getAnchorData(this.automaticAnchor.id,e);n&&null!=o&&null!=this.automaticAnchor&&(o.offsetFromTop=this.automaticAnchor.offsetFromTop);this.setAutomaticAnchor(o)}};t.setAutomaticAnchor=function(e){var t,n,r=this;this.automaticAnchor=e;null===(t=this._automaticAnchorCallbacks)||void 0===t||t.forEach((function(e){return e(r.automaticAnchor,r._bottomAnchor)}));this.updateVisibleMessagesDebounced(null==e?void 0:e.id,null===(n=this._bottomAnchor)||void 0===n?void 0:n.id)};t.getScrollerState=function(){var e,t;return null!==(t=null===(e=this.ref.current)||void 0===e?void 0:e.getScrollerState())&&void 0!==t?t:pr};t.isHeightChange=function(e,t){return e!==this.offsetHeightCache||t!==this.scrollHeightCache};t.isInPlaceholderRegion=function(e){var t=e.scrollTop,n=e.offsetHeight,r=e.scrollHeight,o=this.props,i=o.messages,a=o.placeholderHeight,l=a,u=r-n-a;return i.hasMoreBefore&&t<l&&r>n?1:i.hasMoreAfter&&t>=u?2:0}
|
||
;t.isInScrollTriggerLoadingRegion=function(e){var t=e.scrollTop,n=e.offsetHeight,r=e.scrollHeight,o=this.props.messages;return o.hasMoreBefore&&t<=this.getOffsetToTriggerLoading("top",e)&&r>n?1:o.hasMoreAfter&&t>=this.getOffsetToTriggerLoading("bottom",e)?2:0};t.handleScrollSpeed=function(e){if(!this.isJumping()&&!this.isDragging()&&this.props.canLoadMore){var t=e.scrollTop,n=e.offsetHeight,r=e.scrollHeight,o=this.prevScrollTop,i=this.props.placeholderHeight;this.prevScrollTop=t;if(null!=o){var a=this.isInPlaceholderRegion(e),l=t-o;if(0!==a)if(1===a&&t+l<=0){this.mergeTo(i-n);this.prevScrollTop=i-n}else if(2===a&&t+l>=r-n){this.mergeTo(r-i);this.prevScrollTop=r-i}}}};t.enableAutomaticAck=function(){var e=this;if(this.isInitialized()&&!this.acking){this.acking=!0;this.updateStoreDimensions((function(){(0,q.CZ)(e.props.channel.id,e.props.windowId)}))}};t.fixScrollPosition=function(e,t){this.offsetHeightCache=e;this.scrollHeightCache=t;this.fixJumpTarget()
|
||
;this.isPinned()&&null==this.messageFetchAnchor&&null==this.focusAnchor?this.scrollTo(Number.MAX_SAFE_INTEGER,!1,this.handleScroll):this.fixAnchorScrollPosition()};t.fixJumpTarget=function(){if(this.isJumping()){var e=this.props,t=e.messages,n=e.hasUnreads;if(null!=t.jumpTargetId){var r=dr(t);if(null==r)return;var o=this.getElementFromMessageId(r);(0,Y.k)(o)?this.scrollTo(this.getOffsetOrientationFromNode(o,"middle",n?this.newMessageBarBuffer():R.kQ),!0):this.scrollToNewMessages(!0,"middle")}else this.scrollTo(Number.MAX_SAFE_INTEGER,!0)}};t.scrollToNewMessages=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",r=arguments.length>2?arguments[2]:void 0,o=this,i=null===(e=this.getDocument())||void 0===e?void 0:e.getElementById(R.j1),a=function(){o.jumping=!1;o.setAutomaticAnchor(o.findAnchor());null!=r&&r();o.handleScroll()};this.pinned=!1;this.jumping=t
|
||
;null!=i?this.scrollTo(this.getOffsetOrientationFromNode(i,n,this.newMessageBarBuffer()),t,a):this.scrollTo(this.getOffsetToPreventLoading("top"),t,a)};t.getOffsetOrientationFromNode=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=null===(n=this.ref.current)||void 0===n?void 0:n.getScrollerNode();if(null==o)return 0;var i=this.getScrollerState(),a=ir(e,o);return"middle"===t?Math.min(a-.5*i.offsetHeight+.5*e.offsetHeight-8,a-r):a-r};t.restoreScroll=function(){if(!this.isInitialized()){var e=this.initialScrollTop;this.initialScrollTop=void 0;var t=dr(this.props.messages);null!=t?this.scrollToMessage(t,!1):this.props.hasUnreads&&this.props.channel.type!==L.d4z.GUILD_VOICE&&this.props.channel.type!==L.d4z.GUILD_STAGE_VOICE?this.scrollToNewMessages():null!=e?this.scrollTo(e+this.props.placeholderHeight,!1,this.handleScroll):this.setScrollToBottom()}};t.scrollTo=function(e){
|
||
var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;null===(t=this.ref.current)||void 0===t||t.scrollTo({to:e,animate:!f.Z.useReducedMotion&&n,callback:r});this.isPinned()?this.updateStoreDimensions():this.updateStoreDimensionsDebounced()};t.mergeTo=function(e,t){var n;null===(n=this.ref.current)||void 0===n||n.mergeTo({to:e,callback:t});this.isPinned()?this.updateStoreDimensions():this.updateStoreDimensionsDebounced()};t.setScrollToBottom=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this,n=this.props,r=n.messages,o=n.channel;r.hasMoreAfter?fr(o):this.scrollTo(Number.MAX_SAFE_INTEGER,e,(function(){t.jumping=!1;t.handleScroll()}))};t.updateStoreDimensions=function(e){if(!this.isJumping()&&this.isInitialized()){var t=this.props.channel;if(this.isPinned())K.Z.clearChannelDimensions(t.id,e);else{var n=this.props.placeholderHeight,r=this.getScrollerState(),o=r.scrollTop,i=r.scrollHeight,a=r.offsetHeight
|
||
;K.Z.updateChannelDimensions(t.id,o-n,i-n,a,e)}}};t.scrollIntoViewRect=function(){};t.scrollPageUp=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=this.ref.current)||void 0===e||e.scrollPageUp({animate:t})};t.scrollPageDown=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=this.ref.current)||void 0===e||e.scrollPageDown({animate:t})};t.scrollToMessage=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=this;if(null!=this.ref.current)if(e!==this.props.channel.id){var o=this.getElementFromMessageId(e);if(!this.isJumping()&&t&&null!=n&&!f.Z.useReducedMotion){var i=T.Z.extractTimestamp(e);i>n?this.scrollTo(0):this.scrollTo(Number.MAX_SAFE_INTEGER)}this.pinned=!1;this.jumping=!0;var a=function(){r.jumping=!1;(0,Y.k)(o)&&f.Z.keyboardModeEnabled&&o.focus({preventScroll:!0});r.scrollCounter=0;r.handleScroll();r._scrollCompleteCallbacks.forEach((function(e){
|
||
return e()}))};(0,Y.k)(o)?this.scrollTo(this.getOffsetOrientationFromNode(o,"middle",this.props.hasUnreads?this.newMessageBarBuffer():R.kQ),t,a):this.scrollToNewMessages(t,"middle",a)}else this.scrollTo(0)};t.getOffsetToTriggerLoading=function(e,t){var n=t.scrollHeight,r=t.offsetHeight,o=this.props,i=o.messages,a=o.hasUnreads,l=o.placeholderHeight;return"top"===e?i.hasMoreBefore?a?l-R.D4-2:l+500:0:i.hasMoreAfter?n-r-l-500:n-r};t.getOffsetToPreventLoading=function(e){var t=this.props.messages,n=0;"top"===e&&t.hasMoreBefore?n=2:"bottom"===e&&t.hasMoreAfter&&(n=-2);return this.getOffsetToTriggerLoading(e,this.getScrollerState())+n};t.getSnapshotBeforeUpdate=function(e){if(this.hasAnchor()||null!=e){var t=this.getScrollerState(),n=t.scrollTop,r=t.offsetHeight,o=t.scrollHeight;this.updateFocusAnchor(e,n,r);this.updateFetchAnchor(n,r,o);this.updateAutomaticAnchor(n)}};t.addAutomaticAnchorCallback=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]
|
||
;this._automaticAnchorCallbacks.push(e);this._automaticAnchorCallbacks=z().uniq(this._automaticAnchorCallbacks);!0===t&&this.setAutomaticAnchor(this.findAnchor())};t.removeAutomaticAnchorCallback=function(e){this._automaticAnchorCallbacks=z().without(this._automaticAnchorCallbacks,e)};t.addScrollCompleteCallback=function(e){this._scrollCompleteCallbacks.push(e);this._scrollCompleteCallbacks=z().uniq(this._scrollCompleteCallbacks)};t.removeScrollCompleteCallback=function(e){this._scrollCompleteCallbacks=z().without(this._scrollCompleteCallbacks,e)};t.cleanup=function(){var e=this;this.acking=!1;this.updateStoreDimensionsDebounced.cancel();this._automaticAnchorCallbacks.forEach((function(t){return e.removeAutomaticAnchorCallback(t)}));(0,q.jT)(this.props.channel.id,this.props.windowId)};return e}();var yr=n(730381),br=n.n(yr),vr=n(268319),mr=n(151650),gr=n(34225);function Or(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}
|
||
function Er(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Cr(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var jr=o.forwardRef((function(e,t){var n,o=e.className,i=e.isBeforeGroup,l=void 0!==i&&i,u=Cr(e,["className","isBeforeGroup"]),c=u.children;return(0,
|
||
r.jsx)(gr.Z,Er(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Or(e,t,n[t])}))}return e}({},u),{ref:t,role:"separator","aria-label":"string"==typeof c?c:void 0,className:a()(o,(n={},Or(n,on().divider,!0),Or(n,on().hasContent,null!=c),Or(n,on().beforeGroup,l),n))}))}));const Sr=o.memo(jr);var Ir=n(127661),_r=n(178392),wr=n.n(_r);function xr(e){var t=e.channel,n=e.count,o=e.showRedactedMessages;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Sr,{}),(0,r.jsxs)("div",{className:wr().redactedMessages,children:[(0,r.jsx)(Ir.Z,{className:wr().redactedMessageIcon}),(0,r.jsx)("div",{className:wr().redactedMessageText,children:Fe.Z.Messages.HIDDEN_SPAM_MESSAGE_COUNT.format({count:n})}),(0,r.jsx)(c.zxk,{size:c.zxk.Sizes.MIN,look:c.zxk.Looks.LINK,
|
||
color:c.zxk.Colors.LINK,onClick:function(){Tt.default.track(L.rMx.DM_SAFETY,{channel_id:t.id,channel_type:t.type,safety_prompt:"DMSpamExperiment",response:"show_redacted_messages"});o()},className:wr().showRedactedMessagesButton,children:Fe.Z.Messages.BLOCKED_MESSAGES_SHOW.format({count:n})})]})]})}var Pr=n(773011),Nr=n(1477),Ar=n(145202),Tr=n(289903),Zr=n(924308),Mr=n(725691),Rr=n(784686),Lr=n(382060),Dr=n(5544),kr=n(749565),Ur=n(864928),Br=n(48315),Fr=n(525008),Gr=n(132167),Hr=n(986923),Vr=n(190624),Wr=n(762423),zr=n(804185),Yr=n(211482),Kr=n(775173),qr=n(761953),Qr=n(424871);var Xr=n(771344);function Jr(e){var t,n,o=e.otherUserId,i=e.channel,a=e.buttonSize,l=void 0===a?c.PhG.TINY:a,s=e.className,f=e.buttonText,d=e.navigateAwayOnReportSuccess,p=void 0===d||d,h=e.onReportClick,y=e.onReportSubmit,b=e.onMouseEnter,v=e.onMouseLeave,m=(t=o,(n=(0,u.e7)([Ln.Z],(function(){return Ln.Z.getRelationshipType(t)}),[t]))===L.OGo.NONE||n===L.OGo.BLOCKED||n===L.OGo.PENDING_INCOMING),g=(0,
|
||
Xr.V)(i.id,o);if(!m||null==g)return null;var O=function(){null==y||y();qr.Z.closePrivateChannel(i.id,p)};return(0,r.jsx)(c.zxk,{className:s,size:l,color:c.zxk.Colors.RED,disabled:null==g,onClick:function(){null==h||h();(0,Qr.WL)(g,O)},onMouseEnter:b,onMouseLeave:v,children:null!=f?f:Fe.Z.Messages.REPORT_SPAM})}var $r=n(448898),eo=n(270395),to=n.n(eo),no=function(e){var t=e.userId,n=(0,u.e7)([Zr.Z],(function(){return Zr.Z.getMutualGuilds(t)}),[t]),i=o.useMemo((function(){return null!=n?n.slice(0,3).map((function(e,t){var o=e.guild,i=null!=o?Kr.ZP.getGuildIconURL({id:o.id,icon:o.icon,size:24}):null;if(null==i)return null;var a=t===(n.length>3?3:n.length)-1,l=(0,r.jsx)("img",{src:i,alt:"",className:to().avatar},t);return a?l:(0,r.jsx)(Yr.ZP,{className:to().avatarMask,mask:Yr.ZP.Masks.VOICE_USER_SUMMARY_ITEM,width:24,height:24,children:l},t)})).filter((function(e){return null!=e})):[]}),[n]);if(null==n||0===n.length)return(0,r.jsx)(c.xvT,{color:"header-secondary",variant:"text-sm/normal",
|
||
children:Fe.Z.Messages.NO_MUTUAL_GUILDS});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:to().avatarContainer,children:i}),(0,r.jsx)(c.P3F,{onClick:function(){(0,Wr.m)({userId:t,section:$r.oh.MUTUAL_GUILDS,analyticsLocation:{section:L.jXE.DIRECT_MESSAGE}})},children:(0,r.jsx)(c.xvT,{className:to().mutualGuilds,variant:"text-sm/normal",children:Fe.Z.Messages.USER_PROFILE_MUTUAL_GUILDS.format({count:n.length})})})]})},ro=function(e){var t,n=e.relationshipType,o=e.userId,i=e.showingBanner,a=null===(t=S.default.getUser(o))||void 0===t?void 0:t.bot,l=function(){Ur.Z.addRelationship({userId:o,context:{location:L.ZY5.DM_CHANNEL}})},u=(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,color:c.zxk.Colors.PRIMARY,onClick:function(){Ur.Z.addRelationship({userId:o,context:{location:L.ZY5.DM_CHANNEL},type:L.OGo.BLOCKED})},children:Fe.Z.Messages.BLOCK});switch(n){case L.OGo.NONE:return(0,r.jsxs)(r.Fragment,{children:[!a&&!i&&(0,r.jsx)(c.zxk,{className:to().action,
|
||
size:c.zxk.Sizes.TINY,onClick:l,children:Fe.Z.Messages.ADD_FRIEND}),u]});case L.OGo.FRIEND:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,onClick:function(){Ur.Z.removeFriend(o,{location:L.ZY5.DM_CHANNEL})},color:c.zxk.Colors.PRIMARY,children:Fe.Z.Messages.REMOVE_FRIEND}),u]});case L.OGo.BLOCKED:return(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,onClick:function(){Ur.Z.unblockUser(o,{location:L.ZY5.DM_CHANNEL})},color:c.zxk.Colors.PRIMARY,children:Fe.Z.Messages.UNBLOCK});case L.OGo.PENDING_INCOMING:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.xvT,{className:to().action,color:"header-secondary",variant:"text-sm/normal",children:Fe.Z.Messages.FRIEND_REQUEST_RECEIVED}),(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,onClick:l,children:Fe.Z.Messages.FRIEND_REQUEST_ACCEPT}),(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,color:c.zxk.Colors.PRIMARY,onClick:function(){
|
||
Ur.Z.cancelFriendRequest(o,{location:L.ZY5.DM_CHANNEL})},children:Fe.Z.Messages.FRIEND_REQUEST_IGNORE}),u]});case L.OGo.PENDING_OUTGOING:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,disabled:!0,children:Fe.Z.Messages.ADD_FRIEND_BUTTON_AFTER}),u]});default:return null}},oo=function(e){var t=e.channelId,n=e.otherUserId,i=o.useCallback((function(){(0,c.CFj)((0,c.Yz2)(Fe.Z.Messages.MESSAGE_REQUESTS_SPAM_REQUEST_ERROR_ALERT_TITLE,c.pCN.FAILURE))}),[]),a=o.useCallback((function(){Vr.Z.closeChannelSidebar(zr.uZ)}),[]),l=o.useCallback((function(){Vr.Z.closeChannelSidebar(zr.uZ)}),[]),u=(0,Fr.m)({user:S.default.getUser(n),onError:i,onAcceptSuccess:l,onRejectSuccess:a}),s=u.acceptMessageRequest,f=u.rejectMessageRequest,d=u.isAcceptLoading,p=u.isRejectLoading,h=u.isOptimisticAccepted,y=u.isOptimisticRejected,b=d||p||(h||y);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,onClick:function(){
|
||
return s(t)},disabled:b,submitting:d,children:Fe.Z.Messages.MESSAGE_REQUEST_ACCEPT}),(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,onClick:function(){return f(t)},color:c.zxk.Colors.PRIMARY,disabled:b,submitting:p,children:Fe.Z.Messages.MESSAGE_REQUEST_IGNORE})]})};const io=function(e){var t=e.userId,n=e.channel,o=e.showingBanner,i=(0,Gr._)().channelId,a=(0,u.e7)([Br.Z],(function(){return null!=i&&Br.Z.isSpam(i)}),[i]),l=(0,u.e7)([Ln.Z],(function(){return Ln.Z.getRelationshipType(t)}),[t]),c=n.id===i;return a||c?(0,r.jsxs)("div",{className:to().mobileContainer,children:[(0,r.jsx)("div",{className:to().mobileMutualGuilds,children:(0,r.jsx)(no,{userId:t})}),(0,r.jsxs)("div",{className:to().mobileButtons,children:[(0,r.jsx)(oo,{channelId:n.id,otherUserId:t}),(0,r.jsx)(Hr.Z,{channel:n})]})]}):!0===Je.tq||c?(0,r.jsxs)("div",{className:to().mobileContainer,children:[(0,r.jsx)("div",{className:to().mobileMutualGuilds,children:(0,r.jsx)(no,{userId:t})}),(0,r.jsxs)("div",{
|
||
className:to().mobileButtons,children:[(0,r.jsx)(ro,{relationshipType:l,userId:t,showingBanner:o}),!o&&(0,r.jsx)(Jr,{otherUserId:t,channel:n,navigateAwayOnReportSuccess:!1})]})]}):(0,r.jsxs)("div",{className:to().container,children:[(0,r.jsx)(no,{userId:t}),(0,r.jsx)("div",{className:to().divider}),(0,r.jsx)(ro,{relationshipType:l,userId:t,showingBanner:o}),!o&&(0,r.jsx)(Jr,{otherUserId:t,channel:n})]})};var ao=n(955521),lo=n(469023),uo=n(358969),co=n(572615),so=n(727081),fo=n(319794),po=n.n(fo);function ho(e){var t=e.appliedTags,n=e.setAppliedTags,o=null!=n?function(e){if(t.has(e)){t.delete(e);n(new Set(t))}}:void 0;return(0,r.jsx)("div",{className:po().tags,children:Array.from(t).map((function(e){return(0,r.jsx)(so.ZP,{tag:e,onRemove:o,size:null==o?so.ZP.Sizes.SMALL:so.ZP.Sizes.MEDIUM},e.id)}))})}var yo=n(143901),bo=n(229261),vo=n.n(bo);function mo(e){var t,n=e.channel,i=(0,uo.eV)(n),a=(0,u.cj)([co.Z],(function(){return co.Z.getMessage(n.id)})).firstMessage,l=o.useMemo((function(){
|
||
return new Set(i)}),[i]),s=null!==(t=(0,lo.Z)(n))&&void 0!==t?t:yo.Z;return(0,r.jsxs)(ao.ZP,{channelId:n.id,className:vo().container,children:[(0,r.jsx)("div",{className:vo().iconWrapper,children:(0,r.jsx)(s,{className:vo().icon,strokeWidth:1.75})}),(0,r.jsx)(ao.Ot,{className:vo().header,children:n.name}),null==a&&(0,r.jsx)(c.xvT,{variant:"text-md/normal",color:"header-secondary",children:Fe.Z.Messages.REPLY_QUOTE_MESSAGE_DELETED}),(0,r.jsx)(ho,{appliedTags:l})]})}var go=n(621647);function Oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Eo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){
|
||
if(!e)return;if("string"==typeof e)return Oo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Co(e){var t,n=e.channel,i=e.children,a=Eo(o.useState(!1),2),l=a[0],u=a[1],s=null!==(t=(0,Pr.ZP)(n))&&void 0!==t?t:"";return(0,r.jsxs)(ao.ZP,{channelId:n.id,onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)},children:[(0,r.jsx)(c.qEK,{"aria-label":s,size:c.EFr.SIZE_80,src:(0,go.x)(n,80,l)}),(0,r.jsx)(ao.Ot,{children:s}),(0,r.jsx)(ao.jz,{children:i})]})}
|
||
var jo=n(940060),So=n(547308),Io=n(87127),_o=n(73904),wo=n(689329),xo=n(703790),Po=n(883064),No=n(363582),Ao=n(189865),To=n(566500),Zo=n(534204),Mo=n.n(Zo);function Ro(e){var t,n=e.className,o=e.children,i=e.verified,l=e.roleColor,u=e.roleName;t=i?(0,r.jsx)(To.Z,{size:12,color:l,className:Mo().linkedRoleColor}):(0,r.jsx)("div",{className:Mo().roleColor,style:{backgroundColor:l}});return(0,r.jsxs)("div",{className:a()(n,Mo().role),children:[t,u,o]})}var Lo=n(166030),Do=n.n(Lo);function ko(e){var t=e.className,n=e.roleColor,o=e.roleName,i=e.hasRemoveIcon,l=void 0!==i&&i,u=e.onClick,s=e.disabled,f=void 0!==s&&s,d=e.verified,p=void 0!==d&&d;return(0,r.jsx)(c.zxk,{className:a()(t,Do().button),look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.NONE,onClick:u,disabled:f,children:(0,r.jsx)(Ro,{className:Do().role,roleColor:n,roleName:o,verified:p,children:l&&(0,r.jsx)(Ao.Z,{height:6,width:6,className:Do().removeRole,foreground:Do().removeRoleIcon})})})}
|
||
var Uo=n(563135),Bo=n(107364),Fo=n(475806),Go=n.n(Fo);function Ho(e){var t=e.icon,n=e.onClick,o=e.label;return(0,r.jsx)(c.zxk,{look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.MIN,className:Go().button,onClick:n,children:(0,r.jsxs)(Bo.Z,{align:Bo.Z.Align.CENTER,children:[(0,r.jsx)("div",{className:Go().buttonIcon,children:t}),(0,r.jsx)(c.xvT,{variant:"text-md/normal",color:"none",children:o})]})})}var Vo=n(940405),Wo=n(285475),zo=n.n(Wo);function Yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ko(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function qo(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}
|
||
return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Qo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
function Xo(e){var t=e.channel,n=function(){Io.ZP.open(t.id)},i=Qo(o.useState(!1),2),l=i[0],s=i[1],f=(0,Pr.ZP)(t,!0),d=(0,u.e7)([dt.Z],(function(){return dt.Z.getGuild(t.guild_id)})),p=(0,u.e7)([S.default],(function(){return S.default.getUser(null==d?void 0:d.ownerId)})),h=o.useMemo((function(){return null!=d?z()(d.roles).sortBy((function(e){return-e.position})).filter((function(e){return e.id!==d.id})).value():[]}),[d]),y=o.useMemo((function(){return z()(h).filter((function(e){if(null==d)return!1;var n=Uo.ZP.computePermissionsForRoles({forceRoles:Ko({},e.id,e),context:t});return jo.Z.has(n,L.Plq.ADMINISTRATOR)||jo.Z.has(n,L.Plq.VIEW_CHANNEL)})).value()}),[t,d,h]),b=(0,u.Wu)([S.default],(function(){var e={};null!=p&&(e[p.id]=p);var n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(t.permissionOverwrites)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value;if(l.type===_o.BN.MEMBER&&null==e[l.id]){var u=S.default.getUser(l.id);null!=u&&(e[u.id]=u)}}}catch(e){r=!0;o=e}finally{
|
||
try{n||null==a.return||a.return()}finally{if(r)throw o}}return z()(e).filter((function(e){var n,r=Uo.ZP.can({permission:L.Plq.ADMINISTRATOR,user:e,context:t}),o=null!==(n=t.permissionOverwrites[e.id])&&void 0!==n?n:Uo.ZP.NONE,i=jo.Z.has(o.allow,L.Plq.VIEW_CHANNEL);return r||i})).value()}),[t,p]),v=E.Z.can(L.Plq.MANAGE_CHANNELS,t)||E.Z.can(L.Plq.MANAGE_ROLES,t),m=o.useCallback((function(){return s(!1)}),[]);return(0,r.jsxs)(ao.ZP,{channelId:t.id,children:[(0,r.jsx)(ao.Kq,{locked:!0,channelType:t.type}),(0,r.jsx)(ao.Ot,{children:Fe.Z.Messages.BEGINNING_CHANNEL_WELCOME.format({channelName:f})}),(0,r.jsx)(ao.jz,{children:Fe.Z.Messages.BEGINNING_ROLE_REQUIRED_CHANNEL_DESCRIPTION.format({channelName:f,topicHook:function(){return Po.Z.parseTopic(t.topic,!0,{channelId:t.id})}})}),v?(0,r.jsxs)("div",{className:zo().channelSettingButtons,children:[(0,r.jsx)(Ho,{label:Fe.Z.Messages.CHANNEL_PERMISSIONS_ADD_MEMBERS_TITLE,onClick:function(){return s(!0)},icon:(0,r.jsx)(No.Z,{width:16,height:16})
|
||
}),(0,r.jsx)(Ho,{label:Fe.Z.Messages.EDIT_CHANNEL,onClick:n,icon:(0,r.jsx)(It.Z,{width:16,height:16})})]}):null,(0,r.jsxs)("div",{className:zo().members,children:[function(){if(1!==b.length||y.length>0)return(0,r.jsx)(Vo.Z,{guildId:t.guild_id,className:zo().avatars,maxUsers:5,users:b});var e=b[0],n=kr.ZP.getName(e);return(0,r.jsxs)("div",{className:zo().avatars,children:[(0,r.jsx)(c.qEK,{src:e.getAvatarURL(t.guild_id,24),"aria-label":n,size:c.EFr.SIZE_24}),(0,r.jsx)(c.xvT,{tag:"span",className:zo().singleUserName,variant:"text-md/normal",children:n})," ",(0,r.jsx)(c.xvT,{tag:"span",variant:"text-md/normal",color:"text-muted",children:Fe.Z.Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE})]})}(),y.map((function(e,n){var o,i,l=null!==(i=e.colorString)&&void 0!==i?i:(0,So.Rf)(L.p6O),u=void 0!==(null===(o=e.tags)||void 0===o?void 0:o.guild_connections);return v?(0,r.jsx)(ko,{className:a()(zo().role,Ko({},zo().last,n===y.length-1)),roleName:e.name,roleColor:l,disabled:!v,verified:u,
|
||
onClick:function(){xo.Z.open(t.guild_id,L.pNK.MEMBERS);xo.Z.selectRole(e.id)}},e.id):(0,r.jsx)(Ro,{className:a()(zo().role,Ko({},zo().last,n===y.length-1)),roleName:e.name,roleColor:l,verified:u},e.id)}))]}),l?(0,r.jsx)(c.u_l,{renderModal:function(e){return(0,r.jsx)(wo.default,qo(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ko(e,t,n[t])}))}return e}({},e),{onClose:function(){m();return e.onClose()},channelId:t.id}))},onCloseRequest:function(){return s(!1)}}):null]})}var Jo=n(859917),$o=n(128181),ei=n(198113),ti=n.n(ei),ni=n(558504),ri=n.n(ni),oi=function(){return(0,r.jsx)("svg",{width:"46",height:"34",viewBox:"0 0 46 34",className:ti().chatBubbleLip,xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{
|
||
d:"M0 33.4637C16.1697 28.954 21.1764 9.59155 19.2146 0L45.681 0.000148089C45.681 0.000148089 44.681 9.14498 40.1914 18.3023C34.4077 30.0996 6.2893 33.1232 0 33.4637Z"})})};function ii(e){var t,n=e.channel,o=null!==(t=(0,Pr.ZP)(n))&&void 0!==t?t:"";return(0,r.jsxs)("div",{id:(0,H.p)(n.id,n.id),className:ti().headerContainer,children:[(0,r.jsx)("img",{src:ri(),className:ti().wumpusImage,alt:""}),(0,r.jsxs)("div",{className:ti().chatBubbleContainer,children:[(0,r.jsx)(oi,{}),(0,r.jsxs)("div",{className:ti().chatBubble,children:[(0,r.jsx)(c.qEK,{"aria-label":o,size:c.EFr.SIZE_80,src:(0,go.x)(n,80,!1)}),(0,r.jsxs)(ao.Ot,{className:ti().emptyMessageHeader,children:[o,(0,r.jsx)(Jo.Z,{className:ti().flowerStar,size:24,children:(0,r.jsx)($o.Z,{className:ti().verified,width:24,height:24})})]}),(0,r.jsx)(ao.jz,{children:Fe.Z.Messages.SYSTEM_DM_EMPTY_MESSAGE})]})]})]})}var ai=n(500763),li=n.n(ai);function ui(e){var t=e.channel,n=(0,Pr.ZP)(t,!0),o=(0,u.e7)([E.Z],(function(){
|
||
return E.Z.can(L.Plq.MANAGE_CHANNELS,t)&&Lr.dF.has(t.type)}));return(0,r.jsxs)(ao.ZP,{channelId:t.id,children:[(0,r.jsx)(ao.Kq,{channelType:t.type}),(0,r.jsx)(ao.Ot,{children:Fe.Z.Messages.BEGINNING_CHANNEL_WELCOME.format({channelName:n})}),(0,r.jsx)(ao.jz,{children:Fe.Z.Messages.BEGINNING_CHANNEL_DESCRIPTION.format({channelName:n,topicHook:function(){return Po.Z.parseTopic(t.topic,!0,{channelId:t.id})}})}),o?(0,r.jsx)("div",{className:li().buttonContainer,children:(0,r.jsx)(Ho,{label:Fe.Z.Messages.EDIT_CHANNEL,onClick:function(){Io.ZP.open(t.id)},icon:(0,r.jsx)(It.Z,{width:16,height:16})})}):null]})}var ci=n(971402),si=n(183640),fi=n(21372),di=n(500360),pi=n.n(di);function hi(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function yi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){hi(i,r,o,a,l,"next",e)}function l(e){hi(i,r,o,a,l,"throw",e)}a(void 0)}))}}
|
||
function bi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function vi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){bi(e,t,n[t])}))}return e}function mi(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var gi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]
|
||
},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Oi(e){
|
||
var t,o,i=e.userId,l=e.channel,s=function(e){if(null==f)return null;(0,ci.jW)(e,yi((function(){var e,t;return gi(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(78294)]).then(n.bind(n,478294))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,mi(vi({},e),{user:f,guildId:l.guild_id,channel:l}))}]}}))})))},f=(0,u.e7)([S.default],(function(){return S.default.getUser(i)})),d=(0,u.e7)([fi.ZP],(function(){return null!=i?fi.ZP.getMember(l.guild_id,i):null})),p=null!==(o=null!==(t=null==d?void 0:d.nick)&&void 0!==t?t:kr.ZP.getName(f))&&void 0!==o?o:"???",h=null==d?void 0:d.colorString;return null==f?(0,r.jsx)("span",{className:a()(pi().threadCreatorName,pi().unknownCreatorName),children:p}):(0,r.jsx)(c.yRy,{preload:function(){return(0,Mr.Z)(f.id,f.getAvatarURL(l.guild_id,80),{guildId:l.guild_id,channelId:l.id})},renderPopout:function(e){return(0,r.jsx)(si.Z,vi({userId:f.id,guildId:l.guild_id,channelId:l.id},e))},position:"right",
|
||
children:function(e){return(0,r.jsx)(c.P3F,mi(vi({},e),{tag:"span",className:pi().threadCreatorName,onContextMenu:s,children:(0,r.jsx)(c.PUh,{name:p,color:null!=h?h:void 0})}))}})}function Ei(e){var t=e.channel;return null==t.threadMetadata?(0,r.jsx)("div",{style:{marginTop:-8}}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.xvT,{variant:"text-md/normal",color:"header-secondary",children:(0,r.jsx)("div",{className:pi().subtitle,children:Fe.Z.Messages.THREAD_STARTED_BY.format({usernameHook:function(e,n){return(0,r.jsx)(Oi,{userId:t.ownerId,channel:t},n)}})})}),t.type===L.d4z.PRIVATE_THREAD?(0,r.jsx)(c.xvT,{variant:"text-md/normal",color:"header-secondary",children:Fe.Z.Messages.EMPTY_MESSAGE_PRIVATE_THREAD_INSTRUCTIONS}):null]})}function Ci(e){var t,n=e.channel,o=null!==(t=(0,lo.Z)(n))&&void 0!==t?t:Pt.Z;return(0,r.jsxs)(ao.ZP,{channelId:n.id,children:[(0,r.jsx)("div",{className:pi().iconWrapper,children:(0,r.jsx)(o,{className:pi().icon})}),(0,r.jsx)(ao.Ot,{children:n.name}),(0,
|
||
r.jsx)(Ei,{channel:n})]})}var ji=n(672886),Si=n(518280),Ii=n.n(Si);function _i(e){var t=e.canManageRoles,n=e.channel,o=t&&(0,Nr.Yk)(n),i=(0,u.e7)([Dr.ZP],(function(){return null!=n.guild_id&&n===Dr.ZP.getDefaultChannel(n.guild_id)}),[n]);return(0,Ar.Z)(n.id)?null:n.isForumPost()?(0,r.jsx)(mo,{channel:n}):Lr.Ec.has(n.type)?(0,r.jsx)(Ci,{channel:n}):i?(0,r.jsx)(ji.Z,{channel:n}):o?(0,r.jsx)(Xo,{channel:n}):(0,r.jsx)(ui,{channel:n})}function wi(e){var t,n=e.channel,i=e.showingBanner,a=(0,Pr.ZP)(n),l=(0,Rr.rW)(),s=n.type,f=(0,u.e7)([S.default],(function(){return n.isPrivate()?S.default.getUser(n.getRecipientId()):null})),d=(0,u.cj)([E.Z],(function(){return{canManageRoles:E.Z.can(L.Plq.MANAGE_ROLES,n),canReadMessageHistory:E.Z.can(L.Plq.READ_MESSAGE_HISTORY,n)}})),p=d.canManageRoles,h=d.canReadMessageHistory,y=(0,u.e7)([Zr.Z],(function(){return s===L.d4z.DM?Zr.Z.getMutualGuilds(n.getRecipientId()):null}),[n,s]),b=Tr.Z.useExperiment({},{
|
||
autoTrackExposure:null!==(t=n.isSystemDM())&&void 0!==t&&t}).systemDMRedesignEnabled;o.useEffect((function(){s===L.d4z.DM&&null==y&&null!=f&&Re.Z.wait((function(){return(0,Mr.Z)(n.getRecipientId(),f.getAvatarURL(null,80),{withMutualGuilds:!0})}))}),[y,s,n,f]);return n.isSystemDM()?b?(0,r.jsx)(ii,{channel:n}):(0,r.jsx)(Co,{channel:n,children:Fe.Z.Messages.SYSTEM_DM_EMPTY_MESSAGE}):s===L.d4z.DM?(0,r.jsxs)(Co,{channel:n,children:[l&&null!=f&&(0,r.jsxs)(c.X6q,{variant:"heading-xl/medium",className:Ii().marginBottom20,children:["@",kr.ZP.getUserTag(f,{decoration:"never"})]}),Fe.Z.Messages.BEGINNING_DM.format({username:a}),(0,r.jsx)(io,{userId:n.getRecipientId(),channel:n,showingBanner:i})]}):n.isMultiUserDM()?n.isManaged()?(0,r.jsxs)(ao.ZP,{channelId:n.id,children:[(0,r.jsx)(ao.Ot,{children:Fe.Z.Messages.BEGINNING_CHANNEL_WELCOME.format({channelName:a})}),(0,r.jsx)(ao.jz,{children:Fe.Z.Messages.BEGINNING_GROUP_DM_MANAGED})]}):(0,r.jsx)(Co,{channel:n,
|
||
children:Fe.Z.Messages.BEGINNING_GROUP_DM.format({name:a})}):h?(0,r.jsx)(_i,{channel:n,canManageRoles:p}):(0,r.jsx)(ao.ZP,{channelId:n.id,children:(0,r.jsx)(ao.jz,{children:Fe.Z.Messages.BEGINNING_CHANNEL_NO_HISTORY.format({channelName:a})})})}var xi=n(482507),Pi=n(677681),Ni=n(898302),Ai=n(841150),Ti=n(30778),Zi=n(103295),Mi=n(776009),Ri=n(941463),Li=n.n(Ri),Di=function(){return n.e(61029).then(n.t.bind(n,640002,19)).then((function(e){return e.default}))};function ki(e){var t=e.channel,n=e.isLastItem,o=(0,u.e7)([f.Z],(function(){return f.Z.useReducedMotion})),i=(0,u.e7)([E.Z],(function(){return E.Z.can(L.Plq.SEND_MESSAGES_IN_THREADS,t)})),a=(0,Ce.Gu)(t),l=(0,u.e7)([v.default],(function(){return v.default.getId()}));return n?i&&!a&&t.ownerId!==l?(0,r.jsxs)("div",{className:Li().box,children:[(0,r.jsx)(Mi.Z,{importData:Di,shouldAnimate:!o,className:Li().animation}),(0,r.jsxs)("div",{className:Li().textContainer,children:[(0,r.jsx)(c.X6q,{variant:"heading-md/semibold",
|
||
children:Fe.Z.Messages.FORUM_START_THE_CONVERSATION_HEADER}),(0,r.jsx)(c.xvT,{variant:"text-sm/normal",color:"header-secondary",children:Fe.Z.Messages.FORUM_START_THE_CONVERSATION_DESCRIPTION})]})]}):null:(0,r.jsx)("div",{className:Li().divider})}const Ui=o.memo(ki);var Bi=n(652900),Fi=n(995073),Gi=n(487685),Hi=n(671293),Vi=n(312682),Wi=n(621329),zi=n(176758),Yi=n(234798),Ki=n(854602),qi=n(883069),Qi=n(91655),Xi=n.n(Qi),Ji=n(11783),$i=n.n(Ji);function ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ta(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function na(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ta(e,t,n[t])}))}
|
||
return e}function ra(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function oa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ea(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
|
||
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ea(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ia=16;function aa(e){var t=e.postId,n=e.isFirstMessage,i=e.isLastItem,l=void 0!==i&&i,s=e.parentChannelId,f=(0,Pi.Z)(),d=f.ref,p=f.width,h=oa(o.useState(3),2),y=h[0],b=h[1],v=oa(o.useState(!n),2),m=v[0],g=v[1],O=oa((0,Ni.Z)(!1,2e3),2),E=O[0],C=O[1],j=(0,u.e7)([ce.Z],(function(){return ce.Z.getChannel(t)}),[t]),S=(0,Yi.cl)(j).firstMessage,I=(0,u.e7)([Gi.Z],(function(){return Gi.Z.hasJoined(t)})),_=(0,Ti.Z)(j),w=_.disableReactionUpdates,x=_.disableReactionCreates,P=_.isLurking,N=_.isPendingMember,A=(0,qi.xz)(null==j?void 0:j.guild_id),T=(0,u.e7)([ce.Z],(function(){return ce.Z.getChannel(s)})),Z=(0,
|
||
uo.Bs)(T),M=o.useCallback((function(e){var t=e[0];if(null!=t&&n){var r=t.intersectionRect,o=t.boundingClientRect,i=(r.bottom-r.top)/(o.bottom-o.top);g(i<1)}}),[n]);o.useLayoutEffect((function(){var e=d.current;if(null!=e&&n){var t=new IntersectionObserver(M,{threshold:1});t.observe(e);return function(){t.disconnect()}}}));var R=oa(o.useState(!0),2),D=R[0],k=R[1];o.useEffect((function(){if(null!=p){var e=Math.floor((p-280)/58);b(e);k(!1)}}),[p]);var U=(0,et.Qd)(null==j?void 0:j.guild_id),B=U.enabled,F=U.hasTabUI,G=(0,u.e7)([Rt.Z],(function(){return Rt.Z.remainingBurstCurrency}));if(null==j||null==S)return null;var H=S.reactions.length>0,V=function(){I?Hi.Z.leaveThread(j,"Forum Toolbar"):Hi.Z.joinThread(j,"Forum Toolbar")},W=function(){(0,Ki.B)({postId:j.id,location:{section:L.jXE.CHANNEL_HEADER}});(0,xi.J)((0,zi.wR)(j.guild_id,t));C(!0)},z=I?Wi.Z:Vi.Z,Y=!H&&!x;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:a()(Xi().container,ta({},Xi().header,m)),ref:d,children:[(0,
|
||
r.jsxs)("div",{className:a()(Xi().reactButtons,ta({},Xi().loading,D)),children:[Y&&null!=Z&&(0,r.jsx)("div",{className:$i().reactions,children:(0,r.jsx)(Fi.le,{message:S,readOnly:!1,useChatFontScaling:!1,isLurking:P,isPendingMember:N,emoji:Z,type:Ai.O.NORMAL,hideCount:!0,count:0,me:!1,burst_count:0,burst_me:!1})}),(0,r.jsx)(Bi.Z,{message:S,channel:j,disableReactionCreates:!A||x,disableReactionUpdates:w,isLurking:P,isPendingMember:N,maxReactions:y,className:Xi().reactions,useChatFontScaling:!1,isForumToolbar:!0,forceHideReactionCreates:!0}),!x&&(0,r.jsx)(Zi.X,{type:Ai.O.NORMAL,message:S,channel:j,useChatFontScaling:!1,className:Xi().addReactButton,isForumToolbar:!0,children:!H&&Fe.Z.Messages.FORUM_REACT_TO_POST}),!x&&B&&!F&&(0,r.jsx)(Zi.X,{type:Ai.O.BURST,remainingBurstCurrency:G,message:S,channel:j,useChatFontScaling:!1,isForumToolbar:!0,className:Xi().addReactButton})]}),(0,r.jsxs)("div",{className:Xi().buttons,children:[(0,r.jsx)(c.ua7,{text:Fe.Z.Messages.FORUM_FOLLOW_TOOLTIP,
|
||
children:function(e){return(0,r.jsxs)(c.zxk,ra(na({},e),{look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.SMALL,onClick:V,className:Xi().button,innerClassName:a()(Xi().buttonInner,ta({},Xi().active,I)),children:[(0,r.jsx)(z,{width:ia,height:ia}),I?Fe.Z.Messages.FORUM_FOLLOWING_POST:Fe.Z.Messages.FOLLOW]}))}}),(0,r.jsx)(c.ua7,{text:Fe.Z.Messages.COPY_LINK,children:function(e){return(0,r.jsxs)(c.zxk,ra(na({},e),{look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.SMALL,onClick:W,className:Xi().button,innerClassName:Xi().buttonInner,children:[E?(0,r.jsx)(Wi.Z,{width:ia,height:ia}):(0,r.jsx)(gt.Z,{width:ia,height:ia}),E?Fe.Z.Messages.COPIED:null]}))}})]})]}),(0,r.jsx)(Ui,{channel:j,isLastItem:l})]})}var la=n(451458),ua=n(4798),ca=n(715107),sa=n(84977),fa=n(321705),da=n(715919),pa=n(487868),ha=n(732827),ya=n(326763),ba=n.n(ya);function va(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ma(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,
|
||
configurable:!0,writable:!0}):e[t]=n;return e}function ga(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return va(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return va(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oa(e){
|
||
var t=e.expanded,n=e.onClick,o=e.count,i=e.compact,a=e.collapsedReason;return(0,r.jsx)(se.Z,{compact:i,role:"group",childrenMessageContent:(0,r.jsx)(ha.Z,{compact:i,className:ba().blockedSystemMessage,iconNode:(0,r.jsx)(Ao.Z,{className:ba().blockedIcon}),children:(0,r.jsxs)("div",{className:ba().blockedMessageText,children:[a.format({count:o})," —"," ",(0,r.jsx)(c.P3F,{tag:"span",onClick:n,className:ba().blockedAction,children:t?Fe.Z.Messages.BLOCKED_MESSAGES_HIDE.format({count:o}):Fe.Z.Messages.BLOCKED_MESSAGES_SHOW.format({count:o})})]})})})}function Ea(e){var t,n,i=e.messages,l=e.channel,u=e.compact,c=void 0!==u&&u,s=e.unreadId,f=e.collapsedReason,d=i.hasJumpTarget,p=void 0!==d&&d,h=ga(o.useState(p),2),y=h[0],b=h[1],v=o.useCallback((function(){return b((function(e){return!e}))}),[]),m=i.hasUnread?i.content.length-1:i.content.length;return(0,r.jsxs)("div",{className:a()((n={},ma(n,on().groupStart,!0),ma(n,ba().expanded,y),n)),
|
||
children:[!i.hasUnread||y&&(null===(t=i.content[0])||void 0===t?void 0:t.type)!==L.ys_.DIVIDER?null:(0,r.jsx)(Sr,{isUnread:!0,id:s},"divider"),(0,r.jsx)(Oa,{count:m,compact:c,expanded:y,onClick:v,collapsedReason:f},"collapsed-message-item"),y?i.content.map((function(e,t){if(e.type===L.ys_.DIVIDER&&t>0){var n,o,a=null!==(o=null===(n=i.content[t+1])||void 0===n?void 0:n.isGroupStart)&&void 0!==o&&o;return(0,r.jsx)(Sr,{isUnread:!0,isBeforeGroup:a,id:s},"divider")}if(e.type===L.ys_.MESSAGE||e.type===L.ys_.THREAD_STARTER_MESSAGE){var u=e.type===L.ys_.THREAD_STARTER_MESSAGE?nr:or;return(0,r.jsx)(u,{className:ba().blocked,compact:c,channel:l,message:e.content,groupId:e.groupId,flashKey:e.flashKey,isLastItem:!1,isHighlight:!1,renderContentOnly:!1},e.content.id)}})):null]})}const Ca=o.memo(Ea);var ja=n(989824),Sa=n(853158),Ia=n(396043),_a=n(327566),wa=n(321568),xa=n(633878);function Pa(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}
|
||
function Na(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Aa(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ta(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=Aa(e,["width","height","color"]);return(0,
|
||
r.jsxs)("svg",Na(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Pa(e,t,n[t])}))}return e}({},(0,xa.Z)(u)),{width:n,height:i,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.825 10L10 13.8167L6.175 10L5 11.175L10 16.175L15 11.175L13.825 10Z",fill:l}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.825 5L10 8.81667L6.175 5L5 6.175L10 11.175L15 6.175L13.825 5Z",fill:l})]}))}var Za=n(377463);function Ma(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ra(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function La(e){
|
||
for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ra(e,t,n[t])}))}return e}function Da(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ka(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{
|
||
for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ma(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ma(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ua=n(15726),Ba=n.n(Ua);function Fa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ga(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){
|
||
var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Fa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fa(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ha(e){var t=e.numHighlights,n=e.visible,i=e.disableAnimation,a=e.navigateToNextHighlight,l=e.isLoading,u=e.channelId,s=(0,ja.Z)((function(){return new Sa.Z.Value(0)})),f=(0,ja.Z)((function(){return new Sa.Z.Value(0)})),d=(0,ja.Z)((function(){return new Sa.Z.Value(0)
|
||
})),p=o.useRef(null),h=Ga(o.useState(200),2),y=h[0],b=h[1],v=o.useRef(null),m=Ga(o.useState("inherit"),2),g=m[0],O=m[1],E=Ga(o.useState(!1),2),C=E[0],j=E[1];o.useEffect((function(){t>1&&j(!0)}),[u,t]);var S=o.useCallback((function(){a();d.setValue(0)}),[d,a]);o.useLayoutEffect((function(){var e=p.current;null!=e&&b(e.clientWidth)}),[p,b]);o.useEffect((function(){null!=v.current&&O(v.current.clientWidth+1)}),[v,O,u]);o.useEffect((function(){n?Sa.Z.parallel([Sa.Z.timing(s,{toValue:1,duration:C?500:0}),Sa.Z.timing(f,{toValue:1,duration:C?500:0})]).start():Sa.Z.parallel([Sa.Z.timing(s,{toValue:0,duration:300,delay:500}),Sa.Z.timing(f,{toValue:0,duration:100,delay:500})]).start()}),[s,f,n]);o.useEffect((function(){t>0&&!l&&Sa.Z.timing(d,{toValue:1,duration:C?300:0}).start()}),[d,t,l]);var I=n?1:0,_=n?0:-y;return C?(0,r.jsx)("div",{children:(0,r.jsx)(Sa.Z.div,{style:{opacity:i?I:f,marginLeft:i?_:s.interpolate({inputRange:[0,1],outputRange:[-y,0]})},children:(0,r.jsx)(c.P3F,{
|
||
"aria-label":Fe.Z.Messages.CHANNEL_HIGHLIGHT_NAVIGATOR_NEXT,className:Ba().navigator,onClick:S,children:(0,r.jsxs)("div",{className:Ba().highlightsCountContainer,ref:p,children:[l?(0,r.jsx)(c.$jN,{type:c.$jN.Type.SPINNING_CIRCLE,className:Ba().spinner}):(0,r.jsx)(oe.Z,{className:Ba().highlightIcon,width:16,height:16}),(0,r.jsx)("div",{className:Ba().rollingText,children:(0,r.jsx)(Sa.Z.div,{style:{marginTop:i?-18:d.interpolate({inputRange:[0,1],outputRange:[0,-18]})},children:(0,r.jsxs)("div",{ref:v,style:{width:g},children:[(0,r.jsx)(c.xvT,{className:Ba().oldText,variant:"text-sm/medium",children:Fe.Z.Messages.CHANNEL_HIGHLIGHTS_COUNT.format({count:t+1})}),(0,r.jsx)(c.xvT,{className:Ba().newText,variant:"text-sm/medium",children:Fe.Z.Messages.CHANNEL_HIGHLIGHTS_COUNT.format({count:Math.max(t,1)})})]})})}),(0,r.jsx)("div",{className:Ba().button,children:(0,r.jsx)(Za.Z,{className:Ba().icon})})]})})})}):null}function Va(e){
|
||
var t=e.guildId,n=e.channelId,r=e.highlightedMessageIds,i=e.setNumHighlightsVisited,a=e.messages,l=e.scrollManager,u=Ga(o.useState(null),2),c=u[0],s=u[1],f=Ga(o.useState(null),2),d=f[0],p=f[1],h=o.useCallback((function(e,t){var n,r;s(null!==(n=null==e?void 0:e.id)&&void 0!==n?n:null);p(null!==(r=null==t?void 0:t.id)&&void 0!==r?r:null)}),[s,p]);o.useEffect((function(){l.addAutomaticAnchorCallback(h);return function(){l.removeAutomaticAnchorCallback(h)}}),[l,h]);var y=null;if(null!=c&&null!=d){var b,v,m=a.indexOf(c),g=a.indexOf(d);y=null!==(v=null===(b=a.getByIndex(m+Math.floor(g-m)))||void 0===b?void 0:b.id)&&void 0!==v?v:null}!function(e){var t=e.guildId,n=e.channelId,r=e.highlightedMessageIds,i=e.setNumHighlightsVisited,a=e.topVisibleMessage,l=e.middleVisibleMessage,u=ka(o.useState(!1),2),c=u[0],s=u[1],f=ka(o.useState(!1),2),d=f[0],p=f[1];o.useEffect((function(){d||null==a||null==l||p(!0)}),[a,l,d,p]);o.useEffect((function(){if(!c&&r.length>0&&d){var e=r.filter((function(e){
|
||
return T.Z.compare(e,a)>=0&&T.Z.compare(l,e)>=0})).length;if(e>0){for(var o=0;o<e;o++)Tt.default.track(L.rMx.CHANNEL_HIGHLIGHTS_ACKED,Da(La({},(0,Ia.hH)(t),(0,Ia.JS)(n)),{message_id:r[o],index:o,ack_type:"landing"}));i(e)}s(!0)}}),[r,d,a,l,c,s,i,t,n]);o.useEffect((function(){if(null!=a){var e=r.filter((function(e){return T.Z.compare(a,e)>0})).length;i((function(o){if(e>o)for(var i=o;i<e;i++)Tt.default.track(L.rMx.CHANNEL_HIGHLIGHTS_ACKED,Da(La({},(0,Ia.hH)(t),(0,Ia.JS)(n)),{message_id:r[i],index:i,ack_type:"scroll"}));return Math.max(o,e)}))}}),[a,r,i,t,n])}({guildId:t,channelId:n,highlightedMessageIds:r,setNumHighlightsVisited:i,topVisibleMessage:c,middleVisibleMessage:y});var O=Ga(o.useState(!1),2),E=O[0],C=O[1];o.useEffect((function(){null!=c&&a.indexOf(c)>=0&&(a.length-a.indexOf(c)>50?C(!0):C(!1))}),[a,c,C]);return{scrolledFarBack:E}}function Wa(e){
|
||
var t=e.channelId,n=e.guildId,i=e.hasMoreAfter,a=e.isAtBottom,l=e.isLoading,s=e.isJumpingToBottom,d=e.messages,p=e.scrollManager,h=e.jumpToPresent,b=Ga(o.useState(C.ZP.ackMessageId(t)),2),v=b[0],m=b[1];o.useEffect((function(){m(C.ZP.ackMessageId(t))}),[t]);var g=(0,_a.rd)(t,v),O=Ga(o.useState(0),2),E=O[0],j=O[1],S=g.length-E,I=g.length>0&&d.jumpTargetId===g[0];o.useEffect((function(){S>0&&Ia.ZP.trackWithMetadata(L.rMx.CHANNEL_HIGHLIGHTS_VIEWED,{num_unread_highlights:S,did_jump_to_first_unread_highlight:I})}),[t]);var _=Va({guildId:n,channelId:t,highlightedMessageIds:g,setNumHighlightsVisited:j,messages:d,scrollManager:p}).scrolledFarBack,w=o.useCallback((function(){q.In(t,!0);h()}),[h,t]),x=(0,u.e7)([f.Z],(function(){return f.Z.useReducedMotion}));return(0,y.sk)(n)&&(0!==g.length||i||_)?(0,r.jsxs)("div",{className:Ba().container,style:{visibility:a&&0===S?"hidden":"inherit"},children:[s?(0,r.jsx)("div",{className:Ba().highlightsCountContainer}):(0,r.jsx)(Ha,{visible:S>0,
|
||
numHighlights:S,disableAnimation:x,navigateToNextHighlight:function(){var e=g[E];if(null!=e){wa.K({guildId:n,channelId:t,targetMessageId:e,highlightedMessageIds:g,numHighlightsVisited:E});j((function(e){return e+1}))}},isLoading:l,channelId:t},t),(0,r.jsx)(c.P3F,{"aria-label":Fe.Z.Messages.JUMP_TO_BOTTOM,className:Ba().navigator,onClick:w,children:(0,r.jsx)("div",{className:Ba().button,children:s&&l?(0,r.jsx)(c.$jN,{type:c.$jN.Type.SPINNING_CIRCLE,className:Ba().jumpSpinner}):(0,r.jsx)(Ta,{className:Ba().icon})})})]}):null}var za=n(918771),Ya=n(840598),Ka=n(78551),qa=n(600277),Qa=n(721290),Xa=n.n(Qa);function Ja(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $a(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function el(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$a(i,r,o,a,l,"next",e)}function l(e){
|
||
$a(i,r,o,a,l,"throw",e)}a(void 0)}))}}function tl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ja(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ja(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var nl=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1]
|
||
;return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}
|
||
},rl="749054660769218631";function ol(e){var t=e.channel,n=tl(o.useState(""),2),i=n[0],a=n[1];o.useEffect((function(){(0,Ya.FQ)("847199849233514549",!0)}),[]);var l,f=(0,u.e7)([O.Z,v.default],(function(){return Boolean(z()(O.Z.getMessages(t.id).toArray()).reverse().find((function(e){return e.author.id!==v.default.getId()&&e.state===L.yb.SENT&&!(0,de.Z)(e)})))})),d=(0,u.e7)([S.default],(function(){var e;return null!==(l=null===(e=S.default.getUser(t.isPrivate()?t.getRecipientId():null))||void 0===e?void 0:e.username)&&void 0!==l?l:Fe.Z.Messages.WAVE_DEFAULT_RECIPIENT})),p=(0,u.e7)([Ka.Z],(function(){return Ka.Z.getStickerById(rl)})),h=o.useCallback(el((function(){var e;return nl(this,(function(n){switch(n.label){case 0:if(null!=i&&""!==i)return[2];n.label=1;case 1:n.trys.push([1,3,,4]);return[4,s.Z.sendGreetMessage(t.id,rl)];case 2:n.sent();Tt.default.track(L.rMx.DM_EMPTY_ACTION,{channel_id:t.id,channel_type:t.type,source:"Wave",type:"Send wave"});return[3,4];case 3:
|
||
(e=n.sent()).ok||429!==e.status||a(Fe.Z.Messages.RATE_LIMITED);return[3,4];case 4:return[2]}}))})),[t.id,t.type,i]),y=Fe.Z.Messages.WAVE_TO.format({username:d}),b=null!=i&&""!==i?(0,r.jsx)(c.xvT,{className:Xa().error,color:"text-danger",variant:"text-sm/normal",children:i}):null;return f?(0,r.jsxs)("div",{className:Xa().containerCompact,children:[(0,r.jsxs)(c.P3F,{className:null!=i&&""!==i?Xa().compactButtonDisabled:Xa().compactButton,"aria-label":Fe.Z.Messages.SEND_WAVE,onClick:h,children:[(0,r.jsx)(qa.ZP,{sticker:p,size:24}),(0,r.jsx)(c.xvT,{className:Xa().text,variant:"text-md/medium",children:y})]}),b]}):(0,r.jsxs)("div",{className:Xa().containerExpanded,children:[(0,r.jsx)(qa.ZP,{sticker:p,size:160}),(0,r.jsx)(c.zxk,{className:Xa().button,onClick:h,disabled:Boolean(i),children:y}),b]})}var il=n(318715),al=n(596310);function ll(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ul(e,t,n){t in e?Object.defineProperty(e,t,{value:n,
|
||
enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function cl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ul(e,t,n[t])}))}return e}function sl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||dl(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fl(e){
|
||
return function(e){if(Array.isArray(e))return ll(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dl(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dl(e,t){if(e){if("string"==typeof e)return ll(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ll(e,t):void 0}}function pl(e){return null!=e&&e.type===L.ys_.MESSAGE&&e.content.id===e.groupId}function hl(e,t){s.Z.jumpToMessage({channelId:e.id,messageId:t,flash:!0})}var yl=o.memo((function(e){var t=e.file,n=e.channel,o=e.user,i=e.isGroupStart;return(0,r.jsx)(pa.Z,{isGroupStart:i,channel:n,message:new ua.Z({id:t.id,key:"pending-upload-".concat(t.id),type:L.uaV.DEFAULT,
|
||
author:o,channel_id:n.id,customRenderedContent:{hasSpoilerEmbeds:!1,content:(0,r.jsx)(sa.g,{filename:t.name,progress:null!=t.progress?t.progress:0,size:t.currentSize,onCancelUpload:function(){vr.Z.cancel(t)}})}})})}));function bl(e){var t,n,i,a,l=e.channel,u=e.messages,c=e.unreadCount,d=e.showNewMessagesBar,p=e.messageDisplayCompact,h=e.channelStream,v=e.uploads,m=e.scrollManager,g=e.specs,O=e.filterAfterTimestamp,j=e.showingSpamBanner,I=e.showingQuarantineBanner,_=e.isAtBottom,w=e.jumpToPresent,x=(0,y.sk)(l.guild_id),P=S.default.getCurrentUser(),N=function(){return m.isInitialized()||u.ready},M=(0,da.$)(l),D=sl(o.useState(!1),2),k=D[0],U=D[1],F=u.length>0&&(null===(t=u.first())||void 0===t?void 0:t.isFirstMessageInForumPost(l)),G=(0,mr.t)(l.guild_id),V=(0,Ar.Z)(l.id);n=(0,et.Qd)().enabled,i=b.Yk.useSetting(),a=(0,il.ZP)([f.Z],(function(){return f.Z.useReducedMotion})),o.useEffect((function(){var e=function(e){var t=e.messageId,n=e.channelId,r=e.emoji,o=e.optimistic,l=e.burst
|
||
;!o&&l&&i&&!a&&(0,ct.T6)({channelId:n,messageId:t,emoji:r,key:al.I.EXTERNAL})};n&&Re.Z.subscribe("MESSAGE_REACTION_ADD",e);return function(){Re.Z.unsubscribe("MESSAGE_REACTION_ADD",e)}}),[i,n,a]);var W=null,z=[];if(!k&&j)z.push((0,r.jsx)(xr,{channel:l,count:u.length,showRedactedMessages:function(){return U(!0)}}));else{var Y,K=h.map((function(e,t){if(e.type===L.ys_.DIVIDER){var n,o,i=null!=e.unreadId;return null!=O?null:(0,r.jsx)(Sr,{isUnread:i,isBeforeGroup:null==e.content&&pl(h[t+1]),id:i?R.j1:void 0,children:e.content},"divider-".concat(null!==(o=null!==(n=e.contentKey)&&void 0!==n?n:e.unreadId)&&void 0!==o?o:t))}if(e.type===L.ys_.FORUM_POST_ACTION_BAR)return(0,r.jsx)(aa,{parentChannelId:l.parent_id,postId:l.id,isLastItem:t+1===h.length,isFirstMessage:!0},"forum-post-action-bar-".concat(l.id));if(e.type===L.ys_.MESSAGE_GROUP_BLOCKED||e.type===L.ys_.MESSAGE_GROUP_SPAMMER){var a
|
||
;a=e.type===L.ys_.MESSAGE_GROUP_BLOCKED?Fe.Z.Messages.BLOCKED_MESSAGE_COUNT:Fe.Z.Messages.HIDDEN_SPAM_MESSAGE_COUNT;return(0,r.jsx)(Ca,{unreadId:R.j1,messages:e,channel:l,compact:p,collapsedReason:a},e.key)}if(!(null!=O&&O>1e3*e.content.timestamp.unix())){var u=E.Z.can(L.Plq.CREATE_INSTANT_INVITE,l);if(!(0,fa.Z)(e.content,u)){e.type===L.ys_.MESSAGE&&null==W&&(W=e);var c=e.groupId===(null==W?void 0:W.groupId)?W.content.id:e.groupId,s=e.type===L.ys_.THREAD_STARTER_MESSAGE?nr:or;return(0,r.jsx)(s,{compact:p,channel:l,message:e.content,groupId:c,flashKey:e.flashKey,id:(0,H.p)(l.id,e.content.id),isLastItem:t>=h.length-1,isHighlight:e.isHighlight,renderContentOnly:V},e.content.id)}}}));(Y=z).push.apply(Y,fl(K))}var q,Q,X=h[h.length-1];null!=P&&v.forEach((function(e,t){var n=0===t&&(0,Z.J)(l,X,new ua.Z({type:L.uaV.DEFAULT,author:P}));z.push((0,r.jsx)(yl,{file:e,channel:l,user:P,isGroupStart:n},"upload-".concat(e.id)))}));if(u.hasMoreBefore&&null==O){u.length>0&&z.unshift((0,r.jsx)("div",{
|
||
style:{height:R.D4,flex:"0 0 auto"}},"buffer"));var J=f.Z.useReducedMotion;(J&&N()||!J)&&z.unshift((0,r.jsx)(B.ZP,cl({compact:p},g),"has-more"))}u.hasMoreBefore&&null==O||z.unshift((0,r.jsx)(wi,{channel:l,showingBanner:j||I},"empty-message"));u.hasMoreAfter&&z.push((0,r.jsx)(B.ZP,cl({compact:p},g),"has-more-after"));!j&&!I&&M&&N()&&z.push((0,r.jsx)(ol,{channel:l}));if(c>0&&d&&N()){var $,ee,te=C.ZP.getOldestUnreadTimestamp(l.id),ne=0!==te?te:T.Z.extractTimestamp(l.id),re=(0,A.KC)(br()(),br()(new Date(ne)));if(C.ZP.isEstimated(l.id)){$=re?Fe.Z.Messages.NEW_MESSAGES_ESTIMATED:Fe.Z.Messages.NEW_MESSAGES_ESTIMATED_WITH_DATE;ee=Fe.Z.Messages.NEW_MESSAGES_PILL_ESTIMATED}else{$=re?Fe.Z.Messages.NEW_MESSAGES:Fe.Z.Messages.NEW_MESSAGES_WITH_DATE;ee=Fe.Z.Messages.NEW_MESSAGES_PILL}q=G&&l.type===L.d4z.GUILD_TEXT?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(za.LE,{content:$.format({count:c,timestamp:ne}),channelId:l.id}),(0,r.jsx)(za.BO,{channelId:l.id,scrollManager:m})]}):x?(0,r.jsx)(za.dB,{
|
||
content:ee.format({count:c}),channelId:l.id,hasNoticeAbove:l.isForumPost()&&!F}):(0,r.jsx)(za.LE,{content:$.format({count:c,timestamp:ne}),channelId:l.id})}null==q&&G&&l.type===L.d4z.GUILD_TEXT&&(q=(0,r.jsx)(za.BO,{channelId:l.id,scrollManager:m}));if(u.error)Q=(0,r.jsx)(za.Rp,{loading:u.loadingMore,onClick:function(){return e=l.id,void s.Z.fetchMessages({channelId:e,limit:L.AQB,truncate:!0});var e}});else if(x&&N()){var oe=u.jumpReturnTargetId,ie=w;null!=oe&&(ie=function(){return hl(l,oe)});Q=(0,r.jsx)(Wa,{channelId:l.id,guildId:l.guild_id,messages:u,scrollManager:m,isAtBottom:_,hasMoreAfter:u.hasMoreAfter,isLoading:u.loadingMore,isJumpingToBottom:u.jumpedToPresent,jumpToPresent:ie},l.id)}else if(!x&&u.hasMoreAfter&&N()){var ae=u.jumpReturnTargetId;Q=u.loadingMore&&u.jumpedToPresent?(0,r.jsx)(za.DR,{}):null!=ae?(0,r.jsx)(za.DR,{type:za.A7.REPLY,onClick:function(){return hl(l,ae)}}):(0,r.jsx)(za.DR,{onClick:function(){return function(e){s.Z.jumpToPresent(e.id,L.AQB)
|
||
;var t=ca.Z.getChannelId();e.id===t&&(0,la.Kh)(e.id)}(l)}})}var le=l.isForumPost()&&!F?(0,r.jsx)(aa,{postId:l.id}):null;return{channelStreamMarkup:z,newMessagesBar:q,jumpToPresentBar:Q,forumPostActionBar:le}}var vl=n(113358),ml=n.n(vl);function gl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ol(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function El(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ol(e,t,n[t])}))}return e}function Cl(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){
|
||
var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function jl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Sl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{
|
||
if(l)throw o}}return i}}(e,t)||_l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Il(e){return function(e){if(Array.isArray(e))return gl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _l(e,t){if(e){if("string"==typeof e)return gl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gl(e,t):void 0}}function wl(e){
|
||
var t,n=e.className,i=e.messageGroupSpacing,d=e.scrollerClassName,p=e.channel,y=e.messages,b=e.unreadCount,v=e.showNewMessagesBar,m=e.messageDisplayCompact,g=e.channelStream,O=e.uploads,C=e.hasUnreads,j=e.editingMessageId,S=e.fontSize,I=e.keyboardModeEnabled,w=e.filterAfterTimestamp,x=e.showingSpamBanner,P=e.showingQuarantineBanner,N=Sl(o.useState(!1),2),A=N[0],T=N[1],Z=o.useMemo((function(){return m?(0,B.aJ)({compact:!0,messageGroups:30,groupRange:4,attachments:8,fontSize:S,groupSpacing:i}):(0,B.aJ)({compact:!1,messageGroups:26,groupRange:4,attachments:8,fontSize:S,groupSpacing:i})}),[m,S,i]),M=function(e){var t=e.messages,n=e.channel,r=e.compact,i=e.hasUnreads,a=e.focusId,l=e.placeholderHeight,u=e.canLoadMore,c=void 0===u||u,s=e.handleScrollToBottom,f=e.handleScrollFromBottom,d=o.useContext(Q.ZP).windowId,p=ur(o.useState((function(){return new hr({messages:t,channel:n,compact:r,hasUnreads:i,focusId:a,placeholderHeight:l,canLoadMore:c,windowId:d,handleScrollToBottom:s,
|
||
handleScrollFromBottom:f})})),1)[0];p.getSnapshotBeforeUpdate(a);o.useLayoutEffect((function(){return p.mergePropsAndUpdate({messages:t,channel:n,compact:r,hasUnreads:i,focusId:a,placeholderHeight:l,canLoadMore:c,windowId:d,handleScrollToBottom:s,handleScrollFromBottom:f})}));o.useLayoutEffect((function(){return function(){return p.cleanup()}}),[p]);return p}({messages:y,channel:p,compact:m,hasUnreads:C,focusId:j,placeholderHeight:Z.totalHeight,canLoadMore:null==w,handleScrollToBottom:o.useCallback((function(){return T(!0)}),[T]),handleScrollFromBottom:o.useCallback((function(){return T(!1)}),[T])}),D=function(e){var t=e.scrollerRef,n=V(e,["scrollerRef"]),r=o.useCallback((function(){var e=t.current;return null==e?Promise.resolve():new Promise((function(t){e.scrollToBottom({callback:function(){return requestAnimationFrame(t)}})}))}),[]),i=o.useCallback((function(){var e=t.current;return null==e?Promise.resolve():new Promise((function(t){e.scrollToTop({callback:function(){
|
||
return requestAnimationFrame(t)}})}))}),[]),a=o.useCallback((function(e){var r,o,i;if(n.keyboardModeEnabled){var a=null===(o=null===(r=t.current)||void 0===r?void 0:r.getScrollerNode())||void 0===o?void 0:o.ownerDocument,l=null==a?void 0:a.querySelector(e);null!=l&&(null===(i=t.current)||void 0===i||i.scrollIntoViewNode({node:l,padding:4*R.kQ,callback:function(){return null==l?void 0:l.focus()}}))}}),[n.keyboardModeEnabled]),l=o.useCallback((function(){n.hasMoreAfter||G.S.dispatchToLastSubscribed(L.CkL.TEXTAREA_FOCUS)}),[n.hasMoreAfter]),u=(0,F.ZP)({id:H.W,preserveFocusPosition:!1,setFocus:a,isEnabled:n.keyboardModeEnabled&&!n.isEditing,scrollToStart:i,scrollToEnd:r,onNavigateNextAtEnd:l}),c=o.useCallback((function(e){var t=e.atEnd;void 0!==t&&t?u.focusLastVisibleItem():u.focusFirstVisibleItem()}),[u]);(0,_.yp)({event:L.CkL.FOCUS_MESSAGES,handler:c});return u}({scrollerRef:M.ref,isEditing:null!=j,keyboardModeEnabled:I,hasMoreAfter:y.hasMoreAfter}),k=function(e){return(0,
|
||
u.e7)([h.Z],(function(){return E.Z.can(L.Plq.READ_MESSAGE_HISTORY,e)?null:h.Z.getViewingRolesTimestamp(e.getGuildId())}))}(p),U=bl({channel:p,messages:y,unreadCount:b,showNewMessagesBar:v,messageDisplayCompact:m,channelStream:g,uploads:O,loadMore:M.loadMore,scrollManager:M,specs:Z,filterAfterTimestamp:null!=w?w:k,showingSpamBanner:x,showingQuarantineBanner:P,isAtBottom:A,jumpToPresent:function(){if(y.hasPresent()){var e;null===(e=M.ref.current)||void 0===e||e.scrollToBottom({animate:!f.Z.useReducedMotion})}else s.Z.jumpToPresent(p.id,L.AQB)}}),W=U.channelStreamMarkup,z=U.newMessagesBar,Y=U.jumpToPresentBar,K=U.forumPostActionBar;!function(e){var t=o.useCallback((function(){var t;return null===(t=e.current)||void 0===t?void 0:t.scrollToBottom()}),[e]),n=o.useCallback((function(){var t;return null===(t=e.current)||void 0===t?void 0:t.scrollPageUp({animate:!f.Z.useReducedMotion})}),[e]),r=o.useCallback((function(){var t;return null===(t=e.current)||void 0===t?void 0:t.scrollPageDown({
|
||
animate:!f.Z.useReducedMotion})}),[e]);(0,_.yp)({event:L.CkL.SCROLLTO_PRESENT,handler:t});(0,_.yp)({event:L.CkL.SCROLL_PAGE_UP,handler:n});(0,_.yp)({event:L.CkL.SCROLL_PAGE_DOWN,handler:r})}(M.ref);var q,X=(0,c.mFp)(),J=(0,l.l2)(D),$=J.ref,ee=jl(J,["ref"]),te=o.useCallback((function(e){M.ref.current=e;var t;$.current=null!==(t=null==e?void 0:e.getScrollerNode())&&void 0!==t?t:null}),[]);return(0,r.jsx)(l.bG,{navigator:D,children:(0,r.jsxs)("div",{className:a()(ml().messagesWrapper,n,"group-spacing-".concat(i)),children:[z,(0,r.jsxs)(c.eTT,Cl(El({ref:te,customTheme:!0,className:a()(d,ml().scroller),contentClassName:ml().scrollerContent,onResize:M.handleResize,onScroll:M.handleScroll,onMouseDown:M.handleMouseDown,onMouseUp:M.handleMouseUp},X),{tabIndex:-1,role:"group",children:[K,(0,r.jsxs)("ol",Cl(El({className:ml().scrollerInner,"aria-label":Fe.Z.Messages.CHANNEL_MESSAGES_A11Y_LABEL.format({channelName:p.name})},ee),{children:[(0,r.jsx)("span",{className:ml().navigationDescription,
|
||
id:"messagesNavigationDescription","aria-hidden":!0,children:Fe.Z.Messages.CHANNEL_MESSAGES_A11Y_DESCRIPTION}),W,(0,r.jsx)("div",{className:a()((q={},Ol(q,ml().scrollerSpacer,!x&&!P),Ol(q,ml().empty,0===y.length&&!y.loadingMore),Ol(q,ml().emptyForum,1===y.length&&!y.loadingMore&&p.isForumPost()&&(null===(t=y.first())||void 0===t?void 0:t.isFirstMessageInForumPost(p))),q))})]}))]})),Y]})})}var xl=o.memo(wl,(function(e,t){return null!=e.isHidden&&null!=t.isHidden&&e.isHidden&&t.isHidden}));const Pl=o.memo((function(e){var t=e.channel,n=e.showingSpamBanner,i=e.showingQuarantineBanner,a=e.forceCompact,l=void 0!==a&&a,c=jl(e,["channel","showingSpamBanner","showingQuarantineBanner","forceCompact"]),s=function(e){var t=e.getGuildId(),n=(0,u.e7)([g.Z],(function(){return null==t||g.Z.canChatInGuild(t)}),[t]),r=(0,u.cj)([E.Z],(function(){return{canManageMessages:E.Z.can(L.Plq.MANAGE_MESSAGES,e),permissionVersion:null!=t?E.Z.getGuildVersion(t):null}}),[e,t]),o=r.canManageMessages;return{
|
||
canChat:n,permissionVersion:r.permissionVersion,canManageMessages:o}}(t),h=s.canManageMessages,_=s.permissionVersion,x=s.canChat,P=function(){var e=b.jU.useSetting(),t=b.cC.useSetting(),n=(0,u.cj)([f.Z],(function(){return{messageGroupSpacing:f.Z.messageGroupSpacing,fontSize:f.Z.fontSize,keyboardModeEnabled:f.Z.keyboardModeEnabled}}));return{messageGroupSpacing:n.messageGroupSpacing,messageDisplayCompact:e,renderSpoilers:t,fontSize:n.fontSize,keyboardModeEnabled:n.keyboardModeEnabled}}(),N=P.messageGroupSpacing,A=P.fontSize,T=P.messageDisplayCompact,Z=P.renderSpoilers,M=P.keyboardModeEnabled,R=function(e){var t,n,r,i=(0,u.e7)([O.Z],(function(){return O.Z.getMessages(e.id)}),[e.id]),a=(0,u.e7)([C.ZP],(function(){return null!==(n=C.ZP.getOldestUnreadMessageId(e.id))&&void 0!==n?n:null}),[e.id]),l=(0,y.sk)(e.guild_id),c=(0,u.Wu)([d.Z],(function(){if(!l)return[];var t=d.Z.getHighlightedMessageIds(e.id),n=d.Z.getTempHighlightedMessageIds(e.guild_id);return Array.from(Il(n).concat(Il(t)))
|
||
})),s=p.Z.useExperiment({}).enabled,f=null!==(r=null===(t=S.default.getUser(v.default.getId()))||void 0===t?void 0:t.hasFlag(L.xW$.SPAMMER))&&void 0!==r&&r,h=o.useMemo((function(){return U({channel:e,messages:i,highlightedMessageIds:c,oldestUnreadMessageId:a,treatSpam:s&&!f})}),[i,e,a,s,c]),b=(0,u.e7)([m.Z],(function(){var t;return null===(t=m.Z.getEditingMessage(e.id))||void 0===t?void 0:t.id}));return{messages:i,channelStream:h,oldestUnreadMessageId:a,editingMessageId:b}}(t),D=R.messages,k=R.channelStream,B=R.oldestUnreadMessageId,F=R.editingMessageId;return(0,r.jsx)(I.a.Provider,{value:(0,w.Z)(Z,h),children:(0,r.jsx)(xl,Cl(El({},c),{messageGroupSpacing:N,showNewMessagesBar:!0,channel:t,messageDisplayCompact:l||T,messages:D,channelStream:k,permissionVersion:_,uploads:(0,u.e7)([j.Z],(function(){return j.Z.getFiles(t.id)}),[t]),unreadCount:(0,u.e7)([C.ZP],(function(){return C.ZP.getUnreadCount(t.id)}),[t]),hasUnreads:null!=B,canChat:x,editingMessageId:F,fontSize:A,
|
||
keyboardModeEnabled:M,showingSpamBanner:n,showingQuarantineBanner:i}))})}))},399098:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(785893),o=(n(667294),n(496486)),i=n.n(o),a=n(707961),l=n(658689),u=n(725691),c=n(183640),s=n(633878);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t)
|
||
;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function h(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=p(e,["width","height","color"]);return(0,r.jsxs)("svg",d(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}({},(0,s.Z)(u)),{width:n,height:i,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{fill:l,
|
||
d:"M12 14C7.289 14 4 16.467 4 20V22H20V20C20 16.467 16.711 14 12 14ZM11 19C10.447 19 10 18.553 10 18C10 17.447 10.447 17 11 17C11.553 17 12 17.447 12 18C12 18.553 11.553 19 11 19ZM14 19C13.447 19 13 18.553 13 18C13 17.447 13.447 17 14 17C14.553 17 15 17.447 15 18C15 18.553 14.553 19 14 19Z"}),(0,r.jsx)("path",{fill:l,d:"M18 6H17.91C17.432 3.167 14.967 1 12 1C9.033 1 6.568 3.167 6.09 6H6C4.896 6 4 6.896 4 8V9C4 10.104 4.896 11 6 11C6 12.102 6.897 13 8 13H16C17.104 13 18 12.102 18 11C19.104 11 20 10.104 20 9V8C20 6.896 19.104 6 18 6ZM16 10H8V6H16V10Z"})]}))}var y=n(72580),b=n(2590),v=n(846003),m=n.n(v);function g(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){g(e,t,n[t])}))}return e}function E(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var C=(0,l.Z)((function(e){var t=e.member,n=e.empty,o=e.analyticsContext,i=e.guildId;if(n)return(0,r.jsx)("div",{className:m().partyMemberEmpty});if(null==t)return(0,r.jsx)("div",{className:m().partyMemberUnknown,children:(0,r.jsx)(h,{className:m().partyMemberUnknownIcon})});var l={location:E(O({},o.location),{object:b.qAy.AVATAR})};return(0,r.jsx)("div",{className:m().partyMemberKnown,children:(0,r.jsx)(a.yRy,{preload:function(){
|
||
return(0,u.Z)(t.id,t.getAvatarURL(i,80),{guildId:i})},renderPopout:function(e){return(0,r.jsx)(c.Z,E(O({},e),{userId:t.id,analyticsParams:l}))},position:"left",children:function(e){return(0,r.jsx)(a.qEK,E(O({},e),{src:t.getAvatarURL(i,24),"aria-label":t.username,size:a.EFr.SIZE_24,className:m().partyMember}))}})})}));const j=function(e){var t=e.partySize,n=e.members,o=e.minAvatarsShown,a=void 0===o?1:o,l=e.maxAvatarsShown,u=void 0===l?2:l,c=e.guildId,s=t.unknownSize,f=t.totalSize,d=t.knownSize;if(f<a)return null;for(var p=i()(n).filter(y.lm).take(u).map((function(e){return(0,r.jsx)(C,{member:e,guildId:c},e.id)})).value(),h=0;h<s&&p.length<u;h++)p.push((0,r.jsx)(C,{guildId:c},"unknown-member-".concat(h)));for(var b=f-d-s,v=0;v<b&&p.length<u;v++)p.push((0,r.jsx)(C,{empty:!0,guildId:c},"empty-member-".concat(v)));var g=Math.max(Math.min(f-p.length,99),0);if(1===g){var O=n[u];p.push((0,r.jsx)(C,{member:O,guildId:c},O.id))}return(0,r.jsx)("div",{className:m().wrapper,children:(0,
|
||
r.jsxs)("div",{className:m().partyMembers,children:[p,g>1?(0,r.jsxs)("div",{className:m().partyMemberOverflow,children:["+",g]}):null]})})}},995247:(e,t,n)=>{"use strict";n.d(t,{Uo:()=>L,qw:()=>U,KY:()=>R,fU:()=>k,tn:()=>D,Fo:()=>M});var r=n(667294),o=n(824390),i=n.n(o),a=n(842227),l=n(202351),u=n(418705),c=n(496916),s=n(777158),f=n(896490),d=n(848465),p=n(556056),h=n(971561),y=n(82375),b=n(744564),v=n(917019),m=n(652591),g=n(2590);function O(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function E(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,l,"next",e)}function l(e){O(i,r,o,a,l,"throw",e)}a(void 0)}))}}var C=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){
|
||
return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function j(e,t){return S.apply(this,arguments)}function S(){return(S=E((function(e,t){return C(this,(function(n){switch(n.label){case 0:return[4,(0,v.PS)(e,(function(e){
|
||
e.guildRecentsDismissedAt=y.E.fromDate(new Date);return!0}),v.fy.INFREQUENT_USER_ACTION)];case 1:n.sent();b.Z.dispatch({type:"BULK_CLEAR_RECENTS",guildId:e,channelIds:t});m.default.track(g.rMx.CHANNEL_LIST_UPDATED,{action_type:"recents_dismissed"});return[2]}}))}))).apply(this,arguments)}var I=n(784426),_=n(61209),w=n(877475),x=n(717091),P=n(897196),N=n(966554),A=n(290679),T=n(473708);function Z(e,t){e.index=t}function M(e,t,n,o){o=o.toLowerCase();var a=(0,d.g)(e),l=r.useCallback((function(e,t){return(!a||!e.channel.hasFlag(P.zZ.IS_GUILD_RESOURCE_CHANNEL))&&(e.channel.type!==g.d4z.GUILD_DIRECTORY&&(0===t.length||(i()(t,e.channel.name.toLowerCase())||e.channel.topic.toLowerCase().includes(t))))}),[a]);return r.useMemo((function(){var e={null:[],_categories:[]};n[g.d4z.GUILD_CATEGORY].forEach((function(n){var r=n.channel;"null"===r.id&&(e.null=t.null.filter((function(e){return l(e,o)})));e[r.id]=t[r.id].filter((function(e){return l(e,o)}))}))
|
||
;e._categories=t._categories.filter((function(t){return"null"===t.channel.id||0===o.length||e[t.channel.id].length>0}));(0,s.Z)(e._categories,e).forEach(Z);return e}),[t,n,l,o])}function R(e){var t=e.getSections();if(t[p.zm]>0){switch(e.getCommunitySection().getRow(0)){case N.f.GUILD_HOME:return P.oC.GUILD_HOME;case N.f.GUILD_ROLE_SUBSCRIPTIONS:return P.oC.ROLE_SUBSCRIPTIONS;case N.f.GUILD_MEMBER_APPLICATIONS:return P.oC.MEMBER_APPLICATIONS}}for(var n=p.wd;n<e.voiceChannelsSectionNumber;n++)if(t[n]>0){var r,o=null===(r=e.getChannelFromSectionRow(n,0))||void 0===r?void 0:r.channel;if(null!=o)return o.id}return null}function L(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;j(e,t);(0,c.y5)(t.map((function(e){return{channelId:e,readStateType:A.W.CHANNEL,messageId:x.ZP.lastMessageId(e)}})));null!=n&&(0,I.uL)(g.Z5c.CHANNEL(e,n))}function D(e,t,n,r){var o=(0,f.wE)(u.z$.CHANNEL_BROWSER_NUX),i=(0,l.cj)([_.Z],(function(){var t={},n=_.Z.getMutableGuildChannelsForGuild(e)
|
||
;for(var r in n){var o=n[r].parent_id;if(null!=o){var i;t[o]=(null!==(i=t[o])&&void 0!==i?i:0)+1}}return t}),[e]),a=t._categories.map((function(e){var r=t[e.channel.id];return{rowCount:"null"!==e.channel.id&&0===i[e.channel.id]?1:r.length,rowHeight:0===r.length?0:n}}));o||null==r||a.unshift({rowCount:1,rowHeight:r});return a}function k(e){var t,n,r=(0,l.e7)([w.Z],(function(){return w.Z.getCategories(e)})),o=r._categories.length,i=r._categories[r._categories.length-1];if(null==i)return 0;var a=r[null!==(n=null===(t=i.channel)||void 0===t?void 0:t.id)&&void 0!==n?n:"null"];return null==a?0:0===a.length?i.index+2-o:a[a.length-1].index+2-o}function U(e){var t;return T.Z.Messages.CHANNEL_BROWSER_ACTIVE_TEXT.format({timeAgo:(0,h.ZB)(String(a.default.extractTimestamp(null!==(t=x.ZP.lastMessageId(e))&&void 0!==t?t:e)/1e3),"R").formatted})}},337710:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(202351),o=n(848465),i=n(9430),a=n(489610),l=n(897196);function u(e){var t,n=(0,
|
||
a.DM)(null!=e.getGuildId()?e.guild_id:"null"),u=(0,r.e7)([i.Z],(function(){return i.Z.isChannelRecordOrParentOptedIn(e)})),c=(0,o.g)(null!==(t=e.guild_id)&&void 0!==t?t:"null")&&e.hasFlag(l.zZ.IS_GUILD_RESOURCE_CHANNEL);return n&&!c&&!u&&!e.isThread()}},517285:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(396043),c=n(795909),s=n(652591),f=n(347834),d=n(2590),p=n(473708),h=n(448624),y=n.n(h);function b(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){b(e,t,n[t])}))}return e}function m(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function g(e){var t=e.channel,n=e.narrow;o.useEffect((function(){s.default.track(d.rMx.CHANNEL_BANNER_VIEWED,m(v({},(0,u.hH)(t.getGuildId()),(0,u.v_)(t)),{banner_type:"channel_opt_in"}))}),[t]);return(0,r.jsxs)("div",{className:a()(y().chatHeaderBar,b({},y().narrow,n)),children:[(0,r.jsx)(l.xvT,{className:y().chatHeaderBarText,variant:"text-sm/normal",color:"text-normal",children:p.Z.Messages.OPT_IN_CHANNEL_NOTICE}),(0,r.jsxs)(l.zxk,{size:l.zxk.Sizes.TINY,className:y().chatHeaderBarButton,innerClassName:y().chatHeaderBarButtonInner,color:l.zxk.Colors.BRAND,
|
||
onClick:function(){s.default.track(d.rMx.CHANNEL_BANNER_CTA_CLICKED,m(v({},(0,u.hH)(t.getGuildId()),(0,u.v_)(t)),{banner_type:"channel_opt_in",cta_type:"add channel"}));(0,f.XQ)(t.guild_id,t.id,!0,{section:d.jXE.CHANNEL})},children:[(0,r.jsx)(c.Z,{width:14,height:14}),p.Z.Messages.OPT_IN_CHANNEL_NOTICE_CTA]})]})}},895462:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(318715)),i=n(707961),a=n(785085),l=n(996739);function u(e){var t=e.isShaking,n=e.shakeLocation,u=e.children,c=e.className,s=(0,l.Z)(n);return(0,o.ZP)([a.Z],(function(){return a.Z.isEnabled({shakeLocation:n})}))?(0,r.jsx)(i.UkV,{isShaking:t,intensity:s,className:c,children:u}):(0,r.jsx)(r.Fragment,{children:u})}},996739:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(202351),o=n(901654),i=n(785085);function a(e){var t=(0,r.e7)([o.Z],(function(){return o.Z.isFocused()}));return(0,r.e7)([i.Z],(function(){return i.Z.isEnabled({shakeLocation:e})&&t?i.Z.shakeIntensity:0}))}},472009:(e,t,n)=>{"use strict"
|
||
;n.d(t,{Z:()=>re});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(473727),s=n(202351),f=n(707961),d=n(199912),p=n(443269),h=n(242818),y=n(260012),b=n(599347),v=n(26468),m=n(316878),g=n(258104),O=n(944010),E=n(895303),C=n(379991),j=n(473708);function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){S(e,t,n[t])}))}return e}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=function(t){O.ZP.updatedUnsyncedSettings({disableEmbeddedActivityPopOutAlert:!0});t();e()},o=!C.ZP.disableEmbeddedActivityPopOutAlert;o?(0,f.h7j)((function(o){return(0,r.jsx)(E.default,I({
|
||
confirmText:j.Z.Messages.EMBEDDED_ACTIVITIES_YEP,secondaryConfirmText:j.Z.Messages.DONT_ASK_AGAIN,title:j.Z.Messages.EMBEDDED_ACTIVITIES_CAREFUL,cancelText:j.Z.Messages.EMBEDDED_ACTIVITIES_NVM,onConfirm:function(){o.onClose();e()},onCancel:t,onConfirmSecondary:function(){return n(o.onClose)},body:j.Z.Messages.EMBEDDED_ACTIVITIES_POP_IN_WARNING},o))}),{},f.u1M):e()}var w=n(153686),x=n(19585),P=n(141772),N=n(673817),A=n(91841),T=n(924726),Z=n(384411),M=n(64234),R=n(901654),L=n(329543),D=n(211482),k=n(120415),U=n(463473),B=n(310126),F=n(954183),G=n(979197),H=n(2590),V=n(347079),W=n.n(V);function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function K(e){K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return K(e)}function q(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Y(e,t,n[t])}))}return e}function Q(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function X(e,t){return!t||"object"!==$(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function J(e,t){J=Object.setPrototypeOf||function(e,t){e.__proto__=t
|
||
;return e};return J(e,t)}var $=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return X(this,n)}}var te=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&J(e,t)}(n,e);var t=ee(n);function n(){z(this,n);var e;(e=t.apply(this,arguments)).rootRef=o.createRef();e._cleanupWindowActionCreators=void 0;e.warnPopoutClose=function(t){
|
||
if(e.props.connectedToEmbeddedActivity&&!C.ZP.disableEmbeddedActivityPopOutAlert){t.returnValue=j.Z.Messages.EMBEDDED_ACTIVITIES_ARE_YOU_SURE_WANT_TO_LEAVE;if(!k.FB)return;_((function(){G.Z.unmountWindow(e.props.windowKey);k.FB&&B.default.close(e.props.windowKey)}))}};e.handleBlur=function(){var t,n;null===(n=(t=e.props).onBlur)||void 0===n||n.call(t)};e.handleContextMenu=function(e){e.preventDefault()};return e}var i=n.prototype;i.componentDidMount=function(){var e=this.props.guestWindow,t=e.document;null==t.querySelector("title")&&null!=t.head&&t.head.appendChild(t.createElement("title"));this.updateTitle();this.updateFontScale();this.updateLocale();this.updateClientTheme();(0,F.O)(e);e.addEventListener("blur",this.handleBlur);t.addEventListener("contextmenu",this.handleContextMenu,!0);e.addEventListener("beforeunload",this.warnPopoutClose)};i.componentDidUpdate=function(e){var t=this.props,n=t.title,r=t.fontScale,o=t.locale,i=t.clientThemesCSS;e.title!==n&&this.updateTitle()
|
||
;e.fontScale!==r&&this.updateFontScale();e.locale!==o&&this.updateLocale();e.clientThemesCSS!==i&&this.updateClientTheme()};i.componentWillUnmount=function(){var e=this.props.guestWindow,t=e.document;e.removeEventListener("blur",this.handleBlur);t.removeEventListener("contextmenu",this.handleContextMenu,!0);f.s9z.setState((function(e){return Q(q({},e),Y({},f.u1M,[]))}));e.removeEventListener("beforeunload",this.warnPopoutClose)};i.updateLocale=function(){var e=this.props,t=e.locale,n=e.guestWindow.document.documentElement;u()(null!=n,"Window document element was null");n.lang=t};i.updateTitle=function(){var e=this.props,t=e.title,n=e.guestWindow.document.querySelector("title");null!=n&&(n.innerText=t)};i.updateFontScale=function(){var e=this.props,t=e.fontScale,n=e.guestWindow.document.documentElement;u()(null!=n,"Window document element was null");n.style.fontSize="".concat(t,"%")};i.updateClientTheme=function(){var e=this.props,t=e.clientThemesCSS,n=e.guestWindow.document,r=n.head
|
||
;u()(null!=r,"Window document ".concat("head"," was null"));var o=r.querySelector("style[".concat(P.P,"]"));if(null==o){var i=n.createElement("style");i.setAttribute(P.P,"true");i.textContent=t;r.appendChild(i)}else o.textContent=t};i.render=function(){var e=this.props,t=e.theme,n=e.focused,o=e.appFocused,i=e.children,l=e.windowKey,u=e.mouseModeEnabled,s=e.keyboardModeEnabled,b=e.reducedMotionEnabled,m=e.fontScaleClass,g=e.saturation,O=e.withTitleBar,E=e.guestWindow,C=e.clientThemesClassName,j=(0,k.Xf)(),S=a()(m,{"mouse-mode":u,"reduce-motion":b,"full-motion":!b,"keyboard-mode":s,"app-focused":n||o,"low-saturation":g<=.4});return(0,r.jsx)(c.VK,{children:(0,r.jsx)("div",{"data-popout-root":!0,ref:this.rootRef,className:a()((0,U.Q)(t),(0,N.Z)(),S,C),children:(0,r.jsx)(f.JcV,{containerRef:this.rootRef,children:(0,r.jsx)(d.Z,{children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(D.Co,{}),(0,r.jsx)(v.Wu,{appContext:H.IlC.POPOUT,renderWindow:E,children:(0,r.jsxs)(L.yP,{children:[(0,r.jsxs)("div",{
|
||
className:W().popout,children:[O&&null!=j?(0,r.jsx)(h.Z,{focused:n,type:j,windowKey:l,macOSFrame:!0}):null,(0,r.jsx)("div",{className:W().content,children:i})]}),(0,r.jsx)(f.nKe,{}),(0,r.jsx)(y.Z,{}),(0,r.jsx)(L.Un,{})]})})]})})})})})};return n}(o.Component);te.defaultProps={withTitleBar:!0};function ne(e,t){var n=(0,s.cj)([G.Z],(function(){return{guestWindow:G.Z.getWindow(e.windowKey),focused:G.Z.getWindowFocused(e.windowKey)}})),o=n.guestWindow,i=n.focused;u()(null!=o,"Missing guestWindow reference");var a=(0,s.e7)([R.Z],(function(){return R.Z.isFocused()})),l=(0,s.cj)([M.Z,Z.default],(function(){return{locale:Z.default.locale,theme:M.Z.theme}})),c=l.locale,f=l.theme,d=(0,s.cj)([m.Z],(function(){return{fontScale:m.Z.fontScale,keyboardModeEnabled:m.Z.keyboardModeEnabled,reducedMotionEnabled:m.Z.useReducedMotion,fontScaleClass:m.Z.fontScaleClass,saturation:m.Z.saturation}})),p=d.fontScale,h=d.keyboardModeEnabled,y=d.reducedMotionEnabled,b=d.fontScaleClass,v=d.saturation,O=(0,
|
||
s.e7)([g.ZP],(function(){return null!=e.channelId&&null!==g.ZP.getSelfEmbeddedActivityForChannel(e.channelId)}));(0,A.Z)(o,!1);var E=(0,T.Z)(o,i),C=(0,x.Z)(w.Z.POPOUT_WINDOW).AnalyticsLocationProvider,j=(0,P.Z)(),S=j.clientThemesClassName,I=j.clientThemesCSS;return null==o?null:(0,r.jsx)(C,{children:(0,r.jsx)(te,Q(q({ref:t},e),{guestWindow:o,focused:i,appFocused:a,locale:c,theme:f,fontScale:p,keyboardModeEnabled:h,mouseModeEnabled:E,reducedMotionEnabled:y,connectedToEmbeddedActivity:O,fontScaleClass:b,saturation:v,clientThemesClassName:S,clientThemesCSS:I}))})}const re=(0,b.Z)(o.forwardRef(ne))},15162:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(667294),o=n(513328);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{
|
||
for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var n=a(r.useState(!1),2),i=n[0],l=n[1],u=r.useRef(new o.sW(t,(function(){return l(!1)}))),c=r.useRef(new o.sW(e,(function(){return l(!0)}))),s=r.useCallback((function(){u.current.cancel();c.current.cancel()}),[]);r.useEffect((function(){return s}),[s]);var f=r.useCallback((function(){s();u.current.delay()
|
||
}),[s]),d=r.useCallback((function(){s();c.current.delay()}),[s]);return{isHovered:i,setIsHovered:l,onMouseEnter:d,onMouseLeave:f,cancelTimers:s}}},621270:(e,t,n)=>{"use strict";n.d(t,{rK:()=>d,ZP:()=>p});var r=n(667294),o=n(730381),i=n.n(o),a=n(513328),l=n(249139);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n)
|
||
;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var s=new Date("2023-01-01T07:59:59.000Z"),f=i()(s);function d(){var e=c(r.useState((function(){return f.isAfter(Date.now())})),2),t=e[0],n=e[1];r.useEffect((function(){var e=new a.V7,r=function(){var t=f.diff(Date.now(),"millisecond");null==e||e.start(t,(function(){f.isBefore(Date.now())?n(!1):r()}))};t&&r();return function(){return e.stop()}}));return t}const p=(0,l.Z)({id:"2022-12_seasonal_gifting",label:"Seasonal Gifting",kind:"user",defaultConfig:{enabled:!1},treatments:[{id:1,label:"Enabled",config:{enabled:!0}}]})},645573:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(785893),o=n(667294),i=n(707961),a=n(19585),l=n(652591),u=n(398344),c=n(2590),s=n(824012),f=n.n(s),d=n(20616),p=n.n(d),h=n(556306),y=n.n(h)
|
||
;function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m=function(e){
|
||
switch(e){case u.K.EMOJI_PICKER:return f().emojiSparkle;case u.K.STICKER_PICKER:return f().stickerSparkle;case u.K.FILE_UPLOAD:return f().fileUploadSparkle;case u.K.BOOSTING_FLOW:default:return}};const g=function(e){var t=e.tutorialType,n=e.text,s=e.unformattedText,d=e.children,h=v(o.useState(!1),2),b=h[0],g=h[1],O=t===u.K.EMOJI_PICKER?p():y(),E=(0,a.Z)().analyticsLocations;return(0,r.jsx)(i.ua7,{"aria-label":null!=s?s:n,text:n,position:"top",tooltipContentClassName:f().tooltipText,children:function(e){var n=e.onMouseEnter,o=e.onMouseLeave;return(0,r.jsxs)("div",{onMouseEnter:function(){null==n||n();g(!0);l.default.track(c.rMx.PREMIUM_TUTORIAL_TOOLTIP_VIEWED,{location_stack:E,feature:t})},onMouseLeave:function(){null==o||o();g(!1)},children:[b&&(0,r.jsx)("img",{alt:"",src:O,className:m(t)}),d]})}})}},811276:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var r="https://dis.gd/appeal"},894772:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ct})
|
||
;var r=n(785893),o=n(667294),i=n(707961),a=n(744564),l=n(301928),u=n(956485),c=n(980604),s=n(294184),f=n.n(s),d=n(289283),p=n(202351),h=n(971402),y=n(242839),b=n(241166),v=n(728197);const m=(0,n(260561).B)({kind:"user",id:"2021-02_staff_qc_debugging",label:"Display QS scores in results. Not a real experiment",defaultConfig:{showScores:!1},treatments:[{id:1,label:"Show scores in QS results",config:{showScores:!0}}]});var g=n(61209),O=n(813869),E=n(567403),C=n(717091),j=n(715107),S=n(602397),I=n(700223),_=n(621647),w=n(773011),x=n(239813),P=n(2590),N=n(473708);function A(e){if(null==e)return null;switch(e.type){case P.d4z.GUILD_ANNOUNCEMENT:return N.Z.Messages.NEWS_CHANNEL;case P.d4z.GUILD_STORE:return N.Z.Messages.STORE_CHANNEL;case P.d4z.DM:case P.d4z.GROUP_DM:return N.Z.Messages.DM;case P.d4z.PRIVATE_THREAD:return N.Z.Messages.PRIVATE_THREAD;case P.d4z.ANNOUNCEMENT_THREAD:case P.d4z.PUBLIC_THREAD:return N.Z.Messages.THREAD;case P.d4z.GUILD_TEXT:return N.Z.Messages.TEXT_CHANNEL
|
||
;case P.d4z.GUILD_FORUM:return e.isMediaChannel()?N.Z.Messages.MEDIA_CHANNEL:N.Z.Messages.FORUM_CHANNEL;case P.d4z.GUILD_STAGE_VOICE:return N.Z.Messages.STAGE_CHANNEL;case P.d4z.GUILD_VOICE:return N.Z.Messages.VOICE_CHANNEL;case P.d4z.GUILD_CATEGORY:default:return null}}var T=n(327930),Z=n(840922),M=n(473903),R=n(749565),L=n(901165),D=n(641277),k=n(124251),U=n(294162),B=n(633878);function F(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function G(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function H(e,t){if(null==e)return{}
|
||
;var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function V(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=H(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",G(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){F(e,t,n[t])}))}return e}({},(0,B.Z)(c)),{width:n,height:i,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{className:u,fill:l,
|
||
d:"m4 3.33325h6.9167c-.0834.25-.0834.58334-.0834.83334 0 3.25 2.5834 5.83333 5.8334 5.83333.25 0 .5833 0 .8333-.08334v3.91672c0 .8333-.6667 1.5-1.5 1.5h-6.75l-3 3v-3h-2.25c-.83333 0-1.5-.6667-1.5-1.5v-9.00005c0-.83333.66667-1.5 1.5-1.5z"}),(0,r.jsx)("path",{className:u,fill:l,d:"m20.0002 4.08325-3.5-3.499998-1 1.083338 1.6666 1.66666h-3.8333v1.5h3.8333l-1.6666 1.66667 1.0833 1.08333z"})]}))}var W=n(963881),z=n(349491),Y=n(978461),K=n.n(Y);function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e){X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return X(e)}function J(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,
|
||
configurable:!0}});t&&ee(e,t)}function $(e,t){return!t||"object"!==te(t)&&"function"!=typeof t?q(e):t}function ee(e,t){ee=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return ee(e,t)}var te=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=X(e);if(t){var o=X(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $(this,n)}}var re=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);var e;(e=t.apply(this,arguments)).handleClick=function(t){t.preventDefault();var n=e.props.onClick,r=q(e).node;null!=r&&n(t,r)};e.handleMouseEnter=function(t){var n=e.props.onMouseEnter,r=q(e).node;null!=r&&n(t,r)}
|
||
;e.setRef=function(t){e.node=t};return e}var o=n.prototype;o.componentDidMount=function(){var e=this.props,t=e.focused,n=e.onFocus,r=this.node;t&&null!=r&&n(r)};o.componentDidUpdate=function(e){var t=this.props,n=t.focused,r=t.onFocus,o=this.node;null!=o&&n&&!e.focused&&r(o)};o.render=function(){var e=this.props,t=e.focused,n=e.children,o=e.score,a=e.onContextMenu,l=e.id,u=e["aria-label"];return(0,r.jsxs)(i.P3F,{role:"option",id:l,"aria-label":u,"aria-selected":t,focusProps:{enabled:!1},tabIndex:-1,innerRef:this.setRef,className:K().result,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onContextMenu:a,children:[n,null!=o?(0,r.jsx)("div",{className:K().score,children:o>>0}):null]})};return n}(o.PureComponent),oe=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderIcon=function(){var e=this.props.guild;return(0,r.jsx)("div",{className:K().guildIconContainer,children:(0,r.jsx)(k.Z,{tabIndex:-1,guild:e,
|
||
size:k.Z.Sizes.MINI,className:K().guildIcon})})};o.renderName=function(){var e=this.props.guild;return(0,r.jsx)("div",{className:K().name,children:(0,r.jsx)("span",{className:K().match,children:e.name})})};o.renderContent=function(){var e=this.props,t=e.unread,n=e.children;return(0,r.jsxs)("div",{className:t?K().contentUnread:K().contentDefault,children:[this.renderIcon(),this.renderName(),(0,r.jsx)("div",{className:K().misc,children:n})]})};o.getAccessibilityLabel=function(){var e=this.props.guild;return N.Z.Messages.QUICK_SWITCHER_RESULTS_GUILD_LABEL.format({name:e.name})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.onContextMenu,a=e.focused,l=e.score,u=e.id;return(0,r.jsx)(re,{id:u,"aria-label":this.getAccessibilityLabel(),onMouseEnter:t,onClick:n,onFocus:o,onContextMenu:i,focused:a,score:l,children:this.renderContent()})};return n}(o.Component),ie=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);return t.apply(this,arguments)}
|
||
var o=n.prototype;o.renderIcon=function(){var e,t=this.props.channel,n=(0,x.KS)(t);if(null==n)return null;var o=null!==(e=A(t))&&void 0!==e?e:"";return(0,r.jsx)("div",{className:K().iconContainer,role:"img","aria-label":o,children:(0,r.jsx)(n,{className:K().icon,width:16,height:16})})};o.renderName=function(){var e,t,n=this.props,o=n.mentions,i=n.category,a=n.channel;null!=o&&o>0&&(e=(0,r.jsx)(L.Z,{className:K().badge,value:o}));null!=i&&(t=(0,r.jsx)("span",{className:K().note,children:(0,w.F6)(i,M.default,Z.Z)}));return(0,r.jsxs)("div",{className:K().name,children:[(0,r.jsx)("span",{className:K().match,children:(0,w.F6)(a,M.default,Z.Z)}),e,this.renderVoiceStates(),t]})};o.renderVoiceStates=function(){var e=this.props,t=e.voiceStates,n=e.channel;return null==t?null:(0,r.jsx)(U.Z,{guildId:n.guild_id,users:t.map((function(e){return{user:e.user}})),max:4})};o.renderContent=function(){var e=this.props,t=e.unread,n=e.mentions,o=e.children;return(0,r.jsxs)("div",{"aria-hidden":!0,
|
||
className:t||null!=n&&n>0?K().contentUnread:K().contentDefault,children:[this.renderIcon(),this.renderName(),(0,r.jsx)("div",{className:K().misc,children:o})]})};o.getAccessibilityLabel=function(){var e,t=this.props.channel,n=null===(e=E.Z.getGuild(this.props.channel.guild_id))||void 0===e?void 0:e.name,r=(0,w.F6)(t,M.default,Z.Z),o=A(t);return N.Z.Messages.QUICK_SWITCHER_RESULTS_CHANNEL_LABEL.format({name:r,type:o,guild:n})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.onContextMenu,a=e.focused,l=e.score,u=e.id;return(0,r.jsx)(re,{id:u,"aria-label":this.getAccessibilityLabel(),onMouseEnter:t,onClick:n,onFocus:o,onContextMenu:i,focused:a,score:l,children:this.renderContent()})};return n}(o.Component);ie.defaultProps={unread:!1};var ae=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderIcon=function(){var e=this.props.channel;return(0,r.jsx)("div",{className:K().dmIconContainer,children:(0,
|
||
r.jsx)(i.qEK,{src:(0,_.x)(e),size:i.EFr.SIZE_20,"aria-hidden":!0})})};o.renderName=function(){var e,t=this.props,n=t.mentions,o=t.channel;null!=n&&n>0&&(e=(0,r.jsx)(L.Z,{className:K().badge,value:n}));return(0,r.jsxs)("div",{className:K().name,children:[(0,r.jsx)("span",{className:K().match,children:(0,w.F6)(o,M.default,Z.Z)}),e]})};o.renderContent=function(){var e=this.props,t=e.mentions,n=e.children;return(0,r.jsxs)("div",{className:null!=t&&t>0?K().contentUnread:K().contentDefault,children:[this.renderIcon(),this.renderName(),(0,r.jsx)("div",{className:K().misc,children:n})]})};o.getAccessibilityLabel=function(){var e=this.props,t=e.channel,n=e.mentions,r=(0,w.F6)(t,M.default,Z.Z);return null!=n&&n>0?N.Z.Messages.QUICK_SWITCHER_RESULTS_GROUP_DM_UNREAD_LABEL.format({name:r,mentions:n}):N.Z.Messages.QUICK_SWITCHER_RESULTS_GROUP_DM_LABEL.format({name:r})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.onContextMenu,a=e.focused,l=e.score,u=e.id
|
||
;return(0,r.jsx)(re,{id:u,"aria-label":this.getAccessibilityLabel(),onMouseEnter:t,onClick:n,onFocus:o,onContextMenu:i,focused:a,score:l,children:this.renderContent()})};return n}(o.Component),le=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderIcon=function(){var e=this.props.user;return(0,r.jsx)("div",{className:K().iconContainer,children:(0,r.jsx)(i.qEK,{src:e.getAvatarURL(void 0,20),"aria-hidden":!0,size:i.EFr.SIZE_20})})};o.getDisplayNickname=function(){var e,t=this.props,n=t.user,r=t.comparator,o=t.nickname;if(null!=r&&r===n.tag){var i=r.split("#");i.pop();e=i.join("#")}else e=null!=r&&""!==r?r:n.username;e===n.username&&(e=null!=o?o:e);return e};o.renderName=function(){var e,t=this.props,n=t.user,o=t.mentions,i=this.getDisplayNickname();null!=o&&o>0&&(e=(0,r.jsx)(L.Z,{className:K().badge,value:o}));return(0,r.jsxs)("div",{className:K().name,children:[(0,r.jsx)("span",{className:K().match,children:i}),e,(0,
|
||
r.jsx)("span",{className:K().username,children:R.ZP.getUserTag(n)})]})};o.renderContent=function(){var e=this.props,t=e.children,n=e.mentions;return(0,r.jsxs)("div",{className:null!=n&&n>0?K().contentUnread:K().contentDefault,children:[this.renderIcon(),this.renderName(),(0,r.jsx)("div",{className:K().misc,children:t})]})};o.getAccessibilityLabel=function(){var e=this.props,t=e.mentions,n=e.user,r=this.getDisplayNickname(),o=R.ZP.getUserTag(n);return null!=t&&t>0?N.Z.Messages.QUICK_SWITCHER_RESULTS_USER_UNREAD_LABEL.format({name:r,id:o,mentions:t}):N.Z.Messages.QUICK_SWITCHER_RESULTS_USER_LABEL.format({name:r,id:o})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.onContextMenu,a=e.focused,l=e.score,u=e.id;return(0,r.jsx)(re,{id:u,"aria-label":this.getAccessibilityLabel(),onMouseEnter:t,onClick:n,onFocus:o,onContextMenu:i,focused:a,score:l,children:this.renderContent()})};return n}(o.Component),ue=function(e){J(n,e);var t=ne(n);function n(){Q(this,n)
|
||
;return t.apply(this,arguments)}var o=n.prototype;o.renderContent=function(){var e=this.props,t=e.children,n=e.application;return(0,r.jsxs)("div",{className:K().contentDefault,children:[(0,r.jsx)("div",{className:K().iconContainer,children:(0,r.jsx)(D.Z,{tabIndex:-1,className:K().gameIcon,game:n,size:K().gameIconSize})}),n.name,(0,r.jsx)("div",{className:K().misc,children:t})]})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.focused,a=e.id;return(0,r.jsx)(re,{id:a,onMouseEnter:t,onClick:n,onFocus:o,focused:i,children:this.renderContent()})};return n}(o.Component),ce=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);return t.apply(this,arguments)}n.prototype.render=function(){return(0,r.jsx)("div",{className:K().resultDefault,children:(0,r.jsx)("div",{className:K().contentDefault,children:(0,r.jsx)("div",{className:K().header,children:this.props.children})})})};return n}(o.Component),se=function(e){J(n,e);var t=ne(n);function n(){Q(this,n)
|
||
;return t.apply(this,arguments)}var o=n.prototype;o.renderContent=function(){var e,t,n=this.props,o=n.link,i=n.children,a=(0,T.Qj)(o.path);if(null==a||void 0===a.messageId){e=N.Z.Messages.QUICKSWITCHER_LINK_UNKNOWN;t=(0,r.jsx)(W.Z,{width:16,height:16})}else if((0,T.VO)(a)){e=N.Z.Messages.QUICKSWITCHER_LINK_MESSAGE;t=(0,r.jsx)(V,{width:16,height:16})}else{e=N.Z.Messages.QUICKSWITCHER_LINK_NO_ACCESS;t=(0,r.jsx)(z.Z,{width:16,height:16})}return(0,r.jsxs)("div",{className:K().contentDefault,children:[(0,r.jsx)("div",{className:K().iconContainer,children:t}),e,(0,r.jsx)("div",{className:K().misc,children:i})]})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.onContextMenu,a=e.focused,l=e.score,u=e.id;return(0,r.jsx)(re,{id:u,onMouseEnter:t,onClick:n,onFocus:o,onContextMenu:i,focused:a,score:l,children:this.renderContent()})};return n}(o.Component),fe=n(443812),de=n(930948),pe=n(348592),he=n(853158),ye=n(513328),be=n(180127),ve=n.n(be);function me(e,t){
|
||
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Oe(e){Oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Oe(e)}function Ee(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e,t){Ce=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ce(e,t)}var je=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}()
|
||
;return function(){var n,r=Oe(e);if(t){var o=Oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ee(this,n)}}var Ie={friction:15,tension:100},_e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Ce(e,t)}(i,e);var t=Se(i);function i(){me(this,i);var e;(e=t.apply(this,arguments)).state={shown:!1,translateY:new he.Z.Value(0)};e.rootRef=o.createRef();e.focusTimeout=new ye.V7;e.handleResultFocus=function(t){var n=t.node;e.focusTimeout.start(1,(function(){if(e.props.hasQuery&&null!=n&&null!=e.rootRef.current){var t=e.rootRef.current.getBoundingClientRect().top,r=n.getBoundingClientRect().top,o=Math.abs(t-r);e.springTo(o-118+9)}else e.springTo(0)}))};return e}var a=i.prototype;a.componentDidMount=function(){this.setState({shown:!0})
|
||
;de.S.subscribe(P.CkL.QUICKSWITCHER_RESULT_FOCUS,this.handleResultFocus)};a.componentWillUnmount=function(){this.focusTimeout.stop();de.S.unsubscribe(P.CkL.QUICKSWITCHER_RESULT_FOCUS,this.handleResultFocus)};a.componentDidUpdate=function(){this.props.hasQuery||this.springTo(0)};a.springTo=function(e){he.Z.spring(this.state.translateY,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){ge(e,t,n[t])}))}return e}({toValue:Math.min(e,250)},Ie)).start()};a.renderArrowGroup=function(e){return(0,r.jsxs)("div",{className:f()(ve().arrowGroup,e),children:[(0,r.jsx)(he.Z.div,{className:f()(ve().arrowContainer,ve().horizontal),style:this.getStyle(),children:(0,r.jsx)("img",{alt:"",src:n(185204),className:ve().arrowIcon})}),(0,r.jsx)("div",{
|
||
className:f()(ve().arrowContainer,ve().diag1),children:(0,r.jsx)("img",{alt:"",src:n(73316),className:ve().arrowIcon})}),(0,r.jsx)("div",{className:f()(ve().arrowContainer,ve().diag2),children:(0,r.jsx)("img",{alt:"",src:n(385488),className:ve().arrowIcon})})]})};a.renderContent=function(){return(0,r.jsxs)("div",{className:ve().tutorialMessages,children:[(0,r.jsx)("div",{className:ve().searchMessage,children:N.Z.Messages.QUICKSWITCHER_TUTORIAL_MESSAGE_SEARCH}),(0,r.jsx)("div",{className:ve().selectMessage,children:N.Z.Messages.QUICKSWITCHER_TUTORIAL_MESSAGE_SELECT})]})};a.render=function(){var e,t=this.props.hasQuery,n=this.state.shown;return(0,r.jsxs)("div",{ref:this.rootRef,className:f()(ve().tutorial,(e={},ge(e,ve().shown,n),ge(e,ve().hasQuery,t),e)),children:[this.renderContent(),this.renderArrowGroup(ve().left),this.renderArrowGroup(ve().right)]})};a.getStyle=function(){return{transform:[{translateY:this.state.translateY.interpolate({inputRange:[0,250],
|
||
outputRange:["0px","".concat(250,"px")]})},{translateZ:0}]}};return i}(o.PureComponent);const we=_e;var xe=n(116707),Pe=n.n(xe);function Ne(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Ae(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ne(i,r,o,a,l,"next",e)}function l(e){Ne(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ze(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Me(e){Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Me(e)}function Re(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,
|
||
configurable:!0}});t&&Ue(e,t)}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ze(e,t,n[t])}))}return e}function De(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ke(e,t){return!t||"object"!==Be(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
;return e}(e):t}function Ue(e,t){Ue=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ue(e,t)}var Be=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Me(e);if(t){var o=Me(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ke(this,n)}}var Ge=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,
|
||
r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},He=10,Ve=function(){return(0,r.jsxs)("div",{className:Pe().emptyState,children:[(0,r.jsx)("div",{className:Pe().emptyStateNote,children:N.Z.Messages.QUICKSWITCHER_EMPTY_TEXT}),(0,r.jsx)("div",{className:Pe().emptyStateCTA,children:(0,r.jsx)(i.eee,{
|
||
href:pe.Z.getArticleURL(P.BhN.QUICK_SWITCHER_TUTORIAL),children:N.Z.Messages.QUICKSWITCHER_EMPTY_CTA})})]})},We=function(e){Re(n,e);var t=Fe(n);function n(){Te(this,n);return t.apply(this,arguments)}n.prototype.render=function(){var e=E.Z.getGuild(this.props.channel.guild_id);return(0,r.jsx)(ie,De(Le({},this.props),{children:(0,r.jsx)("div",{className:Pe().miscContainer,children:null!=e?e.name:null})}))};return n}(o.Component);We.defaultProps={unread:!1};var ze=p.ZP.connectStores([C.ZP,g.Z],(function(e){var t=e.channel;return{unread:C.ZP.hasUnread(t.id),mentions:C.ZP.getMentionCount(t.id),category:g.Z.getChannel(t.parent_id)}}))(We),Ye=p.ZP.connectStores([S.ZP],(function(e){var t=e.channel;if(null==t.guild_id)throw new Error("ConnectedVoiceChannel - somehow we got a voice channel with no guild_id...");return{voiceStates:S.ZP.getVoiceStates(t.guild_id)[t.id]}}))(We),Ke=p.ZP.connectStores([O.Z],(function(e){var t=e.guild;return{unread:O.Z.hasUnread(t.id)}
|
||
}))(oe),qe=p.ZP.connectStores([C.ZP],(function(e){var t=e.channel;return{mentions:C.ZP.getMentionCount(t.id)}}))(ae),Qe=p.ZP.connectStores([g.Z,C.ZP],(function(e){var t=e.user,n=g.Z.getDMFromUserId(t.id);return{mentions:null!=n?C.ZP.getMentionCount(n):0}}))(le);function Xe(e,t,n){return(0,r.jsx)(i.ua7,{text:n,children:function(e){return(0,r.jsx)("span",De(Le({},e),{className:Pe().autocompleteQuerySymbol,children:t}))}},e)}var Je=function(e){Re(a,e);var t=Fe(a);function a(){Te(this,a);var e;(e=t.apply(this,arguments)).scrollerRef=o.createRef();e.inputRef=o.createRef();e._listId=(0,fe.hQ)();e.state={query:e.props.query,mouseFocusDisabled:!0};e.handleInputChange=function(){var t=e.inputRef.current;null!=t&&e.search(t.value)};e.handleMouseMove=function(){!1!==e.state.mouseFocusDisabled&&e.setState({mouseFocusDisabled:!1})};e.focusResult=function(t){e.state.mouseFocusDisabled||(0,u.tF)(e.props.results.indexOf(t))};e.selectResult=function(e){(0,u.Se)(e)};e.handleContextMenu=function(t){
|
||
var o=e.props.results[e.props.selectedIndex];switch(o.type){case v.h8.GUILD:return(0,h.jW)(t,Ae((function(){var e,t;return Ge(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(92224),n.e(46194),n.e(7421),n.e(86502),n.e(76003),n.e(19669),n.e(77357),n.e(9907),n.e(66240),n.e(55325)]).then(n.bind(n,166240))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,De(Le({},e),{guild:o.record,onSelect:u.Cp,hideSettings:!0}))}]}}))})));case v.h8.TEXT_CHANNEL:case v.h8.VOICE_CHANNEL:var i=o.record,a=E.Z.getGuild(i.getGuildId());if(null==a)return;switch(i.type){case P.d4z.GUILD_TEXT:case P.d4z.GUILD_ANNOUNCEMENT:case P.d4z.GUILD_FORUM:return(0,h.jW)(t,Ae((function(){var e,t;return Ge(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(84663),n.e(58539),n.e(11261)]).then(n.bind(n,811261))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,De(Le({},e),{channel:i,guild:a,onSelect:u.Cp}))}]}}))})));case P.d4z.GUILD_VOICE:
|
||
case P.d4z.GUILD_STAGE_VOICE:return(0,h.jW)(t,Ae((function(){var e,t;return Ge(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(84663),n.e(58539),n.e(26981)]).then(n.bind(n,926981))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,De(Le({},e),{channel:i,guild:a,onSelect:u.Cp}))}]}}))})));case P.d4z.ANNOUNCEMENT_THREAD:case P.d4z.PUBLIC_THREAD:case P.d4z.PRIVATE_THREAD:return(0,h.jW)(t,Ae((function(){var e,t;return Ge(this,(function(o){switch(o.label){case 0:return[4,n.e(81580).then(n.bind(n,881580))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,De(Le({},e),{channel:i,onSelect:u.Cp}))}]}}))})));case P.d4z.GUILD_STORE:return(0,h.jW)(t,Ae((function(){var e,t;return Ge(this,(function(o){switch(o.label){case 0:return[4,n.e(48372).then(n.bind(n,848372))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,De(Le({},e),{channel:i,guild:a,onSelect:u.Cp}))}]}}))})));case P.d4z.GUILD_DIRECTORY:return(0,
|
||
h.jW)(t,Ae((function(){var e,t;return Ge(this,(function(o){switch(o.label){case 0:return[4,n.e(14284).then(n.bind(n,914284))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,De(Le({},e),{channel:i}))}]}}))})))}break;case v.h8.GROUP_DM:return(0,h.jW)(t,Ae((function(){var e,t;return Ge(this,(function(i){switch(i.label){case 0:return[4,n.e(13035).then(n.bind(n,413035))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,De(Le({},e),{channel:o.record,selected:j.Z.getChannelId()===o.record.id,onSelect:u.Cp}))}]}}))})));case v.h8.USER:return(0,h.jW)(t,Ae((function(){var e,t;return Ge(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(85572)]).then(n.bind(n,810848))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,De(Le({},e),{user:o.record,onSelect:u.Cp}))}]}}))})))}};e.handleKeyDown=function(t){var n=e.state,r=n.mouseFocusDisabled,o=n.query,i=e.props.results;!1===r&&e.setState({
|
||
mouseFocusDisabled:!0});var a=t.key.toLowerCase(),l=e.props.selectedIndex;switch(a){case"escape":t.preventDefault();t.stopPropagation();o.length>0?e.search(""):(0,u.Cp)();return;case"k":if(!0===t.ctrlKey||!0===t.metaKey){t.preventDefault();t.stopPropagation();(0,u.Cp)()}return;case"enter":if(-1===l)return;t.preventDefault();if(t.altKey)return e.handleContextMenu(t);var c=i[l];null!=c&&e.selectResult(c);return;case"arrowup":l=(0,v.gJ)(v.a8.UP,l,i);break;case"arrowdown":l=(0,v.gJ)(v.a8.DOWN,l,i);break;case"n":if(!t.ctrlKey)return;l=(0,v.gJ)(v.a8.DOWN,l,i);break;case"p":if(!t.ctrlKey)return;l=(0,v.gJ)(v.a8.UP,l,i);break;default:return}t.preventDefault();(0,u.tF)(l)};e.renderRow=function(t){var n=t.row,o=e.props.results[n],i=e.props.selectedIndex,a=m.getCurrentConfig({}).showScores;switch(o.type){case v.h8.HEADER:return(0,r.jsx)(ce,{children:o.record.text},"".concat(o.type,"-").concat(o.record.id));case v.h8.TEXT_CHANNEL:return(0,r.jsx)(ze,{id:e.getRowId(n),focused:i>=0&&n===i,
|
||
onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,channel:o.record,score:a?o.score:void 0},"".concat(o.type,"-").concat(o.record.id));case v.h8.VOICE_CHANNEL:return(0,r.jsx)(Ye,{id:e.getRowId(n),focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,channel:o.record,score:a?o.score:void 0},"".concat(o.type,"-").concat(o.record.id));case v.h8.GUILD:return(0,r.jsx)(Ke,{id:e.getRowId(n),focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,guild:o.record,score:a?o.score:void 0},"".concat(o.type,"-").concat(o.record.id));case v.h8.USER:return(0,r.jsx)(Qe,{id:e.getRowId(n),focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){
|
||
return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,user:o.record,comparator:o.comparator,score:a?o.score:void 0},"".concat(o.type,"-").concat(o.record.id));case v.h8.GROUP_DM:return(0,r.jsx)(qe,{id:e.getRowId(n),focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,channel:o.record,score:a?o.score:void 0},"".concat(o.type,"-").concat(o.record.id));case v.h8.APPLICATION:return(0,r.jsx)(ue,{id:e.getRowId(n),focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,application:o.record},"".concat(o.type,"-").concat(o.record.id));case v.h8.LINK:return(0,r.jsx)(se,{focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,link:o.record,score:a?o.score:void 0,
|
||
id:e.getRowId(n)},"".concat(o.type,"-").concat(o.record.id));default:return null}};return e}var l=a.prototype;l.componentDidMount=function(){b.Z.disable();b.Z.enableTemp(y.u)};l.componentWillUnmount=function(){b.Z.disableTemp();b.Z.enable()};l.componentDidUpdate=function(e,t){var n=this.state,r=n.mouseFocusDisabled,o=n.query,i=this.props.selectedIndex,a=this.scrollerRef.current;null!=a&&(o!==t.query?a.scrollTo({to:0}):r&&i>=0&&a.scrollToIndex({section:0,row:i,padding:10}))};l.close=function(){(0,u.Cp)()};l.search=function(e){this.setState({query:e});(0,u.yC)(e)};l.renderInput=function(){var e=this.props,t=e.selectedIndex,n=e.results,o=this.state.query,a=n.length>0&&""!==o;return(0,r.jsx)(i.tEY,{children:(0,r.jsx)("input",{className:Pe().input,"aria-label":N.Z.Messages.QUICK_SWITCHER,ref:this.inputRef,type:"text",role:"combobox","aria-controls":this._listId,"aria-expanded":a,"aria-activedescendant":a?this.getRowId(t):void 0,"aria-autocomplete":"list",
|
||
placeholder:N.Z.Messages.QUICKSWITCHER_PLACEHOLDER,onChange:this.handleInputChange,onKeyDown:this.handleKeyDown,value:this.state.query,spellCheck:!1,autoFocus:!0})})};l.renderSection=function(){return null};l.renderResults=function(){var e=this.state.query,t=this.props.results;return 0===t.length&&e.length>0?(0,r.jsx)(Ve,{}):0===t.length?null:(0,r.jsx)(i._2F,{innerId:this._listId,innerRole:"listbox","aria-label":N.Z.Messages.QUICK_SWITCHER_RESULTS_LABEL,ref:this.scrollerRef,sectionHeight:0,rowHeight:34,paddingBottom:He,sections:[t.length],className:Pe().scroller,renderRow:this.renderRow,renderSection:this.renderSection})};l.focusNode=function(e){de.S.dispatch(P.CkL.QUICKSWITCHER_RESULT_FOCUS,{node:e})};l.getRowId=function(e){return"quick-switcher-".concat(this._listId,"-item-").concat(e)};l.renderProtip=function(){return(0,r.jsx)(I.Z,{className:f()(Pe().protip,Ze({},Pe().hasContent,this.state.query.length>0)),type:I.Z.Types.INLINE,children:N.Z.Messages.QUICKSWITCHER_PROTIP.format({
|
||
userSymbolHook:function(e,t){return Xe(t,v.xQ.USER,N.Z.Messages.QUICKSWITCHER_PROTIP_USERNAMES)},textChannelSymbolHook:function(e,t){return Xe(t,v.xQ.TEXT_CHANNEL,N.Z.Messages.QUICKSWITCHER_PROTIP_TEXT_CHANNELS)},voiceChannelSymbolHook:function(e,t){return Xe(t,v.xQ.VOICE_CHANNEL,N.Z.Messages.QUICKSWITCHER_PROTIP_VOICE_CHANNELS)},guildSymbolHook:function(e,t){return Xe(t,v.xQ.GUILD,N.Z.Messages.QUICKSWITCHER_PROTIP_GUILDS)},helpdeskArticle:pe.Z.getArticleURL(P.BhN.QUICK_SWITCHER_TUTORIAL)})})};l.renderTutorial=function(){var e=this.state.query,t=this.props,n=t.seenTutorial,o=t.results;return n?null:(0,r.jsx)(we,{hasQuery:e.length>0&&o.length>0})};l.render=function(){return(0,r.jsx)(i.Y0X,{"aria-label":N.Z.Messages.QUICK_SWITCHER,size:i.CgR.DYNAMIC,transitionState:this.props.transitionState,className:f()(Pe().container,d.tq&&Pe().mobileContainer),fullscreenOnMobile:!1,children:(0,r.jsxs)("div",{className:f()(Pe().quickswitcher,d.tq&&Pe().mobileQuickswitcher),
|
||
onMouseMove:this.handleMouseMove,children:[this.renderInput(),this.renderResults(),this.renderProtip(),this.renderTutorial()]})})};return a}(o.PureComponent);function $e(e){var t=(0,p.cj)([c.Z],(function(){return c.Z.getProps()}));return(0,r.jsx)(Je,Le({},t,e))}function et(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function nt(e){nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return nt(e)}function rt(e,t){return!t||"object"!==it(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ot(e,t){ot=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return ot(e,t)}var it=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}
|
||
;function at(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=nt(e);if(t){var o=nt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return rt(this,n)}}var lt="QUICK_SWITCHER_MODAL_KEY",ut=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&ot(e,t)}(n,e);var t=at(n);function n(){et(this,n);return t.apply(this,arguments)}var o=n.prototype;o._initialize=function(){a.Z.subscribe("QUICKSWITCHER_SHOW",this.handleShow);a.Z.subscribe("QUICKSWITCHER_HIDE",this.handleHide)};o._terminate=function(){
|
||
a.Z.unsubscribe("QUICKSWITCHER_SHOW",this.handleShow);a.Z.unsubscribe("QUICKSWITCHER_HIDE",this.handleHide)};o.handleShow=function(){c.Z.isOpen()&&!(0,i.nfh)(lt)&&(0,i.h7j)((function(e){return(0,r.jsx)($e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){tt(e,t,n[t])}))}return e}({},e))}),{modalKey:lt,instant:!0,onCloseCallback:u.Cp})};o.handleHide=function(){(0,i.Mr3)(lt)};o.__getLocalVars=function(){return{QUICK_SWITCHER_MODAL_KEY:lt}};return n}(l.Z);const ct=new ut},530537:(e,t,n)=>{"use strict";n.d(t,{S:()=>a,c:()=>l});var r=n(2590),o=n(897196),i=/^\d+$/;function a(e){return null!=e&&(e===r.ME||e===r.I_8||!!i.test(e))}function l(e){return null==e||(!!i.test(e)||!!(0,o.AB)(e))}},928733:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s})
|
||
;var r=n(785893),o=n(667294),i=n(723812),a=n(336194),l=n(707961);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){var t=(0,o.useRef)(null),n=c((0,o.useState)(null),2),u=n[0],s=n[1],f=c((0,o.useState)(null),2),d=f[0],p=f[1],h=(0,l.dQu)(a.Z.colors.BACKGROUND_PRIMARY).hsl(),y=(0,l.dQu)(a.Z.colors.TEXT_NORMAL).hsl(),b=(0,l.dQu)(a.Z.colors.BACKGROUND_ACCENT).hsl(),v=(0,l.dQu)(a.Z.unsafe_rawColors.BRAND_500).hsl();(0,o.useEffect)((function(){var e=t.current;if(null!=e){var n,r=new i.TimelineGraphView(e,null!==(n=window.devicePixelRatio)&&void 0!==n?n:1);r.backgroundColor=h;r.textColor=y;r.gridColor=b;r.timeOptions={timeStyle:"short"};r.fontFamily="gg sans";r.fontSize=11;var o=new i.TimelineDataSeries;o.setColor(v);r.addDataSeries(o);r.updateEndDate();s(r);p(o)}}),[t,h,v,b,y]);null==d||d.setPoints(e.dataPoints);null==u||u.updateEndDate();var m={width:e.width,height:e.height};return(0,r.jsx)("canvas",{style:m,width:e.width,
|
||
height:e.height,ref:t},"canvas")}},878709:(e,t,n)=>{"use strict";n.d(t,{Z:()=>tt});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n.n(l),c=n(202351),s=n(707961),f=n(224813),d=n(790405),p=n(396043),h=n(64234),y=n(769321),b=n(733300),v=n(715107),m=n(131795),g=n.n(m),O=n(853158),E=n(355616),C=n.n(E);function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e){S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return S(e)}function I(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e,t){_=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return _(e,t)}var w=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function x(e){var t=function(){
|
||
if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function P(e){var t=function(e){return e.interpolate({inputRange:[0,1],outputRange:["0px","1px"]})};return{transform:[{translateX:t(e.x)},{translateY:t(e.y)}]}}const N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_(e,t)}(n,e);var t=x(n);function n(){j(this,n);var e;(e=t.apply(this,arguments)).state={x:new O.Z.Value(0),y:new O.Z.Value(0)};e._isMounted=!1;e.shouldLoop=function(){return e._isMounted};return e}
|
||
var o=n.prototype;o.componentDidMount=function(){this._isMounted=!0;var e=this.state,t=e.x,n=e.y;if("Firefox"!==g().name){O.Z.animate(t,{loop:!0,toValueMin:-74,toValueMax:95,overshootClamping:!0,friction:5,tension:1,shouldLoop:this.shouldLoop});O.Z.animate(n,{loop:!0,toValueMin:-59,toValueMax:75,overshootClamping:!0,friction:5,tension:1,shouldLoop:this.shouldLoop})}};o.componentWillUnmount=function(){this._isMounted=!1};o.render=function(){return(0,r.jsxs)("div",{className:C().searchIndexAnimation,children:[(0,r.jsx)("div",{className:C().searchIndexBackground}),(0,r.jsxs)("svg",{className:C().searchIndexForeground,width:"320",height:"280",children:[(0,r.jsx)("defs",{children:(0,r.jsx)("rect",{id:"search-index-foreground-mask-a",width:"80",height:"80",rx:"40"})}),(0,r.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,r.jsxs)("g",{transform:"translate(120 80)",children:[(0,r.jsx)("mask",{id:"search-index-foreground-mask-b",fill:"#fff",children:(0,r.jsx)(O.Z.use,{style:P(this.state),
|
||
className:C().mask,xlinkHref:"#search-index-foreground-mask-a"})}),(0,r.jsxs)("g",{mask:"url(#search-index-foreground-mask-b)",children:[(0,r.jsx)("path",{fill:"#FFF",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338"}),(0,r.jsx)("path",{fill:"#FFF",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338"}),(0,r.jsx)("path",{fill:"#FFD773",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,
|
||
r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-15.0267 170.8361c0 6.311-5.116 11.427-11.428 11.427-6.31 0-11.426-5.116-11.426-11.427s5.116-11.427 11.426-11.427c6.312 0 11.428 5.116 11.428 11.427z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{fill:"#FFF",d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{fill:"#FFD773",d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",
|
||
d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-12.39 165.5622c-6.311 0-11.427-5.116-11.427-11.427s5.116-11.427 11.427-11.427 11.427 5.116 11.427 11.427c0 2.727-.955 5.231-2.55 7.196",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{fill:"#FFF",d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{fill:"#FFD773",
|
||
d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-23.8168 129.5232c6.311 0 11.427 5.116 11.427 11.427s-5.116 11.427-11.427 11.427c-6.312 0-11.427-5.116-11.427-11.427",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967"}),(0,r.jsx)("path",{fill:"#FFF",
|
||
d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967"}),(0,r.jsx)("path",{fill:"#FFD773",d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M110.2125-35.5789c.556 6.286-4.089 11.833-10.375 12.39-6.287.556-11.834-4.089-12.391-10.375-.555-6.286 4.089-11.834 10.376-12.39",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#C2FFF9",
|
||
d:"M-76.4877 122.3928l14.704 5.777-8.133 24.358-25.269-4.57 1.997-15.671"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-76.4877 122.3928l14.704 5.777-8.133 24.358-25.269-4.57 1.997-15.671zm-18.6982 25.5654l33.402-19.788",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-93.1889 132.2868l23.272 20.241-6.571-30.135",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#C2FFF9",d:"M151.5172-63.3406l4.276 12.99-20.723 8.042-10.921-19.362 11.546-7.33"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M151.5172-63.3406l4.276 12.99-20.723 8.042-10.921-19.362 11.546-7.33z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M135.6949-69.0003l-.625 26.692 16.447-21.032m-27.3679 1.6701l31.645 11.319",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#E4E9F8",
|
||
d:"M59.7897 13.2502l-102.171 25.055c-2.453.602-4.93-.899-5.531-3.352l-17.794-72.557c-.602-2.454.9-4.93 3.353-5.532l102.171-25.055c2.454-.601 4.931.899 5.533 3.353l17.793 72.556c.601 2.454-.9 4.93-3.354 5.532"}),(0,r.jsx)("path",{fill:"#7687B2",d:"M45.3502-64.8382c-.602-2.453-3.078-3.954-5.532-3.353l-102.171 25.056c-2.454.601-3.954 3.078-3.353 5.531l3.489 14.228 111.056-27.234-3.489-14.228z"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M59.7897 13.2502l-102.171 25.055c-2.453.602-4.93-.899-5.531-3.352l-17.794-72.557c-.602-2.454.9-4.93 3.353-5.532l102.171-25.055c2.454-.601 4.931.899 5.533 3.353l17.793 72.556c.601 2.454-.9 4.93-3.354 5.532zM-62.2172-23.3763l111.057-27.234m-95.9164 3.7287l-8.367 21.844m30.0096-27.1517l-8.366 21.844m30.0096-27.1516l-8.366 21.844M17.8522-62.804L9.4862-40.96m30.0095-27.1516l-8.366 21.844",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FF7B78",
|
||
d:"M28.693-19.9388c3.986 16.254-5.959 32.661-22.213 36.647-16.254 3.986-32.661-5.959-36.646-22.213-3.987-16.253 5.959-32.661 22.213-36.646 16.252-3.986 32.661 5.959 36.646 22.212"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M28.693-19.9388c3.986 16.254-5.959 32.661-22.213 36.647-16.254 3.986-32.661-5.959-36.646-22.213-3.987-16.253 5.959-32.661 22.213-36.646 16.252-3.986 32.661 5.959 36.646 22.212z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M-16.3051-26.1936l7.999 32.618 26.541-23.798"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-16.3051-26.1936l7.999 32.618 26.541-23.798z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M101.5895 23.7946l33.137 35.518-29.647-1.029c-2.585-.09-4.608-2.258-4.518-4.843l1.028-29.646z"}),(0,r.jsx)("path",{fill:"#E4E9F8",
|
||
d:"M134.7262 59.3127l-3.195 92.059c-.089 2.585-2.258 4.608-4.843 4.519l-93.619-3.249c-2.586-.09-4.609-2.258-4.519-4.844l4.223-121.705c.09-2.585 2.259-4.608 4.844-4.518l63.972 2.22"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M134.7262 59.3127l-3.195 92.059c-.089 2.585-2.258 4.608-4.843 4.519l-93.619-3.249c-2.586-.09-4.609-2.258-4.519-4.844l4.223-121.705c.09-2.585 2.259-4.608 4.844-4.518l63.972 2.22",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M101.5895 23.7946l33.137 35.518-29.647-1.029c-2.585-.09-4.608-2.258-4.518-4.843l1.028-29.646z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M104.15 6.4353l39.81 27.834-29.21 5.171c-2.547.451-4.978-1.248-5.429-3.796l-5.171-29.209z"}),(0,r.jsx)("path",{fill:"#E4E9F8",
|
||
d:"M143.9596 34.2692l16.058 90.704c.45 2.547-1.249 4.978-3.796 5.429l-92.242 16.329c-2.546.452-4.977-1.248-5.428-3.795l-21.229-119.914c-.451-2.547 1.248-4.978 3.796-5.428l63.031-11.159"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M143.9596 34.2692l16.058 90.704c.45 2.547-1.249 4.978-3.796 5.429l-92.242 16.329c-2.546.452-4.977-1.248-5.428-3.795l-21.229-119.914c-.451-2.547 1.248-4.978 3.796-5.428l63.031-11.159",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M104.15 6.4353l39.81 27.834-29.21 5.171c-2.547.451-4.978-1.248-5.429-3.796l-5.171-29.209z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#5871B7",d:"M10.7613-26.0428h117.831c2.829 0 5.123 2.294 5.123 5.123v7.341c0 1.565.716 3.045 1.943 4.016l7 5.542c.659.522.646 1.525-.026 2.029l-6.867 5.151c-1.29.967-2.05 2.485-2.05 4.098v7.685c0 2.829-2.294 5.123-5.123 5.123H10.7613c-2.83 0-5.124-2.294-5.124-5.123v-35.862c0-2.829 2.294-5.123 5.124-5.123"}),(0,
|
||
r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M10.7613-26.0428h117.831c2.829 0 5.123 2.294 5.123 5.123v7.341c0 1.565.716 3.045 1.943 4.016l7 5.542c.659.522.646 1.525-.026 2.029l-6.867 5.151c-1.29.967-2.05 2.485-2.05 4.098v7.685c0 2.829-2.294 5.123-5.123 5.123H10.7613c-2.83 0-5.124-2.294-5.124-5.123v-35.862c0-2.829 2.294-5.123 5.124-5.123zM64.1588 1.2805h-43.147m21.5738-8.1114h-21.574m91.3894 0H49.816m33.9815-8.1118h-62.786",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M166.0641 58.8137l-21.664 89.53c-.608 2.514-3.14 4.06-5.654 3.451l-91.048-22.031c-2.515-.608-4.06-3.14-3.451-5.654l28.64-118.362c.609-2.515 3.14-4.059 5.655-3.451l62.215 15.055"}),(0,r.jsx)("path",{fill:"#E4E9F8",d:"M140.7574 17.3513l25.307 41.462-28.832-6.976c-2.515-.609-4.06-3.14-3.452-5.654l6.977-28.832z"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",
|
||
d:"M166.0641 58.8137l-21.664 89.53c-.608 2.514-3.14 4.06-5.654 3.451l-91.048-22.031c-2.515-.608-4.06-3.14-3.451-5.654l28.64-118.362c.609-2.515 3.14-4.059 5.655-3.451l62.215 15.055",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M140.7574 17.3513l25.307 41.462-28.832-6.976c-2.515-.609-4.06-3.14-3.452-5.654l6.977-28.832z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#5865f2",d:"M84.6422 57.6999h-117.832c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.045-1.943-4.017l-7-5.542c-.659-.521-.646-1.525.027-2.029l6.867-5.151c1.29-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h117.832c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",
|
||
d:"M84.6422 57.6999h-117.832c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.045-1.943-4.017l-7-5.542c-.659-.521-.646-1.525.027-2.029l6.867-5.151c1.29-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h117.832c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123zM-26.3637 22.2653h48.67M6.0826 30.3767h68.309m-100.7553 0h22.799m53.1942 8.1118h14.942m-24.3346 0h4.534m-71.1346 0h54.093m-54.093 8.1113h63.186",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#98AFED",d:"M63.191 113.1003h-130.64c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.046-1.943-4.017l-7-5.542c-.658-.521-.646-1.525.026-2.029l6.868-5.151c1.291-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h130.64c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",
|
||
d:"M63.191 113.1003h-130.64c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.046-1.943-4.017l-7-5.542c-.658-.521-.646-1.525.026-2.029l6.868-5.151c1.291-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h130.64c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123zM-60.6225 77.6657h99.433m-23.4398 8.1114h7.949m-19.6892 0h-64.253m0 8.1118h47.398m-47.398 8.1113h116.122",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#E4E9F8",d:"M37.8805 30.8191h-105.198c-2.527 0-4.574-2.048-4.574-4.574v-74.706c0-2.527 2.047-4.574 4.574-4.574h105.198c2.526 0 4.574 2.047 4.574 4.574v74.706c0 2.526-2.048 4.574-4.574 4.574"}),(0,r.jsx)("path",{fill:"#7687B2",d:"M42.4547-33.7181v-14.743c0-2.527-2.048-4.574-4.574-4.574h-105.198c-2.527 0-4.575 2.047-4.575 4.574v14.743h114.347z"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",
|
||
d:"M37.8805 30.8191h-105.198c-2.527 0-4.574-2.048-4.574-4.574v-74.706c0-2.527 2.047-4.574 4.574-4.574h105.198c2.526 0 4.574 2.047 4.574 4.574v74.706c0 2.526-2.048 4.574-4.574 4.574zM-71.892-33.8123H42.455m-94.0442-19.2231l-13.328 19.223m35.6121-19.223l-13.328 19.223m35.6132-19.223l-13.328 19.223m35.6122-19.223l-13.328 19.223m35.6121-19.223l-13.328 19.223",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FF7B78",d:"M15.5836-8.8211c0 16.735-13.566 30.302-30.302 30.302-16.735 0-30.302-13.567-30.302-30.302s13.567-30.302 30.302-30.302c16.736 0 30.302 13.567 30.302 30.302"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M15.5836-8.8211c0 16.735-13.566 30.302-30.302 30.302-16.735 0-30.302-13.567-30.302-30.302s13.567-30.302 30.302-30.302c16.736 0 30.302 13.567 30.302 30.302z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M-26.6293-25.6136v33.584l31.445-16.792"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",
|
||
d:"M-26.6293-25.6136v33.584l31.445-16.792zM184.3375 8.3772v6.43m3.2149-3.2152h-6.43m-292.9079 79.082v6.43m3.2148-3.2151h-6.43M195.901-43.6692l-1.516 1.515m-6.0611 6.0621l-1.516 1.516m9.0931-.0004l-1.516-1.516m-6.0611-6.0616l-1.516-1.515M-88.642 168.9265l-1.516 1.516m-6.0621 6.0616l-1.516 1.515m9.0941.0001l-1.516-1.515m-6.0621-6.0621l-1.516-1.516M174.3463-8.8211c0 1.775-1.439 3.215-3.215 3.215-1.776 0-3.215-1.44-3.215-3.215s1.439-3.215 3.215-3.215c1.776 0 3.215 1.44 3.215 3.215z",strokeLinecap:"round",strokeLinejoin:"round"})]})]}),(0,r.jsxs)(O.Z.g,{className:C().magnifyingGlass,style:P(this.state),children:[(0,r.jsx)("path",{fill:"#C9D2F0",d:"M89.8311 190.9259c-2.441-2.441-2.441-6.4 0-8.841l36.771-36.771 8.841 8.841-36.771 36.771c-2.441 2.441-6.4 2.441-8.841 0"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M89.8311 190.9259c-2.441-2.441-2.441-6.4 0-8.841l36.771-36.771 8.841 8.841-36.771 36.771c-2.441 2.441-6.4 2.441-8.841 0z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,
|
||
r.jsx)("path",{fill:"#9F7373",d:"M100.1458 189.4524l-8.841-8.841c-1.628-1.628-1.628-4.267 0-5.894l17.437-17.437c1.627-1.628 4.266-1.628 5.894 0l8.841 8.841c1.628 1.628 1.628 4.267 0 5.894l-17.437 17.437c-1.627 1.628-4.266 1.628-5.894 0"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M100.1458 189.4524l-8.841-8.841c-1.628-1.628-1.628-4.267 0-5.894l17.437-17.437c1.627-1.628 4.266-1.628 5.894 0l8.841 8.841c1.628 1.628 1.628 4.267 0 5.894l-17.437 17.437c-1.627 1.628-4.266 1.628-5.894 0z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#F3F9FF",d:"M132.1122 148.6448c-15.621-15.621-15.621-40.948 0-56.569 15.621-15.621 40.948-15.621 56.569 0 15.621 15.621 15.621 40.948 0 56.569-15.621 15.621-40.948 15.621-56.569 0m63.895-63.895c-19.667-19.667-51.554-19.667-71.221 0s-19.667 51.554 0 71.221 51.554 19.667 71.221 0 19.667-51.554 0-71.221"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",
|
||
d:"M196.0069 155.9708c-19.667 19.667-51.554 19.667-71.221 0s-19.667-51.554 0-71.221 51.554-19.667 71.221 0 19.667 51.554 0 71.221z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M132.1122 148.6448c-15.621-15.621-15.621-40.948 0-56.569 15.621-15.621 40.948-15.621 56.569 0 15.621 15.621 15.621 40.948 0 56.569-15.621 15.621-40.948 15.621-56.569 0z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M84 66h130v130H84z"})]})]})]})]})};return n}(o.Component);var A=n(930948),T=n(840474),Z=n(649536),M=n(804808),R=n(840922);function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){
|
||
l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var k=n(348592),U=n(2590),B=n(473708),F=n(247630),G=n.n(F);function H(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){H(e,t,n[t])}))}return e}function W(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function z(e){var t=e.searchMode,n=e.searchByMode;return(0,r.jsxs)("header",{className:G().searchHeader,children:[(0,r.jsx)(Y,V({},e)),(0,r.jsxs)(s.njP,{orientation:"horizontal",className:G().searchHeaderTabList,selectedItem:t,onItemSelect:n,children:[(0,r.jsx)(s.njP.Item,{id:U.QIO.NEWEST,children:B.Z.Messages.SEARCH_NEWEST_SHORT}),(0,r.jsx)(s.njP.Item,{id:U.QIO.OLDEST,children:B.Z.Messages.SEARCH_OLDEST_SHORT}),(0,
|
||
r.jsx)(s.njP.Item,{id:U.QIO.MOST_RELEVANT,children:B.Z.Messages.SEARCH_MOST_RELEVANT_SHORT})]})]})}function Y(e){var t,n=e.isSearching,o=e.isIndexing,i=e.documentsIndexed;(o||n)&&(t=(0,r.jsx)("div",{className:G().spinnerWrapper,children:(0,r.jsx)(s.$jN,{type:s.$jN.Type.SPINNING_CIRCLE,className:G().spinner,itemClassName:G().spinnerPath})}));var a=o&&!n;return(0,r.jsxs)("div",{className:G().totalResults,role:"status",children:[a?(0,r.jsx)(s.ua7,{text:B.Z.Messages.SEARCH_STILL_INDEXING_HINT.format({count:i}),children:function(n){return(0,r.jsxs)("div",W(V({className:G().totalResultsWrapper},n),{children:[(0,r.jsx)(K,V({},e)),t]}))}}):(0,r.jsx)(K,V({},e)),a?null:t]})}function K(e){var t=e.isSearching,n=e.isIndexing,o=e.totalResults;if(t)return(0,r.jsx)(s.xvT,{variant:"text-md/normal",color:"header-primary",children:B.Z.Messages.SEARCHING});if(n)return(0,r.jsx)(s.xvT,{variant:"text-md/normal",children:(0,r.jsx)(s.eee,{className:G().helpdeskLink,
|
||
href:k.Z.getArticleURL(U.BhN.SEARCH_INDEXING),children:B.Z.Messages.STILL_INDEXING})});var i=o.toLocaleString();return(0,r.jsx)(s.xvT,{variant:"text-md/normal",color:"header-primary",children:B.Z.Messages.TOTAL_RESULTS.format({count:i})})}var q=n(144546),Q=n(105783),X=n(665472),J=n(316878),$=n(773011),ee=n(469023),te=n(916286),ne=n(784426),re=n(451458),oe=n(61209),ie=n(682776),ae=n(473903),le=n(507488),ue=n(436622),ce=n(21558),se=n.n(ce);function fe(e){var t=e.changePage,n=e.offset,o=e.totalResults,i=e.pageLength,a=Math.floor(n/i)+1;return(0,r.jsx)("div",{className:se().container,children:(0,r.jsx)(s.DsT,{currentPage:a,totalCount:o,pageSize:i,onPageChange:t,maxVisiblePages:5})})}var de=n(809784),pe=n(971402),he=n(487868),ye=n(988206),be=n.n(ye);function ve(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function me(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){
|
||
ve(i,r,o,a,l,"next",e)}function l(e){ve(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oe(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ee(e){Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Ee(e)}function Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Oe(e,t,n[t])}))}return e}function je(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e)
|
||
;t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Se(e,t){return!t||"object"!==_e(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ie(e,t){Ie=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ie(e,t)}var _e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function we(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ee(e);if(t){var o=Ee(this).constructor;n=Reflect.construct(r,arguments,o)
|
||
}else n=r.apply(this,arguments);return Se(this,n)}}var xe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}
|
||
i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Pe(e,t){var n=null===window||void 0===window?void 0:window.getSelection();if(null!=n&&!n.isCollapsed)return!0;if(null==e||null==t)return!1;for(;(0,de.k)(e)&&e!==t;){var r=e.tagName;if("A"===r||"IMG"===r||"BUTTON"===r)return!0;e=e.parentNode}return!1}var Ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Ie(e,t)}(i,e);var t=we(i);function i(){ge(this,i);var e;(e=t.apply(this,arguments)).containerRef=o.createRef();e.hitRef=o.createRef();e.handleContextMenu=function(e,t){var o=oe.Z.getChannel(t.channel_id);if(null!=o){e.stopPropagation();(0,pe.jW)(e,me((function(){var e,i;return xe(this,(function(a){switch(a.label){case 0:return[4,n.e(22170).then(n.bind(n,822170))];case 1:
|
||
e=a.sent(),i=e.default;return[2,function(e){return(0,r.jsx)(i,je(Ce({},e),{message:t,channel:o}))}]}}))})))}};e.jumpTo=function(t){if(null!=t){t.preventDefault();t.stopPropagation()}var n=e.props,r=n.onJump,o=n.result.find((function(e){return e.isSearchHit}));null!=o&&r(o)};e.handleMessageClick=function(t){Pe(t.target,e.containerRef.current)?t.stopPropagation():e.jumpTo(t)};return e}i.prototype.render=function(){var e=this,t=this.props,n=t.result,o=t.listItemProps,i=t.searchOffset,a=t.index,l=t.totalResults,c=u().find(n,(function(e){return e.isSearchHit}));if(null==c)return null;var f=oe.Z.getChannel(c.channel_id);if(null==f)return null;var d="search-result-".concat(c.id);return(0,r.jsx)(s.tEY,{ringTarget:this.hitRef,ringClassName:be().searchResultFocusRing,offset:4,children:(0,r.jsxs)("li",je(Ce({className:be().container},o),{"aria-posinset":1+i+a,"aria-setsize":l,"aria-labelledby":d,children:[(0,r.jsx)(s.P3F,{tabIndex:-1,onClick:this.handleMessageClick,innerRef:this.containerRef,
|
||
className:be().searchResult,focusProps:{enabled:!1},children:(0,r.jsx)("div",{ref:this.hitRef,className:be().message,children:(0,r.jsx)(he.Z,{id:d,message:c,channel:f,onContextMenu:function(t){return e.handleContextMenu(t,c)},animateAvatar:!1,subscribeToComponentDispatch:!1})},c.id)}),(0,r.jsx)("div",{className:be().buttonsContainer,"aria-hidden":!0,children:(0,r.jsx)(s.P3F,{className:be().button,onClick:this.jumpTo,children:B.Z.Messages.JUMP})})]}))})};return i}(o.PureComponent),Ae=n(748355),Te=n.n(Ae);function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Me(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Me(e,t,n[t])}))}return e}function Le(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function De(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(e){var t,n=e.search,i=e.searchId,a=e.renderEmbeds,l=e.scrollTo,u=e.searchResults,c=e.blockCount,f=n.offset,p=n.totalResults,h=n.isSearching,y=n.showBlockedResults,v=o.useCallback((function(e){h||d.oO(i,e-1)}),[i,h]),m=o.useCallback((function(e){if(e.blocked)Q.Z.show({title:B.Z.Messages.UNBLOCK_TO_JUMP_TITLE,body:B.Z.Messages.UNBLOCK_TO_JUMP_BODY.format({name:e.author.username}),confirmText:B.Z.Messages.OKAY});else{var t=oe.Z.getChannel(e.channel_id),n=null!=t?t.getGuildId():null
|
||
;X.Z.trackJump(e.channel_id,e.id,"Search Results",{search_id:b.Z.getAnalyticsId(i)});(0,ne.uL)(U.Z5c.CHANNEL(n,e.channel_id,e.id))}}),[i]),g=o.useMemo((function(){if(null==u)return[];var e,t=0;return u.reduce((function(n,r){var o=r.find((function(e){return e.isSearchHit}));if(!y&&null!=o&&R.Z.isBlocked(o.author.id))return n;var i=oe.Z.getChannel(r[0].channel_id);if(null==i)return n;null!=e&&e===i.id||n.push({channel:i,results:[],startIndex:t});t+=1;n[n.length-1].results.push(r);e=null==i?void 0:i.id;return n}),[])}),[u,y]),O=o.useRef([]),E=g.reduce((function(e,t){return e+1+t.results.length}),0),C=o.useCallback((function(e,t){if(J.Z.keyboardModeEnabled){var n=O.current,r=null!=t?n[t]:void 0;if(null!=r&&null!=r.hitRef.current){var o=r.hitRef.current.getClientRects()[0],i=o.top-.5*o.height;l(i,!1,(function(){var t;null===(t=document.getElementById(e))||void 0===t||t.focus()}))}}}),[l]),j=o.useCallback((function(e){var t=O.current[e];null==t||t.jumpTo()}),[]),S=(0,q.ZP)({
|
||
navId:"search-results",itemCount:E,focusedIndex:0,setFocus:C,onSelect:j}),I=b.Z.getQuery(i),_=(0,T.nC)(null!==(t=null==I?void 0:I.content)&&void 0!==t?t:""),w=g.map((function(e){var t=e.channel,n=e.results,o=e.startIndex;return(0,r.jsx)(Ue,{channel:t,results:n,highlighter:_,startIndex:o,resultRefs:O,totalResults:p,scrollTo:l,searchId:i,renderEmbeds:a,offset:f,jumpToMessage:m,listNavigator:S},"".concat(t.id,"-").concat(o))}));w.push();var x=o.useRef(null);o.useLayoutEffect((function(){var e;null===(e=x.current)||void 0===e||e.focus()}),[u]);var P=(0,s.mFp)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",Le(Re({ref:x},S.getContainerProps(),P),{"aria-busy":h,children:w})),c>0?(0,r.jsxs)(s.P3F,{tag:"div",className:Te().resultsBlocked,onClick:function(){return d.QY(i,!y)},children:[(0,r.jsx)("div",{className:Te().resultsBlockedImage}),(0,r.jsx)("div",{className:Te().resultsBlockedText,children:y?B.Z.Messages.SEARCH_HIDE_BLOCKED_MESSAGES.format({count:c
|
||
}):B.Z.Messages.SEARCH_NUM_RESULTS_BLOCKED_NOT_SHOWN.format({count:c})})]}):null,!h&&(0,r.jsx)(fe,{changePage:v,offset:f,totalResults:p,pageLength:U.vpv})]})}function Ue(e){var t,n=e.channel,i=e.results,a=e.highlighter,l=e.startIndex,u=e.resultRefs,c=e.totalResults,f=e.scrollTo,d=e.searchId,p=e.renderEmbeds,h=e.offset,b=e.jumpToMessage,m=e.listNavigator,g=y.cC.useSetting(),O=o.useCallback((function(e){if(e!==v.Z.getChannelId()){var t=oe.Z.getChannel(e);null!=t&&ie.Z.can(U.Plq.VIEW_CHANNEL,t)&&(0,re.Kh)(t.id)}}),[]),E=null!=n?(0,$.F6)(n,ae.default,R.Z,!1):"???",C=null!=(null==n?void 0:n.parent_id)?oe.Z.getChannel(n.parent_id):null,j=null!=C?C.name:null,S=null!==(t=(0,ee.Z)(n))&&void 0!==t?t:ue.Z,I=null!=C?(0,ee.Z)(C):null,_=ie.Z.can(U.Plq.MANAGE_MESSAGES,n),w=(0,M.ZP)({content:E,embeds:[]},{postProcessor:a}).content,x=o.useRef(null),P=De(o.useState(!1),2),N=P[0],A=P[1];o.useEffect((function(){var e=x.current
|
||
;null!=e&&null!=e.offsetWidth&&null!=e.scrollWidth&&A(e.offsetWidth<e.scrollWidth)}),[]);return(0,r.jsx)(le.a.Provider,{value:(0,te.Z)(g,_),children:(0,r.jsxs)("ul",{role:"group",className:Te().searchResultGroup,"aria-label":null==j?E:"".concat(E,", ").concat(j),children:[(0,r.jsx)(s.P3F,{onClick:function(){return O(n.id)},children:(0,r.jsxs)("div",{className:Te().channelNameContainer,children:[(0,r.jsx)(S,{className:Te().channelNameIcon,width:16,height:16}),(0,r.jsx)(s.ua7,{text:E,hide:!N,children:function(e){return(0,r.jsx)("span",Le(Re({},e),{ref:x,className:Te().channelNameText,children:w}))}}),null!=C&&null!=j&&null!=I?(0,r.jsxs)(s.P3F,{className:Te().parentChannelNameClickable,onClick:function(e){e.stopPropagation();O(C.id)},children:[(0,r.jsx)(I,{className:Te().parentChannelNameIcon,width:12,height:12}),(0,r.jsx)(s.xvT,{className:Te().parentChannelNameText,variant:"text-xs/medium",color:"header-secondary",children:j})]}):null]})}),i.map((function(e,t){var n=l+t;return(0,
|
||
r.jsx)(Ne,{ref:function(e){return u.current[n]=e},totalResults:c,scrollTo:f,searchId:d,renderEmbeds:p,searchOffset:h,pageResultsLength:i.length,result:e,index:n,onJump:b,listItemProps:m.getItemProps({index:n})},"search-result-".concat(n))}))]})})}var Be=n(777537),Fe=n.n(Be);function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function He(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ve(e){Ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Ve(e)}function We(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&qe(e,t)}function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){He(e,t,n[t])}))}return e}function Ye(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ke(e,t){return!t||"object"!==Qe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qe(e,t){qe=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return qe(e,t)}var Qe=function(e){
|
||
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ve(e);if(t){var o=Ve(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ke(this,n)}}var Je=function(e){We(n,e);var t=Xe(n);function n(){Ge(this,n);var e;(e=t.apply(this,arguments)).autoAnalytics=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null!=e.props.searchAnalyticsId){var n=0,r=0,o=0,i=0;null!=e.props.searchResults&&u()(e.props.searchResults).flatten().filter((function(e){return e.isSearchHit})).forEach((function(e){if(null!=e.content&&""!==e.content){n++;/https?:\/\/[^\s]+/.test(e.content)&&i++}null!=e.embeds&&e.embeds.length>0&&o++
|
||
;null!=e.attachments&&e.attachments.length>0&&r++}));p.ZP.trackWithMetadata(U.rMx.SEARCH_RESULT_VIEWED,{search_type:e.props.searchType,search_id:e.props.searchAnalyticsId,prev_search_id:t!==e.props.searchAnalyticsId?t:null,is_error:e.props.searchHasError,limit:e.props.searchLimit,offset:e.props.searchOffset,page:Math.floor(e.props.searchOffset/e.props.searchLimit)+1,total_results:e.props.searchTotalResults,page_results:null!=e.props.searchResults?e.props.searchResults.length:null,is_indexing:e.props.searchIsIndexing,page_num_messages:n,page_num_links:i,page_num_embeds:o,page_num_attach:r})}};return e}var r=n.prototype;r.componentDidMount=function(){this.autoAnalytics()};r.componentDidUpdate=function(e){this.props.searchAnalyticsId===e.searchAnalyticsId&&this.props.searchOffset===e.searchOffset||this.autoAnalytics(e.searchAnalyticsId)};r.render=function(){return null};return n}(o.Component),$e=function(e){var t=e.children;return(0,r.jsx)("div",{className:Fe().emptyResultsWrap,
|
||
children:(0,r.jsx)("div",{className:Fe().emptyResultsContent,children:t})})},et=function(e){We(n,e);var t=Xe(n);function n(){Ge(this,n);var e;(e=t.apply(this,arguments)).state={searchMode:U.QIO.NEWEST,searchQuery:null};e.scrollerRef=o.createRef();e.scrollTo=function(t,n,r){var o=e.scrollerRef.current;if(null!=o){var i=o.getScrollerState().scrollTop-t;o.scrollTo({to:i,animate:n,callback:r})}};e.selectChannel=function(e){e!==v.Z.getChannelId()&&f.Z.transitionToInviteChannelSync(e)};e.searchPrevious=function(){var t=e.props,n=t.searchId;t.search.isSearching||d.jn(n)};e.searchNext=function(){var t=e.props,n=t.searchId;t.search.isSearching||d.m$(n)};e.handleSearchResultsClose=function(){var t=e.props.searchId;d.qt(t)};e.searchByMode=function(t){var n=e.props,r=n.searchId,o=n.search.isSearching;if(t!==e.state.searchMode&&!o){p.ZP.trackWithMetadata(U.rMx.SEARCH_RESULT_SORT_CHANGED,{search_id:b.Z.getAnalyticsId(r),new_sort_type:t});d.Nz(r,t);e.setState({searchMode:t})}}
|
||
;e.toggleShowBlockedMessages=function(){var t=e.props,n=t.searchId,r=t.search.showBlockedResults;d.QY(n,!r)};e.renderHeader=function(){var t=e.state.searchMode,n=e.props.search,o=n.totalResults,i=n.isSearching,a=n.isHistoricalIndexing,l=n.documentsIndexed;return(0,r.jsx)(z,{searchMode:t,searchByMode:e.searchByMode,totalResults:o,isSearching:i,isIndexing:a,documentsIndexed:l})};e.renderIndexing=function(){var t=b.Z.getSearchType(e.props.searchId)===U.aib.GUILD?B.Z.Messages.SEARCH_GUILD_STILL_INDEXING:B.Z.Messages.SEARCH_DM_STILL_INDEXING;return(0,r.jsxs)($e,{children:[(0,r.jsx)(N,{}),(0,r.jsx)("div",{className:(Fe().emptyResultsText,Fe().stillIndexing),children:t})]})};e.renderNoResults=function(){var t=e.props.search.showNoResultsAlt,n=t?B.Z.Messages.SEARCH_NO_RESULTS_ALT:B.Z.Messages.SEARCH_NO_RESULTS;return(0,r.jsxs)($e,{children:[(0,r.jsx)("div",{className:a()(Fe().noResultsImage,He({},Fe().alt,t))}),(0,r.jsx)("div",{
|
||
className:a()(Fe().emptyResultsText,Fe().noResults,He({},Fe().alt,t)),children:n})]})};e.renderError=function(){return(0,r.jsxs)($e,{children:[(0,r.jsx)("div",{className:Fe().errorImage}),(0,r.jsx)("div",{className:a()(Fe().emptyResultsText,Fe().errorMessage),children:B.Z.Messages.SEARCH_ERROR})]})};e.renderContent=function(){var t=e.props,n=t.searchResults,o=t.blockCount,i=e.props.search,a=i.totalResults,l=i.isSearching,u=i.isIndexing;return i.hasError?e.renderError():u?e.renderIndexing():l?null:a>0?(0,r.jsx)(ke,{search:e.props.search,searchResults:n,blockCount:o,searchId:e.props.searchId,renderEmbeds:e.props.renderEmbeds,scrollTo:e.scrollTo}):e.renderNoResults()};return e}var i=n.prototype;i.componentDidMount=function(){A.S.subscribe(U.CkL.SEARCH_RESULTS_CLOSE,this.handleSearchResultsClose)};i.componentWillUnmount=function(){A.S.unsubscribe(U.CkL.SEARCH_RESULTS_CLOSE,this.handleSearchResultsClose)};i.componentDidUpdate=function(e){var t=e.search
|
||
;if(this.props.search.showBlockedResults!==t.showBlockedResults){var n=this.scrollerRef.current;if(null==n)return;n.scrollToBottom()}var r=b.Z.getQuery(this.props.searchId);JSON.stringify(r)!==JSON.stringify(this.state.searchQuery)&&this.setState({searchQuery:r,searchMode:U.QIO.NEWEST})};i.render=function(){var e=this.props,t=e.searchAnalyticsId,n=e.searchType,o=e.searchResults,i=this.props.search,a=i.offset,l=i.hasError,u=i.totalResults,c=i.isHistoricalIndexing;return(0,r.jsxs)("section",{className:Fe().searchResultsWrap,"aria-label":B.Z.Messages.SEARCH_RESULTS_SECTION_LABEL,children:[this.renderHeader(),(0,r.jsx)(s.Den,{ref:this.scrollerRef,className:Fe().scroller,children:this.renderContent()}),(0,r.jsx)(Je,{searchType:n,searchAnalyticsId:t,searchResults:o,searchOffset:a,searchLimit:U.vpv,searchHasError:l,searchTotalResults:u,searchIsIndexing:c})]})};return n}(o.PureComponent);function tt(e){var t=e.searchId;return(0,r.jsx)(et,ze(Ye(ze({searchId:t},(0,c.cj)([b.Z],(function(){return{
|
||
search:b.Z.getResultsState(t),searchAnalyticsId:b.Z.getAnalyticsId(t),searchType:b.Z.getSearchType()}}),[t]),function(e){var t=(0,c.e7)([b.Z],(function(){var t,n=b.Z.getQuery(e),r=b.Z.getRawResults(e);if(null==n||null==r)return[];var o=(0,T.nC)(null!==(t=n.content)&&void 0!==t?t:"");return r.map((function(e){return e.map((function(e){var t=(0,Z.e5)(e);return t.isSearchHit?t.set("customRenderedContent",(0,M.ZP)(t,{postProcessor:o})):t}))}))}),[e],c.pF),n=D((0,c.e7)([R.Z],(function(){var e=0;return[t.map((function(t){return t.filter((function(t){var n=R.Z.isBlocked(t.author.id);n&&t.isSearchHit&&e++;return!n||t.isSearchHit}))})),e]}),[t],c.pF),2);return{searchResults:n[0],blockCount:n[1]}}(t)),{renderEmbeds:y.NA.useSetting(),developerMode:y.Sb.useSetting()}),(0,c.cj)([h.Z],(function(){return{theme:h.Z.theme}}))))}},468874:(e,t,n)=>{"use strict";n.d(t,{oW:()=>u,AX:()=>c,cV:()=>s,BR:()=>f,Df:()=>d,ZZ:()=>p,gr:()=>h,fW:()=>y,Bo:()=>b,LT:()=>v})
|
||
;var r=n(575494),o=n(281110),i=n(744564),a=n(99452),l=n(2590);function u(e,t,n,r,o){i.Z.dispatch({type:"SHARED_CANVAS_DRAW_LINE_POINT",channelId:e,userId:n,lineId:t,streamerId:r,point:o})}function c(e,t,n,r){return o.Z.post({url:l.ANM.SHARED_CANVAS_LINES(e,n),body:{line_id:t,points:r}})}function s(e,t,n,r){i.Z.dispatch({type:"SHARED_CANVAS_UPDATE_LINE_POINTS",userId:t,lineId:e,newPoints:r,streamerId:n})}function f(e,t,n){return o.Z.post({url:l.ANM.SHARED_CANVAS_EMOJI_HOSES(e,t),body:{emoji_hose:n}})}function d(e,t,n){o.Z.delete({url:l.ANM.SHARED_CANVAS_EMOJI_HOSE(e,t,n),backoff:new r.Z})}function p(e,t){t.state=a.f.STOP;i.Z.dispatch({type:"SHARED_CANVAS_UPDATE_EMOJI_HOSE",emojiHose:t,userId:t.userId,streamerId:e})}function h(e,t,n){i.Z.dispatch({type:"SHARED_CANVAS_UPDATE_EMOJI_HOSE",emojiHose:e,userId:t,streamerId:n})}function y(e,t){i.Z.dispatch({type:"SHARED_CANVAS_CLEAR_DRAWABLES",drawables:e,streamerId:t})}function b(e){i.Z.dispatch({type:"SHARED_CANVAS_SET_DRAW_MODE",drawMode:e})
|
||
}function v(){i.Z.dispatch({type:"TOGGLE_OVERLAY_CANVAS"})}},35723:(e,t,n)=>{"use strict";n.d(t,{Ks:()=>r,qh:()=>o,q2:()=>i,Fq:()=>a,FO:()=>l});var r=80,o=48,i=3,a=500,l=5e3},9134:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(260561).B)({kind:"guild",id:"2023-01_shared_canvas",label:"Shared Canvas",defaultConfig:{isSharedCanvasEnabled:!1},treatments:[{id:1,label:"Enable Shared Canvas",config:{isSharedCanvasEnabled:!0}}]})},407761:(e,t,n)=>{"use strict";n.d(t,{Z:()=>A});var r=n(202351),o=n(744564),i=n(732016),a=n(473903),l=n(38004),u=n(99452),c=n(569588),s=n(35723);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}function h(e,t,n){t in e?Object.defineProperty(e,t,{
|
||
value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e){y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return y(e)}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){h(e,t,n[t])}))}return e}function v(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function m(e,t){
|
||
return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e,t){g=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return g(e,t)}function O(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var E=function(e){
|
||
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}var j={},S={},I={},_=!0,w=null;function x(e){if(null==S[e]){var t=a.default.getUser(e);if(null==t)return;var n=t.getAvatarURL(null,s.Ks),r=new Image;r.src=n;S[e]=r}}var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&g(e,t)}(n,e);var t=C(n);function n(){d(this,n);return t.apply(this,arguments)}var r=n.prototype
|
||
;r.getDrawables=function(e){return null!=j[e]?j[e]:[]};r.getAvatarImage=function(e){return S[e]};r.getEmojiImage=function(e){return I[e]};r.getDrawMode=function(){return w};r.__getLocalVars=function(){return{drawables:j,avatarImages:S,emojiImages:I,visibleOverlayCanvas:_,drawMode:w,store:N}};!function(e,t,n){t&&p(e.prototype,t);n&&p(e,n)}(n,[{key:"visibleOverlayCanvas",get:function(){return _}}]);return n}(r.ZP.Store);P.displayName="SharedCanvasStore";var N=new P(o.Z,{SHARED_CANVAS_UPDATE_LINE_POINTS:function(e){var t=e.lineId,n=e.newPoints,r=e.userId,o=e.streamerId,i=j[o];if(null==i)j[o]=[{type:u.W.LINE,id:t,userId:r,points:n}];else{var a=i.find((function(e){return e.id===t}));if(null==a)i.push({type:u.W.LINE,id:t,userId:r,points:n});else if((0,c.P7)(a)){var l;(l=a.points).push.apply(l,O(n))}}x(r)},SHARED_CANVAS_UPDATE_EMOJI_HOSE:function(e){var t,n,r=e.emojiHose,o=e.streamerId,a=e.userId,c=v(b({},r),{type:u.W.EMOJI_HOSE});if(null==j[o])j[o]=[c];else{var f=j[o].findIndex((function(e){
|
||
return e.id===r.id}));f>=0?j[o][f]=b({},j[o][f],c):j[o].push(c)}var d=null!==(n=null!==(t=r.emojiId)&&void 0!==t?t:r.emojiName)&&void 0!==n?n:"";if(null==I[d]){var p,h=null!=r.emojiName?i.ZP.convertNameToSurrogate(r.emojiName):null;I[d]=new Image;I[d].src=(0,l.qc)({id:r.emojiId,name:null!==(p=null!=h?h:r.emojiName)&&void 0!==p?p:"",animated:!1},s.qh)}x(a)},SHARED_CANVAS_CLEAR_DRAWABLES:function(e){var t=e.drawables,n=e.streamerId;if(null!=j[n]){var r=new Set;t.forEach((function(e){return r.add(e.id)}));j[n]=j[n].filter((function(e){return!r.has(e.id)}))}},SHARED_CANVAS_SET_DRAW_MODE:function(e){var t=e.drawMode;w=t},TOGGLE_OVERLAY_CANVAS:function(e){e=null!==e?e:function(e){throw e}(new TypeError("Cannot destructure undefined"));_=!_}});const A=N},99452:(e,t,n)=>{"use strict";n.d(t,{W:()=>r,f:()=>o});var r,o;!function(e){e.LINE="line";e.EMOJI_HOSE="emoji_hose"}(r||(r={}));!function(e){e.START="START";e.STOP="STOP"}(o||(o={}))},569588:(e,t,n)=>{"use strict";n.d(t,{UN:()=>s,hn:()=>f,
|
||
np:()=>d,RR:()=>p,P7:()=>h,bg:()=>y});var r=n(717621),o=n.n(r),i=n(547308),a=n(109206),l=n(473903),u=n(99452),c=n(35723);function s(e){var t=e.current,n=null==t?void 0:t.getContext("2d");null!=t&&null!=n&&n.clearRect(0,0,t.width,t.height)}function f(e,t){var n=e.getBoundingClientRect(),r=n.width,o=n.height,i=n.left,a=n.top;return{x:(t.clientX-i)/r,y:(t.clientY-a)/o}}function d(e,t){return Math.round(e*t*window.devicePixelRatio)}function p(e,t,n){return{x:d(e.x,t),y:d(e.y,n),deltaTime:e.deltaTime}}function h(e){return e.type===u.W.LINE}function y(e,t,n,r){var u,s=l.default.getUser(e),f=null==s?void 0:s.getAvatarURL(null,c.Ks),d=null!=f?null===(u=a.SR.getState().palette[f])||void 0===u?void 0:u[0]:null,p=null!=d?"#".concat(o()({r:d[0],g:d[1],b:d[2]}).toHex()):r;return{fillColor:p,outlineColor:(0,i.Bd)((0,i._i)(p))>.5?n:t}}},103245:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w})
|
||
;var r=n(667294),o=n(513328),i=n(336194),a=n(707961),l=n(109206),u=n(407561),c=n(468874),s=n(407761),f=n(99452),d=n(569588),p=n(496486),h=n.n(p),y=n(468811),b=n.n(y),v=n(38736);function m(e,t,n,r,o){e.save();e.beginPath();e.fillStyle=r;e.arc(t,n,Math.round(20*window.devicePixelRatio)/2+o,0,2*Math.PI);e.fill();e.restore()}function g(e,t,n,r){e.save();var o=s.Z.getAvatarImage(r);if(null!=o){var i=20*window.devicePixelRatio;e.beginPath();e.arc(t,n,i/2,0,2*Math.PI);e.clip();e.drawImage(o,t-i/2,n-i/2,i,i);e.restore()}}var O=n(35723),E={X_OFFSET:2*O.qh,Y_OFFSET:25,X_SPEED:.5,Y_SPEED_MIN:-1,Y_SPEED_MAX:-5,OPACITY:1,OPACITY_SPEED_MIN:.01,OPACITY_SPEED_MAX:.05,SIZE_MIN:O.qh/2,SIZE_MAX:O.qh},C=(0,v.Z)((function(){return{particles:{},lastSpawned:{}}}));function j(e,t){return{id:b().v4(),x:e+h().random(-E.X_OFFSET,E.X_OFFSET),y:t+h().random(-E.Y_OFFSET,E.Y_OFFSET),xSpeed:h().random(-E.X_SPEED,E.X_SPEED),ySpeed:h().random(E.Y_SPEED_MIN,E.Y_SPEED_MAX),opacity:E.OPACITY,
|
||
opacitySpeed:h().random(E.OPACITY_SPEED_MIN,E.OPACITY_SPEED_MAX),size:h().random(E.SIZE_MIN,E.SIZE_MAX)}}function S(e,t){var n;h()(null!==(n=C.getState().particles[e.id])&&void 0!==n?n:{}).forEach(t)}function I(e){var t,n,r=e.emojiHose,o=e.context,i=e.canvasWidth,a=e.canvasHeight,l=e.fallbackColor,u=e.outlineColorDark,p=e.outlineColorLight,y=e.streamerId,b=e.deadDrawables;o.save();var v=s.Z.getEmojiImage(null!==(n=null!==(t=r.emojiId)&&void 0!==t?t:r.emojiName)&&void 0!==n?n:""),E=(0,d.np)(r.x,i),I=(0,d.np)(r.y,a),_=(0,d.bg)(r.userId,u,p,l).outlineColor;S(r,(function(e){return function(e,t){t.x+=t.xSpeed*window.devicePixelRatio;t.y+=t.ySpeed*window.devicePixelRatio;t.opacity-=t.opacitySpeed;t.opacity<=0&&C.setState((function(n){delete n.particles[e.id][t.id];0===Object.keys(n.particles[e.id]).length&&delete n.particles[e.id];return n}))}(r,e)}));!function(e,t,n){var r,o=null!==(r=C.getState().lastSpawned[e.id])&&void 0!==r?r:0,i=Date.now()
|
||
;o+100>i||e.state===f.f.STOP||(Math.random()<=.8||o+300<i)&&C.setState((function(r){for(var o,i=null!==(o=r.particles[e.id])&&void 0!==o?o:{},a=h().random(1,2),l=0;l<a;l++){var u=j(t,n);i[u.id]=u}r.particles[e.id]=i;r.lastSpawned[e.id]=Date.now();return r}))}(r,E,I);m(o,E,I,_,O.q2);g(o,E,I,r.userId);S(r,(function(e){return function(e,t,n){if(null!=t){var r=n.size*window.devicePixelRatio,o=n.x-r/2*window.devicePixelRatio,i=n.y-1.2*r*window.devicePixelRatio;e.globalAlpha=n.opacity;e.drawImage(t,r/2+o,r/2+i,r,r)}}(o,v,e)}));r.lastUpdatedAt+O.FO<Date.now()&&(0,c.ZZ)(y,r);r.state!==f.f.STOP||function(e){var t;return Object.keys(null!==(t=C.getState().particles[e.id])&&void 0!==t?t:{}).length>0}(r)||b.push(r);o.restore()}function _(e){var t=e.drawable,n=e.context,r=e.canvasWidth,o=e.canvasHeight,i=e.fallbackColor,a=e.outlineColorDark,l=e.outlineColorLight,u=e.linesDrawnAt,c=e.streamerId,s=e.deadDrawables;switch(t.type){case f.W.LINE:return function(e){
|
||
var t=e.line,n=e.context,r=e.canvasWidth,o=e.canvasHeight,i=e.fallbackColor,a=e.outlineColorDark,l=e.outlineColorLight,u=e.linesDrawnAt,c=e.deadDrawables;null==u.current[t.id]&&(u.current[t.id]=Date.now());n.lineCap="round";n.lineJoin="round";var s=t.points.map((function(e){return(0,d.RR)(e,r,o)})),f=u.current[t.id],p=function(e){return f+e.deltaTime},h=function(e){return p(e)+1500>=Date.now()},y=function(e){return p(e)<=Date.now()&&h(e)},b=s.find(y);if(null!=b){var v=function(e,t){var r=null;n.lineWidth=t*window.devicePixelRatio;n.strokeStyle=e;n.beginPath();n.moveTo(b.x,b.y);for(var o=1;o<s.length;o++){var i=s[o];if(y(i)){n.lineTo(i.x,i.y);r=i}}n.stroke();return r},E=(0,d.bg)(t.userId,a,l,i),C=E.fillColor,j=E.outlineColor,S=v(j,6+O.q2),I=null!=S&&y(S);I&&m(n,S.x,S.y,j,O.q2);v(C,6);I&&g(n,S.x,S.y,t.userId)}else h(t.points[t.points.length-1])||c.push(t)}({line:t,context:n,canvasWidth:r,canvasHeight:o,fallbackColor:i,outlineColorDark:a,outlineColorLight:l,linesDrawnAt:u,deadDrawables:s
|
||
});case f.W.EMOJI_HOSE:return I({emojiHose:t,context:n,canvasWidth:r,canvasHeight:o,fallbackColor:i,outlineColorDark:a,outlineColorLight:l,streamerId:c,deadDrawables:s})}}function w(e,t,n,f){var p=(0,a.dQu)(i.Z.unsafe_rawColors.BRAND_500).hex(),h=(0,a.dQu)(i.Z.unsafe_rawColors.BLACK_500).hex(),y=(0,a.dQu)(i.Z.unsafe_rawColors.WHITE_500).hex(),b=r.useRef({}),v=r.useRef(new o.Xp),m=r.useCallback((function(t){var n=s.Z.getDrawables(t);(0,d.UN)(e);!function(e){var t=e.canvasRef,n=e.drawables,r=e.fallbackColor,o=e.linesDrawnAt,i=e.streamerId,a=e.channelId,l=e.outlineColorDark,s=e.outlineColorLight;if(0!==n.length){var f=t.current;if(null!=f){var d=f.getContext("2d");if(null!=d){var p=f.getBoundingClientRect(),h=p.width,y=p.height,b=[];n.forEach((function(e){null!=u.Z.getVoiceStateForChannel(a,e.userId)?_({drawable:e,context:d,canvasWidth:h,canvasHeight:y,fallbackColor:r,outlineColorDark:l,outlineColorLight:s,linesDrawnAt:o,deadDrawables:b,streamerId:i}):b.push(e)}));b.length>0&&(0,
|
||
c.fW)(b,i)}}}}({canvasRef:e,drawables:n,fallbackColor:p,linesDrawnAt:b,streamerId:t,outlineColorDark:h,outlineColorLight:y,channelId:f})}),[e,f,p,h,y]);r.useEffect((function(){var t=new ResizeObserver((function(){var t=e.current;if(null!=t){var r=t.getBoundingClientRect(),o=r.width,i=r.height;t.width=o*window.devicePixelRatio;t.height=i*window.devicePixelRatio;m(n)}}));null!=e.current&&t.observe(e.current);return function(){return t.disconnect()}}),[e,m,n]);var g=r.useCallback((function(){var t=s.Z.getDrawables(n),r=C.getState().particles,o=t.length>0||Object.keys(r).length>0;if(o&&null==v.current._ref)if(null==v.current._ref){m(n);v.current.start(16.666666666666668,(function(){return m(n)}))}else if(!o&&null!=v.current._ref){v.current.stop();(0,d.UN)(e)}}),[e,m,n]);r.useEffect((function(){var e=v.current;s.Z.addChangeListener(g);g();(0,l.vM)(t.getAvatarURL(null,O.Ks));return function(){s.Z.removeChangeListener(g);e.stop()}}))}},336177:(e,t,n)=>{"use strict";n.d(t,{w:()=>g,Dx:()=>O,
|
||
$d:()=>C,AA:()=>S,TB:()=>_,hs:()=>w,xR:()=>x,R:()=>P,xz:()=>N,un:()=>A});var r=n(496486),o=n.n(r),i=n(281110),a=n(744564),l=n(105783),u=n(539381),c=n(917019),s=n(656907),f=n(911980),d=n(460214),p=n(2590),h=n(131559),y=n(473708);function b(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,l,"next",e)}function l(e){b(i,r,o,a,l,"throw",e)}a(void 0)}))}}var m=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),
|
||
0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function g(){var e=s.Z.getGuildIdsToFetch();if(0!==e.length){a.Z.dispatch({type:"GUILD_SOUNDBOARD_FETCH"});a.Z.dispatch({type:"REQUEST_SOUNDBOARD_SOUNDS",guildIds:e})}}function O(e){return E.apply(this,arguments)}function E(){return(E=v((function(e){var t,n,r,o,a,l,u;return m(this,(function(c){switch(c.label){case 0:t=e.guildId,n=e.name,r=e.sound,
|
||
o=e.volume,a=e.emojiId,l=e.emojiName;return[4,i.Z.post({url:p.ANM.GUILD_SOUNDBOARD_SOUNDS(t),body:{name:n,sound:r,volume:o,emoji_id:a,emoji_name:l}})];case 1:u=c.sent();return[2,(0,f.o3)(u.body,t)]}}))}))).apply(this,arguments)}function C(e){return j.apply(this,arguments)}function j(){return(j=v((function(e){var t,n,r,o,a,l,u;return m(this,(function(c){switch(c.label){case 0:t=e.guildId,n=e.soundId,r=e.name,o=e.volume,a=e.emojiId,l=e.emojiName;return[4,i.Z.patch({url:p.ANM.GUILD_SOUNDBOARD_SOUND(t,n),body:{name:r,volume:o,emoji_id:a,emoji_name:l}})];case 1:u=c.sent();return[2,(0,f.o3)(u.body,t)]}}))}))).apply(this,arguments)}function S(e,t){return I.apply(this,arguments)}function I(){return(I=v((function(e,t){return m(this,(function(n){switch(n.label){case 0:return[4,i.Z.delete({url:p.ANM.GUILD_SOUNDBOARD_SOUND(e,t),oldFormErrors:!0})];case 1:n.sent();return[2]}}))}))).apply(this,arguments)}function _(e){c.DZ.updateAsync("favoriteSoundboardSounds",(function(t){
|
||
if(o().size(t.soundIds)>=h.oX){l.Z.show({title:y.Z.Messages.FAVORITES_LIMIT_REACHED_TITLE,body:y.Z.Messages.FAVORITES_LIMIT_REACHED_BODY.format({count:h.oX})});return!1}if(t.soundIds.includes(e))return!1;t.soundIds.push(e)}),h.fy.INFREQUENT_USER_ACTION)}function w(e){c.DZ.updateAsync("favoriteSoundboardSounds",(function(t){t.soundIds=t.soundIds.filter((function(t){return t!==e}))}),h.fy.INFREQUENT_USER_ACTION)}function x(e,t){a.Z.dispatch({type:"GUILD_SOUNDBOARD_SOUND_PLAY_START",soundId:e,userId:t})}function P(e,t){a.Z.dispatch({type:"GUILD_SOUNDBOARD_SOUND_PLAY_END",soundId:e,userId:t})}function N(e){a.Z.dispatch({type:"USER_SOUNDBOARD_SET_VOLUME",volume:e})}function A(){return T.apply(this,arguments)}function T(){return(T=v((function(){var e,t,n;return m(this,(function(r){switch(r.label){case 0:if(!s.Z.shouldFetchDefaultSounds())return[2];a.Z.dispatch({type:"SOUNDBOARD_FETCH_DEFAULT_SOUNDS"});r.label=1;case 1:r.trys.push([1,3,,4]);return[4,i.Z.get(p.ANM.SOUNDBOARD_DEFAULT_SOUNDS)]
|
||
;case 2:e=r.sent();t=e.body.map((function(e){return(0,f.o3)(e,d.X8)}));a.Z.dispatch({type:"SOUNDBOARD_FETCH_DEFAULT_SOUNDS_SUCCESS",sounds:t});return[3,4];case 3:n=r.sent();a.Z.dispatch({type:"SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE"});throw new u.Z(n);case 4:return[2]}}))}))).apply(this,arguments)}},911980:(e,t,n)=>{"use strict";n.d(t,{o3:()=>l,bg:()=>u,vB:()=>c});function r(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));o.forEach((function(t){r(e,t,n[t])}))}return e}function i(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function a(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function l(e,t){var n=e.sound_id,r=e.emoji_id,l=e.emoji_name,u=e.override_path,c=e.user_id;return i(o({},a(e,["sound_id","emoji_id","emoji_name","override_path","user_id"])),{soundId:n,guildId:t,emojiId:r,emojiName:l,overridePath:u,userId:c})}var u,c;!function(e){e[e.FAVORITES=0]="FAVORITES";e[e.GUILD=1]="GUILD"
|
||
;e[e.DEFAULTS=2]="DEFAULTS";e[e.SEARCH=3]="SEARCH"}(u||(u={}));!function(e){e[e.SOUND=0]="SOUND"}(c||(c={}))},815378:(e,t,n)=>{"use strict";n.d(t,{pI:()=>a,Rp:()=>l});var r=n(769321),o=n(736097),i=n(615457);function a(){var e,t=r.kU.getSetting();return null!==(e=null==t?void 0:t.volume)&&void 0!==e?e:100}function l(e){var t,n,a=(n=r.kU.getSetting(),(0,i.P)(null!==(t=null==n?void 0:n.volume)&&void 0!==t?t:100)/100),l=Math.min(o.Z.getOutputVolume()/100,1);return Math.min(e*a*l,1)}},182306:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(682776),o=n(255088),i=n(2590);function a(e){if(null==e)return!1;var t=o.ZP.getCurrentConfig({guildId:e.guild_id}).allowSoundboard,n=r.Z.can(i.Plq.USE_SOUNDBOARD,e),a=r.Z.can(i.Plq.SPEAK,e);return t&&e.type===i.d4z.GUILD_VOICE&&n&&a}},897699:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2590);function o(e,t){var n=null!=t?r.ANM.SOUNDBOARD_DEFAULT_SOUND:r.ANM.SOUNDBOARD_SOUND,o=null!=t?t:e,i=window.GLOBAL_ENV,a=i.CDN_HOST
|
||
;return"development"!==i.PROJECT_ENV?"".concat(location.protocol,"//").concat(a).concat(n(o)):"".concat(location.protocol).concat(window.GLOBAL_ENV.API_ENDPOINT).concat(n(o))}},229400:(e,t,n)=>{"use strict";n.d(t,{O:()=>a,f:()=>l});var r=n(202351),o=n(736097),i=n(36256);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.Z;return e.supports(i.AN.SAMPLE_PLAYBACK)}function l(){return(0,r.e7)([o.Z],(function(){return a(o.Z)}))}},347387:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b,G:()=>y});var r=n(667294),o=n(441143),i=n.n(o),a=n(202351),l=n(242942),u=n(407561),c={currentPreviewRef:r.createRef()};const s=r.createContext(c);var f=n(656907),d=n(815378),p=n(897699);function h(e,t,n){i()(null!=e,"Not currently in voice channel");i()(null!=t,"Sound to play is null");(0,l.kq)(e,t,__OVERLAY__,n)}function y(e,t,n){h(u.Z.getCurrentClientVoiceChannelId(t),e,n)}function b(e,t){var n=r.useContext(s).currentPreviewRef,o=(0,a.e7)([u.Z],(function(){
|
||
return u.Z.getCurrentClientVoiceChannelId(t)})),i=(0,a.e7)([f.Z],(function(){return null!=e&&f.Z.isPlayingSound(e.soundId)}),[e]),l=r.useCallback((function(t,r){null!=n.current&&n.current.pause();h(o,null!=r?r:e,t)}),[e,n,o]),c=r.useCallback((function(){if(null!=e){var t=new Audio((0,p.Z)(e.soundId,e.overridePath));null!=n.current&&n.current.pause();n.current=t;t.currentTime=0;t.volume=(0,d.Rp)(e.volume);t.play()}}),[e,n]);r.useCallback((function(){return function(){var e;return null===(e=n.current)||void 0===e?void 0:e.pause()}}),[n]);return{playSoundboardSound:l,isPlayingSound:i,previewSound:c}}},16727:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(457217),u=n(202351),c=n(336194),s=n(707961),f=n(77413),d=n(362565),p=n(82677),h=n(701190),y=n(796938),b=n(336177),v=n(656907),m=n(347387),g=n(971402),O=n(567403);function E(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function C(e){
|
||
return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){E(i,r,o,a,l,"next",e)}function l(e){E(i,r,o,a,l,"throw",e)}a(void 0)}))}}function j(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function S(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var I=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){
|
||
return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function _(e,t,o){null!=t&&(0,g.jW)(e,C((function(){var e,i;return I(this,(function(a){switch(a.label){case 0:return[4,n.e(2263).then(n.bind(n,102263))];case 1:e=a.sent(),
|
||
i=e.default;return[2,function(e){return(0,r.jsx)(i,S(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){j(e,t,n[t])}))}return e}({},e),{guild:t,sound:o}))}]}}))})))}var w=n(473708),x=n(578932),P=n.n(x);function N(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){N(e,t,n[t])}))}return e}function T(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Z(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function M(e){var t=e.disabled,n=void 0!==t&&t,o=e.onClick,i=e.text,l=e.children;return(0,r.jsx)(s.ua7,{text:i,children:function(e){return(0,r.jsx)(s.P3F,T(A({},e),{"aria-label":i,
|
||
className:a()(P().secondaryButton,N({},P().buttonDisabled,n)),onClick:o,children:l}))}})}const R=o.forwardRef((function(e,t){var n,i=function(e){e.stopPropagation();e.currentTarget.blur();Q?(0,b.hs)(F):(0,b.TB)(F)},g=function(e){e.stopPropagation();e.currentTarget.blur();K()},E=function(){Y(U)},C=e.sound,j=e.voiceChannelGuildId,S=e.className,I=e.focused,x=e.interactive,R=void 0===x||x,L=e.enableSecondaryActions,D=void 0!==L&&L,k=e.onMouseEnter,U=e.analyticsLocations,B=Z(e,["sound","voiceChannelGuildId","className","focused","interactive","enableSecondaryActions","onMouseEnter","analyticsLocations"]),F=C.soundId,G=C.name,H=C.emojiId,V=C.emojiName,W=function(e){return o.useCallback((function(t){t.stopPropagation();var n=O.Z.getGuild(e.guildId);null!=n&&_(t,n,e)}),[e])}(C),z=(0,m.Z)(C,j),Y=z.playSoundboardSound,K=z.previewSound,q=z.isPlayingSound,Q=(0,u.e7)([v.Z],(function(){return v.Z.isFavoriteSound(F)}),[F]),X="sound-".concat(C.soundId),J=(0,l.JA)(X),$=null!=H||null!=V;return(0,
|
||
r.jsx)("li",{ref:t,className:P().soundButtonWrapper,onMouseEnter:k,children:(0,r.jsxs)(s.kL8,T(A({},B),{buttonProps:T(A({},J),{id:X,role:"button"}),"aria-label":w.Z.Messages.SOUNDBOARD_PLAY_SOUND.format({emojiName:C.emojiName,soundName:C.name}),className:a()(S,P().soundButton,(n={},N(n,P().playing,q),N(n,P().soundButtonInteractive,R),N(n,P().buttonDisabled,!R),N(n,P().focused,R&&I),n)),onClick:E,onContextMenu:D?W:E,children:[(0,r.jsxs)("div",{className:P().soundInfo,"aria-hidden":!0,children:[$&&(0,r.jsx)(f.Z,{emojiId:H,emojiName:V,className:P().emoji}),(0,r.jsx)(s.xvT,{variant:"text-xs/medium",color:R?"header-primary":"text-muted",className:a()(P().soundName,N({},P().hasEmoji,$)),children:G})]}),(0,r.jsxs)("div",{className:P().buttonOverlay,children:[(0,r.jsx)("div",{className:P().buttonOverlayBackground}),(0,r.jsxs)("div",{className:P().buttonOverlayActions,children:[D?(0,r.jsx)(M,{disabled:!R,onClick:g,text:w.Z.Messages.SOUNDBOARD_SOUND_PREVIEW_SOUND.format({emojiName:C.emojiName,
|
||
soundName:C.name}),children:(0,r.jsx)(y.Z,{className:P().secondaryIcon})}):null,(0,r.jsx)(h.Z,{className:P().playIcon}),D?(0,r.jsx)(M,{disabled:!R,onClick:i,text:w.Z.Messages.SOUNDBOARD_SOUND_FAVORITE_SOUND.format({emojiName:C.emojiName,soundName:C.name}),children:Q?(0,r.jsx)(p.Z,{className:a()(P().secondaryIcon,P().favoriteIconFavorite),color:c.Z.unsafe_rawColors.GOLD.css}):(0,r.jsx)(d.Z,{className:P().secondaryIcon})}):null]})]})]}))})}))},607313:(e,t,n)=>{"use strict";n.d(t,{IN:()=>a,oZ:()=>l});n(785893),n(667294);var r=n(744564),o=(n(472009),n(15338),n(563367),n(304275)),i=(n(310126),n(626826),n(460214));n(2590),n(473708);i.FW.width,i.FW.height,i.FW.padding;function a(e,t){r.Z.dispatch({type:"OVERLAY_SET_INPUT_LOCKED",locked:!1,pid:t});r.Z.dispatch({type:"SOUNDBOARD_SET_OVERLAY_ENABLED",enabled:!0,keepOpen:e})}function l(e){r.Z.dispatch({type:"SOUNDBOARD_SET_OVERLAY_ENABLED",enabled:!1});o.Z.isInputLocked(e)||r.Z.dispatch({type:"OVERLAY_SET_INPUT_LOCKED",locked:!0,pid:e})}},
|
||
641429:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ve});var r=n(785893),o=n(667294),i=n(999357),a=n(202351),l=n(336194),u=n(707961),c=n(153686),s=n(19585),f=n(674748),d=n(917019),p=n(563367),h=n(138049),y=n(265367),b=n(120415),v=n(79251),m=n(336177),g=n(656907),O=n(824390),E=n.n(O),C=n(971402),j=n(711003),S=n(761731),I=n(43566),_=n(604992),w=n(483902),x=n(394352),P=n(803782),N=n.n(P);function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(e,t)}(e)||function(){
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Z=o.forwardRef((function(e,t){var n=e.store,i=e.hasSearchResults,a=e.listPadding,l=e.renderRow,u=e.renderSection,c=e.renderSectionHeader,s=e.renderSectionFooter,f=e.renderInspector,d=e.renderEmptySearchState,p=e.rowCount,h=e.rowCountBySection,y=e.rowHeight,b=e.sectionHeaderHeight,v=e.sectionFooterHeight,m=o.useRef(!1),g=o.useRef(null),O=n.useStore((function(e){return e.activeCategoryIndex})),E=(0,x.Iu)((function(e){return e.searchQuery})),C=(0,_.Qs)({activeCategoryIndex:O,isScrolling:m,listRef:g,onActiveCategoryIndexChange:n.setActiveCategoryIndex,scrollOffset:20,searchQuery:E});(0,_.Xs)({searchQuery:E,activeCategoryIndex:O,listRef:g});o.useImperativeHandle(t,(function(){var e,t,n;return{scrollTo:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o
|
||
;return null===(o=g.current)||void 0===o?void 0:(r=o).scrollTo.apply(r,T(t))},getRowDescriptors:function(){var t;return null!==(e=null===(t=g.current)||void 0===t?void 0:t.getRowDescriptors())&&void 0!==e?e:[]},getSectionDescriptors:function(){var e;return null!==(t=null===(e=g.current)||void 0===e?void 0:e.getSectionDescriptors())&&void 0!==t?t:[]},scrollToSectionTop:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o;return null===(o=g.current)||void 0===o?void 0:(r=o).scrollToSectionTop.apply(r,T(t))},scrollRowIntoView:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o;return null===(o=g.current)||void 0===o?void 0:(r=o).scrollRowIntoView.apply(r,T(t))},getScrollerNode:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o;return null===(o=g.current)||void 0===o?void 0:(r=o).getScrollerNode.apply(r,T(t))},scrollIntoViewNode:function(){
|
||
for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o;return null===(o=g.current)||void 0===o?void 0:(r=o).scrollIntoViewNode.apply(r,T(t))},getListDimensions:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o,i;return null!==(n=null===(i=g.current)||void 0===i?void 0:(o=i).getListDimensions.apply(o,T(t)))&&void 0!==n?n:{height:-1,totalHeight:-1}}}}),[]);return(0,r.jsxs)("div",{className:N().wrapper,children:[E.length>0&&!i&&null!=d?d():(0,r.jsx)(w.Z,{role:"none presentation",listPadding:a,onScroll:C,renderRow:l,renderSection:u,renderSectionHeader:c,renderSectionFooter:s,rowCount:p,rowCountBySection:h,rowHeight:y,sectionHeaderHeight:b,sectionFooterHeight:v,stickyHeaders:!0,ref:g}),null==f?void 0:f()]})}));var M=n(503528),R=n(707558),L=n(650332),D=n(301627),k=n.n(D);const U=o.forwardRef((function(e,t){
|
||
var n=e.store,i=e.hasSendableExpressions,a=e.onKeyDown,l=e.gridNavigatorId,u=e.expressionsListRef,c=e.defaultSearchPlaceholder,s=e.emptySearchPlaceholder,f=o.useRef(null),d=(0,x.Iu)((function(e){return{searchQuery:e.searchQuery,searchPlaceholder:e.searchPlaceholder,isSearchSuggestion:e.isSearchSuggestion}}),M.Z),p=d.searchQuery,h=d.searchPlaceholder,y=d.isSearchSuggestion,b=n.useStore((function(e){return e.inspectedExpressionPosition}),M.Z),v=o.useCallback((function(e){var t;n.setActiveCategoryIndex(""===e?0:I.c);n.setInspectedExpressionPosition(0,0);(0,x.$2)(null);(0,x.ql)(e);null===(t=u.current)||void 0===t||t.scrollTo(0)}),[u,n]),m=o.useCallback((function(){(0,x.ql)("")}),[]);o.useImperativeHandle(t,(function(){return{focus:function(){var e;return null===(e=f.current)||void 0===e?void 0:e.focus()}}}));o.useLayoutEffect((function(){if(y){var e;null===(e=f.current)||void 0===e||e.focus()}}),[y]);return(0,r.jsx)("div",{className:k().wrapper,children:(0,r.jsx)(L.ZP,{autoFocus:i,
|
||
disabled:!i,query:p,ref:f,size:L.ZP.Sizes.MEDIUM,placeholder:null!=h?h:i||null==s?c:s,onClear:m,onKeyDown:a,onQueryChange:v,className:k().searchBar,preventEscapePropagation:!1,useKeyboardNavigation:!1,inputProps:{"aria-haspopup":"grid","aria-controls":l,"aria-expanded":!0,"aria-activedescendant":(0,R.NE)(l,b.columnIndex,b.rowIndex)}})})}));var B=n(732071),F=n.n(B);function G(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){G(e,t,n[t])}))}return e}function V(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function W(e){var t=e.categories,n=e.collapsedCategories,i=e.containerWidth,a=e.store,l=e.onSelectItem,u=e.onSearchExpressions,c=e.hasSearchResults,s=e.defaultSearchPlaceholder,f=e.emptySearchPlaceholder,d=e.renderEmptyState,p=e.renderRow,h=e.renderSection,y=e.renderSectionHeader,b=e.renderSectionFooter,v=e.renderInspector,m=e.renderEmptySearchState,g=e.renderCategoryList,O=e.renderHeaderAccessories,E=e.rowHeight,C=e.sectionHeaderHeight,j=e.sectionFooterHeight,S=e.itemNodeWidth,I=e.listPaddingRight,w=e.itemNodeMargin,P=e.listPadding,N=e.gridNavigatorId,A=o.useRef(null),T=o.useRef(null),M=o.useRef(null),R=(0,x.Iu)((function(e){return e.searchQuery})),L=0===t.length,D=(0,_.ep)({gridWrapperRef:A,
|
||
containerWidth:i,showingEmptyState:L}),k=(0,_.yi)({categories:t,collapsedCategories:n,gridWidth:D,listPaddingRight:I,itemNodeWidth:S,itemNodeMargin:w}),B=k.expressionsGrid,G=k.rowCount,W=k.rowCountBySection,z=k.columnCounts,Y=k.gutterWidth,K=(0,_.t$)({columnCounts:z,expressionsListRef:T,expressionsGrid:B,onSelectItem:l,store:a,gridNavigatorId:N}),q=K.getItemProps,Q=K.getRowProps,X=K.gridContainerProps,J=K.handleGridContainerKeyDown,$=K.isUsingKeyboardNavigation,ee=o.useCallback((function(e){var t=B[e];return p(t,Q(e),{isUsingKeyboardNavigation:$.current,gutterWidth:Y,rowIndex:e},(function(t){return q(e,t)}),(function(t){return a.setInspectedExpressionPosition(e,t)}))}),[B,q,Q,Y,$,p,a]),te=o.useCallback((function(e){return null==h?void 0:h(t[e])}),[t,h]),ne=o.useCallback((function(e){return null==y?void 0:y(t[e])}),[t,y]),re=o.useCallback((function(e){return null==b?void 0:b(t[e])}),[t,b]);o.useEffect((function(){u(R)}),[u,R]);o.useEffect((function(){return a.resetStoreState
|
||
}),[a.resetStoreState]);o.useLayoutEffect((function(){var e;null===(e=M.current)||void 0===e||e.focus()}),[]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:F().header,children:[(0,r.jsx)(U,{ref:M,store:a,hasSendableExpressions:!0,onKeyDown:J,expressionsListRef:T,gridNavigatorId:N,defaultSearchPlaceholder:s,emptySearchPlaceholder:f}),null==O?void 0:O()]}),L&&null!=d?d(F().emptyState):(0,r.jsxs)(r.Fragment,{children:[g(T),(0,r.jsx)("div",V(H({ref:A,className:F().listWrapper,id:N},X),{children:null!=D?(0,r.jsx)(Z,{ref:T,store:a,hasSearchResults:c,listPadding:P,renderRow:ee,renderSection:null!=h?te:void 0,renderSectionHeader:null!=y?ne:void 0,renderSectionFooter:null!=b?re:void 0,renderInspector:v,renderEmptySearchState:m,rowCount:G,rowCountBySection:W,rowHeight:E,sectionHeaderHeight:C,sectionFooterHeight:j}):null}))]})]})}
|
||
var z=n(769321),Y=n(736818),K=n(61209),q=n(567403),Q=n(552889),X=n(473903),J=n(407561),$=n(443812),ee=n(718831),te=n(336117),ne=n(82677),re=n(466317),oe=n(361674),ie=n(850841),ae=n(911980),le=n(347387),ue=n(16727),ce=n(294184),se=n.n(ce),fe=n(711795),de=n(682529),pe=n.n(de);function he(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var ye=[8,8,8,8];function be(e){var t=e.icon,n=e.isSelected,o=e.onClick;return(0,r.jsx)(u.P3F,{onClick:o,className:se()(pe().categoryIcon,he({},pe().selected,n)),children:(0,r.jsx)(t,{className:pe().categoryIconIcon})})}function ve(e,t,n,o){switch(e.categoryInfo.type){case ae.bg.FAVORITES:return(0,r.jsx)(be,{icon:ne.Z,onClick:n,isSelected:o});case ae.bg.GUILD:return(0,r.jsx)(u.P3F,{className:pe().category,onClick:n,children:(0,r.jsx)(S.Z,{guild:e.categoryInfo.guild,isSelected:o})});case ae.bg.DEFAULTS:return(0,r.jsx)(be,{icon:te.Z,onClick:n,isSelected:o});default:return null}}function me(e){
|
||
var t=e.soundboardListRef,n=e.categories,i=o.useRef(null);return(0,r.jsx)(fe.Z,{className:pe().categoryList,categoryListRef:i,expressionsListRef:t,store:I.Wq,categories:n,listPadding:ye,renderCategoryListItem:ve,rowCount:n.length,categoryHeight:40})}var ge=n(460214),Oe=n(473708),Ee=n(97835),Ce=n.n(Ee);function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Se(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Ie(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Se(i,r,o,a,l,"next",e)}function l(e){Se(i,r,o,a,l,"throw",e)}a(void 0)}))}}function _e(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){_e(e,t,n[t])}))}return e}function xe(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{
|
||
try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ne=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),
|
||
0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Ae=[8,0,8,8];function Te(e){return e.map((function(e){return{type:ae.vB.SOUND,item:e}}))}function Ze(e){var t=e.categoryInfo,n=e.collapsed,o=e.toggleCollapsed;return(0,r.jsxs)(u.P3F,{className:Ce().sectionHeader,onClick:o,children:[function(){switch(t.type){case ae.bg.FAVORITES:return(0,r.jsx)(ne.Z,{className:Ce().headerIcon});case ae.bg.GUILD:
|
||
return(0,r.jsx)(S.Z,{guild:t.guild,height:16,width:16});case ae.bg.DEFAULTS:return(0,r.jsx)(te.Z,{className:Ce().headerIcon});case ae.bg.SEARCH:return(0,r.jsx)(oe.Z,{className:Ce().headerIcon})}}(),(0,r.jsx)(u.X6q,{variant:"eyebrow",color:"none",className:Ce().sectionTitle,children:function(){switch(t.type){case ae.bg.FAVORITES:return Oe.Z.Messages.FAVORITES;case ae.bg.GUILD:return t.guild.name;case ae.bg.DEFAULTS:return Oe.Z.Messages.SOUNDBOARD_SOUND_SECTION_DEFAULTS;case ae.bg.SEARCH:return Oe.Z.Messages.SEARCH_RESULTS_SECTION_LABEL}}()}),(0,r.jsx)(ee.Z,{className:Ce().headerIcon,direction:n?ee.Z.Directions.RIGHT:ee.Z.Directions.DOWN})]})}function Me(){return(0,r.jsx)(j.Z,{message:Oe.Z.Messages.SOUNDBOARD_SEARCH_EMPTY_STATE_BODY})}function Re(e){var t=e.descriptors,n=e.soundButtonProps,i=e.rowIndex,a=e.isUsingKeyboardNavigation,l=e.gridRowProps,u=e.getItemProps,c=e.onItemMouseEnter,s=I.Wq.useStore((function(e){return e.inspectedExpressionPosition}));return(0,r.jsx)("ul",xe(we({},l),{
|
||
className:Ce().soundRow,children:t.map((function(e,t){return(0,o.createElement)(ue.Z,xe(we({},u(t),n),{key:"sound-".concat(t,"-").concat(e.item.soundId),sound:e.item,focused:a&&s.rowIndex===i&&s.columnIndex===t,onMouseEnter:function(){return c(t)},enableSecondaryActions:!0}))}))}))}function Le(e){var t=e.guildId,i=e.containerWidth,l=e.onClose,c=(0,s.Z)().analyticsLocations,f=(0,a.e7)([Y.default],(function(){return Y.default.getId()})),d=(0,a.e7)([J.Z],(function(){return J.Z.getVoiceState(t,f)})),p=(null==d?void 0:d.selfDeaf)||(null==d?void 0:d.mute)||(null==d?void 0:d.suppress),h=(0,a.e7)([K.Z],(function(){return K.Z.getChannel(null==d?void 0:d.channelId)})),y=(0,$.Dt)(),b=function(e){var t,n=(0,a.e7)([X.default],(function(){return X.default.getCurrentUser()})),r=(0,a.e7)([q.Z],(function(){return q.Z.getGuild(null==e?void 0:e.guild_id)})),i=(0,a.e7)([Q.Z],(function(){return Q.Z.getFlattenedGuilds()})),l=Pe((0,a.Wu)([g.Z],(function(){
|
||
return[g.Z.getSounds(),g.Z.getFavorites(),null!==(t=g.Z.getDefaultSounds())&&void 0!==t?t:ge.Hy]})),3),u=l[0],c=l[1],s=l[2],f=o.useMemo((function(){return ie.ZP.canUseSoundboardEverywhere(n)?i:null!=r?[r]:[]}),[n,r,i]),d=o.useMemo((function(){if(null==r)return f;var e=f.filter((function(e){return e.id!==r.id}));e.unshift(r);return e}),[r,f]);return o.useMemo((function(){var e=[],t=[],n=!0,r=!1,o=void 0;try{for(var i,a=d[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l,f=i.value,p=null!==(l=u.get(f.id))&&void 0!==l?l:[],h=!0,y=!1,b=void 0;try{for(var v,m=p[Symbol.iterator]();!(h=(v=m.next()).done);h=!0){var g=v.value;c.has(g.soundId)&&t.push(g)}}catch(e){y=!0;b=e}finally{try{h||null==m.return||m.return()}finally{if(y)throw b}}}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}var O=!0,E=!1,C=void 0;try{for(var j,S=s[Symbol.iterator]();!(O=(j=S.next()).done);O=!0){var I=j.value;c.has(I.soundId)&&t.push(I)}}catch(e){E=!0;C=e}finally{try{
|
||
O||null==S.return||S.return()}finally{if(E)throw C}}t.length>0&&e.push({key:ae.bg.FAVORITES,categoryInfo:{type:ae.bg.FAVORITES},items:Te(t)});var _=!0,w=!1,x=void 0;try{for(var P,N=d[Symbol.iterator]();!(_=(P=N.next()).done);_=!0){var A,T=P.value,Z=null!==(A=u.get(T.id))&&void 0!==A?A:[];Z.length>0&&e.push({categoryInfo:{type:ae.bg.GUILD,guild:T},key:T.id,items:Te(Z)})}}catch(e){w=!0;x=e}finally{try{_||null==N.return||N.return()}finally{if(w)throw x}}e.push({key:ae.bg.DEFAULTS,categoryInfo:{type:ae.bg.DEFAULTS},items:Te(s)});return e}),[u,s,c,d])}(h),v=Pe(o.useState([]),2),m=v[0],O=v[1],j=function(e,t){return t.length>0?[{key:ae.bg.SEARCH,categoryInfo:{type:ae.bg.SEARCH},items:Te(t)}]:e}(b,m),S=z.T4.useSetting(),_=o.useMemo((function(){return new Set(S)}),[S]),w=o.useCallback((function(e){!_.has(e)?_.add(e):_.delete(e);z.T4.updateSetting(Array.from(_))}),[_]),x=o.useCallback((function(e,n,o,i,a){return(0,r.jsx)(Re,{descriptors:e,rowIndex:o.rowIndex,
|
||
isUsingKeyboardNavigation:o.isUsingKeyboardNavigation,gridRowProps:n,getItemProps:i,onItemMouseEnter:a,soundButtonProps:{voiceChannelGuildId:t,interactive:!p,analyticsLocations:c}},"row-".concat(n["aria-rowindex"]))}),[c,t,p]),P=o.useCallback((function(e){var t="".concat(e.key);return(0,r.jsx)(Ze,{categoryInfo:e.categoryInfo,toggleCollapsed:function(){return w(t)},collapsed:_.has(t)},"header-".concat(t))}),[_,w]),N=o.useCallback((function(e){return 0===e?32:40}),[]),A=o.useCallback((function(e){(0,le.G)(e.item,t,c)}),[c,t]),T=o.useCallback((function(e){if(0!==e.length){var t=b.reduce((function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=t.items[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value;t.categoryInfo.type!==ae.bg.FAVORITES&&e.push(l.item)}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return e}),[]),n=e.toLocaleLowerCase(),r=t.filter((function(e){
|
||
var t=E()(n,e.name.toLocaleLowerCase()),r=null!=e.emojiName&&E()(n,e.emojiName.toLocaleLowerCase());return t||r}));O(r)}else O([])}),[b]),Z=o.useCallback((function(e){(0,C.jW)(e,Ie((function(){var e,o;return Ne(this,(function(i){switch(i.label){case 0:return[4,n.e(56674).then(n.bind(n,656674))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,xe(we({guildId:t},e),{onPickerClose:l}))}]}}))})))}),[t,l]),M=o.useCallback((function(){return(0,r.jsx)(u.P3F,{tabIndex:0,className:Ce().settingsClickArea,onClick:Z,"aria-label":Oe.Z.Messages.SETTINGS,children:(0,r.jsx)(re.Z,{className:Ce().settingsIcon})})}),[Z]),R=o.useCallback((function(e){return(0,r.jsx)(me,{soundboardListRef:e,categories:b})}),[b]);return(0,r.jsx)(W,{categories:j,collapsedCategories:_,containerWidth:i,store:I.Wq,onSelectItem:A,onSearchExpressions:T,hasSearchResults:m.length>0,defaultSearchPlaceholder:"Search",renderRow:x,renderSectionHeader:P,renderCategoryList:R,renderHeaderAccessories:M,rowHeight:48,
|
||
sectionHeaderHeight:N,listPadding:Ae,itemNodeWidth:150,gridNavigatorId:y,renderEmptySearchState:Me})}var De=n(2590),ke=n(328314),Ue=n.n(ke);function Be(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Fe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Be(i,r,o,a,l,"next",e)}function l(e){Be(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ge(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var He=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),
|
||
0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Ve(e){var t=e.guildId,O=e.containerWidth,E=e.onClose,C=e.analyticsSource,j=function(){E();(0,u.ZDy)(Fe((function(){var e,t;return He(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(64045),n.e(516)]).then(n.bind(n,722325))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,function(e){
|
||
for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ge(e,t,n[t])}))}return e}({},e))}]}}))})))},S=(0,a.e7)([g.Z],(function(){return g.Z.isFetchingSounds()||g.Z.isFetchingDefaultSounds()})),I=(0,a.e7)([p.Z],(function(){return p.Z.getMediaSessionId()})),_=(0,s.Z)(c.Z.SOUNDBOARD_POPOUT).AnalyticsLocationProvider,w=(0,a.e7)([h.Z],(function(){return h.Z.getKeybindForAction(De.kg4.SOUNDBOARD_HOLD)}));(0,f.Z)({type:i.nv.POPOUT,name:i.zs.SOUNDBOARD_POPOUT,properties:{source:C,guild_id:t,media_session_id:I}});o.useEffect((function(){d.DZ.loadIfNecessary()}),[t]);o.useEffect((function(){m.w();m.un()}),[]);var x=null!=w&&(0,b.ED)()?Oe.Z.Messages.SOUNDBOARD_KEYBIND_HINT_NO_POPOUT_WHEEL_SUPPORT.format({keybind:(0,v.BB)(w.shortcut,!0),openSettingsHook:function(e,t){
|
||
return(0,r.jsx)(u.eee,{onClick:j,children:e},t)}}):null;return(0,r.jsx)(_,{children:(0,r.jsxs)("div",{className:Ue().picker,children:[S?(0,r.jsx)(u.$jN,{className:Ue().spinner}):(0,r.jsx)(Le,{guildId:t,onClose:E,containerWidth:O}),null!=w&&null!=x?(0,r.jsxs)("div",{className:Ue().keybindHint,children:[(0,r.jsx)(y.Z,{className:Ue().warningIcon,color:l.Z.unsafe_rawColors.YELLOW_300.css}),(0,r.jsx)(u.xvT,{variant:"text-sm/medium",color:"text-normal",className:Ue().keybindHintText,children:x})]}):null]})})}},626826:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(785893),o=n(667294),i=n(999357),a=n(202351),l=n(153686),u=n(19585),c=n(674748),s=n(563367),f=n(336177),d=n(656907),p=n(347387),h=n(460214);var y=n(496486),b=n.n(y),v=n(707961);function m(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}function g(e,t,n,r){return m(e,n,r)!==m(t,n,r)&&m(e,t,n)!==m(e,t,r)}function O(e,t,n){var r={x:n.x,y:n.y},o={x:n.x+n.width,y:n.y},i={x:n.x,y:n.y+n.height},a={x:n.x+n.width,y:n.y+n.height}
|
||
;return g(e,t,r,o)||g(e,t,o,a)||g(e,t,a,i)||g(e,t,i,r)}var E=n(473708),C=n(641297),j=n.n(C);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var _=144,w=28.8;function x(e){var t=e.className;return(0,r.jsxs)("svg",{className:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:[(0,r.jsx)("g",{filter:"url(#a)",children:(0,r.jsx)("path",{d:"M30.4 8 24 14.4 17.6 8 16 9.6l6.4 6.4-6.4 6.4 1.6 1.6 6.4-6.4 6.4 6.4 1.6-1.6-6.4-6.4L32 9.6 30.4 8Z",fill:"currentColor"})}),(0,r.jsx)("defs",{children:(0,r.jsxs)("filter",{id:"a",x:"0",y:"0",width:"48",height:"48",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,r.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,r.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,r.jsx)("feOffset",{dy:"8"}),(0,r.jsx)("feGaussianBlur",{stdDeviation:"8"}),(0,r.jsx)("feColorMatrix",{
|
||
values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"}),(0,r.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_605_72103"}),(0,r.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_605_72103",result:"shape"})]})})]})}var P=[{x:.5,y:.05},{x:.95,y:.2},{x:1,y:.5},{x:.95,y:.8},{x:.5,y:.95},{x:.05,y:.8},{x:0,y:.5},{x:.05,y:.2}],N=P.length;function A(e,t,n){var r=e*t;return e>.5?r-n:e<.5?r:r-n/2}const T=o.memo((function(e){var t=e.wheelWidth,n=e.wheelHeight,i=e.itemWidth,a=e.itemHeight,l=e.showDeadZoneIndicator,u=e.activeItem,c=e.onItemSelect,s=e.onItemAction,f=e.interactive,d=void 0===f||f,p=e.children,h=o.useRef(null),m=o.useRef([]),g=o.useRef(!1),C=o.useRef(null),S=I(o.useState(0),2),T=S[0],Z=S[1],M=I(o.useState({x:0,y:0}),2),R=M[0],L=M[1],D=Math.abs(R.x)+Math.abs(R.y)>0,k=o.useMemo((function(){return b().chunk(p,N)}),[p]),U=o.useCallback((function(e,t){null==m.current[T]?m.current[T]=[]:m.current[T][t]=e}),[T]),B=o.useCallback((function(e,t){C.current=t;c(N*e+t)
|
||
}),[c]),F=o.useCallback((function(){C.current=null;c(null)}),[c]),G=o.useCallback((function(e){F();g.current=e}),[F]),H=o.useCallback((function(e,t,n){if(g.current)L({x:0,y:0});else{var r={x:e.x-t.x,y:e.y-t.y},o=r.x<0,i=r.y<0,a=function(e,t){var n=Math.abs(t.x),r=Math.abs(t.y),o=Math.atan2(r,n)*(180/Math.PI),i=e/2-w;return{x:Math.max(i*Math.cos(2*Math.PI*o/360),0),y:Math.max(i*Math.sin(2*Math.PI*o/360),0)}}(n,r),l=o?Math.max(r.x,-a.x):Math.min(r.x,a.x),u=i?Math.max(r.y,-a.y):Math.min(r.y,a.y);L({x:l/2,y:u/2})}}),[]),V=o.useCallback((function(e){if(null!=C.current){e.preventDefault();e.stopPropagation();null==s||s(N*T+C.current)}}),[s,T]),W=o.useMemo((function(){return(0,y.throttle)((function(e){if(null!=h.current){var r=h.current.getBoundingClientRect(),o={x:r.left+r.width/2,y:r.top+r.height/2},i={x:e.clientX,y:e.clientY};H(i,o,Math.max(t,n));if(g.current)null!=u&&F();else{for(var a,l,c,s,f=(a=o,l=i,c=Math.max(t,n),s=Math.sqrt(Math.pow(a.x-l.x,2)+Math.pow(a.y-l.y,2)),{
|
||
x:l.x+(l.x-a.x)/s*c,y:l.y+(l.y-a.y)/s*c}),d=0;d<m.current[T].length;d++){var p=m.current[T][d];if(null!=p){if(O(o,f,p.getBoundingClientRect())){B(T,d);return}}}F()}}}),16)}),[u,H,F,B,T,n,t]),z=o.useCallback((function(e){if(d){var t=e.deltaY>0?1:-1,n=T+t;if(n>=0&&n<k.length){null!=C.current&&(k[n].length>C.current?B(n,C.current):F());Z(n)}}}),[d,T,k,B,F]),Y=o.useMemo((function(){return k[T].map((function(e,o){var l=P[o];if(null==l)throw new Error("Too many items supplied ".concat(p.length," expected max of ").concat(P.length));var u=A(l.x,t,i),c=A(l.y,n,a);return(0,r.jsx)("div",{ref:function(e){return U(e,o)},className:j().chatWheelItem,style:{left:u,top:c,width:i,height:a},children:e},o)}))}),[k,T,t,i,n,a,p.length,U]);return(0,r.jsx)(v.P3F,{className:j().chatWheelMouseInput,onMouseMove:W,onWheel:z,onClick:V,children:(0,r.jsxs)("div",{ref:h,className:j().chatWheel,style:{width:t,height:n},children:[(0,r.jsxs)("svg",{className:j().chatWheelBackground,viewBox:"0 0 288 288",
|
||
xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsxs)("filter",{id:"soundboard-wheel-background-shadow",x:"0",y:"0",width:"288",height:"288",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,r.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,r.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,r.jsx)("feOffset",{dy:"8"}),(0,r.jsx)("feGaussianBlur",{stdDeviation:"8"}),(0,r.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"}),(0,r.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_489_60382"}),(0,r.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_489_60382",result:"shape"})]}),(0,r.jsxs)("g",{filter:"url(#soundboard-wheel-background-shadow)",children:[(0,r.jsx)("circle",{className:j().chatWheelBackground,cx:"144",cy:"144",r:"103.68",strokeWidth:"40.32"}),l&&(0,r.jsx)("circle",{className:j().chatWheelDeadZone,onMouseEnter:function(){
|
||
return G(!0)},onMouseLeave:function(){return G(!1)},cx:_,cy:_,r:w}),D&&(0,r.jsx)("circle",{className:j().chatWheelCenter,cx:_+R.x,cy:_+R.y,r:w})]}),l&&(0,r.jsx)("circle",{className:j().chatWheelDeadZone,onMouseEnter:function(){return G(!0)},onMouseLeave:function(){return G(!1)},cx:_,cy:_,r:w,stroke:"none"})]}),(0,r.jsxs)("div",{className:j().innerContent,children:[l&&(0,r.jsx)(x,{className:j().chatWheelDeadZoneIcon}),d&&k.length>1?(0,r.jsx)("div",{className:j().paginationHint,children:E.Z.Messages.CHAT_WHEEL_PAGINATION_HINT}):null]}),Y]})})}));var Z=n(16727),M=n(309413),R=n.n(M);function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0
|
||
;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e){var t=e.guildId,n=e.width,y=e.height,b=e.keepOpen,v=e.interactive,m=void 0===v||v,g=e.analyticsSource,O=e.onClose,E=function(e){var t;return(0,a.e7)([d.Z],(function(){return null!==(t=d.Z.getSoundsForGuild(e))&&void 0!==t?t:h.Hy}),[e])}(t),C=(0,a.e7)([d.Z],(function(){return d.Z.getGuildIdsToFetch()})),j=(0,p.Z)(null,t).playSoundboardSound,S=o.useRef(null),I=D(o.useState(void 0),2),_=I[0],w=I[1],x=(0,
|
||
a.e7)([s.Z],(function(){return s.Z.getMediaSessionId()})),P=(0,u.Z)(l.Z.SOUNDBOARD_WHEEL),N=P.analyticsLocations,A=P.AnalyticsLocationProvider,M=o.useCallback((function(e){j(N,e);O()}),[N,O,j]);o.useEffect((function(){f.w()}),[]);o.useEffect((function(){0===E.length&&0===C.length&&O()}),[E.length,C,O]);o.useEffect((function(){return function(){var e=S.current;b||null==e||M(e)}}),[b,t,M]);(0,c.Z)({type:i.nv.POPOUT,name:i.zs.SOUNDBOARD_POPOUT,properties:{source:g,guild_id:t,media_session_id:x}},{disableTrack:!m});var L=o.useCallback((function(e){S.current=e;w(null==e?void 0:e.soundId)}),[]),k=o.useCallback((function(e){if(null!=e){var t=E[e];null!=t&&L(t)}else L(null)}),[L,E]),U=o.useCallback((function(e){if(null!=e){var t=E[e];null!=t&&M(t)}}),[E,M]),B=o.useMemo((function(){return E.map((function(e){return(0,r.jsx)(Z.Z,{interactive:m,className:R().soundButton,sound:e,focused:_===e.soundId,voiceChannelGuildId:t},e.soundId)}))}),[_,t,m,E]);return 0===E.length?null:(0,r.jsx)(A,{
|
||
children:(0,r.jsx)(T,{wheelWidth:n,wheelHeight:y,itemWidth:96,itemHeight:52,showDeadZoneIndicator:!b,activeItem:_,onItemSelect:k,onItemAction:U,interactive:m,children:B})})}},672522:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=n(744564);function o(e){r.Z.dispatch({type:"STAGE_MUSIC_MUTE",muted:e})}},519718:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(736818),o=n(82274),i=n(808194),a=n(933022),l=n(766496);function u(e){if(!e.isGuildStageVoice())return!1;if(!l.Z.isLive(e.id))return!1;var t=r.default.getId();return!!a.ZP.isModerator(t,e.id)&&(!!a.ZP.isSpeaker(t,e.id)&&(null==o.Z.getMutableParticipants(e.id).find((function(n){return n.user.id!==t&&a.ZP.isModerator(n.user.id,e.id)}))||null==o.Z.getMutableParticipants(e.id,i.pV.SPEAKER).find((function(n){return n.user.id!==t&&a.ZP.isModerator(n.user.id,e.id)}))))}},499219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(202351),o=n(61209),i=n(715107);function a(){return(0,r.e7)([i.Z,o.Z],(function(){var e=i.Z.getVoiceChannelId()
|
||
;if(null!=e){var t=o.Z.getChannel(e);if(null==t?void 0:t.isGuildStageVoice())return t}return null}))}},129532:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ii});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(496486),s=n(751615),f=n(202351),d=n(630631),p=n(707961),h=n(744564),y=n(677681),b=n(26468),v=n(566706),m=n(91036),g=n(509097),O=n(753705),E=n(201521),C=n(15338),j=n(979197),S=n(784426),I=n(173388),_=n(299836),w=n(729139),x=n(656262),P=n(631443),N=n(821297),A=n(980617),T=n(736818),Z=n(77457),M=n(567403),R=n(682776),L=n(715107),D=n(176758),k=n(120415),U=n(463473),B=n(310126),F=n(915840),G=n(442812),H=n(808194),V=n(766496),W=n(299239),z=n(971402),Y=n(385028),K=n(357088),q=n(725691),Q=n(183640),X=n(21372),J=n(491260),$=n(189865),ee=n(447642),te=n(462791),ne=n(373438),re=n(771575),oe=n(749565),ie=n(473708);function ae(e){var t;if((0,oe.EO)(e.user))return ie.Z.Messages.REQUEST_TO_SPEAK_MEMBER_INFO_NEW_TO_DISCORD;var n=null===(t=e.member)||void 0===t?void 0:t.joinedAt
|
||
;if(null==n)return ie.Z.Messages.REQUEST_TO_SPEAK_MEMBER_INFO_NON_MEMBER;if(null!=e.member&&e.member.roles.length>0){var r,o;return null!==(o=null===(r=e.role)||void 0===r?void 0:r.name)&&void 0!==o?o:ie.Z.Messages.REQUEST_TO_SPEAK_MEMBER_INFO_MEMBER_ROLES}return(new Date).getTime()-Date.parse(n)<864e5?ie.Z.Messages.REQUEST_TO_SPEAK_MEMBER_INFO_NEW_MEMBER:ie.Z.Messages.REQUEST_TO_SPEAK_MEMBER_INFO_MEMBER}var le=n(525261),ue=n(61209),ce=n(563135),se=n(2590);function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var pe=n(516909),he=n(832642),ye=n(796919),be=n.n(ye);function ve(e){var t=e.className;return(0,r.jsx)(he.Z,{className:t,children:(0,r.jsx)("div",{className:be().background,children:(0,r.jsx)(pe.Z,{className:be().foreground,width:32,height:32})})})}var me=n(488462),ge=n(758176),Oe=n.n(ge);function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ce(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function je(e){
|
||
return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ce(i,r,o,a,l,"next",e)}function l(e){Ce(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Se(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Se(e,t,n[t])}))}return e}function _e(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n
|
||
}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
var xe,Pe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0
|
||
}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},Ne=o.memo((function(e){var t=e.toggleRequestToSpeakSidebar,n=e.chatOpen,o=(0,r.jsx)(ne.ZP.Icon,{icon:$.Z,tooltip:ie.Z.Messages.CLOSE,onClick:t});return(0,r.jsxs)(ne.ZP,{toolbar:o,className:a()(Oe().headerContainer,Se({},Oe().chatOpen,n)),children:[(0,r.jsx)(ne.ZP.Icon,{icon:te.Z,disabled:!0,"aria-label":ie.Z.Messages.REQUEST_TO_SPEAK_AREA_TITLE}),(0,r.jsx)(ne.ZP.Title,{children:ie.Z.Messages.REQUEST_TO_SPEAK_AREA_TITLE})]})})),Ae=o.memo((function(e){var t=e.channel,i=e.participant,l=e.tempDisableOnInit,c=void 0!==l&&l,s=function(){(0,re.DT)(t,i.user.id,!1)},d=function(){(0,re.DT)(t,i.user.id,!0)},h=we(o.useState(c),2),y=h[0],b=h[1];o.useEffect((function(){if(y){var e=setTimeout((function(){return b(!1)}),1e3);return function(){return clearTimeout(e)}}}),[]);var v=t.getGuildId();u()(null!=v,"Channel cannot be guildless");var m=(0,f.cj)([J.Z],(function(){return{isMobile:J.Z.isMobileOnline(i.user.id),
|
||
status:J.Z.getStatus(i.user.id,v)}})),g=m.isMobile,O=m.status,E=(0,f.e7)([X.ZP],(function(){return X.ZP.getMember(v,i.user.id)})),C=o.useMemo((function(){return Se({},v,[i.user.id])}),[v,i.user.id]);(0,K.$)(C);var j,S=i.rtsState===le.xO.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK,I=function(e){(0,z.jW)(e,je((function(){var e,o;return Pe(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(3454),n.e(77357),n.e(14136)]).then(n.bind(n,914136))];case 1:e=a.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,_e(Ie({},e),{user:i.user,guildId:v,channel:t,showMediaItems:!0}))}]}}))})))};return(0,r.jsxs)("div",{className:Oe().participantRowContainer,children:[(0,r.jsx)(p.yRy,{preload:function(){return(0,q.Z)(i.user.id,i.user.getAvatarURL(t.guild_id,80),{guildId:t.guild_id,channelId:t.id})},renderPopout:function(e){return(0,r.jsx)(Q.Z,_e(Ie({},e),{userId:i.user.id,guildId:v,channelId:t.id}))},position:"left",spacing:16,children:function(e){return(0,
|
||
r.jsxs)(p.P3F,_e(Ie({className:Oe().participantMemberContainer,onContextMenu:I},e),{children:[(0,r.jsx)(Y.Z,{size:p.EFr.SIZE_40,className:Oe().participantAvatar,user:i.user,isMobile:g,status:O}),(0,r.jsxs)("div",{className:Oe().participantTextContainer,children:[(0,r.jsx)(p.PUh,{name:i.userNick,color:null!==(j=null==E?void 0:E.colorString)&&void 0!==j?j:void 0,className:Oe().participantName}),(0,r.jsx)(p.xvT,{variant:"text-xs/normal",color:"header-secondary",children:ae(i)})]})]}))}}),(0,r.jsx)(p.ua7,{text:S?ie.Z.Messages.REQUEST_TO_SPEAK_INVITATION_SEND:ie.Z.Messages.REQUEST_TO_SPEAK_ACCEPT,children:function(e){return(0,r.jsx)(p.zxk,_e(Ie({},e),{innerClassName:Oe().buttonContainer,look:p.zxk.Looks.BLANK,size:p.zxk.Sizes.NONE,onClick:s,disabled:S||y,children:(0,r.jsx)(ee.Z,{width:16,height:16})}))}}),(0,r.jsx)(p.ua7,{text:ie.Z.Messages.REQUEST_TO_SPEAK_DECLINE,children:function(e){return(0,r.jsx)(p.zxk,_e(Ie({},e),{innerClassName:a()(Oe().buttonContainer,Oe().buttonMargin),
|
||
look:p.zxk.Looks.BLANK,size:p.zxk.Sizes.NONE,onClick:d,children:(0,r.jsx)($.Z,{width:16,height:16})}))}})]})})),Te=o.memo((function(e){var t=we(function(e){var t=(0,f.e7)([ue.Z],(function(){return ue.Z.getChannel(e)}),[e]),n=ce.ZP.canEveryoneRole(se.Plq.REQUEST_TO_SPEAK,t),r=de(o.useState(n),2),i=r[0],a=r[1];o.useEffect((function(){n!==i&&a(n)}),[n]);return[i,function(e){if(null!=t){a(e);(0,re.Pq)(t,se.Plq.REQUEST_TO_SPEAK,e)}}]}(e.channel.id),2),n=t[0],i=t[1];return(0,r.jsx)(p.j7V,{className:Oe().toggle,onChange:i,value:n,children:ie.Z.Messages.MODERATOR_ALLOW_EVERYONE_RAISE_HAND})})),Ze=o.memo((function(){return(0,r.jsxs)("div",{className:Oe().emptyStateContainer,children:[(0,r.jsx)(ve,{}),(0,r.jsx)(p.xvT,{className:Oe().emptyStateTitle,variant:"text-lg/semibold",color:"header-primary",children:ie.Z.Messages.REQUEST_TO_SPEAK_EMPTY_LIST_TITLE}),(0,r.jsx)(p.xvT,{className:Oe().emptyStateBody,variant:"text-sm/normal",color:"header-secondary",
|
||
children:ie.Z.Messages.REQUEST_TO_SPEAK_EMPTY_LIST_BODY})]})}));!function(e){e[e.TOGGLE_REQUEST_TO_SPEAK=0]="TOGGLE_REQUEST_TO_SPEAK";e[e.PARTICIPANTS=1]="PARTICIPANTS"}(xe||(xe={}));function Me(e){var t=e.channel,n=e.toggleRequestToSpeakSidebar,o=e.chatOpen,i=(0,G.Fd)(t.id),l=[(0,f.e7)([R.Z],(function(){return R.Z.can(me.Pl.MANAGE_CHANNELS,t)||R.Z.can(me.Pl.MANAGE_ROLES,t)}))?1:0,Math.max(1,i.length)];return(0,r.jsxs)("div",{className:a()(Oe().container,Se({},Oe().chatOpen,o)),children:[(0,r.jsx)(Ne,{toggleRequestToSpeakSidebar:n,chatOpen:o}),(0,r.jsx)(p.aVo,{className:Oe().contentContainer,sections:l,sectionHeight:function(e){return e===xe.PARTICIPANTS?40:0},rowHeight:function(e){switch(e){case xe.TOGGLE_REQUEST_TO_SPEAK:return 66;case xe.PARTICIPANTS:return 0===i.length?178:48}return 0},renderRow:function(e){var n=e.section,o=e.row;switch(n){case xe.TOGGLE_REQUEST_TO_SPEAK:return(0,r.jsx)(Te,{channel:t},"rts-toggle");case xe.PARTICIPANTS:if(0===i.length)return(0,
|
||
r.jsx)(Ze,{},"participants-empty");var a=i[o];return(0,r.jsx)(Ae,{channel:t,participant:a,tempDisableOnInit:!0},a.id)}return null},renderSection:function(e){return e.section===xe.PARTICIPANTS?(0,r.jsx)(p.xvT,{className:Oe().listTitle,variant:"text-xs/bold",color:"header-secondary",children:i.length>0?ie.Z.Messages.REQUEST_TO_SPEAK_LIST_TITLE.format({numHands:i.length}):ie.Z.Messages.REQUEST_TO_SPEAK_AREA_TITLE},"participants-section"):null}})]})}var Re=n(842629),Le=n(276985),De=n(716371),ke=n(730380),Ue=n(72580),Be=n(773148),Fe=n(788671),Ge=n.n(Fe),He=function(e,t){return Be.Z.getName(e.getGuildId(),e.id,t.user)};function Ve(e,t){return 0===t.length?ie.Z.Messages.CURRENTLY_IN_STAGE_EMPTY:1===t.length?ie.Z.Messages.CURRENTLY_IN_STAGE_1.format({a:He(e,t[0])}):2===t.length?ie.Z.Messages.CURRENTLY_IN_STAGE_2.format({a:He(e,t[0]),b:He(e,t[1])}):t.length>2?ie.Z.Messages.CURRENTLY_IN_STAGE_2_N.format({a:He(e,t[0]),b:He(e,t[1]),n:t.length-2}):void 0}const We=function(e){
|
||
var t=e.participants,n=e.channel,i=e.hasConnectPermission,a=(0,De.J)(n.guild_id),l=o.useCallback((function(){a?(0,Le.hk)(n.guild_id,(function(){return Re.default.selectVoiceChannel(n.id)})):Re.default.selectVoiceChannel(n.id)}),[n.id,n.guild_id,a]),u=t.filter((function(e){return e.type===H.Ui.VOICE})),c=4===u.length?2:3,s=(0,f.Wu)([v.Z],(function(){return u.map((function(e){return v.Z.getParticipant(n.id,e.id)})).filter(Ue.lm)}),[n.id,u]);return(0,r.jsxs)("div",{className:Ge().container,children:[(0,r.jsx)("div",{className:Ge().tiles,style:{maxWidth:168*c},children:s.slice(0,5).map((function(e){return(0,r.jsx)(ke.ZP,{participant:e,channel:n,className:Ge().tile,paused:!0,inCall:!0,noVideoRender:!0,inPopout:!1,width:48},e.id)}))}),(0,r.jsx)(p.X6q,{className:Ge().channelName,variant:"heading-xxl/semibold",children:n.name}),(0,r.jsx)("div",{className:Ge().participantsRow,children:(0,r.jsx)(p.xvT,{color:"header-secondary",variant:"text-sm/normal",children:Ve(n,u)})}),(0,r.jsx)(p.zxk,{
|
||
disabled:!i,className:Ge().joinButton,color:i?p.zxk.Colors.GREEN:p.zxk.Colors.PRIMARY,onClick:l,size:p.zxk.Sizes.MEDIUM,children:i?ie.Z.Messages.STAGE_CHANNEL_JOIN:ie.Z.Messages.CHANNEL_LOCKED_SHORT})]})};var ze=n(336194),Ye=n(247250),Ke=n(679724),qe=n(773011),Qe=n(833667),Xe=n(865050),Je=n(7602),$e=n(283099),et=n(684412),tt=n(607072),nt=n(636398),rt=n(575907),ot=n(372417),it=n(353945),at=n(709189),lt=n(961241),ut=n(363582),ct=n(652591),st=n(162723),ft=n(227202),dt=n(713717),pt=n(468811),ht=n.n(pt),yt=n(732068),bt=n(390817),vt=n.n(bt);function mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ot(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){
|
||
var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Et(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mt(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ct(e){var t=e.width,n=void 0===t?24:t,i=e.height,a=void 0===i?24:i,l=e.isBadged,u=void 0!==l&&l,c=Et(o.useState((function(){return ht().v4()})),1)[0];return(0,r.jsxs)("svg",{width:n,height:a,viewBox:"0 0 24 24",children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("mask",{id:c,children:[(0,r.jsx)("rect",{fill:"white",width:"100%",height:"100%"}),u&&(0,r.jsx)("circle",{cx:"20",cy:"19",r:"10",fill:"black"})]})}),(0,r.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M20.53 7.76998C20.455 7.60998 20.31 7.48998 20.135 7.44498C20.075 7.42832 20.0106 7.41165 19.9462 7.39498L19.85 7.36998C19.305 7.22998 18.635 7.56498 18.35 8.11498L17.37 9.99998C17.085 10.55 16.725 10.51 16.57 9.90998L14.395 1.38498C14.24 0.779981 13.64 0.459981 13.05 0.664981C12.46 0.869981 12.095 1.52498 12.225 2.13498L13.495 7.95998C13.63 8.56998 13.575 9.11498 13.375 9.18498C13.175 9.25498 12.85 8.83498 12.65 8.24498L10.55 2.07498C10.35 1.48498 9.71004 1.17498 9.12004 1.37998C8.53004 1.58498 8.21504 2.22998 8.41004 2.81998L10.47 8.99998C10.665 9.58998 10.665 10.125 10.465 10.195C10.265 10.265 9.88504 9.86498 9.62504 9.29998L7.27504 4.29998C7.01004 3.73998 6.32004 3.44498 5.73004 3.64998C5.14504 3.85498 4.87504 4.47498 5.14004 5.03998L8.10004 11.045C8.36004 11.61 8.41004 12.125 8.21004 12.195C8.01004 12.265 7.53004 11.93 7.14004 11.445L5.10504 8.82498C4.71504 8.33998 4.04004 8.07498 3.59504 8.22998C3.15504 8.38498 3.04004 8.94498 3.34504 9.48998L5.84504 13.865C5.90004 14.02 7.35504 16.8 7.46004 16.915C8.50004 18.565 10.145 19.51 12.23 18.79L12.96 18.5372V15.84C12.96 14.2494 14.2494 12.96 15.84 12.96H18.3887C18.763 12.143 19.1735 11.2467 19.5492 10.4262L19.5592 10.4045L19.5647 10.3926L19.5648 10.3922L19.5702 10.3804L19.581 10.3569C19.9595 9.53048 20.3003 8.78624 20.53 8.28498C20.605 8.11498 20.605 7.92998 20.53 7.76998ZM11.81 20.51L12.96 20.0792V23.395H11.815L11.185 22.03C11.055 21.75 11.045 21.425 11.165 21.135C11.285 20.845 11.52 20.62 11.81 20.51ZM14.4 16.32C14.4 15.2596 15.2596 14.4 16.32 14.4H22.08C23.1404 14.4 24 15.2596 24 16.32V22.08C24 23.1404 23.1404 24 22.08 24H16.32C15.2596 24 14.4 23.1404 14.4 22.08V16.32ZM16.32 16.56H22.08V17.52H16.32V16.56ZM22.08 18.72H16.32V19.68H22.08V18.72ZM16.32 20.88H22.08V21.84H16.32V20.88Z",
|
||
mask:"url(#".concat(c,")")})]})}function jt(e){var t=e.className,n=e.numRequestToSpeak,o=n>0,i=n>99?"99+":n;return(0,r.jsxs)("div",{className:a()(vt().raisedHandIcon,t),children:[(0,r.jsx)(Ct,{isBadged:o}),o?(0,r.jsx)(p.xvT,{className:vt().raisedHandCount,variant:"text-xs/semibold",children:i}):null]})}function St(e){var t=e.toggleRequestToSpeakSidebar,n=e.showRequestToSpeakSidebar,i=e.className,a=e.numRequestToSpeak,l=e.onClick,u=Ot(e,["toggleRequestToSpeakSidebar","showRequestToSpeakSidebar","className","numRequestToSpeak","onClick"]),c=o.useCallback((function(){null==l||l();t()}),[l,t]);return(0,r.jsx)(yt.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){gt(e,t,n[t])}))}return e}({onClick:c,
|
||
label:n?ie.Z.Messages.REQUEST_TO_SPEAK_AREA_CLOSE:ie.Z.Messages.REQUEST_TO_SPEAK_AREA_OPEN,className:i,iconComponent:function(){return(0,r.jsx)(jt,{numRequestToSpeak:a,className:i})}},u))}var It=n(430510),_t=n(492692),wt=n(670843),xt=n(830271),Pt=n(221921),Nt=n(636246),At=n(358500);function Tt(e){var t=(0,f.e7)([ue.Z],(function(){return ue.Z.getChannel(e)}),[e]),n=(0,f.e7)([R.Z],(function(){return R.Z.can(ft.yP,t)})),o=(0,f.e7)([V.Z],(function(){return V.Z.getStageInstanceByChannel(e)}),[e]),i=(0,b.bp)(),a=function(){return null!=t&&(0,Nt.T)(t,i)};return(null==t?void 0:t.isGuildStageVoice())&&n?null!=o?(0,r.jsx)(p.sNh,{id:"edit-stage",label:ie.Z.Messages.EDIT_STAGE_SUBTITLE,action:a}):(0,r.jsx)(p.sNh,{id:"start-stage",label:ie.Z.Messages.STAGE_CHANNEL_START_TITLE,action:a}):null}function Zt(e){var t=(0,f.e7)([ue.Z],(function(){return ue.Z.getChannel(e)}),[e]);u()(null!=t,"useNotificationSettingsItem: channel cannot be undefined");return(0,Pt.Z)(t)}function Mt(e){
|
||
var t=e.channelId,n=e.closePopout,o=e.appContext,i=e.onSelect,a=e.textInStageEnabled,l=(0,f.e7)([v.Z],(function(){return v.Z.getSelectedParticipant(t)})),u=(null==l?void 0:l.type)===At.fO.STREAM?l.stream:null,c=(0,xt.Z)(t);return(0,r.jsxs)(p.v2r,{navId:"stage-channel-call-overflow-popout",onClose:n,"aria-label":ie.Z.Messages.CHANNEL_CALL_OVERFLOW_MENU_LABEL,onSelect:i,children:[Tt(t),Zt(t),(0,_t.Z)(),(0,It.Z)(t),a?c:null,(0,wt.Z)(u,o)]})}function Rt(e){var t,n=(0,f.e7)([v.Z],(function(){return v.Z.getStageVideoLimitBoostUpsellDismissed(e.id)}),[e.id]),r=(0,G.Io)(e.id),o=(0,G.Rk)(e.id,H.pV.AUDIENCE),i=(0,dt.PK)(e.id),a=r+o,l=(0,f.e7)([M.Z],(function(){return M.Z.getGuild(e.guild_id)}),[e.guild_id]),u=(0,f.e7)([R.Z],(function(){return R.Z.can(ft.yP,e)}),[e]),c=dt.AI.useExperiment({guildId:e.guild_id},{autoTrackExposure:!0}).enabled,s=null!==(t=null==l?void 0:l.maxStageVideoChannelUsers)&&void 0!==t?t:0,d=!c&&s>se.RcX;return i&&!n&&u&&!d&&a>=s}var Lt=n(203600),Dt=n(78465),kt=n.n(Dt)
|
||
;function Ut(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Ut(e,t,n[t])}))}return e}function Ft(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Gt(e){
|
||
var t=e.channel,n=e.toggleRequestToSpeakSidebar,i=e.showRequestToSpeakSidebar,l=(0,b.bp)(),u=(0,f.e7)([v.Z],(function(){return v.Z.getChatOpen(t.id)})),c=(0,st.B)(t.id),s=(0,G.Rk)(t.id,H.pV.REQUESTED_TO_SPEAK_ONLY),d=(0,A.Vy)(t.guild_id),h=(0,nt.Y)("popup"),y=h.preventIdle,m=h.allowIdle;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.yRy,{position:"bottom",animation:p.yRy.Animation.NONE,align:"right",renderPopout:function(e){return(0,r.jsx)(rt.Z,{children:(0,r.jsx)(Mt,Ft(Bt({},e),{channelId:t.id,appContext:l,textInStageEnabled:d}))})},autoInvert:!1,children:function(e,t){var n=t.isShown;return(0,o.createElement)(it.Z,Ft(Bt({},e),{key:"more-options",isActive:n,className:kt().button,iconClassName:kt().buttonIcon}))}},"more-options-popout"),(0,r.jsx)(tt.Z,{onOpen:y,onClose:m,className:kt().button},"recents"),!i&&c?(0,r.jsx)("div",{className:kt().button,children:(0,r.jsx)(St,{toggleRequestToSpeakSidebar:function(){u&&Ye.Z.updateChatOpen(t.id,!1);n()},showRequestToSpeakSidebar:i,
|
||
numRequestToSpeak:s})}):null,d&&!u&&(0,r.jsx)("div",{className:a()(kt().button,Ut({},kt().sidebarOpen,i)),children:(0,r.jsx)(ot.T,{channelId:t.id,showRequestToSpeakSidebar:i,toggleRequestToSpeakSidebar:n,iconClassName:kt().buttonIcon})})]})}function Ht(e){var t,n=e.channel,i=e.toggleRequestToSpeakSidebar,l=e.showRequestToSpeakSidebar,u=(0,qe.ZP)(n),c=dt.AI.useExperiment({guildId:n.guild_id},{autoTrackExposure:!0}).enabled,s=(0,f.e7)([V.Z],(function(){return V.Z.getStageInstanceByChannel(n.id)})),d=(0,G.Io)(n.id),h=(0,G.Rk)(n.id,H.pV.AUDIENCE),y=(0,f.e7)([M.Z],(function(){return M.Z.getGuild(n.guild_id)}),[n.guild_id]),b=null!==(t=null==y?void 0:y.maxStageVideoChannelUsers)&&void 0!==t?t:0,v=c?b<se.TU7:(null==y?void 0:y.premiumTier)!==se.Eu4.TIER_3&&b<=se.eez,m=Rt(n),g=(0,f.e7)([R.Z],(function(){return R.Z.can(ft.yP,n)})),O=function(){Ye.Z.updateStageVideoLimitBoostUpsellDismissed(n.id,!0);ct.default.track(se.rMx.BOOSTING_UPSELL_CLICKED,{guild_id:n.guild_id,type:Lt.cd.VIDEO_STAGE_LIMIT,
|
||
is_moderator:g,action:Lt.T7.DISMISS})};o.useEffect((function(){m&&ct.default.track(se.rMx.BOOSTING_UPSELL_VIEWED,{guild_id:n.guild_id,type:Lt.cd.VIDEO_STAGE_LIMIT,is_moderator:g,listener_count:d+h})}),[m]);var E,C,j=Ke._.useExperiment({}),S=j.enabled,I=j.left,_=(0,Je.Z)(n.guild_id,!S),w=null!=_?_[n.name.toLowerCase()]:void 0,x=null!=w?[w,null!==(E=Xe.Z[w])&&void 0!==E?E:"#607D8B"]:void 0,P=(0,r.jsxs)(ne.ZP,{toolbar:(0,r.jsx)(Gt,{toggleRequestToSpeakSidebar:i,showRequestToSpeakSidebar:l,channel:n}),onDoubleClick:$e.O,transparent:!0,className:a()((0,U.Q)(se.BRd.DARK),kt().participants),children:[null!=x&&I?(0,r.jsx)(et.MA,{emojiAndColor:x,channelEmojiLeftOfIcon:!1}):null,(0,r.jsx)(ne.ZP.Icon,{icon:pe.Z,disabled:!0,"aria-label":ie.Z.Messages.STAGE_CHANNEL,className:kt().icon,color:null!=s?ze.Z.unsafe_rawColors.GREEN_360.css:void 0}),null==x||I?null:(0,r.jsx)(et.MA,{emojiAndColor:x,channelEmojiLeftOfIcon:I}),(0,r.jsx)(ne.ZP.Title,{className:kt().channelName,
|
||
wrapperClassName:kt().channelNameWrapper,children:null!==(C=null==s?void 0:s.topic)&&void 0!==C?C:u}),(0,r.jsx)(ne.ZP.Divider,{className:kt().divider}),(0,r.jsxs)(ne.ZP.Title,{children:[(0,r.jsx)(lt.Z,{width:16,height:16}),(0,r.jsx)(p.xvT,{variant:"text-xs/medium",color:"header-secondary",className:kt().speakerCount,children:ie.Z.Messages.SPEAKING_COUNT.format({count:d})}),(0,r.jsx)(ut.Z,{width:16,height:16}),(0,r.jsx)(p.xvT,{variant:"text-xs/medium",color:"header-secondary",className:kt().speakerCount,children:ie.Z.Messages.LISTENING_COUNT.format({count:h})})]})]});return m?(0,r.jsxs)("div",{children:[P,(0,r.jsxs)("div",{className:kt().boostUpsell,children:[(0,r.jsx)(Vt,{}),(0,r.jsxs)("div",{className:kt().text,children:[(0,r.jsx)(p.xvT,{variant:"text-md/medium",color:"header-primary",children:v?ie.Z.Messages.STAGE_FULL_MODERATOR_TITLE:ie.Z.Messages.STAGE_FULL_MODERATOR_MAX_TITLE}),(0,r.jsx)(p.xvT,{variant:"text-xs/medium",color:"text-normal",
|
||
children:v?ie.Z.Messages.STAGE_FULL_MODERATOR_BODY:ie.Z.Messages.STAGE_FULL_MAX_BODY})]}),(0,r.jsx)("div",{className:kt().buttons,children:v?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.zxk,{className:kt().notNowButton,onClick:O,look:p.zxk.Looks.BLANK,size:p.zxk.Sizes.SMALL,children:ie.Z.Messages.NOT_NOW}),(0,r.jsx)(at.C,{size:p.zxk.Sizes.SMALL,onClick:function(){(0,Qe.f)({guildId:n.guild_id,location:{section:se.jXE.STAGE_VIDEO_LIMIT}});ct.default.track(se.rMx.BOOSTING_UPSELL_CLICKED,{guild_id:n.guild_id,type:Lt.cd.VIDEO_STAGE_LIMIT,is_moderator:g,action:Lt.T7.BOOST})},className:kt().boostButton,children:ie.Z.Messages.PREMIUM_GUILD_SUBSCRIPTION})]}):(0,r.jsx)(p.zxk,{className:kt().notNowButton,onClick:O,look:p.zxk.Looks.BLANK,size:p.zxk.Sizes.SMALL,children:ie.Z.Messages.DISMISS})})]})]}):P}function Vt(){return(0,r.jsxs)("svg",{width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_595_59940)",children:[(0,r.jsx)("path",{
|
||
d:"M36 18C36 19.8 33.075 21.15 32.625 22.725C32.175 24.3 33.525 27.225 32.625 28.575C31.725 29.925 28.35 29.25 27 30.375C25.65 31.5 25.2 34.425 23.625 35.1C22.05 35.775 19.8 33.3 18 33.3C16.2 33.3 13.95 35.55 12.375 35.1C10.8 34.65 10.35 31.275 9 30.375C7.65 29.475 4.5 29.925 3.375 28.575C2.25 27.225 3.825 24.525 3.375 22.725C2.925 20.925 0 19.8 0 18C0 16.2 2.925 14.85 3.375 13.275C3.825 11.7 2.475 8.77497 3.375 7.42496C4.275 6.07497 7.65 6.74997 9 5.62497C10.35 4.49997 10.8 1.57497 12.375 0.899965C13.95 0.224965 16.2 2.69997 18 2.69997C19.8 2.69997 22.05 0.449965 23.625 0.899965C25.2 1.34997 25.65 4.49997 27 5.62497C28.35 6.74997 31.5 6.07497 32.625 7.42496C33.75 8.77497 32.175 11.475 32.625 13.275C33.075 15.075 36 16.2 36 18Z",fill:"url(#paint0_linear_595_59940)"}),(0,r.jsx)("path",{d:"M15.75 20.7001L18 22.9501L20.25 20.7001V15.3001L18 13.0501L15.75 15.3001V20.7001Z",fill:"white"}),(0,r.jsx)("path",{
|
||
d:"M18 6.75L11.25 13.5V22.5L18 29.25L24.75 22.5V13.5L18 6.75ZM22.5 21.6L18 26.1L13.5 21.6V14.4L18 9.9L22.5 14.4V21.6Z",fill:"white"})]}),(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"paint0_linear_595_59940",x1:"2.4046e-06",y1:"35.2166",x2:"35.7182",y2:"-1.45185",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#3E70DD"}),(0,r.jsx)("stop",{offset:"1",stopColor:"#B377F3"})]}),(0,r.jsx)("clipPath",{id:"clip0_595_59940",children:(0,r.jsx)("rect",{width:"36",height:"36",fill:"white"})})]})]})}var Wt=n(672380),zt=n(82274),Yt=n(68537);function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qt(e){return function(e){if(Array.isArray(e))return Kt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
|
||
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Qt=function(e){return e},Xt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=Jt(Qt,t,n,r),a=o.useRef(e);o.useEffect((function(){var t=i(e);a.current=t}),[e,i]);return 0===t?e:a.current},Jt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=o.useRef((0,c.throttle)(e,t,r));o.useEffect((function(){i.current=(0,c.throttle)(e,t,r);return function(){var e;null===(e=i.current)||void 0===e||e.cancel()}}),[e,t,r].concat(qt(n)));return i.current};function $t(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function en(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $t(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tn(e,t,n){var r=(0,f.e7)([zt.Z],(function(){
|
||
return[e,zt.Z.getParticipantsVersion(e)]}),[e],Yt.QF),i=(0,f.e7)([v.Z],(function(){return v.Z.getSelectedParticipantId(e)}),[e]);return o.useMemo((function(){var o=[],a=[],l=-1,u=[];if(n){var s=zt.Z.getMutableParticipants(e,H.pV.SPEAKER),f=!0,d=!1,p=void 0;try{for(var h,y=s[Symbol.iterator]();!(f=(h=y.next()).done);f=!0){var b=h.value;if(b.type!==H.Ui.STREAM)break;b.id!==i&&u.push(b);l++}}catch(e){d=!0;p=e}finally{try{f||null==y.return||y.return()}finally{if(d)throw p}}}var v=function(e,t,n){var r=n?e.filter((function(e,t){return e.id!==i&&t>l})):e,u=(0,c.chunk)(r,t);a.push(u);o.push(u.length)},m=null!=i?zt.Z.getParticipant(e,i):null;(null==m?void 0:m.speaker)?v([m],1,!1):v([],1,!1);[H.pV.SPEAKER,H.pV.AUDIENCE].forEach((function(e){v(zt.Z.getMutableParticipants(r[0],e),t[e],e===H.pV.SPEAKER)}));v(u,1,!1);return[o,a]}),[r,t,i,n,e])}var nn;!function(e){e[e.SELECTED=0]="SELECTED";e[e.SPEAKER=1]="SPEAKER";e[e.AUDIENCE=2]="AUDIENCE";e[e.MEDIA=3]="MEDIA"}(nn||(nn={}))
|
||
;var rn=n(742257),on=n(217674),an=n(330944),ln=n.n(an);function un(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function cn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){un(i,r,o,a,l,"next",e)}function l(e){un(i,r,o,a,l,"throw",e)}a(void 0)}))}}function sn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){sn(e,t,n[t])}))}return e}function dn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var pn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,
|
||
o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},hn=o.memo((function(e){var t=e.guildId,n=e.channelId,o=e.user,i=e.isPremium,a=e.isBlocked;return(0,r.jsxs)("div",{className:ln().textContainer,children:[a?(0,r.jsx)(rn.Z,{className:ln().blockedIcon,color:ze.Z.unsafe_rawColors.RED_400.css}):null,(0,r.jsx)(p.xvT,{className:ln().text,variant:"text-sm/normal",color:"header-primary",children:Be.Z.getName(t,n,o)}),i?(0,r.jsx)(on.Z,{className:ln().boost,color:ze.Z.unsafe_rawColors.GUILD_BOOSTING_PINK.css}):null]})})),yn=o.memo((function(e){
|
||
var t,n=e.participant,o=e.guildId,i=e.channel,l=e.isPremium,u=n.user,c=n.blocked,s=n.rtsState,f=s===le.xO.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK,d=s===le.xO.REQUESTED_TO_SPEAK||f;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:ln().avatarContainer,children:[d&&(0,r.jsx)(te.Z,{className:a()(ln().icon,sn({},ln().invited,f))}),(0,r.jsx)("img",{src:null!==(t=u.getAvatarURL(i.guild_id,56,!1))&&void 0!==t?t:void 0,alt:u.username,"aria-label":u.username,className:a()(ln().avatar,sn({},ln().faded,c))})]}),(0,r.jsx)(hn,{guildId:o,channelId:i.id,user:u,isPremium:l,isBlocked:c})]})})),bn=function(){return(0,r.jsx)("div",{className:ln().tileBaseContainer})};const vn=o.memo((function(e){var t=e.participant,i=e.channel,l=t.user,c=t.blocked,s=i.getGuildId(),d=(0,b.bp)(),h=(0,f.e7)([X.ZP],(function(){var e;return null!=s&&null!=(null===(e=X.ZP.getMember(s,l.id))||void 0===e?void 0:e.premiumSince)}),[s,l.id]);u()(null!=s,"Channel cannot be guildless")
|
||
;var y=o.useCallback((function(e){(0,z.jW)(e,cn((function(){var e,t;return pn(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(3454),n.e(77357),n.e(14136)]).then(n.bind(n,914136))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,dn(fn({},e),{user:l,guildId:s,channel:i,showMediaItems:!0,showStageChannelItems:!0,showChatItems:!1}))}]}}))})),{context:d})}),[l,s,i,d]),v=o.useCallback((function(e){return(0,r.jsx)(Q.Z,dn(fn({},e),{guildId:s,channelId:i.id,userId:l.id}))}),[i.id,s,l.id]);return(0,r.jsx)(p.yRy,{preload:function(){return(0,q.Z)(l.id,l.getAvatarURL(i.guild_id,80),{guildId:i.guild_id,channelId:i.id})},renderPopout:v,position:"right",spacing:8,children:function(e){var n;return(0,r.jsx)(p.P3F,dn(fn({className:a()(ln().tileContainer,(n={},sn(n,ln().singleIcon,h||c),sn(n,ln().doubleIcon,h&&c),n)),onContextMenu:y},e),{children:(0,r.jsx)(yn,{participant:t,guildId:s,channel:i,isPremium:h})}))}})}));var mn=n(944643),gn=n.n(mn)
|
||
;const On=o.memo((function(e){var t=e.channel,n=e.participants,o=e.maxTiles;if(0===n.length)return null;for(var i=[],a=0;a<o;a++)if(a<n.length){var l=n[a];i.push((0,r.jsx)(vn,{channel:t,participant:l},l.id))}else i.push((0,r.jsx)(bn,{},a));return(0,r.jsx)("div",{className:gn().participants,children:i})}));var En,Cn=n(753274),jn=n(312274),Sn=n.n(jn),In=n(441086),_n=n.n(In);const wn=(0,p.v_l)(Sn().auto,Sn().fade,_n().customTheme,null!==(En=window.ResizeObserver)&&void 0!==En?En:Cn.d);var xn=n(481008),Pn=n(859853),Nn=n(409125),An=n(306263),Tn=n(924066),Zn=n(177570),Mn=n(407561),Rn=n(225253),Ln=n(933022),Dn=n(736097),kn=n(993137),Un=n(447394),Bn=n.n(Un);function Fn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Fn(e,t,n[t])}))}return e}function Hn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Vn(e){
|
||
var t=e.aspectRatio,n=e.blocked,o=e.channel,i=e.className,a=e.focused,l=e.children,u=e.inCall,c=e.inPopout,s=e.noBorder,f=e.onClick,d=e.onContextMenu,p=e.onDoubleClick,h=e.onVideoResize,y=e.paused,b=e.pulseSpeakingIndicator,v=e.participant,m=e.width,g=Hn(e,["aspectRatio","blocked","channel","className","focused","children","inCall","inPopout","noBorder","onClick","onContextMenu","onDoubleClick","onVideoResize","paused","pulseSpeakingIndicator","participant","width"]),O=Dn.Z.getVideoComponent();return(0,r.jsx)("div",{style:{width:m},className:Bn().spaceBetweenTiles,children:(0,r.jsxs)(kn.Z,{className:Bn().tileSizer,aspectRatio:t,children:[(0,r.jsx)(ke.ZP,Gn({blocked:n,channel:o,className:i,focused:a,inCall:u,inPopout:c,noBorder:s,onClick:f,onContextMenu:d,onDoubleClick:p,onVideoResize:h,participant:v,paused:y,pulseSpeakingIndicator:b,videoComponent:O,width:m},g)),l]})})}var Wn=n(422557),zn=n(955871),Yn=n.n(zn);function Kn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,
|
||
configurable:!0,writable:!0}):e[t]=n;return e}function qn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}const Qn=function(){return(0,r.jsx)(p.ua7,{text:ie.Z.Messages.STAGE_MODERATOR_TOOLTIP,children:function(e){return(0,r.jsx)("div",qn(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Kn(e,t,n[t])}))}return e}({},e),{className:Yn().container,
|
||
children:(0,r.jsx)(Wn.Z,{color:ze.Z.unsafe_rawColors.WHITE_500.css})}))}})};var Xn=n(636389),Jn=n.n(Xn);function $n(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function er(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$n(i,r,o,a,l,"next",e)}function l(e){$n(i,r,o,a,l,"throw",e)}a(void 0)}))}}function tr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function nr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){tr(e,t,n[t])}))}return e}function rr(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var or=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],
|
||
done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},ir=16/9,ar=function(e){var t=e.stageParticipant,n=e.rtcParticipant,i=e.channel,a=e.guildId,l=e.user,u=e.width,c=e.isModerator,s=e.onContextMenu,f=e.inPopout,d=o.useContext(Pn.S).reducedMotion,h=t.blocked,y=t.id;return(0,r.jsx)(p.yRy,{preload:null==n?void 0:function(){return(0,q.Z)(n.user.id,n.user.getAvatarURL(i.guild_id,80),{guildId:i.guild_id,channelId:i.id})},renderPopout:function(e){return(0,r.jsx)(Q.Z,rr(nr({},e),{guildId:a,channelId:i.id,userId:l.id}))},position:"right",spacing:8,
|
||
children:function(e){return(0,r.jsx)(p.P3F,rr(nr({onContextMenu:function(e){return s(n,e)}},e),{children:(0,r.jsx)(Vn,{participant:n,aspectRatio:ir,blocked:h,channel:i,className:Jn().tile,inCall:!0,inPopout:f,paused:!1,pulseSpeakingIndicator:!d.enabled,width:u,children:c&&(0,r.jsx)(Qn,{})},y)}))}})},lr=function(e){var t=e.stageParticipant,n=e.rtcParticipant,i=e.channel,a=e.width,l=e.isModerator,u=e.onContextMenu,c=e.inPopout,s=o.useContext(Pn.S).reducedMotion,d=t.id,p=t.blocked,h=(0,f.Wu)([Zn.Z],(function(){return Zn.Z.getAllActiveStreams()}),[]),y=(0,f.cj)([v.Z],(function(){return{selectedParticipant:null!=i?v.Z.getSelectedParticipant(i.id):null,largeStream:null!=i&&v.Z.getStageStreamSize(i.id)}})),b=y.selectedParticipant,m=y.largeStream,g=o.useCallback((function(e,t){if(e.type===At.fO.STREAM){if(0===h.filter((function(t){return(0,An.V9)(t)===e.id&&t.state!==se.jm8.ENDED})).length){if(!(0,Tn.p9)(i,Mn.Z,M.Z,R.Z,Nn.Z)[0])return;(0,xn.rn)((0,An.my)(e.id),{forceMultiple:t.shiftKey})}}
|
||
if((null==b?void 0:b.id)===e.id)if(m){Ye.Z.selectParticipant(i.id,null);Ye.Z.updateStageStreamSize(i.id,!1)}else Ye.Z.updateStageStreamSize(i.id,!0);else{Ye.Z.updateStageStreamSize(i.id,!1);Ye.Z.selectParticipant(i.id,e.id)}}),[h,i,b,m]);return(0,r.jsx)(Vn,{participant:n,aspectRatio:ir,fit:n.type===At.fO.USER?Rn.L.COVER:void 0,blocked:p,channel:i,className:Jn().tile,inCall:!0,inPopout:c,onClick:g,onContextMenu:u,paused:!1,pulseSpeakingIndicator:!s.enabled,width:a,children:l&&n.type===At.fO.USER&&(0,r.jsx)(Qn,{})},d)};const ur=o.memo((function(e){var t,o=e.participant,i=e.channel,a=e.width,l=(0,b.bp)(),c=i.getGuildId();u()(null!=c,"Channel cannot be guildless");var s=o.user,d=(0,f.e7)([v.Z],(function(){return v.Z.getParticipant(i.id,o.id)}),[i.id,o.id]),p=(0,f.e7)([Ln.ZP],(function(){return Ln.ZP.isModerator(s.id,i.id)}),[i.id,s.id]);if(null==d||d.type===At.fO.ACTIVITY)return null;var h=function(e,t){switch(e.type){case At.fO.HIDDEN_STREAM:case At.fO.STREAM:(0,z.jW)(t,er((function(){
|
||
var t,o;return or(this,(function(i){switch(i.label){case 0:return[4,n.e(97848).then(n.bind(n,997848))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,rr(nr({},t),{stream:e.stream,appContext:l,exitFullscreen:function(){}}))}]}}))})),{context:l});return;case At.fO.USER:default:(0,z.jW)(t,er((function(){var e,t;return or(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(3454),n.e(77357),n.e(14136)]).then(n.bind(n,914136))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,rr(nr({},e),{user:s,guildId:c,channel:i,showMediaItems:!0,showStageChannelItems:!0,showChatItems:!1}))}]}}))})),{context:l})}},y=d.type===At.fO.USER&&!(null===(t=d.voiceState)||void 0===t?void 0:t.selfVideo);return(0,r.jsx)(r.Fragment,{children:y?(0,r.jsx)(ar,{stageParticipant:o,rtcParticipant:d,channel:i,guildId:c,user:s,width:a,isModerator:p,onContextMenu:h,inPopout:l===se.IlC.POPOUT}):(0,r.jsx)(lr,{stageParticipant:o,rtcParticipant:d,
|
||
channel:i,guildId:c,user:s,width:a,isModerator:p,onContextMenu:h,inPopout:l===se.IlC.POPOUT})})}));var cr=n(340518),sr=n.n(cr);const fr=o.memo((function(e){var t=e.channel,n=e.participants,o=e.tileWidth,i=e.selectedParticipant;return(0,r.jsx)("div",{className:sr().rowContainer,children:n.map((function(e){return e.id===(null==i?void 0:i.id)?null:(0,r.jsx)(ur,{channel:t,participant:e,width:o},e.id)}))})}));var dr=n(377463),pr=n(977005),hr=n(473664),yr=n(294162),br=n(775173),vr=n(315707),mr=n.n(vr);function gr(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Or(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){gr(i,r,o,a,l,"next",e)}function l(e){gr(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Er(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Cr(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Er(e,t,n[t])}))}return e}function jr(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var Sr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){
|
||
return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Ir(e){var t=e.channel,i=e.speaker,l=e.className,u=(0,b.bp)(),c=o.useContext(Pn.S).reducedMotion,s=(0,hr.Z)({userId:i.id}),f=null!=i.member?(0,br.CA)(i.member):null,d=function(e){(0,
|
||
z.jW)(e,Or((function(){var e,o;return Sr(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(3454),n.e(77357),n.e(14136)]).then(n.bind(n,914136))];case 1:e=a.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,jr(Cr({},e),{user:i.user,guildId:t.guild_id,channel:t,showMediaItems:!0,showStageChannelItems:!0,showChatItems:!1}))}]}}))})),{context:u})};return(0,r.jsx)(p.yRy,{preload:function(){return(0,q.Z)(i.user.id,i.user.getAvatarURL(t.guild_id,80),{guildId:t.guild_id,channelId:t.id})},renderPopout:function(e){return(0,r.jsx)(Q.Z,jr(Cr({},e),{guildId:t.guild_id,channelId:t.id,userId:i.id}))},position:"right",spacing:8,children:function(e){return(0,r.jsx)(p.ua7,{text:i.userNick,position:"bottom",children:function(n){return(0,r.jsx)(p.P3F,jr(Cr({},n,e),{onClick:function(t){t.stopPropagation();e.onClick(t)},onContextMenu:d,children:(0,r.jsx)(p.qEK,{src:null!=f?f:i.user.getAvatarURL(t.guild_id,24),size:p.EFr.SIZE_24,className:a()(mr().avatar,l),
|
||
"aria-label":i.userNick,isSpeaking:s&&!c.enabled})}))}})}})}function _r(e){var t=e.speakers,n=e.channel;return(0,r.jsx)(yr.Z,{className:mr().summary,guildId:n.guild_id,users:t,max:10,renderUser:function(e,t,o){return(0,r.jsx)(Ir,{channel:n,speaker:e,className:t},o)},renderMoreUsers:function(e,t,n){return(0,r.jsx)("div",{className:a()(mr().speakers,t),children:e},n)}})}var wr=n(891964),xr=n.n(wr);function Pr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}const Nr=o.memo((function(e){var t=e.label,n=e.participantCount,o=e.onClick,i=e.className,l=e.collapsed,u=e.speakers,c=e.channel,s=e.isStreamLive;return(0,r.jsxs)(p.P3F,{onClick:o,className:a()(xr().container,i),children:[null==u?(0,r.jsx)(ut.Z,{width:20,height:20,className:xr().micIcon}):(0,r.jsx)(lt.Z,{width:20,height:20,className:xr().micIcon}),(0,r.jsxs)(p.xvT,{color:"header-primary",variant:"text-md/semibold",className:xr().text,children:[t," — ",n]
|
||
}),l&&null!=c&&null!=u&&u.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_r,{channel:c,speakers:u}),s&&(0,r.jsx)(pr.ZP,{})]}),(0,r.jsx)(dr.Z,{width:20,height:20,className:a()(xr().downIcon,Pr({},xr().upIcon,l))})]})}));var Ar=n(248722),Tr=n.n(Ar);function Zr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Rr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Zr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
|
||
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Lr,Dr=424,kr=624,Ur=824;!function(e){e[e.SELECTED=0]="SELECTED";e[e.SPEAKER=1]="SPEAKER";e[e.AUDIENCE=2]="AUDIENCE"}(Lr||(Lr={}));const Br=(0,Wt.Z)((function(e){var t,n,i,a=e.channel,l=e.width,u=e.onScroll,c=(0,f.cj)([v.Z],(function(){return{selectedParticipantId:v.Z.getSelectedParticipantId(a.id),largeStream:v.Z.getStageStreamSize(a.id),chatOpen:v.Z.getChatOpen(a.id)}}),[a.id]),s=c.selectedParticipantId,d=c.largeStream,p=c.chatOpen,h=(0,G.Io)(a.id),y=(0,G.Rk)(a.id,H.pV.AUDIENCE),b=(0,f.e7)([zt.Z],(function(){return null!=s?zt.Z.getParticipant(a.id,s):null})),m=(0,G.w8)(a.id,H.pV.SPEAKER),g=m.filter((function(e){
|
||
return e.type===H.Ui.VOICE})),O=null!=m.find((function(e){return e.type===H.Ui.STREAM})),E=function(e){return Math.floor((e-32)/102)}(l),C=function(e,t){return e<Dr?1:e<kr?2:e<Ur||t?3:4}(l,p),j=(Mr(t={},H.pV.SPEAKER,C),Mr(t,H.pV.AUDIENCE,E),Mr(t,H.pV.SELECTED,1),t),S=function(e){var t=(0,G.Rk)(e,H.pV.AUDIENCE),n=en(o.useState(!1),2),r=n[0],i=n[1];o.useEffect((function(){t>100?i(!0):t<75&&i(!1)}),[t]);return r?5e3:0}(a.id),I=Rr(function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=tn(e,t,r),i=en(o,2),a=i[0],l=i[1],u=en(Xt(o,n,[t[H.pV.AUDIENCE]]),2),c=u[0],s=u[1],f=[a[r?nn.MEDIA:nn.SELECTED],a[nn.SPEAKER],c[nn.AUDIENCE]],d=[l[r?nn.MEDIA:nn.SELECTED],l[nn.SPEAKER],s[nn.AUDIENCE]];return[f,d]}(a.id,j,S),2),_=I[0],w=I[1],x=[Math.max(null!==(n=_[Lr.SELECTED])&&void 0!==n?n:1,1),Math.max(null!==(i=_[Lr.SPEAKER])&&void 0!==i?i:1,1),_[Lr.AUDIENCE]],P=function(e,t){var n=Math.floor(e/t-8);return{speakerTileWidth:n,speakerTileHeight:Math.floor(n/ir)}
|
||
}(l,C),N=P.speakerTileWidth,A=P.speakerTileHeight,T=d?l-32:Math.min(l-64,3*N+8),Z=function(e){return e===_.length-1||0===y&&1===e},M=Rr(o.useState(!1),2),R=M[0],L=M[1],D=Rr(o.useState(!1),2),k=D[0],U=D[1];return(0,r.jsx)(wn,{sections:x,renderSection:function(e){var t=e.section;return t===Lr.SPEAKER?0===h?null:(0,r.jsx)(Nr,{participantCount:h,label:ie.Z.Messages.SPEAKER_LABEL,className:Tr().header,onClick:function(){return L(!R)},collapsed:R,speakers:g,channel:a,isStreamLive:O},"speaker-header-".concat(t)):t===Lr.AUDIENCE?0===y?null:(0,r.jsx)(Nr,{participantCount:y,label:ie.Z.Messages.AUDIENCE_LABEL,className:Tr().header,onClick:function(){return U(!k)},collapsed:k,channel:a},"audience-header-".concat(t)):null},sectionHeight:function(e){return 48},renderRow:function(e){var t=e.section,n=e.row,i=w[t][n];if(null==(null==i?void 0:i.length))return null;switch(t){case Lr.SELECTED:return 0===i.length||null==i[0]?null:(0,r.jsx)("div",{className:Tr().focusedRow,children:(0,r.jsx)(ur,{channel:a,
|
||
participant:i[0],width:T})},"selected-participant");case Lr.SPEAKER:return R?null:(0,r.jsx)(o.Fragment,{children:(0,r.jsx)(fr,{tileWidth:N,channel:a,participants:i,selectedParticipant:b})},"speakers-".concat(t,"-").concat(n));case Lr.AUDIENCE:return k?null:(0,r.jsx)(On,{channel:a,participants:i,maxTiles:E},"audience-".concat(t,"-").concat(n));default:return null}},rowHeight:function(e){return null==w[e][Lr.SELECTED]?0:e===Lr.SELECTED?T/ir+8:e===Lr.SPEAKER?R?0:A:k?0:98},renderFooter:function(e){var t=e.section;return Z(t)?(0,r.jsx)("div",{className:Tr().spacer},"bottom-spacer"):null},footerHeight:function(e){return e===Lr.SPEAKER?8:e===Lr.SELECTED?12:Z(e)?88:0},className:Tr().scroller,chunkSize:60,onScroll:u})}));var Fr=n(666305),Gr=n(496388),Hr=n(668269),Vr=n(99189),Wr=n(866926),zr=n(852221),Yr=n(311569),Kr=n(194026);function qr(e){var t=e.className,n=e.channel,o=e.highlight,i=(0,b.bp)();return(0,r.jsx)(Kr.Z,{highlight:null!=o&&o,className:t,icon:(0,r.jsx)(pe.Z,{height:20,width:20}),
|
||
color:ze.Z.unsafe_rawColors.GREEN_360.css,title:ie.Z.Messages.STAGE_CHANNEL_START_TITLE,description:ie.Z.Messages.STAGE_CHANNEL_START_SUBTITLE,onClick:function(){(0,Nt.T)(n,i)}})}var Qr=n(199047),Xr=n(708258),Jr=n(259099),$r=n(79987),eo=n(270662),to=n(289261),no=n(65200),ro=n(759864),oo=n(473903),io=n(164760),ao=n(419348),lo=n(127661),uo=n(633878);function co(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function so(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function fo(e,t){if(null==e)return{};var n,r,o=function(e,t){
|
||
if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function po(e){var t=e.width,n=void 0===t?22:t,o=e.height,i=void 0===o?20:o,a=e.color,l=void 0===a?"currentColor":a,u=fo(e,["width","height","color"]);return(0,r.jsxs)("svg",so(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){co(e,t,n[t])}))}return e}({},(0,uo.Z)(u)),{width:n,height:i,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{
|
||
d:"M15.9829 8.45685C16.4834 8.9082 17.0602 9.27649 17.6918 9.53992C17.1979 10.7194 16.1545 11.6141 14.8834 11.9017C14.8022 11.8683 14.7203 11.8358 14.6378 11.8041C15.3982 10.8785 15.8873 9.72192 15.9829 8.45685Z",fill:l}),(0,r.jsx)("path",{d:"M14 8C14 10.205 12.206 12 10 12C7.79501 12 6 10.205 6 8C6 5.79498 7.79401 4 10 4C12.206 4 14 5.79498 14 8Z",fill:l}),(0,r.jsx)("path",{d:"M2 19C2 15.467 5.29001 13 10 13C14.711 13 18 15.467 18 19V20H2V19Z",fill:l}),(0,r.jsx)("path",{d:"M22.0001 20H20.0001V19C20.0001 16.7999 19.0621 14.9067 17.5213 13.5292C20.2697 14.4355 22.0001 16.4374 22.0001 19V20Z",fill:l}),(0,r.jsx)("path",{d:"M-439.135 -677.865L-436.999 -675.729H-442V-674.271H-436.999L-439.135 -672.135L-438 -671L-434 -675L-438 -679L-439.135 -677.865Z",fill:l}),(0,r.jsx)("path",{
|
||
d:"M-446 -677C-445.566 -677 -445.153 -676.908 -444.781 -676.743C-444.924 -676.186 -445 -675.602 -445 -675C-445 -673.096 -444.24 -671.37 -443.007 -670.108L-443.01 -668C-443.01 -666.34 -444.34 -665 -446 -665C-447.66 -665 -449 -666.34 -449 -668V-674C-449 -675.66 -447.66 -677 -446 -677Z",fill:l}),(0,r.jsx)("path",{d:"M-446 -662.9C-443.24 -662.9 -440.7 -665 -440.7 -668H-439C-439 -664.58 -441.72 -661.76 -445 -661.28V-657H-447V-661.28C-450.28 -661.77 -453 -664.59 -453 -668H-451.3C-451.3 -665 -448.76 -662.9 -446 -662.9Z",fill:l}),(0,r.jsx)("path",{d:"M22.8648 2.86484L20.7293 5.00126L20.7293 -1.42968e-07L19.2707 -2.06723e-07L19.2707 5.00126L17.1352 2.86484L16 4L20 8L24 4L22.8648 2.86484Z",fill:l})]}))}var ho=n(161482),yo=n(102770),bo=n(672522),vo=n(137390),mo=n(130166),go=n(519718);function Oo(e){var t=(0,f.e7)([T.default],(function(){return T.default.getId()}));return(0,le.ZP)(t,e)===le.xO.ON_STAGE}var Eo=n(455771);function Co(e,t){(null==t||t>e.length)&&(t=e.length)
|
||
;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Co(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Co(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function So(e){var t=(0,f.e7)([T.default],(function(){
|
||
return T.default.getId()})),n=(0,le.ZP)(t,e.id),r=n===le.xO.REQUESTED_TO_SPEAK||n===le.xO.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK,i=jo(o.useState(r),2),a=i[0],l=i[1];o.useEffect((function(){l(r)}),[r]);return[a,function(){n===le.xO.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK?(0,re.RK)(e,!0):(0,re.Q1)(e,!a);l(!a)}]}var Io=n(828927),_o=n.n(Io);function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
|
||
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Po(e){var t=e.channel,n=e.appContext;(0,go.Z)(t)?(0,Nt.Us)(t,n):Re.default.disconnect()}function No(e,t){return e?ie.Z.Messages.AUDIENCE_LOWER_HAND:t?ie.Z.Messages.AUDIENCE_RAISE_HAND_CTA:ie.Z.Messages.AUDIENCE_RAISE_HAND_NO_PERMISSION}function Ao(e){var t=e.channel,n=Oo(t.id),o=xo(So(t),2),i=o[0],a=o[1],l=(0,f.e7)([R.Z],(function(){return R.Z.can(se.Plq.REQUEST_TO_SPEAK,t)}));return n?null:(0,r.jsx)(yt.d,{isActive:i,label:No(i,l),iconComponent:function(){return(0,r.jsx)(te.Z,{className:i?_o().raisedHandButtonIconActive:_o().raisedHandButtonIcon})},onClick:a,className:_o().buttonSpacing,disabled:!l&&!i})}
|
||
var To=o.memo((function(e){var t=e.channel,n=(0,f.e7)([L.Z],(function(){return L.Z.getVoiceChannelId()===t.id}),[t.id]),o=(0,vo.pp)(t.id);return(0,r.jsx)(Vr.Z,{children:function(e){return(0,r.jsxs)("div",{className:a()(e,_o().container),children:[o&&(0,r.jsx)(Lo,{channelId:t.id}),n?(0,r.jsx)(Ao,{channel:t}):null,(0,r.jsx)(Mo,{channel:t})]})}})}));function Zo(e){var t=e.onClick;return(0,r.jsx)(p.zxk,{size:p.zxk.Sizes.MEDIUM,color:_o().primaryButtonColor,className:a()(_o().buttonSpacing,_o().buttonWithTextButton),onClick:t,children:(0,r.jsxs)("div",{className:_o().buttonWithTextInnerContainer,children:[(0,r.jsx)(ee.Z,{height:24,width:24,className:_o().buttonWithTextIcon}),(0,r.jsx)(p.xvT,{color:"none",variant:"text-sm/medium",children:ie.Z.Messages.MODERATOR_RAISE_OWN_HAND})]})})}function Mo(e){var t=e.channel,n=e.onSelect,o=(0,b.bp)(),i=(0,zr.o)(t.guild_id,t),l=(0,f.e7)([V.Z],(function(){return V.Z.getStageInstanceByChannel(t.id)}),[t.id]),u=(0,f.e7)([L.Z],(function(){
|
||
return L.Z.getVoiceChannelId()===t.id}),[t.id]),c=(0,$r.Z)(t).suppress,s=null!=(null==l?void 0:l.guild_scheduled_event_id),d=T.default.getId(),h=xo(So(t),1)[0],y=Ln.ZP.isModerator(d,t.id),v=(0,st.B)(t.id);return u?(y||s&&i)&&null!=l?(0,r.jsx)(p.yRy,{renderPopout:function(e){var i=e.closePopout;return(0,r.jsx)(rt.Z,{children:(0,r.jsx)(p.v2r,{navId:"exit-options","aria-label":ie.Z.Messages.SET_STATUS,onClose:i,onSelect:n,children:(0,r.jsx)(p.sNh,{id:"end-stage",color:"danger",action:function(){return(0,Nt.Ev)(t,o)},label:ie.Z.Messages.END_GUILD_EVENT_FOR_EVERYONE,icon:lo.Z})})})},align:"center",position:"top",animation:p.yRy.Animation.FADE,children:function(e,n){var i=e.onClick,a=n.isShown;return(0,r.jsx)(yt.d,{className:_o().buttonSpacing,label:ie.Z.Messages.EXIT_EVENT_STAGE_OPTIONS_LABEL,color:"red",iconComponent:function(){return(0,r.jsx)(ao.Z,{height:24,width:24})},onClick:function(){return Po({channel:t,appContext:o})},onPopoutClick:i,popoutOpen:a})}}):c&&!v||h?(0,r.jsx)(p.zxk,{
|
||
size:p.zxk.Sizes.MEDIUM,color:p.zxk.Colors.RED,className:a()(_o().buttonSpacing,_o().buttonWithTextButton),onClick:function(){return Po({channel:t,appContext:o})},children:(0,r.jsxs)("div",{className:_o().buttonWithTextInnerContainer,children:[(0,r.jsx)(ao.Z,{height:24,width:24,className:_o().buttonWithTextIcon}),(0,r.jsx)(p.xvT,{color:"none",variant:"text-sm/medium",children:ie.Z.Messages.AUDIENCE_DISCONNECT})]})}):(0,r.jsx)(yt.d,{className:_o().buttonSpacing,label:ie.Z.Messages.EXIT_EVENT_STAGE_OPTIONS_LABEL,color:"red",iconComponent:function(){return(0,r.jsx)(ao.Z,{height:24,width:24})},onClick:function(){return Po({channel:t,appContext:o})}}):(0,r.jsx)(p.zxk,{size:p.zxk.Sizes.MEDIUM,color:p.zxk.Colors.GREEN,className:a()(_o().buttonSpacing,_o().buttonWithTextButton),onClick:function(){return function(e){(0,F.TM)(e)}(t)},children:(0,r.jsxs)("div",{className:_o().buttonWithTextInnerContainer,children:[(0,r.jsx)(io.Z,{height:24,width:24,className:_o().buttonWithTextIcon}),(0,
|
||
r.jsx)(p.xvT,{color:"none",variant:"text-sm/medium",children:ie.Z.Messages.STAGE_CHANNEL_JOIN})]})})}function Ro(e){var t=e.onClick;return(0,r.jsx)(p.zxk,{size:p.zxk.Sizes.MEDIUM,color:_o().primaryButtonColor,className:a()(_o().buttonSpacing,_o().buttonWithTextButton),onClick:t,children:(0,r.jsxs)("div",{className:_o().buttonWithTextInnerContainer,children:[(0,r.jsx)(po,{height:24,width:24,className:_o().buttonWithTextIcon}),(0,r.jsx)(p.xvT,{color:"none",variant:"text-sm/medium",children:ie.Z.Messages.MOVE_ME_TO_AUDIENCE})]})})}function Lo(e){var t=e.channelId,n=(0,f.e7)([mo.Z],(function(){return mo.Z.isMuted()}));return(0,vo.pp)(t)?(0,r.jsx)(yt.d,{isActive:n,className:_o().buttonSpacing,label:n?ie.Z.Messages.STAGE_MUSIC_UNMUTE:ie.Z.Messages.STAGE_MUSIC_MUTE,iconComponent:function(){return n?(0,r.jsx)(yo.Z,{height:24,width:24}):(0,r.jsx)(ho.Z,{height:24,width:24})},onClick:function(){return(0,bo.v)(!n)}}):null}var Do=o.memo((function(e){var t=e.channel,n=(0,
|
||
$r.Z)(t),o=n.suppress,i=n.selfMute,l=n.mute,u=(0,st.B)(t.id),c=(0,f.e7)([Nn.Z],(function(){return null!=Nn.Z.getAwaitingRemoteSessionInfo()})),s=(0,Qr.Z)(),d=s.cameraUnavailable,h=s.enabled,y=(0,Jr.Z)(t),b=(0,Xr.Z)(t),m=b.limit,g=b.reachedLimit,O=(0,f.e7)([oo.default],(function(){return oo.default.getCurrentUser()})),E=(0,f.e7)([Dn.Z],(function(){return(0,Wr.Z)(Dn.Z)})),C=(0,f.e7)([L.Z],(function(){return L.Z.getVoiceChannelId()===t.id}),[t.id]),j=(0,f.e7)([v.Z],(function(){return v.Z.getStreamParticipants(t.id)[0]}),[t.id]),S=(0,dt.PK)(t.id),I=m>0,_=g&&!S||null!=j&&j.user.id!==(null==O?void 0:O.id),w=(0,vo.pp)(t.id);if(null==O)return null;var x=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(rt.Z,{children:(0,r.jsx)(Gr.Z,{onClose:t})})},position:"top",align:"center",animation:p.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,o=t.isShown;return(0,r.jsx)(ro.C,{centerButton:!0,hasPermission:y,enabled:h,
|
||
cameraUnavailable:d,onChange:eo.r,onCameraUnavailable:to.Z,channelLimitReached:g,channelLimit:m,popoutOpen:o,onPopoutClick:n})}}),(0,r.jsx)(eo.NZ,{channel:t,currentUser:O,exitFullScreen:function(){return null},canGoLive:E,hasPermission:y,disabled:_})]});return(0,r.jsxs)("div",{className:_o().container,children:[w&&(0,r.jsx)(Lo,{channelId:t.id}),C&&(0,r.jsx)(Ao,{channel:t}),C&&!o?(0,r.jsxs)("div",{className:a()(_o().avControls,_o().buttonSpacing),children:[I&&m>0&&x,(0,r.jsx)(p.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(rt.Z,{children:(0,r.jsx)(Fr.default,{onClose:t,renderInputDevices:!0,renderOutputDevices:!0})})},align:"center",position:"top",animation:p.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,a=t.isShown;return(0,r.jsx)(no.Z,{centerButton:!0,onPopoutClick:n,selfMute:i,serverMute:l,suppress:o,popoutOpen:a,onClick:function(){return(0,Hr.Z)(l,o)},awaitingRemote:c})}})]}):null,C&&u&&o&&(0,r.jsx)(Zo,{onClick:function(){return(0,re.RK)(t,!1)}
|
||
}),C&&!o&&(0,r.jsx)(Ro,{onClick:function(){return(0,re.yi)(t)}}),(0,r.jsx)(Mo,{channel:t})]})}));function ko(e){var t=e.channel;return(0,r.jsx)(Vr.Z,{children:function(e){return(0,r.jsxs)("div",{className:a()(e,_o().container),children:[(0,r.jsx)(Lo,{channelId:t.id}),(0,r.jsx)(Mo,{channel:t})]})}})}const Uo=o.memo((function(e){var t=e.channel,n=e.isOnStartStageScreen,o=Oo(t.id),i=(0,st.B)(t.id),l=(0,f.e7)([R.Z],(function(){return R.Z.can(ft.yP,t)}),[t]),u=t.guild_id,c=(0,Eo.Z)(t.id),s=(0,f.e7)([v.Z],(function(){return null!=t?v.Z.getSelectedParticipant(t.id):null})),d=!c&&null==s;return n?(0,r.jsx)(ko,{channel:t}):o||i?(0,r.jsx)(Vr.Z,{children:function(e){return(0,r.jsxs)("div",{className:a()(e,_o().containerColumn),children:[(0,r.jsxs)("div",{className:_o().eventPrompts,children:[d?(0,r.jsx)(Yr.Z,{guildId:u,channelId:null==t?void 0:t.id}):null,(0,r.jsx)("div",{className:_o().separator}),d&&l?(0,r.jsx)(qr,{highlight:!0,channel:t}):null,(0,r.jsx)("div",{className:_o().separator})]}),(0,
|
||
r.jsx)(Do,{channel:t})]})}}):(0,r.jsx)(To,{channel:t})}));var Bo=n(570202),Fo=n(360703);function Go(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Ho(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Go(i,r,o,a,l,"next",e)}function l(e){Go(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Vo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Wo(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}
|
||
var zo=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}
|
||
if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function Yo(e){var t=e.className,o=e.guildId,i=(0,Fo.Z)();return(0,r.jsx)(Kr.Z,{className:t,icon:(0,r.jsx)(Bo.Z,{height:20,width:20}),color:ze.Z.unsafe_rawColors.BRAND_500.css,title:ie.Z.Messages.SCHEDULE_EVENT,description:ie.Z.Messages.SCHEDULE_EVENT_DESCRIPTION,onClick:function(){(0,p.ZDy)(Ho((function(){var e,t;return zo(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(40706),n.e(3328),n.e(76003),n.e(39023)]).then(n.bind(n,41380))];case 1:e=i.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,Wo(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Vo(e,t,n[t])}))}return e}({},e),{guildId:o}))}]}}))})),i)}})}
|
||
var Ko=n(96606);function qo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
function Xo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Qo((0,f.e7)([zt.Z],(function(){var n=zt.Z.getMutableParticipants(e).filter((function(e){return e.type===H.Ui.VOICE})),r=[],o=!0,i=!1,a=void 0;try{for(var l,u=function(){var e=l.value;if(r.length>=t)return"break";if(null!=r.find((function(t){return t.id===e.user.id})))return"continue";r.push(e.user)},c=n[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){if("break"===u())break}}catch(e){i=!0;a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return[{participants:n,usersInSummary:r},zt.Z.getParticipantsVersion(e)]}),[e,t],Yt.QF),1),r=n[0];return r}var Jo=n(425777),$o=n.n(Jo);function ei(e){var t=e.onClick;return(0,r.jsx)(Kr.Z,{iconContainerClassName:$o().continueIconContainer,icon:(0,r.jsx)(pe.Z,{className:$o().continueIcon,height:20,width:20}),color:ze.Z.unsafe_rawColors.PRIMARY_700.css,title:ie.Z.Messages.STAGE_CONTINUE_PROMPT_TITLE,description:ie.Z.Messages.STAGE_CONTINUE_PROMPT_SUBTITLE,
|
||
onClick:t})}function ti(e){if(0===e.length)return"";if(1===e.length)return ie.Z.Messages.STAGE_AUDIENCE_WAITING_ONE.format({first:e[0].userNick});if(2===e.length)return ie.Z.Messages.STAGE_AUDIENCE_WAITING_TWO.format({first:e[0].userNick,second:e[1].userNick});var t=e.length-2;return ie.Z.Messages.STAGE_AUDIENCE_WAITING_MANY.format({first:e[0].userNick,second:e[1].userNick,numOthers:t})}function ni(e){var t=e.channel,n=Xo(t.id),o=n.participants,i=n.usersInSummary;return(0,r.jsxs)("div",{className:$o().audienceSummary,children:[(0,r.jsx)(Ko.Z,{className:$o().summaryItem,guildId:t.guild_id,users:i,size:Ko.u.SIZE_16}),(0,r.jsx)(p.xvT,{variant:"text-sm/normal",color:"header-secondary",children:ti(o)})]})}function ri(e){var t=e.channel,n=e.onContinueClick,o=(0,f.e7)([R.Z],(function(){return R.Z.can(ft.yP,t)}),[t]),i=t.guild_id,a=(0,zr.o)(i,t),l=(0,Eo.Z)(t.id),u=Xo(t.id).usersInSummary;return(0,r.jsxs)("div",{children:[(0,r.jsx)(he.Z,{children:(0,r.jsx)("div",{className:$o().iconBackground,
|
||
children:(0,r.jsx)(pe.Z,{width:40,height:40,className:$o().icon})})}),(0,r.jsxs)("div",{className:$o().headerContainer,children:[(0,r.jsx)(p.X6q,{className:$o().title,variant:"heading-xl/semibold",children:ie.Z.Messages.STAGE_START_PROMPT_TITLE_MODERATOR}),(0,r.jsx)(p.xvT,{className:$o().subtitle,variant:"text-sm/normal",children:ie.Z.Messages.STAGE_START_PROMPT_SUBTITLE})]}),l?null:(0,r.jsx)(Yr.Z,{guildId:i,channelId:t.id}),o?(0,r.jsx)(qr,{className:$o().eventPrompt,channel:t}):null,a?(0,r.jsx)(Yo,{className:$o().eventPrompt,guildId:i}):null,(o||u.length>0)&&(0,r.jsx)("hr",{className:$o().separator}),o?(0,r.jsx)(ei,{onClick:n}):null,(0,r.jsx)(ni,{channel:t})]})}var oi=n(396043),ii=n(987152),ai=n(930948),li=n(202181),ui=n(830987),ci=n.n(ui);function si(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function fi(e){
|
||
var t=e.channel,n=e.appContext,i=e.popoutOpen,a=e.popoutWindow,l=e.currentWindow,u=n===se.IlC.POPOUT,c=o.useRef(null),s=(0,f.cj)([v.Z],(function(){var e=v.Z.getMode(t.id),r=n===se.IlC.POPOUT;r&&(e=se.WtW.VIDEO);var o=e===se.WtW.VIDEO?v.Z.getLayout(t.id,n):se.AEg.MINIMUM;r&&o!==se.AEg.FULL_SCREEN&&(o=se.AEg.NO_CHAT);return{currentLayout:o,mode:e}}),[t,n]),d=s.currentLayout,p=s.mode,y=(0,f.e7)([L.Z],(function(){return L.Z.getVoiceChannelId()===t.id}),[t.id]);o.useEffect((function(){c.current=p}));var b=o.useRef(d),m=o.useMemo((function(){var e=null!=a&&u?a.document:document,t=l.document.getElementById("app-mount");return{currentWindow:l,currentDocument:e,rootNode:t}}),[a,u,l]),g=m.currentDocument,O=m.rootNode,E=i&&!u,j=p===se.WtW.VIDEO&&y&&!E,S=o.useCallback((function(e,r){if(r!==e){Ye.Z.updateLayout(t.id,r,n);r===se.AEg.FULL_SCREEN&&t.isPrivate()&&ai.S.dispatch(se.CkL.TEXTAREA_BLUR)}}),[n,t]),I=o.useCallback((function(e){if(null!=O&&e===se.AEg.FULL_SCREEN){S(e,b.current);(0,
|
||
li.Pr)((function(e){b.current=e}),g)}}),[g,S,O]),_=o.useCallback((function(e){return function(){if(null!=O)if(e!==se.AEg.FULL_SCREEN){b.current=e;S(e,se.AEg.FULL_SCREEN);(0,li.Dj)(O)}else I(e)}}),[S,I,O]);o.useEffect((function(){var e=function(){null!=O&&((0,li.rB)(O,g)||d!==se.AEg.FULL_SCREEN||_(d)())};g.addEventListener(li.NO,e);return function(){g.removeEventListener(li.NO,e)}}),[g,d,_,O]);o.useEffect((function(){ct.default.track(se.rMx.VIDEO_LAYOUT_TOGGLED,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){si(e,t,n[t])}))}return e}({video_layout:u?"popout":d},(0,oi.AB)(t.id)));return function(){u&&(0,k.id)()||I(d)}}),[d,u]);o.useEffect((function(){null!=O&&c.current===se.WtW.VIDEO&&p===se.WtW.VOICE&&(0,li.Pr)(O,g)}),[g,p,c,O])
|
||
;o.useEffect((function(){!y&&u&&h.Z.wait((function(){return C.xv(se.KJ3.CHANNEL_CALL_POPOUT)}))}),[y,u]);return j?(0,r.jsx)(ii.Z,{themeable:!1,node:O,guestWindow:a,className:ci().rightTrayIcon,onClick:_(d)}):null}function di(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pi(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function hi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){pi(i,r,o,a,l,"next",e)}function l(e){pi(i,r,o,a,l,"throw",e)}a(void 0)}))}}function yi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function bi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{
|
||
for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return di(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var vi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){
|
||
if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},mi="HasBeenInStageChannel",gi=function(e,t){return function(){var n=e.getGuildId();null!=n&&null!=t&&(0,S.XU)(n,t);C.hP(e)}},Oi=function(){h.Z.wait((function(){return C.xv(se.KJ3.CHANNEL_CALL_POPOUT)}))
|
||
},Ei=function(e){C.hY(se.KJ3.CHANNEL_CALL_POPOUT,e)};function Ci(e){var t=e.channel,n=e.appContext,i=e.popoutOpen,a=e.popoutWindow,l=e.popoutWindowAlwaysOnTop,u=e.selectedParticipant,c=t.getGuildId(),s=(0,f.e7)([L.Z],(function(){return L.Z.getMostRecentSelectedTextChannelId(c)}),[c]),d=T.default.getId(),p=!(0,f.e7)([v.Z],(function(){return v.Z.isFullscreenInContext(n)}))&&(!k.FB||k.FB&&B.default.supportsFeature(se.eRX.POPOUT_WINDOWS)),h=null!=u&&u.type!==At.fO.ACTIVITY&&u.user.id!==d,y=o.useMemo((function(){var e;return null!==(e=null==a?void 0:a.window)&&void 0!==e?e:window}),[a]),b=fi({channel:t,appContext:n,popoutOpen:i,popoutWindow:a,currentWindow:y}),g=n===se.IlC.POPOUT&&k.FB&&B.default.supportsFeature(se.eRX.POPOUT_WINDOWS);return(0,r.jsxs)(r.Fragment,{children:[h?(0,r.jsx)(N.Z,{context:(0,m.Z)(u.type),userId:u.user.id,currentWindow:y,sliderClassName:ci().volumeSlider}):null,g?(0,r.jsx)(P.Z,{className:ci().rightTrayIcon,popoutWindowAlwaysOnTop:l,onToggleStayOnTop:Ei}):null,p?(0,
|
||
r.jsx)(x.Z,{className:ci().rightTrayIcon,popoutOpen:i,onOpenPopout:gi(t,s),onClosePopout:Oi}):null,b]})}function ji(e){var t=e.channel,n=(0,b.bp)(),o=(0,f.e7)([R.Z],(function(){return R.Z.can(se.Plq.CREATE_INSTANT_INVITE,t)})),i=(0,f.e7)([M.Z],(function(){return M.Z.getGuild(t.guild_id)})),a=(0,f.e7)([V.Z],(function(){return V.Z.getStageInstanceByChannel(t.id)})),l=o||null!=(null==a?void 0:a.invite_code);return null!=i&&l?(0,r.jsx)(I.Z,{channel:t,appContext:n,className:ci().leftTrayIcon,analyticsLocation:se.ZY5.GUILD_CHANNEL}):null}function Si(e){var t=e.channel,n=e.toggleRequestToSpeakSidebar,i=e.showRequestToSpeakSidebar,l=e.popoutWindow,d=e.popoutWindowAlwaysOnTop,p=e.popoutOpen,h=e.textInStageEnabled,y=e.chatOpen,m=(0,b.bp)(),O=(0,f.e7)([L.Z],(function(){return L.Z.getVoiceChannelId()===t.id}),[t.id]),C=(0,f.e7)([R.Z],(function(){return R.Z.can(se.Plq.CONNECT,t)})),j=(0,G.w8)(t.id,H.pV.SPEAKER),S=(0,f.e7)([v.Z],(function(){return v.Z.getSelectedParticipant(t.id)
|
||
})),I=p&&m!==se.IlC.POPOUT,x=bi(o.useState(0),2),P=x[0],N=x[1],A=(0,W.ZP)().isOnStartStageScreen;(0,W.MV)(t);var T,M=(0,f.e7)([Z.Z],(function(){return Z.Z.getToastsEnabled(t.id)})),k=Rt(t)?null!=S?"84px":"124px":null!=S?"0px":"48px";o.useEffect((function(){h||O||!p||Oi()}),[h,p,O]);if(!h&&!O&&!p){var U=(0,E.e)(t),B=t.getGuildId();u()(null!=B,"Guild voice channel without guild id.");return(0,r.jsx)(s.l_,{to:(0,D.LY)(null!=U?U:B)})}T=A?(0,r.jsx)(ri,{channel:t,onContinueClick:function(){(0,W.Ku)(!1);O||(0,F.TM)(t)}}):O?(0,r.jsx)(Br,{channel:t,onScroll:function(e){var t=e.target.scrollTop;(0,c.debounce)((function(){return N(t)}),1e3,{leading:!0})()}}):(0,r.jsx)(We,{participants:j,channel:t,hasConnectPermission:C});return(0,r.jsx)(w.Z,{style:{height:"calc(100% - ".concat(k,")"),paddingTop:k},disableGradients:0===P&&w.e.TOP,renderBottomLeft:function(){return(0,r.jsx)(ji,{channel:t})},renderBottomCenter:function(){return O?(0,r.jsx)(Uo,{channel:t,isOnStartStageScreen:A}):null},
|
||
renderBottomRight:function(){return O?(0,r.jsx)(Ci,{channel:t,appContext:m,popoutOpen:p,popoutWindow:l,popoutWindowAlwaysOnTop:d,selectedParticipant:S}):null},renderHeader:function(){return(0,r.jsx)(Ht,{toggleRequestToSpeakSidebar:n,showRequestToSpeakSidebar:i,channel:t})},renderChatToasts:h?function(){return!h||!M||y||I?null:(0,r.jsx)(g.ZP,{children:(0,r.jsx)(_.Z,{className:a()(ci().chatToasts,yi({},ci().rtsSidebarOpen,i)),channelId:t.id})})}:void 0,onActive:function(){},onPreventIdle:function(){},onAllowIdle:function(){},onForceIdle:function(){},screenMessage:I?{mainText:ie.Z.Messages.POPOUT_PLAYER_OPENED}:null,idle:!1,children:!I&&T})}function Ii(e){var t=e.channel,i=bi(o.useState(!1),2),l=i[0],u=i[1],c=o.useCallback((function(){u(!l)}),[l,u]),s=(0,f.cj)([j.Z],(function(){return{popoutWindow:j.Z.getWindow(se.KJ3.CHANNEL_CALL_POPOUT),popoutWindowAlwaysOnTop:j.Z.getIsAlwaysOnTop(se.KJ3.CHANNEL_CALL_POPOUT)}})),h=s.popoutWindow,m=s.popoutWindowAlwaysOnTop,E=null!=h&&!h.closed,C=(0,
|
||
b.bp)(),S=(0,f.e7)([v.Z],(function(){return v.Z.getChatOpen(t.id)}),[t.id]),I=(0,f.e7)([M.Z],(function(){return M.Z.getGuild(t.guild_id)}),[t.guild_id]),_=(0,A.Vy)(t.guild_id);o.useEffect((function(){if(null==d.Z.get(mi)){(0,p.ZDy)(hi((function(){var e,t;return vi(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(14372)]).then(n.bind(n,714372))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){yi(e,t,n[t])}))}return e}({},e))}]}}))})));d.Z.set(mi,Date.now())}}),[]);var w,x=(0,y.Z)(),P=x.width,N=void 0===P?0:P,T=x.ref,Z=N-550;return(0,r.jsxs)(g.B2,{children:[(0,r.jsxs)("div",{className:ci().container,ref:T,children:[(0,r.jsx)("div",{
|
||
className:a()(ci().callContainer,(0,U.Q)(se.BRd.DARK),(w={},yi(w,ci().sidebarVisible,l),yi(w,ci().sidebarOrChatVisible,l||_&&S),w)),children:(0,r.jsx)(Si,{channel:t,toggleRequestToSpeakSidebar:c,showRequestToSpeakSidebar:l,popoutWindow:h,popoutWindowAlwaysOnTop:m,popoutOpen:E,textInStageEnabled:_,chatOpen:S})}),l?(0,r.jsx)(Me,{channel:t,toggleRequestToSpeakSidebar:c,chatOpen:_&&S}):null,(0,r.jsx)("div",{className:ci().channelChatWrapper,children:_&&S&&(!E||E&&C===se.IlC.POPOUT)&&(0,r.jsx)(O.Z,{channel:t,guild:I,maxWidth:Z})})]}),(0,r.jsx)(g.H_,{})]})}},461908:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(785893),o=(n(667294),n(349491)),i=n(289450),a=n.n(i);const l=function(e){var t=e.size;return(0,r.jsx)("div",{className:a().unownedStickerLockContainer,style:{width:t,height:t},children:(0,r.jsx)(o.Z,{width:12,height:12,className:a().unownedStickerLockIcon})})}},965196:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T})
|
||
;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n(712861),c=n(707961),s=n(971402),f=n(579581),d=n(933850),p=n(652591),h=n(748755),y=n(514351),b=n(513586),v=n(600277),m=n(461908),g=n(2590),O=n(473708),E=n(859167),C=n.n(E);function j(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){j(i,r,o,a,l,"next",e)}function l(e){j(i,r,o,a,l,"throw",e)}a(void 0)}))}}function I(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){I(e,t,n[t])}))}return e}
|
||
function w(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function x(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var P=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},
|
||
"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},N=(0,u.Mg)(C().stickerPickerPreviewDimensions),A=(0,
|
||
u.Mg)(C().stickerPickerPreviewPadding);const T=o.memo((function(e){var t=e.isDisplayingIndividualStickers,i=void 0!==t&&t,u=e.preferAnimation,E=void 0===u||u,j=e.getStickerItemProps,T=e.getStickerRowProps,Z=e.gutterWidth,M=e.inspectedStickerPosition,R=e.isScrolling,L=e.isUsingKeyboardNavigation,D=e.onInspect,k=e.onSelect,U=e.rowIndex,B=e.stickerClassName,F=e.stickerDescriptors,G=e.stickerPadding,H=void 0===G?A:G,V=e.stickerSize,W=void 0===V?N:V,z=e.ownedStickerPacks,Y=e.enlargeOnInteraction,K=void 0!==Y&&Y,q=e.channel,Q=e.currentUser,X=e.checkSendability,J=void 0===X||X,$=(0,f.O)().location,ee=W+2*H,te=o.useMemo((function(){return{gridColumnGap:Z,gridTemplateColumns:"repeat(auto-fill, ".concat(ee,"px)"),height:ee,paddingRight:i?void 0:ee}}),[i,Z,ee]),ne=o.useMemo((function(){return{width:W,height:W,padding:H}}),[H,W]);return(0,r.jsx)("div",w(_({className:C().row,style:te},null==T?void 0:T(U)),{children:F.map((function(e){
|
||
var t,u=e.visibleRowIndex===(null==M?void 0:M.rowIndex)&&e.columnIndex===(null==M?void 0:M.columnIndex),f=e.type===y.al.STICKER&&K&&u,N=(0,l.throttle)((function(){!0===(null==R?void 0:R.current)||!0===(null==L?void 0:L.current)||u||null==D||D(e)}),250),A=null!==(t=null==j?void 0:j(e.columnIndex,U))&&void 0!==t?t:{},T=A.ref,Z=A.tabIndex,F=A.onFocus,G=x(A,["ref","tabIndex","onFocus"]);switch(e.type){case y.al.CREATE_STICKER:return(0,r.jsx)("div",w(_({},G),{children:(0,r.jsxs)(c.P3F,{"aria-label":e.name,className:a()(C().createSticker,B,I({},C().createInspected,u)),innerRef:T,tabIndex:Z,onFocus:null!=F?F:N,onMouseMove:N,onClick:function(){if(e.type===y.al.CREATE_STICKER){p.default.track(g.rMx.OPEN_MODAL,{type:g.jXE.CREATE_STICKER_MODAL,location:$});(0,c.ZDy)(S((function(){var t,o;return P(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(56729),n.e(943)]).then(n.bind(n,856729))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,_({
|
||
guildId:e.guild_id},t))}]}}))})))}},style:ne,children:[!K&&(0,r.jsx)("div",{className:C().inspectedIndicator}),(0,r.jsx)("div",{className:C().iconWrapper,children:(0,r.jsx)(d.Z,{className:C().icon})}),(0,r.jsx)(c.xvT,{color:"interactive-active",variant:"text-xs/normal",children:O.Z.Messages.STICKER_PICKER_CREATE_STICKER})]})}),e.guild_id);case y.al.STICKER:var H,V=i&&null!=z&&(0,b.jl)(e.sticker)&&!z.has(e.sticker.pack_id);return(0,o.createElement)("div",w(_({},G),{key:e.sticker.id}),(0,r.jsxs)(c.P3F,{className:a()(C().sticker,B,I({},C().stickerInspected,u)),innerRef:T,tabIndex:Z,onFocus:null!=F?F:N,onMouseMove:N,onClick:function(t){!0!==(null==R?void 0:R.current)&&!0!==(null==L?void 0:L.current)&&(null==k||k(e,t))},onContextMenu:function(e){(0,s.jW)(e,S((function(){var e,t;return P(this,(function(o){switch(o.label){case 0:return[4,n.e(96938).then(n.bind(n,96938))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,_({},e))}]}}))})))},style:ne,"data-type":"sticker",
|
||
"data-id":e.sticker.id,children:[(0,r.jsx)(c.nn4,{children:(0,v.Co)(e.sticker)}),(0,r.jsxs)("div",{"aria-hidden":!0,children:[!K&&(0,r.jsx)("div",{className:C().inspectedIndicator}),(0,r.jsx)(v.ZP,{className:a()(C().stickerNode,(H={},I(H,C().stickerNodeDimmed,K&&!u&&null!=M&&-1!==M.rowIndex&&-1!==M.columnIndex),I(H,C().stickerNodeHidden,f),I(H,C().stickerUnsendable,J&&!(0,h.kl)(e.sticker,Q,q)),H)),disableAnimation:!u&&!E,enlargeOnInteraction:K,isInteracting:u,maskAsset:u,sticker:e.sticker,size:W}),V?(0,r.jsx)(m.Z,{size:20}):null]})]}))}}))}))}))},289903:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o,Q:()=>i});var r=(0,n(260561).B)({kind:"user",id:"2022-07_system_dm_safety_onboarding",label:"System DM Safety Onboarding",defaultConfig:{systemDMRedesignEnabled:!1},treatments:[{id:1,label:"Enabled, v1 copy",config:{systemDMRedesignEnabled:!0}},{id:2,label:"Enabled, v2 copy",config:{systemDMRedesignEnabled:!0}}]});const o=r;function i(){return r.getCurrentConfig({}).systemDMRedesignEnabled}},
|
||
29975:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T});var r=n(496486),o=n.n(r),i=n(842227),a=n(202351),l=n(744564),u=n(61209),c=n(21372),s=n(512291),f=n(491260),d=n(436154),p=n(473903),h=n(72580),y=n(563135),b=n(749565),v=n(2590);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e){O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return O(e)}function E(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function C(e,t){C=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return C(e,t)}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var S=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1
|
||
;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}var _={},w=function(){function e(t,n,r){g(this,e);this.guildId=t;this.parentId=n;this.threadId=r;this.version=0;this.sections={};this.allUserIds=new Set}var t=e.prototype;t.rebuild=function(e){var t=this;this.version++;this.sections={};null!=e&&(this.allUserIds=new Set(e));var n=u.Z.getChannel(this.parentId);o()(Array.from(this.allUserIds)).map((function(e){var r=j(t.calculateNewState(e,n),3);return{userId:e,sectionId:r[0],displayName:r[1],canViewChannel:r[2]}})).sort((function(e,t){return i.default.compare(e.userId,t.userId)})).sortBy((function(e){return e.displayName})).forEach((function(e){t.addUser(e.userId,e.sectionId,e.displayName,e.canViewChannel,!0)}))
|
||
};t.updateMultipleUserIds=function(e,t){var n=this;if(null!=t&&this.guildId!==t)return!1;if(0===(e=e.filter((function(e){return n.allUserIds.has(e)}))).length)return!1;e.length>50?this.rebuild():e.forEach((function(e){return n.updateUserId(e)}));return!0};t.updateUserId=function(e){if(!this.allUserIds.has(e))return!1;var t=j(this.findOldState(e),3),n=t[0],r=t[1],o=t[2],i=j(this.calculateNewState(e,u.Z.getChannel(this.parentId)),3),a=i[0],l=i[1],c=i[2];if(n===a&&r===l&&o===c)return!1;this.removeUserId(e,n);this.addUser(e,a,l,c);return!0};t.addUserId=function(e){var t=j(this.calculateNewState(e,u.Z.getChannel(this.parentId)),3),n=t[0],r=t[1],o=t[2];this.addUser(e,n,r,o)};t.removeUserId=function(e,t){this.allUserIds.delete(e);if(null!=t&&this.removeUserIdFromSection(e,t))return!0;for(var n in this.sections)if(this.removeUserIdFromSection(e,n))return!0;return!1};t.addUser=function(e,t,n,r,o){this.allUserIds.add(e);var i=p.default.getUser(e);if(null!=i&&""!==i.username){
|
||
t in this.sections||(this.sections[t]={sectionId:t,usersById:{},userIds:[]});var a=this.sections[t];a.usersById[e]={userId:e,displayName:n,canViewChannel:r};if(o)a.userIds.push(e);else{var l=this.findUserIdSortedPosition(a,e,n);a.userIds.splice(l,0,e)}this.version++}};t.findUserIdSortedPosition=function(e,t,n){for(var r=e.userIds,o=e.usersById,i=0;i<r.length;i++){var a=r[i],l=o[a].displayName;if(l===n){if(t<a)return i}else if(null==l){if(null!=n)return i}else if(null!=n&&n<l)return i}return r.length};t.removeUserIdFromSection=function(e,t){var n=this.sections[t];if(null==t)return!1;if(e in n.usersById){delete n.usersById[e];n.userIds=n.userIds.filter((function(t){return t!==e}));this.version++;return!0}return!1};t.findOldState=function(e){for(var t in this.sections){var n=this.sections[t];if(e in n.usersById){var r=n.usersById[e];return[t,r.displayName,r.canViewChannel]}}return[void 0,void 0,!1]};t.calculateNewState=function(e,t){
|
||
var n,r,o=c.ZP.getMember(this.guildId,e),i=p.default.getUser(e),a=p.default.getCurrentUser(),l=(null==i?void 0:i.id)===(null==a?void 0:a.id)?d.Z.getStatus():f.Z.getStatus(e,this.guildId),u=null!=i&&null!=t&&y.ZP.can({permission:v.Plq.VIEW_CHANNEL,user:i,context:t}),s=l!==v.Skl.OFFLINE&&l!==v.Skl.INVISIBLE&&l!==v.Skl.UNKNOWN?null!==(n=null==o?void 0:o.hoistRoleId)&&void 0!==n?n:"online":"offline",h=null!==(r=null==o?void 0:o.nick)&&void 0!==r?r:b.ZP.getName(i);return[s,null==h?void 0:h.toLowerCase(),u]};return e}();function x(e){return P(e.user.id)}function P(e){if(null==e)return!1;var t=!1;for(var n in _)_[n].updateUserId(e)&&(t=!0);return t}function N(e){var t=e.guildId,n=!1;for(var r in _)if(_[r].guildId===t){_[r].rebuild();n=!0}return n}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&C(e,t)}(n,e)
|
||
;var t=I(n);function n(){g(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(u.Z,c.ZP,s.Z,f.Z,d.Z,p.default);this.syncWith([s.Z],(function(){var e=s.Z.getSubscribedThreadIds(),t=!1;for(var n in _)if(!e.has(n)){delete _[n];t=!0}return t}));this.syncWith([d.Z],(function(){var e;return P(null===(e=p.default.getCurrentUser())||void 0===e?void 0:e.id)}))};r.getMemberListVersion=function(e){var t;return null===(t=_[e])||void 0===t?void 0:t.version};r.getMemberListSections=function(e){var t;return null===(t=_[e])||void 0===t?void 0:t.sections};r.canUserViewChannel=function(e,t,n){var r,o=_[e];if(null==o)return!1;var i,a=null===(r=o.sections[t])||void 0===r?void 0:r.usersById[n];return null!==(i=null==a?void 0:a.canViewChannel)&&void 0!==i&&i};r.__getLocalVars=function(){return{memberLists:_}};return n}(a.ZP.Store);A.displayName="ThreadMemberListStore";const T=new A(l.Z,{CONNECTION_OPEN:function(){_={}},THREAD_MEMBERS_UPDATE:function(e){
|
||
if(!(e.id in _))return!1;var t,n;null===(t=e.addedMembers)||void 0===t||t.forEach((function(t){var n=t.userId;return _[e.id].addUserId(n)}));null===(n=e.removedMemberIds)||void 0===n||n.forEach((function(t){return _[e.id].removeUserId(t)}))},THREAD_UPDATE:function(e){var t,n=e.channel;if(!(n.id in _)||!0!==(null===(t=n.threadMetadata)||void 0===t?void 0:t.archived))return!1;delete _[n.id]},THREAD_DELETE:function(e){var t=e.channel;if(!(t.id in _))return!1;delete _[t.id]},CHANNEL_UPDATES:function(e){var t=e.updates,n=new Set(t.map((function(e){return e.channel.id}))),r=!1;for(var o in _)if(n.has(_[o].parentId)){_[o].rebuild();r=!0}return r},THREAD_MEMBER_LIST_UPDATE:function(e){var t=e.threadId,n=e.guildId,r=e.members,o=u.Z.getChannel(t),i=null==o?void 0:o.parent_id;if(null!=i){_[t]=new w(n,i,t);_[t].rebuild(r.map((function(e){return e.user_id})))}},USER_UPDATE:x,PRESENCE_UPDATES:function(e){return e.updates.map((function(e){return P(e.user.id)})).some((function(e){return e}))},
|
||
GUILD_MEMBER_ADD:x,GUILD_MEMBER_UPDATE:x,GUILD_MEMBER_REMOVE:x,PRESENCES_REPLACE:function(e){var t=e.presences,n=o()(t).map((function(e){var t;return null===(t=e.user)||void 0===t?void 0:t.id})).filter(h.lm).uniq().value(),r=!1;for(var i in _)_[i].updateMultipleUserIds(n)&&(r=!0);return r},GUILD_MEMBERS_CHUNK:function(e){var t=e.guildId,n=e.members.map((function(e){return e.user.id})),r=!1;for(var o in _)_[o].updateMultipleUserIds(n,t)&&(r=!0);return r},GUILD_ROLE_UPDATE:N,GUILD_ROLE_DELETE:N,PASSIVE_UPDATE_V1:function(e){var t;return null===(t=e.members)||void 0===t?void 0:t.reduce((function(e,t){return P(t.user.id)||e}),!1)}})},426012:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(707961),a=n(312682),l=n(105538),u=n(373438),c=n(930948),s=n(665783),f=n(551856),d=n(379364),p=n(2590),h=n(473708),y=n(385919),b=n.n(y);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){m(e,t,n[t])}))}return e}function O(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e){var t=e.channel,n=(0,s.B)(t),y=E(o.useState(!1),2),v=y[0],m=y[1];o.useEffect((function(){var e=function(){return m(!0)};c.S.subscribe(p.CkL.OPEN_THREAD_NOTIFICATION_SETTINGS,e);return function(){
|
||
c.S.unsubscribe(p.CkL.OPEN_THREAD_NOTIFICATION_SETTINGS,e)}}),[]);var C=h.Z.Messages.NOTIFICATION_SETTINGS;return(0,r.jsx)(i.yRy,{shouldShow:v,animation:i.yRy.Animation.NONE,position:"bottom",align:"right",autoInvert:!1,onRequestClose:function(){return m(!1)},renderPopout:function(e){return(0,r.jsx)(f.Z,O(g({},e),{channel:t,navId:"thread-context",label:h.Z.Messages.THREAD_ACTIONS_MENU_LABEL}))},children:function(e,t){var o=t.isShown;return(0,r.jsx)(u.ZP.Icon,O(g({},e),{onClick:function(){return m((function(e){return!e}))},tooltip:o?null:C,icon:n===d.iN.NO_MESSAGES?l.Z:a.Z,foreground:n===d.iN.NO_MESSAGES?b().strikethrough:null,"aria-label":C,selected:o}))}})}},54282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R})
|
||
;var r=n(785893),o=n(667294),i=n(707961),a=n(281873),l=n(576668),u=n(874710),c=n(103314),s=n(313031),f=n(954814),d=n(839463),p=n(218318),h=n(40111),y=n(579583),b=n(112897),v=n(201521),m=n(451458),g=n(189865),O=n(824456),E=n(186440),C=n(373438),j=n(930948),S=n(426012),I=n(367406),_=n(2590),w=n(473708);function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){P(e,t,n[t])}))}return e}function A(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){
|
||
var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n)
|
||
;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e){var t=e.channel,n=function(){u((function(e){return!e}))},a=T(o.useState(!1),2),l=a[0],u=a[1],c=w.Z.Messages.MORE;return(0,r.jsx)(i.yRy,{shouldShow:l,animation:i.yRy.Animation.NONE,position:"bottom",align:"right",autoInvert:!1,onRequestClose:function(){return u(!1)},renderPopout:function(e){return(0,r.jsx)(M,A(N({},e),{channel:t}))},children:function(e,t){var o=t.isShown;return(0,r.jsx)(C.ZP.Icon,A(N({},e),{onClick:n,tooltip:o?null:c,icon:E.Z,"aria-label":c,selected:o}))}})}function M(e){var t=e.channel,n=e.closePopout,o=e.onSelect,v=function(){(0,m.Kh)(t.id)},g=(0,u.Z)(t,"Sidebar Overflow"),E=(0,s.Z)(t),C=(0,p.Z)(t),S=(0,h.Z)(t),I=(0,a.Z)(t),x=(0,c.Z)(t),P=(0,d.Z)(t.id),N=(0,f.Z)(t),A=(0,l.Z)(t),T=(0,
|
||
b.Z)(t.id),Z=(0,y.Z)(t);return(0,r.jsxs)(i.v2r,{navId:"thread-context",onClose:n,"aria-label":w.Z.Messages.THREAD_ACTIONS_MENU_LABEL,onSelect:o,children:[(0,r.jsxs)(i.kSQ,{children:[g,(0,r.jsx)(i.sNh,{id:"open",label:w.Z.Messages.OPEN_IN_FULL_VIEW,action:v})]}),(0,r.jsxs)(i.kSQ,{children:[C,S]}),(0,r.jsxs)(i.kSQ,{children:[N,E,P]}),(0,r.jsxs)(i.kSQ,{children:[(0,r.jsx)(i.sNh,{id:"search",label:w.Z.Messages.SEARCH,icon:O.Z,action:function(){v();setTimeout((function(){j.S.dispatch(_.CkL.FOCUS_SEARCH,{prefillCurrentChannel:!1})}),2e3)}}),(0,r.jsx)(i.sNh,{id:"pins",label:w.Z.Messages.PINS,icon:O.Z,action:function(){v();j.S.dispatch(_.CkL.TOGGLE_CHANNEL_PINS)}})]}),(0,r.jsxs)(i.kSQ,{children:[Z,I,x,A]}),(0,r.jsx)(i.kSQ,{children:T})]})}function R(e){var t=e.channel,n=e.baseChannelId;return(0,r.jsxs)(r.Fragment,{children:[t.isForumPost()?null:(0,r.jsx)(S.Z,{channel:t}),(0,r.jsx)(Z,{channel:t}),(0,r.jsx)(C.ZP.Icon,{icon:g.Z,tooltip:w.Z.Messages.CLOSE,onClick:function(){return(0,I.vN)((0,
|
||
v.e)(t),null!=n?n:t.parent_id)}})]})}},136836:(e,t,n)=>{"use strict";n.d(t,{Z:()=>M});var r=n(785893),o=n(667294),i=n(496486),a=n.n(i),l=n(202351),u=n(744564),c=n(971402),s=n(764079),f=n(341305),d=n(396043),p=n(773011),h=n(281808),y=n(684412),b=n(451458),v=n(61209),m=n(284610),g=n(567403),O=n(407561),E=n(373438),C=n(54282),j=n(379364),S=n(2590),I=n(473708),_=n(75627),w=n.n(_);function x(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function P(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){x(i,r,o,a,l,"next",e)}function l(e){x(i,r,o,a,l,"throw",e)}a(void 0)}))}}function N(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){N(e,t,n[t])}))}return e}function T(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var Z=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){
|
||
if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function M(e){var t=e.channelId,i=e.baseChannelId,_=e.channelViewSource,x=void 0===_?"Split View":_,N=(0,l.e7)([v.Z],(function(){return v.Z.getChannel(t)})),M=(0,l.e7)([g.Z],(function(){
|
||
return g.Z.getGuild(null==N?void 0:N.getGuildId())})),R=(0,p.ZP)(N);!function(e){var t=(0,l.e7)([O.Z],(function(){return null!=e&&!a().isEmpty(O.Z.getVoiceStatesForChannel(e.id))}));o.useEffect((function(){if(t&&null!=e){u.Z.dispatch({type:"SIDEBAR_CLOSE",baseChannelId:e.parent_id});(0,b.ad)(e,j.on.VOICE_AUTO_OPEN)}}),[t,e])}(N);var L=o.useRef(!1);o.useEffect((function(){if(null!=N&&!L.current){L.current=!0;var e=(0,d.KG)(v.Z.getChannel(N.id),!0);(0,d.yw)(S.rMx.CHANNEL_OPENED,T(A({},e),{channel_id:N.id,guild_id:N.guild_id,parent_id:N.parent_id,channel_view:x}))}}),[N,x]);if(null==N||null==M)return null;var D=(0,r.jsx)(C.Z,{channel:N,baseChannelId:i});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.Z,{channel:N,draftType:m.d.ChannelMessage}),(0,r.jsx)(E.ZP,{toolbar:D,"aria-label":I.Z.Messages.THREAD_HEADER_BAR_A11Y_LABEL,children:(0,y.ud)({channel:N,channelName:R,guild:M,inSidebar:!0,handleContextMenu:function(e){(0,c.jW)(e,P((function(){var e,t;return Z(this,(function(o){
|
||
switch(o.label){case 0:return[4,n.e(81580).then(n.bind(n,881580))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,T(A({},e),{channel:N}))}]}}))})))},handleClick:function(){null!=N&&(0,b.Kh)(N.id)}})}),(0,r.jsx)("div",{className:w().chat,children:(0,r.jsx)(s.Z,{channel:N,guild:M,chatInputType:h.I.SIDEBAR},t)})]})}},593005:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b,r:()=>v});var r=n(667294),o=n(503528),i=n(105783),a=n(268319),l=n(460471),u=n(503871),c=n(30027),s=n(284610),f=n(567403),d=n(275374),p=n(161283),h=n(2590),y=n(473708);function b(e){var t=e.parentChannel,n=e.parentMessageId,o=e.threadSettings,i=e.privateThreadMode,l=e.location,u=e.onThreadCreated,f=e.useDefaultThreadName,d=r.useCallback((function(e,t,n,r){a.Z.uploadFiles({channelId:e.id,uploads:t,draftType:s.d.FirstThreadMessage,options:{stickerIds:r},parsedMessage:c.ZP.parse(e,n)})}),[]);return(0,p.JA)({parentChannel:t,parentMessageId:n,threadSettings:o,privateThreadMode:i,location:l,onThreadCreated:u,
|
||
useDefaultThreadName:f,uploadHandler:d})}function v(e){var t=e.parentChannel,n=(0,u.xH)((function(e){return{name:e.name,appliedTags:e.appliedTags}}),o.Z),r=n.name,a=n.appliedTags;return(0,p.Wj)({parentChannel:t,name:r,appliedTags:a,upload:function(e,n,r){return new Promise((function(o,a){var u=new l.Z(e);u.on("error",(function(e,n,r){if(n===h.evJ.EXPLICIT_CONTENT){var o,l=f.Z.getGuild(null!==(o=t.getGuildId())&&void 0!==o?o:"");null!=l&&i.Z.show({title:y.Z.Messages.UPLOAD_AREA_UPLOAD_FAILED_TITLE,body:y.Z.Messages.BOT_GUILD_EXPLICIT_CONTENT.format({name:l.toString()})})}else if(n===h.evJ.ENTITY_TOO_LARGE){var u=(0,d.dg)(t.getGuildId());i.Z.show({title:y.Z.Messages.UPLOAD_AREA_TOO_LARGE_TITLE,body:y.Z.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:(0,d.Ng)(u)})})}else n===h.evJ.TOO_MANY_ATTACHMENTS&&i.Z.show({title:y.Z.Messages.ATTACHMENT_TOO_MANY_ERROR_TITLE,body:y.Z.Messages.ATTACHMENT_TOO_MANY_ERROR_MESSAGE.format({limit:h.dN1})});a({body:r})}));u.on("complete",(function(e,t){
|
||
o({body:t})}));u.uploadFiles(r,n,"message.attachments")}))}})}},736543:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(973935),a=n(809784),l=n(202351),u=n(217458),c=n(901654),s=n(454871),f=n(361925);function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function h(e){h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return h(e)}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){p(e,t,n[t])}))}return e}function b(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function v(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e,t){m=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return m(e,t)}var g=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
|
||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&m(e,t)}(n,e);var t=O(n);function n(){d(this,n);return t.apply(this,arguments)}var l=n.prototype;l.componentDidMount=function(){var e=this.props,t=e.visible;null==e.inlineSpecs&&this.show(t)};l.componentWillUnmount=function(){null==this.props.inlineSpecs&&this.show(!1)};l.componentDidUpdate=function(e){var t=e.position,n=e.offsetX,r=e.offsetY,o=e.tutorialId,i=e.visible,a=e.windowSize
|
||
;o!==this.props.tutorialId?u.Z.hide(o):i===this.props.visible&&t===this.props.position&&n===this.props.offsetX&&r===this.props.offsetY&&a===this.props.windowSize||this.show(this.props.visible)};l.show=function(e){var t=this.props,n=t.tutorialId,r=t.position,o=t.offsetX,l=t.offsetY,c=t.visible,s=t.inlineSpecs,f=t.autoInvert;if(e&&null==s){var d=(0,i.findDOMNode)(this);if(!(0,a.k)(d))return;var p=d.getBoundingClientRect(),h=p.top,y=p.left,b=p.right,v=p.bottom;u.Z.show(n,{position:r,targetWidth:b-y,targetHeight:v-h,autoInvert:f,origin:{x:y,y:h},offset:{x:o,y:l}})}else c&&u.Z.hide(n)};l.render=function(){var e=this.props,t=e.inlineSpecs,n=e.tutorialId,i=e.children,a=e.visible,l=e.windowFocused,u=e.position,c=e.autoInvert,d=f.Z.getData()[n];return null!=t&&null!=d?(0,r.jsxs)(r.Fragment,{children:[i,a&&(0,r.jsx)(s.V,y({autoInvert:c,position:u,tutorialId:n,tutorialDefinition:d,focused:l},t))]}):o.Children.only(i)};return n}(o.Component);E.defaultProps={position:"top",offsetX:0,offsetY:0,
|
||
autoInvert:!0};function C(e){var t=e.tutorialId,n=(0,l.e7)([f.Z],(function(){return f.Z.shouldShow(t)}),[t]),o=(0,l.e7)([c.Z],(function(){return c.Z.isFocused()})),i=(0,l.e7)([c.Z],(function(){return c.Z.windowSize()}),[]);return(0,r.jsx)(E,b(y({},e),{visible:n,windowFocused:o,windowSize:i}))}},454871:(e,t,n)=>{"use strict";n.d(t,{V:()=>ue,Z:()=>ce});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(973935),s=n(809784),f=n(202351),d=n(707961),p=n(217458),h=n(50433),y=n(901654),b=n(37689),v=n(414273),m=n.n(v),g=n(949191),O=n.n(g),E=n(305257),C=n.n(E);function j(){return(0,r.jsx)("div",{className:m().container,children:(0,r.jsxs)("svg",{width:"224",height:"148",viewBox:"0 0 224 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M0.5 33.5H223.5V140C223.5 144.142 220.142 147.5 216 147.5H8C3.85786 147.5 0.5 144.142 0.5 140V33.5Z",fill:"#F2F3F4",stroke:"#E3E5E8"}),(0,r.jsx)("circle",{cx:"28",cy:"120",r:"16",
|
||
fill:"url(#tutorial-media-channels-image1)"}),(0,r.jsx)("path",{
|
||
d:"M62.104 116L61.468 107.72H59.488L57.4 113.96L55.3 107.72H53.284L52.648 116H54.076L54.496 109.892L56.584 116.024H58L60.076 109.892L60.52 116H62.104ZM65.7704 111.08C66.4664 111.08 66.8264 111.584 66.9224 112.484H64.6064C64.7144 111.548 65.1944 111.08 65.7704 111.08ZM68.3144 115.412L68.1464 114.284C67.5104 114.728 66.8984 115.004 66.1544 115.004C65.2664 115.004 64.6544 114.512 64.5944 113.384H68.3144C68.3144 113.3 68.3264 113.156 68.3264 113.036C68.3264 111.392 67.5464 110.084 65.8064 110.084C64.2944 110.084 63.1664 111.224 63.1664 113.108C63.1664 115.196 64.3784 116.12 65.9984 116.12C66.9344 116.12 67.6904 115.844 68.3144 115.412ZM72.6338 112.088C72.6338 112.724 72.2498 113.192 71.6138 113.192C70.9898 113.192 70.6058 112.736 70.6058 112.136C70.6058 111.5 70.9778 111.008 71.6138 111.008C72.2258 111.008 72.6338 111.476 72.6338 112.088ZM74.6858 116.24C74.6858 115.352 73.9418 114.98 72.7538 114.812L72.0098 114.74C71.1098 114.608 70.9298 114.56 70.9298 114.368C70.9298 114.272 71.0258 114.164 71.1698 114.056C71.3138 114.08 71.4698 114.092 71.6378 114.092C72.8858 114.092 73.9538 113.348 73.9538 112.1C73.9538 111.836 73.9058 111.572 73.7978 111.344L74.8538 111.272L74.6618 110.12L73.2458 110.624C72.8258 110.276 72.2738 110.084 71.6018 110.084C70.3058 110.084 69.2738 110.864 69.2738 112.136C69.2738 112.904 69.6818 113.504 70.3658 113.828C69.8858 114.116 69.6338 114.428 69.6338 114.752C69.6338 114.98 69.7418 115.196 69.9698 115.376C69.2498 115.784 68.8778 116.204 68.8778 116.744C68.8778 117.704 70.0658 118.184 71.6378 118.184C73.3178 118.184 74.6858 117.488 74.6858 116.24ZM71.7338 117.332C70.6418 117.332 70.1258 117.02 70.1258 116.588C70.1258 116.288 70.3178 116.012 70.7378 115.712C71.0258 115.772 71.2058 115.808 71.6018 115.856L72.3818 115.952C73.1018 116.06 73.3538 116.24 73.3538 116.552C73.3538 116.984 72.7658 117.332 71.7338 117.332ZM78.8219 114.404C78.4259 114.788 77.9579 115.028 77.4659 115.028C77.0219 115.028 76.7579 114.776 76.7579 114.356C76.7579 113.804 77.1539 113.312 78.8219 113.108V114.404ZM80.2619 116V112.028C80.2619 110.636 79.5179 110.084 78.0179 110.084C77.0939 110.084 76.3859 110.288 75.7139 110.552L75.8939 111.704C76.5179 111.428 77.1539 111.236 77.8259 111.236C78.4619 111.236 78.8219 111.476 78.8219 112.1V112.268C76.4819 112.496 75.3299 113.108 75.3299 114.512C75.3299 115.52 75.9899 116.12 76.9739 116.12C77.8379 116.12 78.4379 115.736 78.9059 115.244L79.0259 116H80.2619ZM86.633 116V111.824C86.633 110.744 86.057 110.084 84.977 110.084C84.197 110.084 83.585 110.504 83.045 111.02L82.913 110.204H81.689V116H83.129V112.088C83.549 111.644 84.005 111.356 84.449 111.356C84.977 111.356 85.193 111.704 85.193 112.208V116H86.633Z",
|
||
fill:"#060607"}),(0,r.jsx)("path",{
|
||
d:"M62.02 132L61.372 123.72H59.992L57.412 130.512L54.832 123.72H53.44L52.78 132H53.836L54.34 125.316L56.932 132.036H57.832L60.424 125.316L60.94 132H62.02ZM65.8287 126.996C66.6567 126.996 67.0647 127.524 67.1967 128.448H64.4367C64.6047 127.476 65.1687 126.996 65.8287 126.996ZM68.2647 131.352L68.1087 130.392C67.4847 130.884 66.8847 131.208 66.0567 131.208C65.0607 131.208 64.4367 130.584 64.3887 129.252H68.2767V129.024C68.2767 127.44 67.5087 126.156 65.8407 126.156C64.4007 126.156 63.3207 127.284 63.3207 129.12C63.3207 131.22 64.4847 132.12 65.9727 132.12C66.9207 132.12 67.6527 131.832 68.2647 131.352ZM71.073 123.72H69.789L70.077 129.54L70.773 129.384L71.073 123.72ZM71.025 132V130.572H69.825V132H71.025ZM84.7192 132L84.0712 123.72H82.6912L80.1112 130.512L77.5312 123.72H76.1392L75.4792 132H76.5352L77.0392 125.316L79.6312 132.036H80.5312L83.1232 125.316L83.6392 132H84.7192ZM89.6079 130.428C89.1279 130.92 88.5279 131.232 87.9039 131.232C87.3639 131.232 87.0519 130.932 87.0519 130.464C87.0519 129.876 87.4959 129.3 89.6079 129.096V130.428ZM90.6759 132V127.992C90.6759 126.72 90.0039 126.156 88.6119 126.156C87.7239 126.156 87.0759 126.36 86.3919 126.636L86.5359 127.56C87.1599 127.284 87.8199 127.068 88.5159 127.068C89.1759 127.068 89.6079 127.32 89.6079 128.04V128.28C87.2199 128.532 85.9959 129.096 85.9959 130.524C85.9959 131.496 86.6439 132.12 87.6759 132.12C88.6119 132.12 89.2359 131.7 89.6919 131.232L89.8119 132H90.6759ZM92.6347 134.184C93.4747 134.184 94.0987 133.872 94.5667 132.6L96.9067 126.276H95.7907L94.2907 130.728L92.7547 126.192L91.6747 126.36L93.7627 132.024L93.6187 132.408C93.3907 133.02 93.0667 133.248 92.5867 133.248C92.4187 133.248 92.2027 133.212 92.0227 133.164L92.1787 134.136C92.2867 134.16 92.4067 134.184 92.6347 134.184ZM103.068 128.976C103.068 127.068 102.048 126.156 100.812 126.156C100.032 126.156 99.4795 126.552 99.0955 126.948V123.336L98.0275 123.504V131.712C98.7835 131.94 99.3955 132.072 100.26 132.072C101.916 132.072 103.068 131.064 103.068 128.976ZM101.988 129.024C101.988 130.5 101.364 131.16 100.248 131.16C99.7195 131.16 99.4555 131.1 99.0955 130.968V128.04C99.5275 127.5 100.056 127.104 100.656 127.104C101.424 127.104 101.988 127.776 101.988 129.024ZM106.61 126.996C107.438 126.996 107.846 127.524 107.978 128.448H105.218C105.386 127.476 105.95 126.996 106.61 126.996ZM109.046 131.352L108.89 130.392C108.266 130.884 107.666 131.208 106.838 131.208C105.842 131.208 105.218 130.584 105.17 129.252H109.058V129.024C109.058 127.44 108.29 126.156 106.622 126.156C105.182 126.156 104.102 127.284 104.102 129.12C104.102 131.22 105.266 132.12 106.754 132.12C107.702 132.12 108.434 131.832 109.046 131.352ZM117.779 129.768C117.779 128.52 117.227 127.968 115.619 127.236C114.359 126.66 114.047 126.36 114.047 125.724C114.047 125.112 114.467 124.608 115.415 124.608C116.075 124.608 116.699 124.872 117.155 125.22L117.335 124.092C116.855 123.816 116.255 123.624 115.451 123.624C113.951 123.624 112.931 124.476 112.931 125.808C112.931 126.996 113.519 127.512 115.079 128.22C116.327 128.784 116.663 129.096 116.663 129.852C116.663 130.656 116.051 131.112 115.187 131.112C114.359 131.112 113.579 130.776 113.015 130.404L112.847 131.556C113.459 131.88 114.263 132.096 115.163 132.096C116.711 132.096 117.779 131.196 117.779 129.768ZM122.456 130.428C121.976 130.92 121.376 131.232 120.752 131.232C120.212 131.232 119.9 130.932 119.9 130.464C119.9 129.876 120.344 129.3 122.456 129.096V130.428ZM123.524 132V127.992C123.524 126.72 122.852 126.156 121.46 126.156C120.572 126.156 119.924 126.36 119.24 126.636L119.384 127.56C120.008 127.284 120.668 127.068 121.364 127.068C122.024 127.068 122.456 127.32 122.456 128.04V128.28C120.068 128.532 118.844 129.096 118.844 130.524C118.844 131.496 119.492 132.12 120.524 132.12C121.46 132.12 122.084 131.7 122.54 131.232L122.66 132H123.524ZM127.928 132.024L127.784 131.112C127.652 131.136 127.484 131.148 127.292 131.148C126.692 131.148 126.5 130.86 126.5 130.392V127.176H127.88L127.736 126.276H126.5V124.212L125.456 124.368V126.276H124.592V127.176H125.456V130.584C125.456 131.736 126.116 132.096 127.124 132.096C127.496 132.096 127.748 132.06 127.928 132.024ZM129.199 126.276V130.44C129.199 131.472 129.763 132.12 130.855 132.12C131.659 132.12 132.343 131.676 132.883 131.172L133.015 132H133.867V126.276H132.799V130.236C132.283 130.788 131.707 131.16 131.143 131.16C130.519 131.16 130.267 130.764 130.267 130.176V126.276H129.199ZM138.755 127.176L138.587 126.156C137.651 126.204 136.991 126.792 136.583 127.44L136.403 126.276H135.551V132H136.619V128.616C137.003 127.86 137.807 127.224 138.755 127.176ZM140.397 129.252C140.397 127.836 141.045 127.104 141.945 127.104C142.557 127.104 142.905 127.2 143.349 127.428V130.164C142.893 130.776 142.389 131.172 141.729 131.172C140.961 131.172 140.397 130.512 140.397 129.252ZM139.317 129.3C139.317 131.22 140.337 132.12 141.573 132.12C142.413 132.12 143.001 131.688 143.433 131.172L143.565 132H144.417V123.336L143.349 123.504V126.456C142.989 126.312 142.473 126.204 141.909 126.204C140.517 126.204 139.317 127.212 139.317 129.3ZM149.362 130.428C148.882 130.92 148.282 131.232 147.658 131.232C147.118 131.232 146.806 130.932 146.806 130.464C146.806 129.876 147.25 129.3 149.362 129.096V130.428ZM150.43 132V127.992C150.43 126.72 149.758 126.156 148.366 126.156C147.478 126.156 146.83 126.36 146.146 126.636L146.29 127.56C146.914 127.284 147.574 127.068 148.27 127.068C148.93 127.068 149.362 127.32 149.362 128.04V128.28C146.974 128.532 145.75 129.096 145.75 130.524C145.75 131.496 146.398 132.12 147.43 132.12C148.366 132.12 148.99 131.7 149.446 131.232L149.566 132H150.43ZM152.389 134.184C153.229 134.184 153.853 133.872 154.321 132.6L156.661 126.276H155.545L154.045 130.728L152.509 126.192L151.429 126.36L153.517 132.024L153.373 132.408C153.145 133.02 152.821 133.248 152.341 133.248C152.173 133.248 151.957 133.212 151.777 133.164L151.933 134.136C152.041 134.16 152.161 134.184 152.389 134.184ZM159.19 129.54L159.886 129.384L159.994 128.196C161.422 127.548 162.286 126.984 162.286 125.688C162.286 124.38 161.29 123.564 159.826 123.564C158.842 123.564 157.99 123.912 157.258 124.452L157.414 125.556C158.086 125.004 158.83 124.584 159.766 124.584C160.57 124.584 161.158 125.004 161.158 125.736C161.158 126.504 160.654 126.888 159.526 127.356L159.034 127.56L159.19 129.54ZM158.938 132H160.138V130.572H158.938V132Z",
|
||
fill:"#2E3338"}),(0,r.jsx)("path",{d:"M0.5 8C0.5 3.85786 3.85786 0.5 8 0.5H216C220.142 0.5 223.5 3.85786 223.5 8V33.5H0.5V8Z",fill:"#F2F3F4",stroke:"#E3E5E8"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M12.5641 23.75C12.253 23.75 12.0174 23.4689 12.0718 23.1626L12.5 20.75H10.0951C9.78449 20.75 9.54905 20.4698 9.60259 20.1638L9.69009 19.6638C9.73196 19.4246 9.93972 19.25 10.1826 19.25H12.7625L13.5575 14.75H11.1526C10.842 14.75 10.6065 14.4698 10.6601 14.1638L10.7476 13.6638C10.7895 13.4246 10.9972 13.25 11.2401 13.25H13.82L14.2793 10.6626C14.3216 10.4239 14.5291 10.25 14.7716 10.25H15.2559C15.567 10.25 15.8026 10.5311 15.7482 10.8374L15.32 13.25H19.82L20.2793 10.6626C20.3216 10.4239 20.5291 10.25 20.7716 10.25H21.2559C21.567 10.25 21.8026 10.5311 21.7482 10.8374L21.32 13.25H23.7249C24.0355 13.25 24.271 13.5302 24.2174 13.8362L24.1299 14.3362C24.0881 14.5754 23.8803 14.75 23.6374 14.75H21.0575L20.2625 19.25H22.6674C22.978 19.25 23.2135 19.5302 23.1599 19.8362L23.0724 20.3362C23.0306 20.5754 22.8228 20.75 22.5799 20.75H20L19.5407 23.3374C19.4984 23.5761 19.2909 23.75 19.0484 23.75H18.5641C18.253 23.75 18.0174 23.4689 18.0718 23.1626L18.5 20.75H14L13.5407 23.3374C13.4984 23.5761 13.2909 23.75 13.0484 23.75H12.5641ZM15.0578 14.75L14.2628 19.25H18.7628L19.5578 14.75H15.0578Z",
|
||
fill:"#4F5660"}),(0,r.jsx)("path",{
|
||
d:"M41.014 22V17.128C41.014 15.868 40.384 15.098 39.11 15.098C38.2 15.098 37.458 15.588 36.856 16.19C36.604 15.532 36.086 15.098 35.12 15.098C34.21 15.098 33.524 15.588 32.894 16.19L32.74 15.238H31.312V22H32.992V17.422C33.482 16.918 33.972 16.582 34.49 16.582C35.106 16.582 35.33 16.988 35.33 17.576V22H37.01V17.422C37.5 16.918 37.99 16.582 38.508 16.582C39.124 16.582 39.334 16.988 39.334 17.576V22H41.014ZM46.3967 20.138C45.9347 20.586 45.3887 20.866 44.8147 20.866C44.2967 20.866 43.9887 20.572 43.9887 20.082C43.9887 19.438 44.4507 18.864 46.3967 18.626V20.138ZM48.0767 22V17.366C48.0767 15.742 47.2087 15.098 45.4587 15.098C44.3807 15.098 43.5547 15.336 42.7707 15.644L42.9807 16.988C43.7087 16.666 44.4507 16.442 45.2347 16.442C45.9767 16.442 46.3967 16.722 46.3967 17.45V17.646C43.6667 17.912 42.3227 18.626 42.3227 20.264C42.3227 21.44 43.0927 22.14 44.2407 22.14C45.2487 22.14 45.9487 21.692 46.4947 21.118L46.6347 22H48.0767ZM53.8857 22.098L55.6777 21.832L53.0317 18.29L55.5237 15.238H53.6197L51.4217 18.038V11.892L49.7417 12.158V22H51.4217V18.64L53.8857 22.098ZM59.1699 16.26C59.9819 16.26 60.4019 16.848 60.5139 17.898H57.8119C57.9379 16.806 58.4979 16.26 59.1699 16.26ZM62.1379 21.314L61.9419 19.998C61.1999 20.516 60.4859 20.838 59.6179 20.838C58.5819 20.838 57.8679 20.264 57.7979 18.948H62.1379C62.1379 18.85 62.1519 18.682 62.1519 18.542C62.1519 16.624 61.2419 15.098 59.2119 15.098C57.4479 15.098 56.1319 16.428 56.1319 18.626C56.1319 21.062 57.5459 22.14 59.4359 22.14C60.5279 22.14 61.4099 21.818 62.1379 21.314ZM66.9533 18.78V17.156H63.3133V18.78H66.9533ZM72.9665 18.528C72.9665 20.012 72.3085 20.726 71.4405 20.726C70.8665 20.726 70.5445 20.628 70.1385 20.432V17.534C70.5865 16.96 71.0625 16.582 71.6645 16.582C72.4205 16.582 72.9665 17.226 72.9665 18.528ZM74.6605 18.43C74.6605 16.162 73.5265 15.098 72.1125 15.098C71.1745 15.098 70.5165 15.616 70.0405 16.162L69.8865 15.238H68.4585V24.604L70.1385 24.352V21.804C70.5445 21.958 71.0625 22.07 71.7065 22.07C73.2605 22.07 74.6605 20.95 74.6605 18.43ZM77.7827 22V11.892L76.1027 12.158V22H77.7827ZM83.2561 20.138C82.7941 20.586 82.2481 20.866 81.6741 20.866C81.1561 20.866 80.8481 20.572 80.8481 20.082C80.8481 19.438 81.3101 18.864 83.2561 18.626V20.138ZM84.9361 22V17.366C84.9361 15.742 84.0681 15.098 82.3181 15.098C81.2401 15.098 80.4141 15.336 79.6301 15.644L79.8401 16.988C80.5681 16.666 81.3101 16.442 82.0941 16.442C82.8361 16.442 83.2561 16.722 83.2561 17.45V17.646C80.5261 17.912 79.1821 18.626 79.1821 20.264C79.1821 21.44 79.9521 22.14 81.1001 22.14C82.1081 22.14 82.8081 21.692 83.3541 21.118L83.4941 22H84.9361ZM92.3691 22V17.128C92.3691 15.868 91.6971 15.098 90.4371 15.098C89.5271 15.098 88.8131 15.588 88.1831 16.19L88.0291 15.238H86.6011V22H88.2811V17.436C88.7711 16.918 89.3031 16.582 89.8211 16.582C90.4371 16.582 90.6891 16.988 90.6891 17.576V22H92.3691ZM99.0642 20.012C99.0642 18.738 98.3782 18.262 96.6282 17.814C95.6202 17.548 95.3682 17.338 95.3682 16.974C95.3682 16.61 95.6762 16.358 96.3062 16.358C96.9782 16.358 97.7762 16.596 98.4482 16.974L98.6722 15.574C98.0002 15.28 97.1882 15.098 96.3062 15.098C94.7382 15.098 93.8142 15.924 93.8142 17.1C93.8142 18.332 94.5002 18.808 96.1382 19.228C97.2162 19.494 97.5102 19.69 97.5102 20.166C97.5102 20.614 97.1182 20.88 96.3902 20.88C95.5502 20.88 94.6542 20.558 93.9262 20.082L93.7022 21.482C94.3462 21.832 95.3542 22.14 96.3342 22.14C98.1122 22.14 99.0642 21.342 99.0642 20.012Z",
|
||
fill:"#060607"}),(0,r.jsx)("circle",{cx:"28",cy:"62",r:"16",fill:"url(#tutorial-media-channels-image2)"}),(0,r.jsx)("path",{
|
||
d:"M59.572 60V51.72H58.096V57.144L54.376 51.72H52.876V60H54.352V54.3L58.252 60H59.572ZM63.4852 55.08C64.1812 55.08 64.5412 55.584 64.6372 56.484H62.3212C62.4292 55.548 62.9092 55.08 63.4852 55.08ZM66.0292 59.412L65.8612 58.284C65.2252 58.728 64.6132 59.004 63.8692 59.004C62.9812 59.004 62.3692 58.512 62.3092 57.384H66.0292C66.0292 57.3 66.0412 57.156 66.0412 57.036C66.0412 55.392 65.2612 54.084 63.5212 54.084C62.0092 54.084 60.8812 55.224 60.8812 57.108C60.8812 59.196 62.0932 60.12 63.7132 60.12C64.6492 60.12 65.4052 59.844 66.0292 59.412ZM68.7047 60V51.336L67.2647 51.564V60H68.7047ZM71.7281 60V51.336L70.2881 51.564V60H71.7281ZM73.8635 62.184C74.9075 62.184 75.5795 61.764 76.0715 60.372L78.2915 54.204H76.8395L75.5435 58.284L74.2235 54.12L72.7235 54.312L74.8235 59.988L74.7755 60.156C74.5835 60.78 74.1995 60.996 73.7195 60.996C73.4675 60.996 73.2635 60.96 73.0835 60.912L73.2755 62.124C73.4075 62.16 73.5515 62.184 73.8635 62.184Z",fill:"#060607"}),(0,r.jsx)("path",{
|
||
d:"M58.792 76.084L59.908 75.844L56.716 67.684H55.588L52.348 76H53.524L54.448 73.516H57.82L58.792 76.084ZM56.128 69.004L57.448 72.52H54.82L56.128 69.004ZM65.7697 76V71.836C65.7697 70.804 65.1937 70.156 64.1137 70.156C63.2977 70.156 62.6257 70.612 62.0857 71.104L61.9537 70.276H61.1017V76H62.1697V72.04C62.6857 71.488 63.2617 71.116 63.8257 71.116C64.4497 71.116 64.7017 71.512 64.7017 72.1V76H65.7697ZM67.7558 78.184C68.5958 78.184 69.2198 77.872 69.6878 76.6L72.0278 70.276H70.9118L69.4118 74.728L67.8758 70.192L66.7958 70.36L68.8838 76.024L68.7398 76.408C68.5118 77.02 68.1878 77.248 67.7078 77.248C67.5398 77.248 67.3238 77.212 67.1438 77.164L67.2998 78.136C67.4078 78.16 67.5278 78.184 67.7558 78.184ZM77.9291 73.144C77.9291 71.26 76.8011 70.156 75.2651 70.156C73.7411 70.156 72.6371 71.26 72.6371 73.144C72.6371 75.028 73.7411 76.12 75.2651 76.12C76.8011 76.12 77.9291 75.028 77.9291 73.144ZM76.8491 73.144C76.8491 74.344 76.3211 75.232 75.2651 75.232C74.2571 75.232 73.7171 74.32 73.7171 73.144C73.7171 71.944 74.2331 71.044 75.2651 71.044C76.2971 71.044 76.8491 71.968 76.8491 73.144ZM83.9572 76V71.836C83.9572 70.804 83.3812 70.156 82.3012 70.156C81.4852 70.156 80.8132 70.612 80.2732 71.104L80.1412 70.276H79.2892V76H80.3572V72.04C80.8732 71.488 81.4492 71.116 82.0132 71.116C82.6372 71.116 82.8892 71.512 82.8892 72.1V76H83.9572ZM87.8013 70.996C88.6293 70.996 89.0373 71.524 89.1693 72.448H86.4093C86.5773 71.476 87.1413 70.996 87.8013 70.996ZM90.2373 75.352L90.0813 74.392C89.4573 74.884 88.8573 75.208 88.0293 75.208C87.0333 75.208 86.4093 74.584 86.3613 73.252H90.2493V73.024C90.2493 71.44 89.4813 70.156 87.8133 70.156C86.3733 70.156 85.2933 71.284 85.2933 73.12C85.2933 75.22 86.4573 76.12 87.9453 76.12C88.8933 76.12 89.6253 75.832 90.2373 75.352ZM101.73 70.276H100.662L99.4503 74.512L98.1903 70.276H97.2903L96.0303 74.512L94.7823 70.192L93.7383 70.36L95.5743 76.024H96.4623L97.7223 71.704L98.9943 76.024H99.8943L101.73 70.276ZM106.014 74.428C105.534 74.92 104.934 75.232 104.31 75.232C103.77 75.232 103.458 74.932 103.458 74.464C103.458 73.876 103.902 73.3 106.014 73.096V74.428ZM107.082 76V71.992C107.082 70.72 106.41 70.156 105.018 70.156C104.13 70.156 103.482 70.36 102.798 70.636L102.942 71.56C103.566 71.284 104.226 71.068 104.922 71.068C105.582 71.068 106.014 71.32 106.014 72.04V72.28C103.626 72.532 102.402 73.096 102.402 74.524C102.402 75.496 103.05 76.12 104.082 76.12C105.018 76.12 105.642 75.7 106.098 75.232L106.218 76H107.082ZM113.406 76V71.836C113.406 70.804 112.83 70.156 111.75 70.156C110.934 70.156 110.262 70.612 109.722 71.104L109.59 70.276H108.738V76H109.806V72.04C110.322 71.488 110.898 71.116 111.462 71.116C112.086 71.116 112.338 71.512 112.338 72.1V76H113.406ZM117.815 76.024L117.671 75.112C117.539 75.136 117.371 75.148 117.179 75.148C116.579 75.148 116.387 74.86 116.387 74.392V71.176H117.767L117.623 70.276H116.387V68.212L115.343 68.368V70.276H114.479V71.176H115.343V74.584C115.343 75.736 116.003 76.096 117.011 76.096C117.383 76.096 117.635 76.06 117.815 76.024ZM124.494 76.024L124.35 75.112C124.218 75.136 124.05 75.148 123.858 75.148C123.258 75.148 123.066 74.86 123.066 74.392V71.176H124.446L124.302 70.276H123.066V68.212L122.022 68.368V70.276H121.158V71.176H122.022V74.584C122.022 75.736 122.682 76.096 123.69 76.096C124.062 76.096 124.314 76.06 124.494 76.024ZM130.71 73.144C130.71 71.26 129.582 70.156 128.046 70.156C126.522 70.156 125.418 71.26 125.418 73.144C125.418 75.028 126.522 76.12 128.046 76.12C129.582 76.12 130.71 75.028 130.71 73.144ZM129.63 73.144C129.63 74.344 129.102 75.232 128.046 75.232C127.038 75.232 126.498 74.32 126.498 73.144C126.498 71.944 127.014 71.044 128.046 71.044C129.078 71.044 129.63 71.968 129.63 73.144ZM139.375 76V71.836C139.375 70.804 138.799 70.156 137.719 70.156C136.903 70.156 136.243 70.612 135.775 71.032V67.336L134.707 67.504V76H135.775V72.04C136.291 71.488 136.867 71.116 137.431 71.116C138.055 71.116 138.307 71.512 138.307 72.1V76H139.375ZM144.299 74.428C143.819 74.92 143.219 75.232 142.595 75.232C142.055 75.232 141.743 74.932 141.743 74.464C141.743 73.876 142.187 73.3 144.299 73.096V74.428ZM145.367 76V71.992C145.367 70.72 144.695 70.156 143.303 70.156C142.415 70.156 141.767 70.36 141.083 70.636L141.227 71.56C141.851 71.284 142.511 71.068 143.207 71.068C143.867 71.068 144.299 71.32 144.299 72.04V72.28C141.911 72.532 140.687 73.096 140.687 74.524C140.687 75.496 141.335 76.12 142.367 76.12C143.303 76.12 143.927 75.7 144.383 75.232L144.503 76H145.367ZM151.692 76V71.836C151.692 70.804 151.116 70.156 150.036 70.156C149.22 70.156 148.548 70.612 148.008 71.104L147.876 70.276H147.024V76H148.092V72.04C148.608 71.488 149.184 71.116 149.748 71.116C150.372 71.116 150.624 71.512 150.624 72.1V76H151.692ZM156.484 72.136C156.484 72.82 156.028 73.36 155.296 73.36C154.588 73.36 154.132 72.844 154.132 72.184C154.132 71.488 154.576 70.936 155.296 70.936C156.004 70.936 156.484 71.452 156.484 72.136ZM158.188 76.42C158.188 75.532 157.432 75.148 156.22 74.932L155.812 74.86C154.804 74.68 154.6 74.632 154.6 74.428C154.6 74.32 154.72 74.188 154.888 74.08C155.032 74.104 155.176 74.116 155.32 74.116C156.484 74.116 157.516 73.372 157.516 72.148C157.516 71.824 157.444 71.524 157.288 71.26L158.38 71.152L158.224 70.192L156.772 70.636C156.376 70.324 155.872 70.156 155.296 70.156C154.132 70.156 153.1 70.912 153.1 72.148C153.1 72.928 153.532 73.528 154.168 73.852C153.784 74.08 153.568 74.356 153.568 74.632C153.568 74.848 153.676 75.052 153.928 75.232C153.124 75.664 152.716 76.12 152.716 76.708C152.716 77.716 153.904 78.184 155.392 78.184C156.88 78.184 158.188 77.62 158.188 76.42ZM155.44 77.416C154.324 77.416 153.736 77.08 153.736 76.624C153.736 76.228 154.036 75.892 154.708 75.556C154.936 75.604 155.104 75.64 155.416 75.7L156.1 75.82C156.916 75.964 157.18 76.204 157.18 76.552C157.18 77.032 156.556 77.416 155.44 77.416ZM167.003 73.144C167.003 71.26 165.875 70.156 164.339 70.156C162.815 70.156 161.711 71.26 161.711 73.144C161.711 75.028 162.815 76.12 164.339 76.12C165.875 76.12 167.003 75.028 167.003 73.144ZM165.923 73.144C165.923 74.344 165.395 75.232 164.339 75.232C163.331 75.232 162.791 74.32 162.791 73.144C162.791 71.944 163.307 71.044 164.339 71.044C165.371 71.044 165.923 71.968 165.923 73.144ZM168.339 70.276V74.44C168.339 75.472 168.903 76.12 169.995 76.12C170.799 76.12 171.483 75.676 172.023 75.172L172.155 76H173.007V70.276H171.939V74.236C171.423 74.788 170.847 75.16 170.283 75.16C169.659 75.16 169.407 74.764 169.407 74.176V70.276H168.339ZM177.44 76.024L177.296 75.112C177.164 75.136 176.996 75.148 176.804 75.148C176.204 75.148 176.012 74.86 176.012 74.392V71.176H177.392L177.248 70.276H176.012V68.212L174.968 68.368V70.276H174.104V71.176H174.968V74.584C174.968 75.736 175.628 76.096 176.636 76.096C177.008 76.096 177.26 76.06 177.44 76.024ZM184.119 76.024L183.975 75.112C183.843 75.136 183.675 75.148 183.483 75.148C182.883 75.148 182.691 74.86 182.691 74.392V71.176H184.071L183.927 70.276H182.691V68.212L181.647 68.368V70.276H180.783V71.176H181.647V74.584C181.647 75.736 182.307 76.096 183.315 76.096C183.687 76.096 183.939 76.06 184.119 76.024ZM190.082 76V71.836C190.082 70.804 189.506 70.156 188.426 70.156C187.61 70.156 186.95 70.612 186.482 71.032V67.336L185.414 67.504V76H186.482V72.04C186.998 71.488 187.574 71.116 188.138 71.116C188.762 71.116 189.014 71.512 189.014 72.1V76H190.082ZM193.038 68.452C193.038 68.08 192.738 67.768 192.366 67.768C191.994 67.768 191.682 68.08 191.682 68.452C191.682 68.824 191.994 69.124 192.366 69.124C192.738 69.124 193.038 68.824 193.038 68.452ZM192.894 76V70.276H191.826V76H192.894ZM198.656 74.404C198.656 73.312 198.02 72.904 196.604 72.544C195.704 72.316 195.416 72.1 195.416 71.716C195.416 71.308 195.752 71.056 196.4 71.056C197 71.056 197.636 71.26 198.14 71.548L198.308 70.54C197.768 70.3 197.132 70.156 196.424 70.156C195.176 70.156 194.408 70.828 194.408 71.74C194.408 72.76 194.948 73.168 196.292 73.504C197.324 73.756 197.648 73.948 197.648 74.476C197.648 74.956 197.216 75.232 196.484 75.232C195.704 75.232 195.008 74.944 194.468 74.572L194.312 75.58C194.804 75.856 195.644 76.12 196.4 76.12C197.876 76.12 198.656 75.448 198.656 74.404ZM60.328 86.276H59.26L58.048 90.512L56.788 86.276H55.888L54.628 90.512L53.38 86.192L52.336 86.36L54.172 92.024H55.06L56.32 87.704L57.592 92.024H58.492L60.328 86.276ZM63.5318 86.996C64.3598 86.996 64.7678 87.524 64.8998 88.448H62.1398C62.3078 87.476 62.8718 86.996 63.5318 86.996ZM65.9678 91.352L65.8118 90.392C65.1878 90.884 64.5878 91.208 63.7598 91.208C62.7638 91.208 62.1398 90.584 62.0918 89.252H65.9798V89.024C65.9798 87.44 65.2118 86.156 63.5438 86.156C62.1038 86.156 61.0238 87.284 61.0238 89.12C61.0238 91.22 62.1878 92.12 63.6758 92.12C64.6238 92.12 65.3558 91.832 65.9678 91.352ZM69.5201 86.996C70.3481 86.996 70.7561 87.524 70.8881 88.448H68.1281C68.2961 87.476 68.8601 86.996 69.5201 86.996ZM71.9561 91.352L71.8001 90.392C71.1761 90.884 70.5761 91.208 69.7481 91.208C68.7521 91.208 68.1281 90.584 68.0801 89.252H71.9681V89.024C71.9681 87.44 71.2001 86.156 69.5321 86.156C68.0921 86.156 67.0121 87.284 67.0121 89.12C67.0121 91.22 68.1761 92.12 69.6641 92.12C70.6121 92.12 71.3441 91.832 71.9561 91.352ZM76.9364 92.084L78.1004 91.904L75.4844 88.808L77.8964 86.276H76.6124L74.3924 88.676V83.336L73.3244 83.504V92H74.3924V89L76.9364 92.084ZM81.1099 86.996C81.9379 86.996 82.3459 87.524 82.4779 88.448H79.7179C79.8859 87.476 80.4499 86.996 81.1099 86.996ZM83.5459 91.352L83.3899 90.392C82.7659 90.884 82.1659 91.208 81.3379 91.208C80.3419 91.208 79.7179 90.584 79.6699 89.252H83.5579V89.024C83.5579 87.44 82.7899 86.156 81.1219 86.156C79.6819 86.156 78.6019 87.284 78.6019 89.12C78.6019 91.22 79.7659 92.12 81.2539 92.12C82.2019 92.12 82.9339 91.832 83.5459 91.352ZM89.5822 92V87.836C89.5822 86.804 89.0062 86.156 87.9262 86.156C87.1102 86.156 86.4382 86.612 85.8982 87.104L85.7662 86.276H84.9142V92H85.9822V88.04C86.4982 87.488 87.0742 87.116 87.6382 87.116C88.2622 87.116 88.5142 87.512 88.5142 88.1V92H89.5822ZM91.9983 89.252C91.9983 87.836 92.6463 87.104 93.5463 87.104C94.1583 87.104 94.5063 87.2 94.9503 87.428V90.164C94.4943 90.776 93.9903 91.172 93.3303 91.172C92.5623 91.172 91.9983 90.512 91.9983 89.252ZM90.9183 89.3C90.9183 91.22 91.9383 92.12 93.1743 92.12C94.0143 92.12 94.6023 91.688 95.0343 91.172L95.1663 92H96.0183V83.336L94.9503 83.504V86.456C94.5903 86.312 94.0743 86.204 93.5103 86.204C92.1183 86.204 90.9183 87.212 90.9183 89.3ZM99.3194 89.54L100.015 89.384L100.123 88.196C101.551 87.548 102.415 86.984 102.415 85.688C102.415 84.38 101.419 83.564 99.9554 83.564C98.9714 83.564 98.1194 83.912 97.3874 84.452L97.5434 85.556C98.2154 85.004 98.9594 84.584 99.8954 84.584C100.699 84.584 101.287 85.004 101.287 85.736C101.287 86.504 100.783 86.888 99.6554 87.356L99.1634 87.56L99.3194 89.54ZM99.0674 92H100.267V90.572H99.0674V92Z",
|
||
fill:"#2E3338"}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("pattern",{id:"tutorial-media-channels-image1",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1",children:(0,r.jsx)("image",{x:"0",y:"0",height:"32",width:"32",href:O()})}),(0,r.jsx)("pattern",{id:"tutorial-media-channels-image2",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1",children:(0,r.jsx)("image",{x:"0",y:"0",height:"32",width:"32",href:C()})})]})]})})}var S=n(439250),I=n.n(S);function _(){return(0,r.jsx)("div",{className:I().container,children:(0,r.jsxs)("svg",{width:"248",height:"67",viewBox:"0 0 248 67",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{
|
||
d:"M1.91937 22.0819L0.353585 25.3514C0.282937 25.5093 0.265227 25.6857 0.303076 25.8544C0.311999 25.943 0.339002 26.0288 0.382429 26.1067C0.425856 26.1845 0.484791 26.2527 0.555622 26.3071C0.607907 26.38 0.675826 26.4403 0.754452 26.4838C0.833079 26.5273 0.920441 26.5529 1.0102 26.5586C1.19659 26.5915 1.38843 26.5741 1.5658 26.5083L4.74788 24.949L5.15196 24.8484L5.55603 24.949L8.73811 26.5083H9.29371L9.74829 26.2568C9.85659 26.1275 9.92655 25.9707 9.95033 25.8041C9.98818 25.6354 9.97046 25.459 9.89982 25.3011L8.33403 22.0315C8.2926 21.919 8.27539 21.799 8.28352 21.6794C8.27533 21.5434 8.29245 21.4069 8.33403 21.277L9.89982 18.1081C9.94425 18.0329 9.97177 17.949 9.98049 17.8621C9.98921 17.7753 9.97892 17.6876 9.95033 17.6051C9.93611 17.4208 9.86561 17.2453 9.74829 17.1021C9.60449 16.9853 9.42824 16.9151 9.2432 16.9009C9.16036 16.8724 9.07231 16.8622 8.98511 16.8709C8.89791 16.8796 8.81364 16.907 8.73811 16.9512L5.50552 18.5105L5.10145 18.6111L4.69737 18.5105L1.5153 16.9512C1.43095 16.9057 1.3382 16.8778 1.24269 16.8692C1.14717 16.8605 1.05089 16.8713 0.959695 16.9009C0.792331 16.9246 0.634911 16.9943 0.505112 17.1021C0.372179 17.2408 0.284186 17.416 0.252566 17.6051C0.236844 17.779 0.271925 17.9537 0.353585 18.1081L1.86886 21.3273C1.94921 21.4454 1.98499 21.5879 1.96988 21.7297C1.98577 21.7888 1.98948 21.8504 1.9808 21.9109C1.97212 21.9715 1.95122 22.0296 1.91937 22.0819Z",
|
||
fill:"#AEC7FF"}),(0,r.jsx)("path",{d:"M205.949 47.6259C218.112 47.6259 227.971 37.8071 227.971 25.695C227.971 13.5829 218.112 3.76405 205.949 3.76405C193.787 3.76405 183.927 13.5829 183.927 25.695C183.927 37.8071 193.787 47.6259 205.949 47.6259Z",fill:"url(#tutorial-media-voice-channels-image2)"}),(0,r.jsx)("path",{d:"M206.106 47.5713C218.256 47.5713 228.106 37.7216 228.106 25.5713C228.106 13.4211 218.256 3.57133 206.106 3.57133C193.956 3.57133 184.106 13.4211 184.106 25.5713C184.106 37.7216 193.956 47.5713 206.106 47.5713Z",stroke:"#3ba55c",strokeWidth:"3"}),(0,r.jsx)("path",{d:"M43.8822 66.4461C56.0446 66.4461 65.9042 56.6273 65.9042 44.5152C65.9042 32.4031 56.0446 22.5843 43.8822 22.5843C31.7198 22.5843 21.8602 32.4031 21.8602 44.5152C21.8602 56.6273 31.7198 66.4461 43.8822 66.4461Z",fill:"url(#tutorial-media-voice-channels-image1)"}),(0,r.jsx)("path",{
|
||
d:"M43.6684 66.0315C55.8187 66.0315 65.6684 56.1818 65.6684 44.0315C65.6684 31.8813 55.8187 22.0315 43.6684 22.0315C31.5181 22.0315 21.6684 31.8813 21.6684 44.0315C21.6684 56.1818 31.5181 66.0315 43.6684 66.0315Z",stroke:"#3ba55c",strokeWidth:"3"}),(0,r.jsx)("path",{d:"M138.597 43.8116C134.96 31.857 134.96 19.0973 138.597 7.14265",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M111.562 25.5955C115.2 37.5501 115.2 50.3098 111.562 62.2644",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M159.71 37.6246C158.509 33.6948 157.896 29.6101 157.892 25.5023C157.9 21.3782 158.513 17.2775 159.71 13.3296",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M149.154 10.2613C146.124 20.198 146.124 30.8065 149.154 40.7433",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{
|
||
d:"M170.266 16.4482C169.347 19.3785 168.887 22.4324 168.903 25.5023C168.887 28.5721 169.347 31.626 170.266 34.5563",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M90.0579 56.1351C91.2957 52.1951 91.9258 48.0908 91.9267 43.9625C91.9301 39.8503 91.2999 35.7619 90.0579 31.8401",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M100.614 28.6068C103.644 38.5435 103.644 49.152 100.614 59.0887",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M79.5015 34.9084C81.3857 40.7986 81.3857 47.1263 79.5015 53.0165",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{
|
||
d:"M182.237 57.1914L184.257 56.4872C184.354 56.4431 184.436 56.3722 184.494 56.2831C184.551 56.1939 184.582 56.0902 184.582 55.9842C184.582 55.8783 184.551 55.7746 184.494 55.6854C184.436 55.5962 184.354 55.5254 184.257 55.4812L182.237 54.777C182.16 54.7552 182.088 54.7169 182.027 54.6648C181.966 54.6127 181.917 54.548 181.884 54.4752L181.176 52.4632C181.143 52.3626 181.079 52.275 180.993 52.2128C180.907 52.1507 180.803 52.1173 180.697 52.1173C180.59 52.1173 180.487 52.1507 180.4 52.2128C180.314 52.275 180.25 52.3626 180.217 52.4632L179.51 54.4752C179.476 54.548 179.427 54.6127 179.366 54.6648C179.305 54.7169 179.233 54.7552 179.156 54.777L177.186 55.4812C177.052 55.4812 176.924 55.5342 176.829 55.6286C176.734 55.7229 176.681 55.8508 176.681 55.9842C176.681 56.1176 176.734 56.2456 176.829 56.3399C176.924 56.4343 177.052 56.4872 177.186 56.4872L179.156 57.1914C179.233 57.2133 179.305 57.2516 179.366 57.3037C179.427 57.3558 179.476 57.4205 179.51 57.4933L180.217 59.5053C180.25 59.6059 180.314 59.6935 180.4 59.7556C180.487 59.8178 180.59 59.8512 180.697 59.8512C180.803 59.8512 180.907 59.8178 180.993 59.7556C181.079 59.6935 181.143 59.6059 181.176 59.5053L181.884 57.4933C181.917 57.4205 181.966 57.3558 182.027 57.3037C182.088 57.2516 182.16 57.2133 182.237 57.1914Z",
|
||
fill:"#EC7DF7"}),(0,r.jsx)("path",{d:"M242.696 1.35812C242.696 0.746955 242.199 0.251511 241.585 0.251511C240.972 0.251511 240.474 0.746955 240.474 1.35812V2.4949C240.474 3.10607 240.972 3.60151 241.585 3.60151C242.199 3.60151 242.696 3.10607 242.696 2.4949V1.35812Z",fill:"#7196FF"}),(0,r.jsx)("path",{d:"M242.696 10.2613C242.696 9.65011 242.199 9.15466 241.585 9.15466C240.972 9.15466 240.474 9.65011 240.474 10.2613V11.3981C240.474 12.0092 240.972 12.5047 241.585 12.5047C242.199 12.5047 242.696 12.0092 242.696 11.3981V10.2613Z",fill:"#7196FF"}),(0,r.jsx)("path",{d:"M246.636 7.49476C247.25 7.49476 247.747 6.99933 247.747 6.38817C247.747 5.77701 247.25 5.28156 246.636 5.28156H245.495C244.881 5.28156 244.384 5.77701 244.384 6.38817C244.384 6.99933 244.881 7.49476 245.495 7.49476H246.636Z",fill:"#7196FF"}),(0,r.jsx)("path",{
|
||
d:"M237.696 7.49477C238.31 7.49477 238.807 6.99931 238.807 6.38815C238.807 5.77699 238.31 5.28154 237.696 5.28154H236.555C235.941 5.28154 235.443 5.77699 235.443 6.38815C235.443 6.99931 235.941 7.49477 236.555 7.49477H237.696Z",fill:"#7196FF"}),(0,r.jsx)("path",{d:"M25.2929 2.23526C24.8786 1.82274 24.207 1.82274 23.7928 2.23526C23.3786 2.64777 23.3786 3.31659 23.7928 3.7291L24.5535 4.48669C24.9678 4.8992 25.6394 4.8992 26.0536 4.48669C26.4678 4.07418 26.4678 3.40536 26.0536 2.99285L25.2929 2.23526Z",fill:"#F7D036"}),(0,r.jsx)("path",{d:"M31.3539 8.25656C30.9397 7.84404 30.2681 7.84404 29.8538 8.25656C29.4396 8.66907 29.4396 9.33789 29.8538 9.7504L30.6146 10.508C31.0288 10.9205 31.7004 10.9205 32.1146 10.508C32.5289 10.0955 32.5289 9.42666 32.1146 9.01415L31.3539 8.25656Z",fill:"#F7D036"}),(0,r.jsx)("path",{
|
||
d:"M32.109 3.71739C32.5233 3.30488 32.5233 2.63606 32.109 2.22354C31.6948 1.81103 31.0232 1.81103 30.609 2.22355L29.8482 2.98114C29.434 3.39365 29.434 4.06247 29.8482 4.47498C30.2625 4.88749 30.9341 4.88749 31.3483 4.47498L32.109 3.71739Z",fill:"#F7D036"}),(0,r.jsx)("path",{d:"M26.0985 9.73869C26.5128 9.32618 26.5128 8.65736 26.0985 8.24485C25.6843 7.83233 25.0127 7.83233 24.5985 8.24485L23.8378 9.00244C23.4235 9.41495 23.4235 10.0838 23.8378 10.4963C24.252 10.9088 24.9236 10.9088 25.3378 10.4963L26.0985 9.73869Z",fill:"#F7D036"}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("pattern",{id:"tutorial-media-voice-channels-image1",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1",children:(0,r.jsx)("image",{x:"0",y:"0",height:"44",width:"44",href:O()})}),(0,r.jsx)("pattern",{id:"tutorial-media-voice-channels-image2",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1",children:(0,r.jsx)("image",{x:"0",y:"0",height:"44",width:"44",href:C()})})]})]})})}
|
||
var w=n(503528),x=n(621647),P=n(628486),N=n(61209),A=n(567403),T=n(473903),Z=n(124251),M=n(775173),R=n(762507),L=n.n(R);function D(){var e=(0,P.Z)((function(e){return{guildId:e.guildId,channelId:e.channelId}}),w.Z),t=e.guildId,n=e.channelId,o=(0,f.e7)([A.Z],(function(){return A.Z.getGuild(t)})),i=(0,f.e7)([N.Z],(function(){return null==o?N.Z.getChannel(n):null})),a=(0,f.e7)([T.default],(function(){return T.default.getCurrentUser()})),l=null!=i?(0,x.x)(i):null,u=null!=a?a.getAvatarURL(t,80):M.pK[0],c=(0,r.jsx)(d.qEK,{src:u,"aria-hidden":!0,size:d.EFr.SIZE_80,className:L().avatarSizeOverride}),s=null;s=null!=o?(0,r.jsx)(Z.Z,{guild:o}):null!=l?(0,r.jsx)(d.qEK,{"aria-hidden":!0,src:l,size:d.EFr.SIZE_80,className:L().avatarSizeOverride}):c;return(0,r.jsxs)("div",{className:L().container,children:[(0,r.jsx)("div",{className:L().personAvatar,children:c}),(0,r.jsx)("div",{className:L().guildAvatar,children:s}),(0,r.jsx)("svg",{className:L().illustration,xmlns:"http://www.w3.org/2000/svg",
|
||
width:"156",height:"70",viewBox:"0 0 123 55",children:(0,r.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,r.jsx)("path",{fill:"#D3D6ED",d:"M7.6003,3.7337 C7.6003,3.1817 7.1533,2.7337 6.6003,2.7337 C5.7663,2.7337 5.0903,2.0577 5.0903,1.2237 C5.0903,0.6717 4.6423,0.2237 4.0903,0.2237 C3.5383,0.2237 3.0903,0.6717 3.0903,1.2237 C3.0903,2.0577 2.4133,2.7337 1.5803,2.7337 C1.0283,2.7337 0.5803,3.1817 0.5803,3.7337 C0.5803,4.2857 1.0283,4.7337 1.5803,4.7337 C2.4133,4.7337 3.0903,5.4097 3.0903,6.2437 C3.0903,6.7967 3.5383,7.2437 4.0903,7.2437 C4.6423,7.2437 5.0903,6.7967 5.0903,6.2437 C5.0903,5.4097 5.7663,4.7337 6.6003,4.7337 C7.1533,4.7337 7.6003,4.2857 7.6003,3.7337"}),(0,r.jsx)("path",{fill:"#ACB0FF",
|
||
d:"M96.6157,5.4263 C96.6157,4.8743 96.1687,4.4263 95.6157,4.4263 C95.0627,4.4263 94.6157,4.8743 94.6157,5.4263 C94.6157,6.2603 93.9397,6.9363 93.1057,6.9363 C92.5537,6.9363 92.1057,7.3843 92.1057,7.9363 C92.1057,8.4883 92.5537,8.9363 93.1057,8.9363 C93.9397,8.9363 94.6157,9.6123 94.6157,10.4463 C94.6157,10.9983 95.0627,11.4463 95.6157,11.4463 C96.1687,11.4463 96.6157,10.9983 96.6157,10.4463 C96.6157,9.6123 97.2917,8.9363 98.1257,8.9363 C98.6787,8.9363 99.1257,8.4883 99.1257,7.9363 C99.1257,7.3843 98.6787,6.9363 98.1257,6.9363 C97.2917,6.9363 96.6157,6.2603 96.6157,5.4263 Z"}),(0,r.jsx)("path",{fill:"#FFF",
|
||
d:"M120.7351 14.0452L119.5511 15.2282C119.1611 15.6182 119.1611 16.2512 119.5511 16.6422 119.7471 16.8372 120.0031 16.9352 120.2581 16.9352 120.5141 16.9352 120.7701 16.8372 120.9651 16.6422L122.1491 15.4592C122.5401 15.0682 122.5401 14.4362 122.1491 14.0452 121.7581 13.6542 121.1261 13.6542 120.7351 14.0452zM113.635 21.1452C113.245 21.5352 113.245 22.1682 113.635 22.5592 113.831 22.7542 114.087 22.8522 114.342 22.8522 114.598 22.8522 114.855 22.7542 115.049 22.5592L116.233 21.3752C116.624 20.9842 116.624 20.3522 116.233 19.9612 115.842 19.5702 115.209 19.5702 114.819 19.9612L113.635 21.1452zM120.9655 19.9612C120.5745 19.5702 119.9425 19.5702 119.5515 19.9612 119.1605 20.3522 119.1605 20.9842 119.5515 21.3752L120.7355 22.5592C120.9305 22.7542 121.1865 22.8522 121.4425 22.8522 121.6975 22.8522 121.9535 22.7542 122.1495 22.5592 122.5395 22.1682 122.5395 21.5352 122.1495 21.1452L120.9655 19.9612zM115.0491 14.0449C114.6591 13.6549 114.0251 13.6549 113.6351 14.0449 113.2451 14.4359 113.2451 15.0689 113.6351 15.4589L114.8191 16.6419C115.0141 16.8369 115.2701 16.9349 115.5261 16.9349 115.7821 16.9349 116.0381 16.8369 116.2331 16.6419 116.6241 16.2509 116.6241 15.6189 116.2331 15.2279L115.0491 14.0449z"
|
||
}),(0,r.jsx)("rect",{width:"40",height:"25",x:"68",y:"22",fill:"#999CF4",fillRule:"nonzero",rx:"3"}),(0,r.jsx)("path",{fill:"#999CF4",fillRule:"nonzero",d:"M90,46 L90,53.8100983 C90,54.362383 90.4477153,54.8100983 91,54.8100983 C91.2501917,54.8100983 91.4912948,54.7163131 91.6757246,54.5472524 L101,46 L90,46 Z",transform:"matrix(-1 0 0 1 191 0)"}),(0,r.jsxs)("g",{fill:"#FFF",fillRule:"nonzero",opacity:".902",transform:"translate(78 32)",children:[(0,r.jsx)("circle",{cx:"2.5",cy:"2.5",r:"2.5"}),(0,r.jsx)("circle",{cx:"10.5",cy:"2.5",r:"2.5"}),(0,r.jsx)("circle",{cx:"18.5",cy:"2.5",r:"2.5"})]}),(0,r.jsx)("rect",{width:"40",height:"25",x:"13",y:"9",fill:"#5865f2",fillRule:"nonzero",rx:"3"}),(0,r.jsx)("path",{fill:"#5865f2",fillRule:"nonzero",d:"M20,33 L20,40.8100983 C20,41.362383 20.4477153,41.8100983 21,41.8100983 C21.2501917,41.8100983 21.4912948,41.7163131 21.6757246,41.5472524 L31,33 L20,33 Z"}),(0,r.jsxs)("g",{fill:"#FFF",fillRule:"nonzero",opacity:".902",
|
||
transform:"translate(23 19)",children:[(0,r.jsx)("circle",{cx:"2.5",cy:"2.5",r:"2.5"}),(0,r.jsx)("circle",{cx:"10.5",cy:"2.5",r:"2.5"}),(0,r.jsx)("circle",{cx:"18.5",cy:"2.5",r:"2.5"})]})]})})]})}var k=Object.freeze({"voice-conversations":{popoutPosition:"right",highPriority:!0,textAlign:b.iu.CENTER,media:function(){return(0,r.jsx)(_,{})}},"writing-messages":{popoutPosition:"top",highPriority:!0,textAlign:b.iu.CENTER,spacing:10,media:function(){return(0,r.jsx)(D,{})}},"direct-messages":{popoutPosition:"right"},"create-first-server":{popoutPosition:"right",highPriority:!0},"organize-by-topic":{popoutPosition:"right",textAlign:b.iu.CENTER,spacing:8,media:function(){return(0,r.jsx)(j,{})}},"instant-invite":{popoutPosition:"right",spacing:24,highPriority:!0},"whos-online":{spacing:16,popoutPosition:"left"},"server-settings":{popoutPosition:"bottom",spacing:10},"friends-list":{spacing:8,popoutPosition:"right"},"create-more-servers":{spacing:8,popoutPosition:"right"}}),U=function(e){
|
||
return e in k?k[e]:null},B=n(464187),F=n(226919),G=n(473708),H=n(909774),V=n.n(H),W=function(){return(0,r.jsx)(r.Fragment,{children:G.Z.Messages.TIP_INSTANT_INVITE_BODY3.format({shareIcon:G.Z.Messages.INSTANT_INVITE,shareIconHook:function(){return(0,r.jsx)(F.Z,{className:V().icon},"icon")}})})},z=function(){var e=(0,f.e7)([A.Z,B.Z],(function(){return A.Z.getGuild(B.Z.getGuildId())}),[]),t=null==e?void 0:e.name;return(0,r.jsx)(r.Fragment,{children:G.Z.Messages.TIP_WRITING_MESSAGES_BODY3.format({serverName:t})})},Y=n(361925),K=n(2590),q=n(577254),Q=n.n(q);function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ee(e){ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)}
|
||
;return ee(e)}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){$(e,t,n[t])}))}return e}function ne(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function re(e,t){return!t||"object"!==ae(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}
|
||
function oe(e,t){oe=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return oe(e,t)}function ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return X(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ae=function(e){
|
||
return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=ee(e);if(t){var o=ee(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return re(this,n)}}var ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&oe(e,t)}(n,e);var t=le(n);function n(){J(this,n);var e;(e=t.apply(this,arguments)).state={offsetX:null,offsetY:null};e.handleDismiss=function(){p.Z.dismiss(e.props.tutorialId)};return e}var o=n.prototype;o.componentDidMount=function(){this.updateCache()}
|
||
;o.componentDidUpdate=function(e){var t=e.tutorialId,n=e.origin,r=n.x,o=n.y,i=e.targetWidth,a=e.targetHeight,l=e.position,u=e.offset;this.props.tutorialId===t&&this.props.origin.x===r&&this.props.origin.y===o&&this.props.targetWidth===i&&this.props.targetHeight===a&&this.props.position===l&&this.props.offset.x===u.x&&this.props.offset.y===u.y||this.updateCache()};o.updateCache=function(){var e=(0,c.findDOMNode)(this);if(null!=e&&(0,s.k)(e,HTMLElement)){var t,n,r=e.offsetWidth,o=e.offsetHeight,i={offsetX:(this.props.targetWidth-r)/2,offsetY:(this.props.targetHeight-o)/2};switch(this.props.position){case"left":i.offsetX=-r;break;case"right":i.offsetX=this.props.targetWidth;break;case"bottom":i.offsetY=this.props.targetHeight;break;default:i.offsetY=-o}i.offsetX+=null!==(t=this.props.offset.x)&&void 0!==t?t:0;i.offsetY+=null!==(n=this.props.offset.y)&&void 0!==n?n:0;this.setState(i)}};o.handleSkipTips=function(){p.Z.suppressAll()};o.getTutorialPopoutText=function(){return function(e){
|
||
var t,n,o=null!==(t={VOICE_CONVERSATIONS:{title:(0,r.jsx)("div",{className:V().voiceChannelsTitle,children:G.Z.Messages.NUF_VOICE_CHANNELS_TITLE}),body:G.Z.Messages.NUF_VOICE_CHANNELS_DESCRIPTION},WRITING_MESSAGES:{title:(0,r.jsx)("div",{className:V().writingMessagesTitle,children:G.Z.Messages.TIP_WRITING_MESSAGES_TITLE3}),body:(0,r.jsx)(z,{})},ORGANIZE_BY_TOPIC:{title:(0,r.jsx)("div",{className:V().channelsTitle,children:G.Z.Messages.NUF_CHANNELS_TITLE}),body:G.Z.Messages.NUF_CHANNELS_DESCRIPTION},WHOS_ONLINE:{title:G.Z.Messages.TIP_WHOS_ONLINE_TITLE3,body:G.Z.Messages.TIP_WHOS_ONLINE_BODY3.format()},INSTANT_INVITE:{title:G.Z.Messages.TIP_INSTANT_INVITE_TITLE3,body:(0,r.jsx)(W,{})},SERVER_SETTINGS:{title:G.Z.Messages.TIP_SERVER_SETTINGS_TITLE3,body:G.Z.Messages.TIP_SERVER_SETTINGS_BODY3.format()},DIRECT_MESSAGES:{title:G.Z.Messages.TIP_DIRECT_MESSAGES_TITLE3,body:G.Z.Messages.TIP_DIRECT_MESSAGES_BODY3.format()},CREATE_MORE_SERVERS:{title:G.Z.Messages.TIP_CREATE_MORE_SERVERS_TITLE3,
|
||
body:G.Z.Messages.TIP_CREATE_MORE_SERVERS_BODY3.format()},CREATE_FIRST_SERVER:{title:G.Z.Messages.TIP_CREATE_FIRST_SERVER_TITLE3,body:G.Z.Messages.TIP_CREATE_FIRST_SERVER_BODY3.format()},FRIENDS_LIST:{title:G.Z.Messages.TIP_FRIENDS_LIST_TITLE3,body:G.Z.Messages.TIP_FRIENDS_LIST_BODY3.format()}}[e.replace(/-/g,"_").toUpperCase()])&&void 0!==t?t:{};return{title:o.title,body:o.body,isLongText:null!==(n=o.isLongText)&&void 0!==n&&n}}(this.props.tutorialId)};o.render=function(){var e=this.props,t=e.tutorialId,n=e.autoInvert,o=e.focused,i=e.origin,l=U(t);if(null==l)return null;var u=l.media,c=l.textAlign,s=l.isLongText,f=l.highPriority,p=l.spacing,h=l.arrowAlignment,y=void 0===h?b.cy.TOP:h,v=l.popoutPosition,m=this.state,g=m.offsetX,O=m.offsetY,E={left:null!=g?i.x+g:void 0,top:null!=O?i.y+O:void 0},C=function(e){var t,n=o&&!e;return $(t={},Q().animating,n),$(t,Q().notAnimating,!n),$(t,Q().highPriority,f),t},j=this.getTutorialPopoutText();return(0,r.jsx)(b.ZP,ne(te({position:v,renderMedia:u,
|
||
textAlign:c,spacing:p,isLongText:s,uniqueId:t,autoInvert:n,arrowAlignment:y,forceTheme:K.BRd.LIGHT,onSkipAll:this.handleSkipTips,onComplete:this.handleDismiss},j),{children:function(e,t){var n,i,l,u,c=t.isShown;return(0,r.jsx)(d.P3F,ne(te({},e),{className:Q().indicator,style:E,children:(0,r.jsxs)("div",{className:a()(Q().animationContainer,C(c)),children:[(n=c,u=o&&!n,!0!==f?null:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:a()(Q().top,(i={},$(i,Q().animating,u),$(i,Q().notAnimating,!u),i))}),(0,r.jsx)("div",{className:a()(Q().bottom,(l={},$(l,Q().animating,u),$(l,Q().notAnimating,!u),l))})]})),(0,r.jsx)("div",{className:a()(Q().innerCircle,C(c))}),(0,r.jsx)("div",{className:a()(Q().outerCircle,C(c))})]})}))}}))};return n}(o.PureComponent);const ce=function(){var e=(0,f.cj)([Y.Z,y.Z,h.Z],(function(){return{indicators:Y.Z.getIndicators(),tutorialData:Y.Z.getData(),shouldShowAny:Y.Z.shouldShowAnyIndicators()&&!h.Z.hasLayers(),windowFocused:y.Z.isFocused()}
|
||
})),t=e.indicators,n=e.tutorialData,o=e.windowFocused;return e.shouldShowAny?(0,r.jsx)(r.Fragment,{children:Object.entries(t).map((function(e){var t=ie(e,2),i=t[0],a=t[1],l=n[i];u()(null!=l,"Missing tutorial definition for ".concat(i));return(0,r.jsx)(ue,te({tutorialId:i,tutorialDefinition:l,focused:o},a),i)}))}):null}},361925:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(289283),o=n(202351),i=n(744564),a=n(532548);const l=Object.freeze({"voice-conversations":{popoutOffset:{x:45,y:0}},"writing-messages":{prerequisites:["voice-conversations"],popoutOffset:{x:-36,y:0}},"direct-messages":{popoutOffset:{x:50,y:0}},"create-first-server":{popoutOffset:{x:45,y:0}},"organize-by-topic":{popoutOffset:{x:50,y:0}},"instant-invite":{prerequisites:["organize-by-topic"],popoutOffset:{x:-10,y:0}},"whos-online":{prerequisites:["instant-invite"],popoutOffset:{x:-50,y:0}},"server-settings":{prerequisites:["instant-invite"],popoutOffset:{y:32,x:0}},"friends-list":{prerequisites:["instant-invite"],
|
||
popoutOffset:{x:45,y:0}},"create-more-servers":{prerequisites:["server-settings"],popoutOffset:{x:45,y:0}}});var u=n(199790);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e){d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return d(e)}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}function h(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function y(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e,t){b=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return b(e,t)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break
|
||
}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){
|
||
var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}var O={},E={},C=!0,j={},S=!1;function I(){return l}function _(){j={};if(!C){var e=I(),t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=v(o.value,2),l=a[0],u=a[1],c=!1!==O[l];j[l]=c;if(c&&null!=u.prerequisites){var s=!0,f=!1,d=void 0;try{for(var p,h=u.prerequisites[Symbol.iterator]();!(s=(p=h.next()).done);s=!0){var y=p.value;!1===O[y]||(j[l]=!1)}}catch(e){f=!0;d=e}finally{try{s||null==h.return||h.return()}finally{if(f)throw d}}}}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&b(e,t)}(n,e);var t=g(n);function n(){s(this,n)
|
||
;return t.apply(this,arguments)}var o=n.prototype;o.initialize=function(){_();this.mustEmitChanges((function(e){return"CONNECTION_OPEN"!==e.type}));this.waitFor(a.Z)};o.shouldShow=function(e){return!(!S||C||u.a||function(e){return r.tq&&["writing-messages","organize-by-topic"].includes(e)}(e))&&(j[e]||!1)};o.shouldShowAnyIndicators=function(){return!C};o.getIndicators=function(){return E};o.getData=function(){return I()};o.getDefinition=function(e){var t=this.getData();return null!=t?t[e]:null};o.__getLocalVars=function(){return{indicators:O,activeIndicators:E,tutorialIndicatorsSuppressed:C,shouldShow:j,readyToShow:S}};return n}(o.ZP.Store);w.displayName="TutorialIndicatorStore";const x=new w(i.Z,{CONNECTION_OPEN:function(e){var t=e.tutorial;S=!0;C=!0;O={};if(null!=t){C=t.indicators_suppressed;t.indicators_confirmed.forEach((function(e){return O[e]=!1}))}_()},CONNECTION_CLOSED:function(){S=!1},TUTORIAL_INDICATOR_DISMISS:function(e){O=h(p({},O),f({},e.tutorialId,!1))
|
||
;delete(E=p({},E))[e.tutorialId];_()},TUTORIAL_INDICATOR_SHOW:function(e){E=h(p({},E),f({},e.tutorialId,e.renderData))},TUTORIAL_INDICATOR_HIDE:function(e){delete(E=p({},E))[e.tutorialId]},TUTORIAL_INDICATOR_SUPPRESS_ALL:function(){C=!0}})},944014:(e,t,n)=>{"use strict";n.d(t,{T:()=>C,Z:()=>j});var r=n(785893),o=n(667294),i=n(202351),a=n(707961),l=n(971402),u=n(285991),c=n(334835),s=n(491260),f=n(924308),d=n(762423),p=n(2590),h=n(473708),y=n(867705),b=n.n(y);function v(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,l,"next",e)}function l(e){v(i,r,o,a,l,"throw",e)}a(void 0)}))}}function g(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1
|
||
};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function C(e){var t=e.user,n=e.status,o=e.onSelect,l=e.onContextMenu,u=(0,i.e7)([s.Z],(function(){return s.Z.isMobileOnline(t.id)}));return(0,r.jsxs)(a.P3F,{className:b().listRow,onClick:function(){return o(t.id)},onContextMenu:function(e){return l(e,t)},children:[(0,r.jsx)(a.qEK,{src:t.getAvatarURL(void 0,40),"aria-label":t.username,size:a.EFr.SIZE_40,status:n,isMobile:u,className:b().listAvatar}),(0,r.jsx)(c.Z,{user:t,className:b().listName,discriminatorClass:b().listDiscriminator})]})}
|
||
function j(e){var t,c=e.user,s=e.onClose,y=function(e){s();(0,d.m)({userId:e,analyticsLocation:{section:p.jXE.USER_PROFILE_MUTUAL_FRIENDS}})},v=function(e,t){(0,l.jW)(e,m((function(){var e,o;return E(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(85572)]).then(n.bind(n,810848))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,O(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){g(e,t,n[t])}))}return e}({},e),{user:t}))}]}}))})))},j=(0,i.e7)([f.Z],(function(){return f.Z.getMutualFriends(c.id)}));o.useEffect((function(){null==j&&(0,u.Sr)(c.id)}),[j,c.id]);t=null==j?(0,r.jsx)("div",{className:b().empty,children:(0,r.jsx)(a.$jN,{})}):0===j.length?(0,r.jsxs)("div",{
|
||
className:b().empty,children:[(0,r.jsx)("div",{className:b().emptyIconFriends}),(0,r.jsx)("div",{className:b().emptyText,children:h.Z.Messages.NO_MUTUAL_FRIENDS})]}):j.map((function(e){return(0,r.jsx)(C,{user:e.user,status:e.status,onSelect:y,onContextMenu:v},e.key)}));return(0,r.jsx)(a.zJl,{className:b().listScroller,fade:!0,children:t})}},769476:(e,t,n)=>{"use strict";n.d(t,{D:()=>w,Z:()=>x});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(202351),l=n(707961),u=n(971402),c=n(735885),s=n(74535),f=n(795470),d=n(934870),p=n(124251),h=n(749565),y=n(924308),b=n(2590),v=n(473708),m=n(867705),g=n.n(m),O=n(190361),E=n.n(O);function C(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function j(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){C(i,r,o,a,l,"next",e)}function l(e){C(i,r,o,a,l,"throw",e)}a(void 0)}))}}function S(e,t,n){t in e?Object.defineProperty(e,t,{
|
||
value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var _=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,
|
||
o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function w(e){var t=e.guild,n=e.nick,o=e.theme,a=e.onSelect,u=e.onContextMenu,c=e.user,s=c.hasAvatarForGuild(t.id);return(0,r.jsxs)(l.P3F,{focusProps:{offset:{right:8}},className:g().listRow,onClick:function(){return a(t.id)},onContextMenu:function(e){return u(e,t)},children:[(0,r.jsx)(p.Z,{tabIndex:-1,guild:t,showBadge:!0,className:i()(g().listAvatar,null==t.icon?E().guildAvatarWithoutIcon:null),
|
||
badgeStrokeColor:(0,f.Lq)(o===b.BRd.DARK?b.Ilk.PRIMARY_600:b.Ilk.WHITE_500),size:p.Z.Sizes.MEDIUM,active:!0}),(0,r.jsxs)("div",{className:g().listRowContent,children:[(0,r.jsx)("div",{className:g().listName,children:t.toString()}),s||null!=n?(0,r.jsxs)("div",{className:E().guildNick,children:[s&&(0,r.jsx)(l.qEK,{src:c.getAvatarURL(t.id,16),size:l.EFr.SIZE_16,className:E().guildAvatar,"aria-hidden":!0}),null!=n?n:h.ZP.getName(c)]}):null]})]})}function x(e){var t,o=e.user,i=e.onClose,f=function(e){(0,d.X)(e);i();(0,c.xf)()},p=function(e,t){(0,u.jW)(e,j((function(){var e,o;return _(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(92224),n.e(46194),n.e(7421),n.e(86502),n.e(76003),n.e(19669),n.e(77357),n.e(9907),n.e(66240),n.e(55325)]).then(n.bind(n,166240))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,I(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){S(e,t,n[t])}))}return e}({},e),{guild:t}))}]}}))})))},h=(0,a.e7)([y.Z],(function(){return y.Z.getMutualGuilds(o.id)})),b=(0,s.ZP)();t=null==h||0===h.length?(0,r.jsxs)("div",{className:g().empty,children:[(0,r.jsx)("div",{className:g().emptyIconGuilds}),(0,r.jsx)("div",{className:g().emptyText,children:v.Z.Messages.NO_MUTUAL_GUILDS})]}):h.map((function(e){var t=e.guild,n=e.nick;return(0,r.jsx)(w,{user:o,guild:t,nick:n,theme:b,onSelect:f,onContextMenu:p},t.id)}));return(0,r.jsx)(l.zJl,{className:g().listScroller,fade:!0,children:t})}},761065:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(656645),l=n(736097),u=n(615457),c=n(473708);function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n
|
||
;return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(){var e=(0,o.e7)([l.Z],(function(){return(0,u.P)(l.Z.getInputVolume())}));return(0,r.jsx)(i.II_,{id:"input",label:c.Z.Messages.FORM_LABEL_INPUT_VOLUME,control:function(t,n){return(0,r.jsx)(i._wy,f(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){s(e,t,n[t])}))}return e
|
||
}({},t),{ref:n,value:e,onChange:function(e){return a.Z.setInputVolume((0,u.A)(e))},"aria-label":c.Z.Messages.FORM_LABEL_INPUT_VOLUME}))}})}},46106:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(656645),l=n(736097),u=n(120415),c=n(2590),s=n(473708);function f(){var e=!u.FB,t=(0,o.e7)([l.Z],(function(){return l.Z.getMode()})),n=function(e,n){return(0,r.jsx)(i.k5B,{id:e,group:"input-modes",label:n,checked:t===e,action:function(){return a.Z.setMode(e)}},e)};return[n(c.pM4.VOICE_ACTIVITY,s.Z.Messages.INPUT_MODE_VAD),n(c.pM4.PUSH_TO_TALK,e?s.Z.Messages.INPUT_MODE_PTT_LIMITED:s.Z.Messages.INPUT_MODE_PTT)]}},755380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(656645),l=n(736097),u=n(615457),c=n(120415),s=n(473708);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function p(){var e=(0,o.e7)([l.Z],(function(){return(0,u.P)(l.Z.getOutputVolume())}));return(0,r.jsx)(i.II_,{id:"output",label:s.Z.Messages.FORM_LABEL_OUTPUT_VOLUME,control:function(t,n){return(0,r.jsx)(i._wy,d(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}({},t),{ref:n,value:e,
|
||
maxValue:c.FB?200:100,onChange:function(e){return a.Z.setOutputVolume((0,u.A)(e))},"aria-label":s.Z.Messages.FORM_LABEL_OUTPUT_VOLUME}))}})}},504001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(202351),o=n(736097),i=n(630926);function a(){return(0,r.e7)([o.Z],(function(){return(0,i.Z)(o.Z)}))}},791271:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(773148),o=n(358500);function i(e,t,n){if(t.type===o.fO.ACTIVITY){var i;return null!==(i=null==n?void 0:n.name)&&void 0!==i?i:null}return r.Z.getName(e.getGuildId(),e.id,t.user)}},781295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(358500);function o(e){var t,n;return e.type!==r.fO.ACTIVITY&&((0,r._5)(e)?null!=e.streamId:null!==(n=null===(t=e.voiceState)||void 0===t?void 0:t.selfVideo)&&void 0!==n&&n)}},199047:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(496486),o=n.n(r),i=n(202351),a=n(736097),l=n(36256);function u(){var e=(0,i.cj)([a.Z],(function(){
|
||
var e,t,n=null===(t=null===(e=o()(a.Z.getVideoDevices()).values().first())||void 0===e?void 0:e.disabled)||void 0===t||t;return{enabled:a.Z.isVideoEnabled(),cameraUnavailable:n||!a.Z.supports(l.AN.VIDEO)}}));return{enabled:e.enabled,cameraUnavailable:e.cameraUnavailable}}},79987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(202351),o=n(861426),i=n(736818),a=n(736097),l=n(682776),u=n(407561),c=n(2590);function s(e){return(0,r.cj)([i.default,u.Z,a.Z,l.Z,o.Z],(function(){return function(e){var t,n=e.channel,r=e.authenticationStore,s=void 0===r?i.default:r,f=e.voiceStateStore,d=void 0===f?u.Z:f,p=e.mediaEngineStore,h=void 0===p?a.Z:p,y=e.permissionStore,b=void 0===y?l.Z:y,v=e.impersonateStore,m=void 0===v?o.Z:v,g=null!=n?d.getVoiceState(n.getGuildId(),s.getId()):null,O=h.isSelfMute()||h.isSelfMutedTemporarily(),E=null==n?void 0:n.getGuildId(),C=m.isViewingRoles(E)&&!b.can(c.Plq.SPEAK,n);return{selfMute:O,suppress:(null==g?void 0:g.suppress)||C,
|
||
mute:null!==(t=null==g?void 0:g.mute)&&void 0!==t&&t}}({channel:e,authenticationStore:i.default,voiceStateStore:u.Z,mediaEngineStore:a.Z,permissionStore:l.Z,impersonateStore:o.Z})}))}},767484:(e,t,n)=>{"use strict";n.d(t,{OV:()=>F,ZP:()=>H});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(579581),s=n(258104),f=n(61040),d=n(322422),p=n(195034),h=n(483535),y=n(92585),b=n(744564),v=n(961337),m=n(979197),g=n(930948),O=n(2590),E=function(e,t){return b.Z.wait((function(){(0,v.Cz)(e,t)}))};function C(e){var t,n=e.embedId,i=e.className,a=e.style,u=(0,l.e7)([m.Z],(function(){return m.Z.getWindow(O.KJ3.CHANNEL_CALL_POPOUT)})),c=null!==(t=null==u?void 0:u.window)&&void 0!==t?t:window,s=o.useRef(null),f=o.useMemo((function(){var e=null;return function(){null==e&&(e=c.requestAnimationFrame((function(){var t,r;E(n,null!==(r=null===(t=s.current)||void 0===t?void 0:t.getBoundingClientRect())&&void 0!==r?r:null);e=null})))}}),[n,c]);o.useEffect((function(){
|
||
c.addEventListener("resize",f);g.S.subscribe(O.CkL.REMEASURE_TARGET,f);return function(){c.removeEventListener("resize",f);g.S.unsubscribe(O.CkL.REMEASURE_TARGET,f)}}),[f,c]);o.useLayoutEffect((function(){var e=s.current;if(null!=e){var t=e.ownerDocument.defaultView;if(null!=t){f();var r=new t.ResizeObserver(f);r.observe(e);return function(){r.disconnect();E(n,null)}}}}),[n,f]);return(0,r.jsx)("div",{ref:s,style:a,className:i})}var j,S=n(391186),I=n(283133),_=n(153686),w=n(19585),x=n(28661),P=n(736818),N=n(473903),A=n(96606),T=n(72580),Z=n(773148),M=n(473708),R=n(353537),L=n.n(R);function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){
|
||
var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(e){e[e.SMALL=0]="SMALL";e[e.MEDIUM=1]="MEDIUM";e[e.LARGE=2]="LARGE"}(j||(j={}));var B=["embedded_background"];function F(e){var t=e.avatarSize,n=e.guildId,o=e.channelId,i=e.users,a=null!=t?t:u.EFr.SIZE_32,l=(0,u.pxk)(a);return(0,r.jsx)(A.Z,{size:l,guildId:n,users:i,max:4,renderUser:function(e){
|
||
if(null==e)return null;var t=Z.Z.getName(n,o,e);return(0,r.jsx)(u.DY3,{text:t,color:u.FGA.GREY,children:(0,r.jsx)("img",{src:e.getAvatarURL(n,l),alt:t,className:L().avatar},e.id)},e.id)}})}function G(e){var t,n,o,i,p=e.participants,h=e.application,y=e.currentEmbeddedApplication,b=e.channel,v=e.width,m=function(e){return e>400?j.LARGE:e>300?j.MEDIUM:j.SMALL}(v),g=U(function(e){return e>400?[u.EFr.SIZE_56,56]:e>300?[u.EFr.SIZE_32,32]:[u.EFr.SIZE_24,24]}(v),1),O=g[0],E=(0,l.Wu)([N.default,P.default],(function(){return Array.from(p).map((function(e){return P.default.getId()===e?null:N.default.getUser(e)})).filter(T.lm)})),C=(0,l.e7)([s.ZP],(function(){return s.ZP.getEmbeddedActivitiesForChannel(b.id).find((function(e){return e.application_id===h.id}))})),I=(0,w.Z)().analyticsLocations,_=(0,c.O)(),x=Z.Z.getName(b.getGuildId(),b.id,null==E?void 0:E[0]),A=(0,d.s5)({userId:null===(t=N.default.getCurrentUser())||void 0===t?void 0:t.id,activity:C,channelId:b.id,application:h
|
||
})===d.Fw.CAN_JOIN,R=null!==(n=b.getGuildId())&&void 0!==n?n:void 0;return(0,r.jsxs)("div",{className:L().splash,children:[(0,r.jsx)(F,{avatarSize:O,guildId:R,channelId:b.id,users:E}),(0,r.jsx)(u.xvT,{className:a()(L().subheader,(o={},k(o,L().small,m===j.SMALL),k(o,L().medium,m===j.MEDIUM),o)),variant:"text-sm/normal",children:E.length>1?M.Z.Messages.EMBEDDED_ACTIVITIES_USERNAME_AND_OTHERS.format({username:x,count:E.length-1}):M.Z.Messages.EMBEDDED_ACTIVITIES_IS_PLAYING.format({username:x})}),(0,r.jsx)(u.xvT,{className:a()(L().header,(i={},k(i,L().small,m===j.SMALL),k(i,L().medium,m===j.MEDIUM),i)),variant:"text-sm/normal",children:h.name}),(0,r.jsx)("div",{className:L().buttons,children:A?(0,r.jsx)(u.zxk,{onClick:function(e){e.stopPropagation();null!=C&&(0,f.Z)({activity:C,currentEmbeddedApplication:y,activityChannelId:b.id,locationObject:_.location,embeddedActivitiesManager:S.Z,analyticsLocations:I})},size:function(e){switch(e){case j.LARGE:return u.zxk.Sizes.LARGE;case j.MEDIUM:
|
||
return u.zxk.Sizes.MEDIUM;case j.SMALL:return u.zxk.Sizes.SMALL}}(m),className:L().button,color:u.zxk.Colors.PRIMARY,children:M.Z.Messages.EMBEDDED_ACTIVITIES_JOIN_ACTIVITY}):null})]})}function H(e){var t=e.participant,n=e.width,o=e.selected,i=e.interactible,a=e.channel,l=(0,w.Z)(_.Z.ACTIVITY_TILE).AnalyticsLocationProvider,u=t.id,c=(0,p.Z)(),s=(null==c?void 0:c.channelId)===a.id&&c.application_id===u,f=(0,h.Z)(),d=U((0,x.Z)([u]),1)[0],b=(0,y.Z)({applicationId:u,names:B,size:1024}).url,v=!o&&s,m=!s,g=!s&&!o;return(0,r.jsx)(l,{children:(0,r.jsx)("div",{className:L().container,children:(0,r.jsxs)(r.Fragment,{children:[v&&(0,r.jsx)(C,{className:L().iframe,embedId:(0,I.Z)(a.id,u)}),m&&null!=d&&null!=b&&""!==b?(0,r.jsx)("img",{className:L().splashImage,alt:d.name,src:b}):null,g&&null!=d&&(0,r.jsx)(G,{width:n,channel:a,participants:t.participants,application:d,currentEmbeddedApplication:f}),i||m?null:(0,r.jsx)("div",{className:L().clickShield})]})})})}},730380:(e,t,n)=>{"use strict";n.d(t,{
|
||
BP:()=>cn,ZP:()=>sn});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(336194),c=n(707961),s=n(656645),f=n(213276),d=n(28661),p=n(91036),h=n(468811),y=n.n(h),b=n(744564),v=n(316878),m=n(396043),g=n(777314),O=n(869495),E=n(285629),C=n(496486),j=n.n(C),S=n(211248),I=n.n(S),_=n(833529),w=n.n(_);function x(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function P(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){x(i,r,o,a,l,"next",e)}function l(e){x(i,r,o,a,l,"throw",e)}a(void 0)}))}}var N,A=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,
|
||
r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},T=(N=P((function(e){var t,n,r,o,i,a,l,u,c;return A(this,(function(s){switch(s.label){case 0:t=e.animationType,n=e.animationId,r=e.url,o=e.shouldResize;i=E.Jw[t];a=null!=n&&n<i.length?i[n]:(0,C.sample)(i);l=JSON.parse(JSON.stringify(a));u=l.assets[0];return o?[4,(0,E.lv)(r)]:[3,2];case 1:
|
||
c=s.sent();return[3,3];case 2:c=r;s.label=3;case 3:u.p=c;return[2,l]}}))})),function(e){return N.apply(this,arguments)});function Z(e){var t=e.containerDimensions,n=e.effect,i=e.onComplete,a=o.useRef(null);o.useEffect((function(){var e,t;(t=P((function(){var t;return A(this,(function(r){switch(r.label){case 0:return null==a.current?[3,2]:[4,T(n)];case 1:t=r.sent();(e=I().loadAnimation({container:a.current,renderer:"svg",loop:!1,autoplay:!0,animationData:t,rendererSettings:{preserveAspectRatio:"xMidYMax slice"}})).addEventListener("complete",(function(){return null==i?void 0:i(n.id)}));r.label=2;case 2:return[2]}}))})),function(){return t.apply(this,arguments)})();return function(){null==e||e.destroy()}}),[i,n]);return(0,r.jsx)("div",{className:w().effect,style:{height:t.height,width:t.width},ref:a})}var M=n(2590),R=n(383591),L=n.n(R);function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){return function(e){
|
||
if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||B(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||B(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){if(e){if("string"==typeof e)return D(e,t)
|
||
;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}function F(e){var t=e.channelId,n=e.guildId,i=e.userId,a=e.containerDimensions,u=(0,l.e7)([v.Z],(function(){return v.Z.useReducedMotion})),c=k(o.useState([]),2),s=c[0],f=c[1],d=s.length<50;o.useEffect((function(){var e=function(e){var r=e.channelId,o=e.userId,a=e.emoji,l=e.animationType,c=e.animationId;if(null==i||i===o){var s;if(!g.Z.getEnabled()||!(0,O.Z)(null!==(s=null==a?void 0:a.name)&&void 0!==s?s:"")){if(r===t&&!u&&d&&(null!=a&&null!=l&&null!=c)){var p=(0,E._r)(a),h=null!=a.id&&!a.animated,b={id:y()(),animationType:l,animationId:c,shouldResize:h,url:p,userId:o};f((function(e){return U(e).concat([b])}));m.ZP.trackWithMetadata(M.rMx.VOICE_CHANNEL_EFFECT_VIEWED,{channel_id:t,guild_id:n})}}}};b.Z.subscribe("VOICE_CHANNEL_EFFECT_SEND",e);return function(){
|
||
b.Z.unsubscribe("VOICE_CHANNEL_EFFECT_SEND",e)}}),[t,n,i,u,d]);var p=o.useCallback((function(e){f((function(t){var n=U(t),r=n.findIndex((function(t){return t.id===e}));n.splice(r,1);return n}))}),[]);return u?null:(0,r.jsx)("div",{className:L().effectsWrapper,style:{width:a.width},children:(0,r.jsx)("div",{className:L().effects,children:s.map((function(e){return(0,r.jsx)(Z,{containerDimensions:a,effect:e,onComplete:p},e.id)}))})})}var G=n(473708),H=n(690598),V=n.n(H);function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(e){var t,n=e.channelId,o=e.userId,i=z((0,l.Wu)([g.Z],(function(){return[g.Z.getWaitingHighFive(n,o),g.Z.getCompletedHighFive(n,o)]})),2),u=i[0],c=i[1];if(null!=c)t=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{alt:G.Z.Messages.CALL_HIGH_FIVE_EXCLAMATION,src:(0,E._r)({name:c[0],id:null,animated:!1}),className:a()(V().completeLeft,V().highFive)}),(0,r.jsx)("img",{alt:G.Z.Messages.CALL_HIGH_FIVE_EXCLAMATION,src:(0,E._r)({name:c[1],id:null,animated:!1}),className:a()(V().completeRight,V().highFive)})]});else{
|
||
if(null==u)return null;t=(0,r.jsx)("img",{alt:G.Z.Messages.CALL_HIGH_FIVE_EXCLAMATION,src:(0,E._r)({name:u,id:null,animated:!1}),className:a()(V().waiting,V().highFive)})}return(0,r.jsx)("div",{className:V().root,children:t})}var K=n(533293),q=n(367299),Q=n(757730),X=n(991789),J=n(69540);function $(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){$(e,t,n[t])}))}return e}function te(e){var t=e.callTileRef,n=e.isFiring,o=(0,X.Z)(),i=(0,Q.Z)(t);return null==i||null==t?null:(0,r.jsx)(K.Z,{position:{y:i.y+t.clientHeight/2,x:i.x+t.clientWidth/2},firing:n,count:4*o.count})}function ne(e){return(0,r.jsx)(q.Z,{
|
||
confettiLocation:J.Hn.CALL_TILE,children:(0,r.jsx)(te,ee({},e))})}var re=n(895462),oe=n(714602),ie=n(986279),ae=n(248088),le=n(77413),ue=n(603478),ce=n.n(ue);function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t)}(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var de=-120,pe=function(e){return"scale(".concat(1-e/de,") rotate(").concat(e,"deg)")};function he(e){var t,n=e.userId,i=e.voiceChannelEffect,u=e.onComplete,c=i.emoji,s=i.sentAt,f=(0,l.e7)([v.Z],(function(){return v.Z.useReducedMotion})),d=fe(o.useState(!0),2),p=d[0],h=d[1],y=!f,b=(0,ae.useTransition)(p,{from:{rotate:de},enter:{rotate:0},leave:{rotate:de},config:ae.config.default,immediate:f,onRest:function(e,t){"leave"===t.phase&&u()}});o.useEffect((function(){var e;Date.now()-s>=2e3?(0,ie.H)(n):e=setTimeout((function(){h(!1);y&&(0,ie.H)(n)}),y?2e3:6e3);return function(){null!=e&&clearTimeout(e)}}),[s,n,y]);return y?null:b((function(e,n){var o=e.rotate;return n&&(0,r.jsx)(ae.animated.div,{className:ce().voiceChannelEffectEmojiContainer,style:{transform:o.to(pe)},children:(0,r.jsx)(le.Z,{
|
||
className:a()(ce().voiceChannelEffectEmoji),emojiId:c.id,emojiName:c.name,animated:null!==(t=c.animated)&&void 0!==t&&t})})}))}var ye=n(736818),be=n(736097),ve=n(225253),me=n(742257),ge=n(542231),Oe=n(781736),Ee=n(308377),Ce=n(554647),je=n(425454),Se=n(186440),Ie=n(796938),_e=n(61473),we=n(791271),xe=n(767484),Pe=n(408816),Ne=n(247250),Ae=n(481008),Te=n(587683),Ze=n(774930),Me=n(257164),Re=n(246549),Le=n(544475),De=n(441143),ke=n.n(De),Ue=n(318715),Be=n(636398),Fe=n(473903),Ge=n(9134),He=n(407761),Ve=n(99452),We=n(569588),ze=n(306263),Ye=n(69660),Ke=n(652591),qe=n(203600);function Qe(e,t){var n=e.handleMouseDown,r=e.handleMouseMove,i=e.handleMouseUp,a=e.handleMouseEnter,u=o.useRef(null),c=(0,l.e7)([Ye.Z],(function(){return Ye.Z.getRTCConnection((0,ze.V9)(t))})),s=o.useCallback((function(e,t,r){u.current=Date.now();n(e,t,r)}),[n]),f=o.useCallback((function(e,t,n){i(e,t,n);if(null!=u.current){!function(e,t,n){Ke.default.track(M.rMx.PREMIUM_FEATURE_USAGE,{
|
||
feature_name:"".concat(qe.QP.SHARED_CANVAS,"_").concat(e.type),feature_tier:qe.h1.FREE,media_session_id:t.getMediaSessionId(),parent_media_session_id:t.parentMediaSessionId,guild_id:t.guildId,duration:n})}(e,c,Date.now()-u.current);u.current=null}}),[i,c]);return{handleMouseUp:f,handleMouseDown:s,handleMouseMove:r,handleMouseEnter:a}}var Xe=n(468874),Je=function(){};function $e(e,t,n){var r=o.useRef(y().v4()),i=o.useRef(Date.now()),a=o.useCallback((function(o,a){var l={x:o,y:a,deltaTime:Date.now()-i.current};(0,Xe.oW)(t,r.current,e,n,l);(0,Xe.cV)(r.current,e,n,[l])}),[t,n,e]),l=o.useCallback((function(e,t,n){r.current=y().v4();i.current=Date.now();a(t,n)}),[a]),u=o.useCallback((function(e,t,n){return a(t,n)}),[a]),c=o.useCallback((function(e,t,n){return l(e,t,n)}),[l]);return o.useMemo((function(){return{handleMouseDown:l,handleMouseMove:u,handleMouseUp:Je,handleMouseEnter:c}}),[l,c,u])}var et=n(513328),tt=n(35723);function nt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,
|
||
enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){nt(e,t,n[t])}))}return e}function ot(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var it=j().debounce(Xe.BR,tt.Fq,{maxWait:tt.Fq});function at(e){
|
||
var t=e.user,n=e.channelId,r=e.streamerId,i=e.stream,a=e.focused,l=e.canvas,u=o.useRef(!1),c=(0,Ue.ZP)([He.Z],(function(){return He.Z.getDrawMode()})),s=Qe($e(t.id,n,r),i),f=Qe(function(e,t,n){var r=o.useRef(y().v4()),i=o.useRef(new et.Xp),a=o.useCallback((function(r){r.lastUpdatedAt=Date.now();(0,Xe.gr)(r,e,n);(0,Xe.BR)(t,n,r)}),[t,n,e]),l=o.useCallback((function(o,l,u){r.current=y().v4();var c=ot(rt({},o),{id:r.current,x:l,y:u,userId:e,state:Ve.f.START,lastUpdatedAt:Date.now()});(0,Xe.BR)(t,n,c);(0,Xe.gr)(c,e,n);i.current.start(tt.FO,(function(){return a(c)}))}),[e,t,n,a]),u=o.useCallback((function(o,l,u){var c=ot(rt({},o),{id:r.current,x:l,y:u,userId:e,state:Ve.f.START,lastUpdatedAt:Date.now()});it(t,n,c);(0,Xe.gr)(c,e,n);i.current.start(tt.FO,(function(){return a(c)}))}),[e,t,n,a]),c=o.useCallback((function(o,a,l){it.cancel();(0,Xe.Df)(t,n,r.current);(0,Xe.gr)(ot(rt({},o),{id:r.current,x:a,y:l,userId:e,state:Ve.f.STOP,lastUpdatedAt:Date.now()}),e,n);i.current.stop()
|
||
}),[t,n,e]),s=o.useCallback((function(e,t,n){return u(e,t,n)}),[u]);return o.useMemo((function(){return{handleMouseDown:l,handleMouseMove:u,handleMouseUp:c,handleMouseEnter:s}}),[l,s,u,c])}(t.id,n,r),i),d=o.useCallback((function(e,t,n){if(null!=l){var r=(0,We.hn)(l,n),o=r.x,i=r.y;switch(t.type){case Ve.W.LINE:return s[e](t,o,i);case Ve.W.EMOJI_HOSE:return f[e](t,o,i)}}}),[l,s,f]),p=o.useCallback((function(e){if(a&&null!=c){e.stopPropagation();u.current=!0;d("handleMouseDown",c,e)}}),[d,c,a]),h=o.useCallback((function(e){if(a&&null!=c){e.stopPropagation();u.current&&d("handleMouseMove",c,e)}}),[d,c,a]),b=o.useCallback((function(e){if(a&&null!=c){e.stopPropagation();u.current=!1;d("handleMouseUp",c,e)}}),[d,c,a]),v=o.useCallback((function(e){u.current&&null!=c&&d("handleMouseEnter",c,e)}),[d,c]);o.useEffect((function(){var e=function(e){if(null!=c){u.current=!1;d("handleMouseUp",c,e)}};window.addEventListener("mouseup",e);return function(){return window.removeEventListener("mouseup",e)}
|
||
}),[d,c]);return{handleClick:o.useCallback((function(e){a&&null!=c&&e.stopPropagation()}),[c,a]),handleMouseDown:p,handleMouseEnter:v,handleMouseMove:h,handleMouseUp:b}}var lt=n(103245),ut=n(285704),ct=n.n(ut);function st(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ft(e){var t=e.focused,n=e.channelId,i=e.streamerId,a=e.stream,l=o.useRef(null),u=(0,Ue.ZP)([Fe.default],(function(){return Fe.default.getCurrentUser()}));ke()(null!=u,"user cannot be null");(0,lt.Z)(l,u,i,n);var c=at({user:u,channelId:n,streamerId:i,stream:a,focused:t,canvas:l.current}),s=c.handleClick,f=c.handleMouseDown,d=c.handleMouseEnter,p=c.handleMouseMove,h=c.handleMouseUp;return(0,r.jsx)(Be.Z,{children:(0,r.jsx)("canvas",{ref:l,onClick:s,onMouseDown:f,onMouseEnter:d,onMouseMove:p,onMouseUp:h,className:ct().sharedCanvas})})}function dt(e){return!Ge.Z.useExperiment({guildId:e.guildId},{autoTrackExposure:!0
|
||
}).isSharedCanvasEnabled||e.hasScreenMessage?null:(0,r.jsx)(ft,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){st(e,t,n[t])}))}return e}({},e))}var pt=n(419375),ht=n(177570),yt=n(61209),bt=n(901654),vt=n(994796),mt=n(633878);function gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ot(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Et(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Ct(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function St(e){var t=e.width,n=void 0===t?24:t,i=e.height,a=void 0===i?24:i,l=e.color,u=void 0===l?"currentColor":l,c=e.foreground,s=Ct(e,["width","height","color","foreground"]),f=jt(o.useState((function(){return y().v4()})),1)[0];return(0,r.jsxs)("svg",Et(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))))
|
||
;r.forEach((function(t){Ot(e,t,n[t])}))}return e}({},(0,mt.Z)(s)),{width:n,height:a,viewBox:"0 0 24 24",fill:"none",children:[(0,r.jsxs)("g",{clipPath:"url(".concat(f,")"),children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4.49956C2 3.39656 2.897 2.49956 4 2.49956H16.3994L2.3179 16.5811C2.11679 16.2692 2 15.8979 2 15.4996L2 4.49956ZM7.88469 19.4996H11L11 17.4996H9.88469L22 5.38426L22 15.4996C22 16.6036 21.103 17.4996 20 17.4996L13 17.4996L13 19.4996L17 19.4996L17 21.4996H7L7 20.3843L7.88469 19.4996Z",fill:u}),(0,r.jsx)("rect",{className:c,x:"1.53553",y:"20.1924",width:"28",height:"2",transform:"rotate(-45 1.53553 20.1924)",fill:"#ED4245"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:f,children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]}))}var It=n(977005),_t=n(827025),wt=n(988533),xt=n(327746),Pt=n(361584),Nt=n(167538),At=n(667286);function Tt(e){return e<=220}var Zt=n(358500),Mt=n(36256),Rt=n(754074),Lt=n.n(Rt);function Dt(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Dt(e,t,n[t])}))}return e}function Ut(e){var t=e.participant,n=e.selected,o=e.focused,i=e.idle,a=e.width,u=(0,l.e7)([ht.Z],(function(){return ht.Z.getActiveStreamForUser(t.user.id,t.stream.guildId)})),c=Tt(a);return(0,r.jsxs)(r.Fragment,{children:[n?null:(0,r.jsx)(At.Z,{participant:t}),o||null==u||u.state===M.jm8.ENDED||u.state===M.jm8.FAILED?null:(0,r.jsx)(Le.Z,{size:It.ZP.Sizes.SMALL,className:Lt().liveIndicator,participant:t,showQuality:!c&&!i,isUpsellEnabled:!1})]})}function Bt(e){var t=e.isSmall;return(0,r.jsxs)("div",{
|
||
className:a()(Lt().content,Lt().streamPreview,Lt().streamUnavailable,Dt({},Lt().small,t)),children:[(0,r.jsx)(c.xvT,{className:Lt().streamUnavailableText,color:"always-white",variant:t?"text-sm/semibold":"text-md/semibold",children:G.Z.Messages.CONSOLE_STREAM_UNAVAILABLE}),(0,r.jsx)("div",{className:Lt().darkCircle,children:(0,r.jsx)(St,{className:Lt().stopStreamIcon,foreground:Lt().stopStreamForeground})})]})}function Ft(e){var t=e.participant,n=e.selected,i=e.onVideoResize,u=e.paused,s=e.fit,f=e.inPopout,d=e.width,p=e.focused,h=be.Z.getVideoComponent(),y=(0,l.e7)([ye.default],(function(){return ye.default.getId()})),b=(0,Ze.Z)(),v=t.stream,m=t.user,g=t.streamId,O=(0,l.e7)([yt.Z],(function(){return yt.Z.getChannel(v.channelId)})),E=(0,l.e7)([ht.Z],(function(){return ht.Z.getActiveStreamForUser(m.id,v.guildId)}),[m.id,v.guildId]),C=(0,l.e7)([ht.Z],(function(){return ht.Z.getAllActiveStreams().length>0})),j=(0,l.e7)([bt.Z],(function(){return bt.Z.isFocused()
|
||
})),S=(null==E?void 0:E.ownerId)===y,I=S&&!j&&!f,_=null!=E?(0,Me.Z)(E,m,m.id===y,I):null,w=d<195;o.useEffect((function(){if(!C&&(null==O?void 0:O.isGuildStageVoice())&&!S){(0,Ae.rn)(v);Ne.Z.updateStageStreamSize(v.channelId,!1)}}),[]);return b?(0,r.jsx)(Bt,{isSmall:w}):(null==E?void 0:E.state)===M.jm8.ENDED?(0,r.jsx)(xt.Z,{selected:n,stream:E,width:d}):(null==E?void 0:E.state)===M.jm8.FAILED?(0,r.jsx)(Pt.Z,{selected:n,stream:E,width:d}):t.type===Zt.fO.HIDDEN_STREAM?(0,r.jsx)(Nt.Z,{selected:n,participant:t,width:d}):null!=E&&!n&&null!=h&&be.Z.supports(Mt.AN.VIDEO)?(0,r.jsxs)(r.Fragment,{children:[null!=O?(0,r.jsx)(dt,{focused:p,channelId:O.id,guildId:O.guild_id,streamerId:m.id,hasScreenMessage:null!=_,stream:v}):null,(0,r.jsx)(ve.Z,{onResize:i,wrapperClassName:Lt().videoWrapper,className:Lt().content,streamId:g,videoComponent:h,fit:s,paused:u||I,videoSpinnerContext:S?Te.m.SELF_STREAM:Te.m.REMOTE_STREAM,userId:m.id}),null!=_?(0,r.jsx)(pt.Z,kt({size:(0,wt.L)(d)},_)):null]}):(0,
|
||
r.jsxs)("div",{className:a()(Lt().content,Lt().streamPreview,Dt({},Lt().small,w)),children:[(0,r.jsx)(Re.Z,{noText:!0,className:a()(Lt().absoluteFill,Dt({},Lt().streamPreviewOpacity,null==E)),stream:t.stream}),n?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_t.a,{isSmall:w,children:(0,r.jsx)(c.xvT,{variant:w?"text-sm/semibold":"text-md/semibold",color:"none",children:d<175?G.Z.Messages.WATCH:G.Z.Messages.WATCH_STREAM})}),C?(0,r.jsx)(_t.a,{className:Lt().addCTA,tooltip:G.Z.Messages.STREAM_WATCH_MULTIPLE_TOOLTIP,onClick:function(e){e.stopPropagation();(0,Ae.rn)(v,{forceMultiple:!0})},isSmall:w,children:(0,r.jsx)(vt.Z,{className:Lt().addStreamIcon})}):null]})]})}var Gt=n(80317),Ht=n(995141),Vt=n(566706),Wt=n(979197),zt=n(68392),Yt=n(775173),Kt=n(773148),qt=n(781295);function Qt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var Xt=c.EFr.SIZE_80,Jt=c.EFr.SIZE_40;function $t(e){
|
||
var t=e.participant,n=e.channel,i=e.inCall,u=e.width,s=e.paused,f=e.selected,d=e.fit,h=e.onVideoResize,y=e.blocked,b=e.noVideoRender,m=void 0!==b&&b,g=e.pulseSpeakingIndicator,O=void 0!==g&&g,E=be.Z.getVideoComponent(),C=(0,l.e7)([ye.default],(function(){return ye.default.getId()})),j=(0,l.e7)([v.Z],(function(){return v.Z.useReducedMotion})),S=t.user,I=t.streamId,_=t.speaking,w=S.id===C,x=(0,qt.Z)(t),P=(0,l.e7)([bt.Z],(function(){return bt.Z.isFocused()})),N=(0,l.e7)([Wt.Z],(function(){return Wt.Z.getWindowFocused(M.KJ3.CHANNEL_CALL_POPOUT)})),A=(0,l.e7)([be.Z],(function(){return null!=S.id&&be.Z.isLocalVideoDisabled(S.id,(0,p.Z)(t.type))}),[S.id,t.type]),T=Kt.Z.getName(n.getGuildId(),n.id,S),Z=u<124,R=(0,Gt.U)().canUseAvatarDecorations,L=(0,l.e7)([Vt.Z],(function(){return Vt.Z.getSelectedParticipant(n.id)}));o.useEffect((function(){n.isGuildStageVoice()&&!x&&(null==L?void 0:L.id)===S.id&&Ne.Z.selectParticipant(n.id,null)}),[x])
|
||
;if(i&&!A&&!m&&x&&!f&&null!=E&&be.Z.supports(Mt.AN.VIDEO))return(0,r.jsx)(ve.Z,{onResize:h,wrapperClassName:Lt().videoWrapper,className:Lt().content,mirror:w,streamId:I,videoComponent:E,fit:d,paused:s,videoSpinnerContext:S.id===C?Te.m.SELF_VIDEO:Te.m.REMOTE_VIDEO,userId:S.id});var D=!j&&_&&(N||P),k=Z?Jt:Xt,U=R?(0,Yt.NZ)({userId:S.id,avatarDecoration:S.avatarDecoration,size:(0,Ht.y)(k),canAnimate:D}):null;return(0,r.jsx)("div",{className:a()(Lt().content,Qt({},Lt().blockedAvatar,y)),children:(0,r.jsx)(zt.Z,{"aria-label":T,src:S.getAvatarURL(n.guild_id,(0,c.pxk)(Z?Jt:Xt),D),avatarDecoration:U,backgroundSrc:S.getAvatarURL(n.guild_id,80),size:k,pulseSpeakingIndicator:O,speaking:_})})}function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function nn(e){for(var t=1;t<arguments.length;t++){
|
||
var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){tn(e,t,n[t])}))}return e}function rn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function on(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e)
|
||
;for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function an(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return en(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return en(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
var ln=o.memo((function(e){var t,n,i,u=e.participant,h=e.onDoubleClick,y=e.onContextMenu,b=e.onClick,v=e.onMouseDown,m=e.onKeyDown,O=e.className,E=e.style,C=e.channel,j=e.width,S=e.inPopout,I=e.onVideoResize,_=e.inCall,w=void 0!==_&&_,x=e.selected,P=void 0!==x&&x,N=e.noBorder,A=void 0!==N&&N,T=e.noVideoRender,Z=void 0!==T&&T,R=e.focused,L=void 0!==R&&R,D=e.blocked,k=void 0!==D&&D,U=e.fit,B=void 0===U?ve.L.CONTAIN:U,H=e.paused,V=void 0!==H&&H,W=e.pulseSpeakingIndicator,z=void 0!==W&&W,K=o.useContext(oe.h9),q=an(o.useState(!1),2),Q=q[0],X=q[1],$=(0,l.e7)([ye.default],(function(){return ye.default.getId()})),ee=u.type===Zt.fO.ACTIVITY?null:null===(t=u.user)||void 0===t?void 0:t.id,te=an((0,d.Z)(u.type===Zt.fO.ACTIVITY?[u.id]:[]),1)[0],ae=(0,l.e7)([g.Z],(function(){return g.Z.getEnabled()})),le=(0,l.e7)([be.Z],(function(){return null!=ee&&be.Z.isLocalVideoDisabled(ee,(0,p.Z)(u.type))}),[ee,u.type]),ue=function(e,t){var n,r,o=null,i=null,a=null,l=!1,u=!1;switch(e.type){case Zt.fO.ACTIVITY:
|
||
break;case Zt.fO.USER:o=e.streamId;a=e.voiceState;l=e.speaking;u=e.ringing;break;case Zt.fO.STREAM:o=e.streamId;i=e.stream}return{streamId:o,stream:i,speaking:l,ringing:u,muted:null!==(n=null==a?void 0:a.isVoiceMuted())&&void 0!==n&&n,deafen:null!==(r=null==a?void 0:a.isVoiceDeafened())&&void 0!==r&&r,mirror:e.type===Zt.fO.USER&&e.user.id===t,hasVideo:(0,qt.Z)(e)}}(u,$),ce=ue.speaking,se=ue.muted,fe=ue.deafen,de=ue.ringing,pe=ue.hasVideo,me=(0,l.e7)([be.Z],(function(){return null!=ee&&be.Z.isLocalMute(ee,(0,p.Z)(u.type))}),[ee,u.type]),Oe=u.type===Zt.fO.STREAM&&ee===$,Ee=(0,l.e7)([ie.Z],(function(){return null!=ee?ie.Z.getEffectForUserId(ee):null}));o.useEffect((function(){X(L)}),[L]);var Ce=o.useCallback((function(){null!=ee&&s.Z.toggleLocalMute(ee,Mt.Yn.STREAM)}),[ee]),je=o.useCallback((function(e){null==b||b(u,e)}),[b,u]),Se=o.useCallback((function(e){null==h||h(u,e)}),[h,u]),Ie=o.useCallback((function(e){null==y||y(u,e)}),[y,u]),_e=null,Ne=null,Ae="";switch(u.type){
|
||
case Zt.fO.STREAM:_e=(0,r.jsx)(Ft,{participant:u,selected:P,width:j,fit:B,onVideoResize:I,paused:V,inPopout:S,focused:L});Ne=(0,r.jsx)(Ut,{participant:u,selected:P,width:j,focused:L,idle:K});Ae=G.Z.Messages.CALL_TILE_A11Y_LABEL_STREAM.format({streamerName:u.user.username});break;case Zt.fO.USER:_e=(0,r.jsx)($t,{channel:C,inCall:w,participant:u,fit:B,onVideoResize:I,paused:V,selected:P,width:j,blocked:k,noVideoRender:Z,pulseSpeakingIndicator:z});Ae=G.Z.Messages.CALL_TILE_A11Y_LABEL_USER.format({username:u.user.username});break;case Zt.fO.ACTIVITY:_e=(0,r.jsx)(xe.ZP,{interactible:L,participant:u,selected:P,channel:C,width:j});Ae=G.Z.Messages.CALL_TILE_A11Y_LABEL_ACTIVITY.format({activityName:null==te?void 0:te.name});break;case Zt.fO.HIDDEN_STREAM:_e=(0,r.jsx)(Ft,{participant:u,selected:P,width:j,fit:B,onVideoResize:I,paused:V,inPopout:S,focused:L})}var Te,Ze,Me,Re,Le=o.useRef(null);return(0,r.jsx)(f.Z,{section:M.jXE.VOICE_CHANNEL_TILE,children:(0,r.jsx)("div",{
|
||
className:a()(Lt().wrapper,tn({},Lt().ringing,de),O),children:(0,r.jsxs)(re.Z,{shakeLocation:J.oZ.VOICE_USER,isShaking:ce,className:Lt().tile,children:[(0,r.jsx)(Pe.Z,{ref:Le,className:a()(Lt().tile,(Me={},tn(Me,Lt().noBorder,A),tn(Me,Lt().noInteraction,null==b),tn(Me,Lt().idle,K),Me)),noBorder:A,style:E,participantUserId:ee,children:(0,r.jsxs)(c.kL8,{"aria-label":Ae,className:Lt().tileChild,onDoubleClick:Se,onContextMenu:Ie,onClick:je,onMouseDown:v,onKeyDown:m,focusProps:{offset:1},children:[u.type===Zt.fO.USER&&null!=ee&&null!=Ee?(0,r.jsx)(he,{voiceChannelEffect:Ee,onComplete:function(){return(0,ie.H)(ee)},userId:ee}):null,u.type===Zt.fO.USER?(0,r.jsx)("div",{className:Lt().voiceChannelEffectsContainer,children:(0,r.jsx)(F,{userId:ee,channelId:C.id,guildId:C.getGuildId(),containerDimensions:{width:null!==(Te=null==Le||null===(n=Le.current)||void 0===n?void 0:n.clientWidth)&&void 0!==Te?Te:0,
|
||
height:null!==(Ze=null==Le||null===(i=Le.current)||void 0===i?void 0:i.clientHeight)&&void 0!==Ze?Ze:0}})}):null,_e,A?null:(0,r.jsx)("div",{className:Lt().indicators,children:Ne}),P?(0,r.jsx)("div",{className:Lt().selectedScreen,children:(0,r.jsx)(ge.Z,{className:Lt().selectedIcon})}):null,u.type!==Zt.fO.ACTIVITY?(0,r.jsx)(un,{focused:L,width:j,inCall:w,participantType:u.type,hasVideo:null!=pe&&pe,muted:se,deafen:fe,idle:K,title:(0,we.Z)(C,u),blocked:k,localMute:me,localVideoDisabled:le,hideAudioIcon:Oe,onContextMenu:Ie,onToggleMute:Ce,participantUserId:ee}):null,u.type===Zt.fO.USER&&ae?(0,r.jsx)(Y,{userId:u.id,channelId:C.id}):null,w&&!A?(0,r.jsx)("div",{className:a()(Lt().border,(Re={},tn(Re,Lt().voiceChannelEffect,!L&&null!=Ee),tn(Re,Lt().speaking,ce&&!L),Re))}):null]})}),(0,r.jsx)(ne,{isFiring:Q,callTileRef:Le.current})]})})})}));ln.displayName="CallTile";var un=o.memo((function(e){
|
||
var t=e.muted,n=e.deafen,o=e.idle,i=e.title,s=e.width,f=e.hasVideo,d=e.inCall,h=e.localMute,y=e.localVideoDisabled,b=e.focused,v=e.blocked,m=e.hideAudioIcon,g=e.participantType,O=e.participantUserId,E=e.onContextMenu,C=e.onToggleMute,j=null,S=null,I=null,_=Tt(s),w=function(e){return e<=124}(s),x=(0,l.e7)([be.Z],(function(){return null!=O&&be.Z.isLocalVideoAutoDisabled(O,(0,p.Z)(g))}),[O,g]);if(!m)if(n||t||h){var P=n?Ee.Z:Ce.Z;j=(0,r.jsx)(P,{foreground:a()(tn({},Lt().localMuteStrikethrough,h&&!n)),className:Lt().status});if(h&&g===Zt.fO.STREAM&&f&&!b){j=(0,r.jsx)(c.ua7,{text:G.Z.Messages.UNMUTE,children:function(e){var t=e.onClick,n=on(e,["onClick"]);return(0,r.jsx)(c.P3F,rn(nn({},n),{onClick:function(e){e.stopPropagation();null==t||t();C()},className:a()(Lt().status,Lt().interactive),children:(0,r.jsx)(_e.Z,{})}))}})}}else if(!h&&g===Zt.fO.STREAM&&f&&!_&&!b){j=(0,r.jsx)(c.ua7,{text:G.Z.Messages.MUTE,children:function(e){var t=e.onClick,n=on(e,["onClick"]);return(0,
|
||
r.jsx)(c.P3F,rn(nn({},n),{onClick:function(e){e.stopPropagation();null==t||t();C()},className:a()(Lt().status,Lt().interactive,Lt().toggleMute),children:(0,r.jsx)(Ie.Z,{})}))}})}d&&be.Z.supports(Mt.AN.VIDEO)||!f?d&&f&&y&&!x&&(S=(0,r.jsx)(Oe.Z,{className:Lt().status,foreground:Lt().localMuteStrikethrough})):S=(0,r.jsx)(ge.Z,{className:Lt().status});if(g===Zt.fO.STREAM&&!b&&f){I=(0,r.jsx)(c.ua7,{text:G.Z.Messages.OPTIONS,children:function(e){var t=e.onClick,n=on(e,["onClick"]);return(0,r.jsx)(c.P3F,rn(nn({},n),{onClick:function(e){e.stopPropagation();null==t||t();E(e)},className:a()(Lt().status,Lt().interactive),children:(0,r.jsx)(Se.Z,{})}))}})}return(0,r.jsxs)("div",{className:Lt().overlayContainer,children:[(0,r.jsx)("div",{className:a()(Lt().overlayTop,tn({},Lt().small,s<195)),children:x?o?(0,r.jsx)(Oe.Z,{className:Lt().status}):(0,r.jsxs)("div",{className:a()(Lt().overlayTitle,Lt().videoDisabledTitle),children:[(0,r.jsx)(Oe.Z,{className:Lt().status}),(0,r.jsx)(c.xvT,{
|
||
variant:"text-sm/normal",className:Lt().overlayTitleText,children:G.Z.Messages.UNSTABLE_CONNECTION})]}):null}),(0,r.jsxs)("div",{className:a()(Lt().overlayBottom,tn({},Lt().small,s<195)),children:[w?(0,r.jsx)("div",{}):(0,r.jsxs)(c.xvT,{className:a()(Lt().overlayTitle,tn({},Lt().idle,o)),color:"none",variant:"text-md/normal",children:[v?(0,r.jsx)("div",{className:Lt().blocked,children:(0,r.jsx)(me.Z,{className:Lt().blockedIcon,color:u.Z.unsafe_rawColors.RED_400.css})}):null,g===Zt.fO.STREAM&&(0,r.jsx)(je.Z,{className:Lt().titleIcon}),null!=i&&""!==i?(0,r.jsx)("span",{className:Lt().overlayTitleText,children:i}):null]}),(0,r.jsxs)("div",{className:Lt().statusContainer,children:[S,j,I]})]})]})}));un.displayName="CallTileOverlay";var cn=ve.L;const sn=ln},270662:(e,t,n)=>{"use strict";n.d(t,{NZ:()=>Mt,ZP:()=>kt,r:()=>Zt})
|
||
;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(248088),s=n(202351),f=n(707961),d=n(656645),p=n(842629),h=n(481008),y=n(213276),b=n(26468),v=n(859853),m=n(258104),g=n(555086),O=n(153686),E=n(19585),C=n(566706),j=n(400572),S=n(666305),I=n(496388),_=n(668269),w=n(958481),x=n(409125),P=n(122590),N=n(306263),A=n(866926),T=n(371607),Z=n(201441),M=n(575907),R=n(732068),L=n(61209),D=n(419348),k=n(127661),U=n(382840),B=n(242735),F=n(877116),G=n(852221),H=n(473708),V=n(874721),W=n.n(V);function z(e){var t=e.guildId,n=e.channelId,o=e.onClick,i=(0,b.bp)(),a=(0,Z.qY)(n),l=(0,s.e7)([L.Z],(function(){return L.Z.getChannel(n)}),[n]),u=(0,G.o)(t,l);if(null==a)return null;var c=function(){null!=l&&(0,F.Z)(l)?(0,U.lC)(l,i):o()},d=function(){B.Z.endEvent(a.id,a.guild_id)};return u?(0,r.jsx)(f.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(M.Z,{children:(0,r.jsx)(f.v2r,{navId:"exit-options",onSelect:function(){},"aria-label":H.Z.Messages.DISCONNECT_MENU,
|
||
onClose:t,children:(0,r.jsx)(f.sNh,{id:"end-voice-event",color:"danger",action:d,label:H.Z.Messages.END_EVENT,icon:k.Z})})})},align:"center",position:"top",animation:f.yRy.Animation.FADE,children:function(e){var t=e.onClick;return(0,r.jsx)(R.d,{label:H.Z.Messages.DISCONNECT_SELF,color:"red",iconComponent:D.Z,onClick:c,onPopoutClick:t,className:W().buttonSpacing})}}):(0,r.jsx)(R.d,{className:W().buttonSpacing,label:H.Z.Messages.DISCONNECT_SELF,color:"red",iconComponent:D.Z,onClick:o})}var Y=n(311569),K=n(636398),q=n(997244),Q=n(189865);function X(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function J(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}
|
||
return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function $(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ee(e){var t=e.channel,n=$(e,["channel"]);return(0,r.jsx)(R.d,J(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){X(e,t,n[t])}))}return e}({},n),{iconComponent:Q.Z,label:H.Z.Messages.DISMISS,onClick:function(){return q.Z.stopRinging(t.id)}}))}
|
||
var te=n(731209),ne=n(111441),re=n(8464),oe=n(65200),ie=n(524538),ae=n(235606);function le(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ue(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ce(e){var t=e.hasPermission,n=e.centerButton,o=void 0!==n&&n,i=ue(e,["hasPermission","centerButton"]),a=o?R.d:R.Z,l=t?H.Z.Messages.SHARE_YOUR_SCREEN:H.Z.Messages.ACTIVITY_PANEL_GO_LIVE_TOOLTIP_NO_PERMISSION_IN_VOICE;return(0,r.jsx)(a,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){le(e,t,n[t])}))}return e}({label:l,disabled:!t,iconComponent:ae.Z},i))}var se=n(759864),fe=n(177570),de=n(610773),pe=n(736097),he=n(715107),ye=n(473903),be=n(563135),ve=n(199047),me=n(708258),ge=n(259099),Oe=n(79987),Ee=n(418705),Ce=n(579581),je=(0,n(260561).B)({kind:"user",id:"2022-12_activities_auto_suggest",label:"Activities Auto Suggest",defaultConfig:{enableCenterControlTrayMiniShelf:!1},treatments:[{id:1,label:"Enable VC Activities Mini Shelf",config:{enableCenterControlTrayMiniShelf:!0}}]});var Se=n(22664),Ie=n(59732),_e=n(436771),we=n(468811),xe=n.n(we),Pe=n(316878),Ne=n(136317),Ae=n(108206),Te=n(652591),Ze=n(417290),Me=n(238852);function Re(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Le(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}const De=function(e){return(0,r.jsxs)("svg",Le(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){Re(e,t,n[t])}))}return e}({viewBox:"0 0 500 350",xmlns:"http://www.w3.org/2000/svg"},e),{children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"linear-gradient",x1:137.05,y1:259.98,x2:172.2,y2:237.66,
|
||
gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:0,stopColor:"#ffe75c"}),(0,r.jsx)("stop",{offset:1,stopColor:"#ff8c19"})]}),(0,r.jsxs)("linearGradient",{id:"linear-gradient-2",x1:146.1,y1:114.65,x2:204.28,y2:84.63,gradientTransform:"matrix(-.99 .13 .13 .99 416 -12.92)",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:0,stopColor:"#7196ff"}),(0,r.jsx)("stop",{offset:.2,stopColor:"#6990fc"}),(0,r.jsx)("stop",{offset:.49,stopColor:"#547ff4"}),(0,r.jsx)("stop",{offset:.67,stopColor:"#4572ee"})]}),(0,r.jsxs)("linearGradient",{id:"linear-gradient-3",x1:167.18,y1:156.28,x2:118.66,y2:238.11,gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:0,stopColor:"#ff8c19"}),(0,r.jsx)("stop",{offset:.55,stopColor:"#ffe75c"})]}),(0,r.jsxs)("linearGradient",{id:"linear-gradient-4",x1:125.79,y1:287.01,x2:241.87,y2:290.82,gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:.45,stopColor:"#ffe75c"}),(0,r.jsx)("stop",{offset:.95,
|
||
stopColor:"#ff8c19"})]}),(0,r.jsxs)("linearGradient",{id:"linear-gradient-5",x1:323.47,y1:303.47,x2:284.74,y2:147.93,gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:.08,stopColor:"#717f8e"}),(0,r.jsx)("stop",{offset:1,stopColor:"#d3d7db"})]}),(0,r.jsxs)("linearGradient",{id:"linear-gradient-6",x1:211.38,y1:109.6,x2:273.39,y2:77.6,gradientTransform:"matrix(-.8 .6 .6 .8 325.62 -103.19)",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:.32,stopColor:"#7196ff"}),(0,r.jsx)("stop",{offset:.43,stopColor:"#6a90fc"}),(0,r.jsx)("stop",{offset:.74,stopColor:"#5b84f6"}),(0,r.jsx)("stop",{offset:1,stopColor:"#5680f4"})]}),(0,r.jsxs)("linearGradient",{id:"linear-gradient-7",x1:-96.32,y1:138.47,x2:-101.4,y2:109.82,gradientTransform:"scale(-1 1) rotate(14.5 27.61 -552.62)",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:0,stopColor:"#4572ee"}),(0,r.jsx)("stop",{offset:1,stopColor:"#7196ff"})]}),(0,r.jsx)("linearGradient",{id:"linear-gradient-8",
|
||
x1:-39.5,y1:59.37,x2:-44.66,y2:30.24,gradientTransform:"matrix(-.98 .17 .17 .98 119.49 49.25)",xlinkHref:"#linear-gradient-7"}),(0,r.jsxs)("linearGradient",{id:"linear-gradient-9",x1:299.25,y1:167.71,x2:244.21,y2:161.69,gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:.32,stopColor:"#4572f0"}),(0,r.jsx)("stop",{offset:.52,stopColor:"#4d79f3"}),(0,r.jsx)("stop",{offset:.84,stopColor:"#638bfa"}),(0,r.jsx)("stop",{offset:1,stopColor:"#7196ff"})]}),(0,r.jsxs)("linearGradient",{id:"linear-gradient-10",x1:423.96,y1:48.35,x2:363.72,y2:139.3,gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:.45,stopColor:"#ffe75c"}),(0,r.jsx)("stop",{offset:1,stopColor:"#ff8c19"})]}),(0,r.jsx)("style",{children:".cls-3{fill:#ff78b9}.cls-6{fill:#ed5f00}.cls-12{fill:#7196ff}.cls-16{fill:#b6cbff}.cls-18{fill:#7fa0ff}.cls-21{fill:#5783ff}.cls-24{fill:#8e99a5}"})]}),(0,r.jsx)("path",{
|
||
d:"M391.43 240.7a19.35 19.35 0 0 1-8.76-13.59l-1.46-9.49a1 1 0 0 0-.31-.59.85.85 0 0 0-1.24 0 1 1 0 0 0-.31.59l-1.45 9.49a19.66 19.66 0 0 1-8.76 13.59l-1.26.79a.92.92 0 0 0-.3.35.9.9 0 0 0-.1.45.87.87 0 0 0 .1.45.92.92 0 0 0 .3.35l1.26.79a19.71 19.71 0 0 1 8.76 13.6l1.45 9.48a1 1 0 0 0 .32.57 1 1 0 0 0 1.23 0 .93.93 0 0 0 .31-.57l1.46-9.48a19.34 19.34 0 0 1 8.76-13.6l1.26-.79a1 1 0 0 0 .3-.35 1 1 0 0 0 .1-.45 1 1 0 0 0-.4-.8Z",style:{fill:"#57f287"}}),(0,r.jsx)("path",{d:"M79.4 119.28a19.34 19.34 0 0 1-8.76-13.6l-1.46-9.48a1 1 0 0 0-.31-.6.87.87 0 0 0-1.24 0 1.06 1.06 0 0 0-.31.6l-1.45 9.48a19.71 19.71 0 0 1-8.76 13.6l-1.26.79a.92.92 0 0 0-.3.35.87.87 0 0 0-.1.45.9.9 0 0 0 .1.45.83.83 0 0 0 .3.34l1.26.8a19.66 19.66 0 0 1 8.76 13.59l1.45 9.48a1 1 0 0 0 .32.58 1 1 0 0 0 1.23 0 .92.92 0 0 0 .31-.58l1.46-9.48a19.49 19.49 0 0 1 2.89-7.75 19.24 19.24 0 0 1 5.87-5.84l1.26-.8a.83.83 0 0 0 .3-.34 1 1 0 0 0 .1-.45 1 1 0 0 0-.1-.45.92.92 0 0 0-.3-.35Z",style:{fill:"#8cd9ff"}}),(0,r.jsx)("path",{
|
||
className:"cls-3",d:"M424.29 277.52a13.59 13.59 0 0 1-4.15-4.12 13.85 13.85 0 0 1-2-5.48l-1-6.69a.66.66 0 0 0-1.31 0l-1 6.69a13.88 13.88 0 0 1-6.18 9.6l-.9.56a.72.72 0 0 0-.21.25.71.71 0 0 0-.07.32.68.68 0 0 0 .28.56l.9.56a13.88 13.88 0 0 1 6.18 9.6l1 6.7a.64.64 0 0 0 .22.4.67.67 0 0 0 .87 0 .64.64 0 0 0 .22-.4l1-6.7a13.85 13.85 0 0 1 2-5.48 13.7 13.7 0 0 1 4.15-4.12l.89-.56a.68.68 0 0 0 .28-.56.71.71 0 0 0-.07-.32.72.72 0 0 0-.21-.25ZM312.67 50.64a13.7 13.7 0 0 1-4.14-4.13 13.46 13.46 0 0 1-2-5.47l-1-6.7a.75.75 0 0 0-.22-.42.6.6 0 0 0-.88 0 .69.69 0 0 0-.22.42l-1 6.7a13.84 13.84 0 0 1-6.18 9.6l-.89.56a.69.69 0 0 0-.21.24.77.77 0 0 0 0 .64.61.61 0 0 0 .21.24l.89.57a13.79 13.79 0 0 1 6.18 9.6l1 6.69a.73.73 0 0 0 .23.41.69.69 0 0 0 .86 0 .73.73 0 0 0 .23-.41l1-6.69a13.65 13.65 0 0 1 6.18-9.6l.89-.57a.61.61 0 0 0 .21-.24.77.77 0 0 0 0-.64.69.69 0 0 0-.21-.24Z"}),(0,r.jsx)("path",{
|
||
d:"M117 223.15s27.1-4.4 40.07 12.51 18.76 54.19-27.79 56.74c0 0 6.25-3.94 7.41-14.82 0 0-26.64 26.86-60.68 6.25 0 0 9-4.56 16.68-29.87C99.58 231.38 127 233.8 127 233.8s-2.6-5.55-10-10.65Z",style:{fill:"#eb459f"}}),(0,r.jsx)("path",{className:"cls-3",d:"M126.3 258.49s21.35-38.36 36.1-21.1c12.3 14.39 1.6 29.8-36.1 21.1Z"}),(0,r.jsx)("path",{d:"M140.49 210.84a39.73 39.73 0 0 1 36.29 70.69l-.24.12L140.25 211Z",style:{fill:"url(#linear-gradient)"}}),(0,r.jsx)("path",{className:"cls-6",d:"M185.46 233.56a1.25 1.25 0 1 0-1.08-2.25l-27 13 1.14 2.22ZM146.66 223.45c7.56-2.8 21.64-6.61 35.13-2.62a1.25 1.25 0 0 0 .71-2.4c-14.5-4.28-29.23-.2-37 2.75ZM193.82 240.23a1.25 1.25 0 0 0-2.41-.69c-4 14-15.42 24.07-21.73 28.74l1.17 2.28c6.51-4.72 18.63-15.19 22.97-30.33Z"}),(0,r.jsx)("path",{d:"M272.84 128.72c7.42.14 15.65-.7 25.48-1.7a9.76 9.76 0 1 0-2-19.41c-16.47 1.68-25.41 2.46-32.79.33-7.11-2-14.09-7.29-25.76-19.35a9.76 9.76 0 1 0-14 13.57c12.12 12.52 22.1 21 34.38 24.53a56.21 56.21 0 0 0 14.69 2.03Z",
|
||
style:{fill:"url(#linear-gradient-2)"}}),(0,r.jsx)("path",{d:"M213.51 175.69 180.61 154a69.42 69.42 0 0 0-48.86-10.64l-14 2.17a4.88 4.88 0 0 0-2.09 8.78l51.53 36.94Z",style:{fill:"url(#linear-gradient-3)"}}),(0,r.jsx)("path",{d:"M247.56 242 246 281.4a69.31 69.31 0 0 1-19.83 45.9l-9.9 10.08a4.88 4.88 0 0 1-8.35-3.42v-63.41Z",style:{fill:"url(#linear-gradient-4)"}}),(0,r.jsx)("path",{d:"m195.12 271.32-35.64-69.44a6.69 6.69 0 0 1 2.89-9l172.52-88.56s35.91-16.82 74.81 4.87a13 13 0 0 1 6.63 12.81c-4.86 41.79-39.68 63.62-39.68 63.62l-172.52 88.6a6.69 6.69 0 0 1-9.01-2.9Z",style:{fill:"url(#linear-gradient-5)"}}),(0,r.jsx)("circle",{cx:311.18,cy:167.88,r:30.46}),(0,r.jsx)("path",{className:"cls-6",d:"M311.22 200.86a33 33 0 1 1 15-3.66 33 33 0 0 1-15 3.66Zm-.09-60.94a28 28 0 1 0 24.93 15.19 27.82 27.82 0 0 0-24.93-15.19Z"}),(0,r.jsx)("path",{
|
||
d:"M213.42 126c7-3.71 14.22-8.75 22.86-14.78a10.4 10.4 0 1 0-11.9-17C209.9 104.24 202 109.6 194 111.44c-7.69 1.78-16.91.51-34-4.69a10.4 10.4 0 0 0-6 19.9c17.77 5.4 31.46 8.12 44.74 5a59.84 59.84 0 0 0 14.68-5.65Z",style:{fill:"url(#linear-gradient-6)"}}),(0,r.jsx)("path",{className:"cls-12",d:"M261.69 121.31c-2.89-11.31-5-17.25-13.46-28.37l-46.85 10.53c-1.67 25.92-6.72 34.81-5.67 43.93.83 7.25 8.38 18.18 23 18.42s21.94-9 32.9-16.55 12.55-18.27 10.08-27.96Z"}),(0,r.jsx)("path",{d:"M192.19 32.35c-12.59 2.17-3 15.4.4 18l29.55-7.24c-18.83-1.33-20.14-12.46-29.95-10.76Z",style:{fill:"#55ef84"}}),(0,r.jsx)("path",{d:"M205.44 47.31a1.23 1.23 0 0 1-.9-.38c-.14-.15-15-15.27-25.26-12.12a1.25 1.25 0 1 1-.73-2.39c11.73-3.59 27.14 12.1 27.79 12.77a1.25 1.25 0 0 1 0 1.77 1.27 1.27 0 0 1-.9.35Z"}),(0,r.jsx)("path",{d:"M230.71 38.82c8.19-3.11 15.33-22.12 1.67-26.55a15.5 15.5 0 0 0-8.25-.24c-22.91 5.18-6.34 30.84-25.54 35.31Z",style:{fill:"#47c26e"}}),(0,r.jsx)("path",{
|
||
d:"M217.22 46.26a1.26 1.26 0 0 1-1.12-.7 1.24 1.24 0 0 1 .56-1.67c10.32-5.15 10.89-20.58 10.89-20.74a1.23 1.23 0 0 1 1.29-1.21 1.24 1.24 0 0 1 1.21 1.28c0 .7-.6 17.09-12.28 22.91a1.23 1.23 0 0 1-.55.13Z"}),(0,r.jsx)("path",{d:"M253.05 45.91c12-1.77 15.64-3.67 18.58 16 2.73 17.52.16 16.89-14 18.91Z",style:{fill:"url(#linear-gradient-7)"}}),(0,r.jsx)("path",{className:"cls-16",d:"M255.39 50c8.39-1.24 11.08-4.17 13 11.17 1.55 12.32.11 11.83-9.82 13.24Z"}),(0,r.jsx)("path",{className:"cls-12",d:"M194.32 38.29h43.29A25.74 25.74 0 0 1 263.35 64v20.2a20.59 20.59 0 0 1-20.59 20.59h-50.49a20.59 20.59 0 0 1-20.59-20.59V60.93a22.64 22.64 0 0 1 22.64-22.64Z",transform:"matrix(-.99 .17 -.17 -.99 443.95 105.64)"}),(0,r.jsx)("ellipse",{cx:191.65,cy:67.44,rx:4.15,ry:4.98,transform:"rotate(-10.19 191.598 67.447)"}),(0,r.jsx)("path",{className:"cls-16",d:"M215.13 55.86h20.38a13.26 13.26 0 0 1 13.26 13.26v7.29a9.45 9.45 0 0 1-9.45 9.45h-28a9.45 9.45 0 0 1-9.45-9.45v-7.29a13.26 13.26 0 0 1 13.26-13.26Z",
|
||
transform:"rotate(170.35 225.325 70.857)"}),(0,r.jsx)("ellipse",{cx:253.68,cy:56.65,rx:4.15,ry:4.98,transform:"rotate(-10.19 253.608 56.64)"}),(0,r.jsx)("path",{d:"M213.51 92.38a49.86 49.86 0 0 1-7.2-1.71 1.22 1.22 0 0 0-1.52 1.55c1.48 4.27 5.12 12 9.63 1.86a1.21 1.21 0 0 0-.91-1.7Z"}),(0,r.jsx)("path",{d:"M213.09 96.62c-3.15 4.93-5.76 1.52-7.35-2a6.39 6.39 0 0 1 7.35 2Z",style:{fill:"#ff78b7"}}),(0,r.jsx)("rect",{className:"cls-18",x:215.56,y:78.58,width:12.43,height:3.55,rx:1.76,transform:"rotate(-9.66 221.695 80.354)"}),(0,r.jsx)("rect",{className:"cls-18",x:230.95,y:76.24,width:10.55,height:3.55,rx:1.78,transform:"rotate(-9.66 236.196 78.003)"}),(0,r.jsx)("path",{d:"M173.25 59c-13.14 2.31-17.43 1.63-14.12 21.19 2.85 17.5 6.11 15.93 20.21 13.43Z",style:{fill:"url(#linear-gradient-8)"}}),(0,r.jsx)("path",{className:"cls-16",d:"m173.44 62.83 4.77 24.7c-11.86 1.86-11.85 1.07-14.43-12.24-2.09-10.82.33-11.04 9.66-12.46Z"}),(0,r.jsx)("path",{
|
||
d:"M230 137.26c31.47-9.59 39-.5 34.65 26.87-2.18 13.85-1.83 27.21-14.49 27-19.91-.34-12.71-17.14-12.14-32.18 0 0-6.33 1.33-11.61 2.24s-10.13-3.45-9.21-11.85 6.58-10.19 12.8-12.08Z",style:{fill:"url(#linear-gradient-9)"}}),(0,r.jsx)("path",{className:"cls-21",d:"M228.51 138.45a1.25 1.25 0 0 1-.51-2.39 42.25 42.25 0 0 1 17.69-3.33 1.27 1.27 0 0 1 1.24 1.27 1.25 1.25 0 0 1-1.25 1.23 39.77 39.77 0 0 0-16.68 3.11 1.34 1.34 0 0 1-.49.11ZM239.23 158a1.2 1.2 0 0 1-.74-.25 1.25 1.25 0 0 1-.26-1.75l5-6.65a1.25 1.25 0 1 1 2 1.49l-5 6.65a1.27 1.27 0 0 1-1 .51ZM199.73 132.31a1.26 1.26 0 0 1-1.17-.8 1.25 1.25 0 0 1 .72-1.62l9.07-3.51a1.25 1.25 0 1 1 .91 2.33l-9.08 3.51a1.2 1.2 0 0 1-.45.09Z"}),(0,r.jsx)("path",{d:"M409.7 109.18c-38.9-21.69-74.81-4.87-74.81-4.87l19.56 38.11 22.2 43.24s34.82-21.83 39.68-63.62a13 13 0 0 0-6.63-12.86Z",style:{fill:"url(#linear-gradient-10)"}}),(0,r.jsx)("ellipse",{cx:367.61,cy:110.41,rx:12.8,ry:5.19,style:{fill:"#fff"}}),(0,r.jsx)("path",{className:"cls-24",
|
||
d:"m281.46 220.54-56.2 28.63a12.69 12.69 0 0 0-5.55 17.06L298.15 226a12.41 12.41 0 0 0-16.69-5.46ZM242.5 229.16a5.34 5.34 0 0 0-10 3.54l-4.21 2.09a5.36 5.36 0 1 0 1.1 2.24l4.22-2.09a5.27 5.27 0 0 0 2.38 1.65 5.25 5.25 0 0 0 4.08-.27 5.35 5.35 0 0 0 2.42-7.16Zm-17 11.59a2.84 2.84 0 1 1-2.53-5.09 2.81 2.81 0 0 1 1.26-.3 2.91 2.91 0 0 1 .92.15 2.78 2.78 0 0 1 1.63 1.43 2.84 2.84 0 0 1-1.31 3.81Zm13.5-6.67a2.78 2.78 0 0 1-2.17.14 2.84 2.84 0 1 1 2.17-.14Z"})]}))};var ke=n(691648),Ue=n(2590),Be=n(458276),Fe=n.n(Be);function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function He(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){
|
||
i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||ze(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(e){return function(e){if(Array.isArray(e))return Ge(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ze(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ze(e,t){if(e){if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ge(e,t):void 0}}
|
||
var Ye="vc-activities-".concat(xe().v4());function Ke(e){var t=e.channel,n=e.isHovered,i=e.closePopout,l=e.onMouseEnter,u=e.onMouseLeave,c=e.onClick,d=e.className,p=(0,s.e7)([Pe.Z],(function(){return Pe.Z.useReducedMotion})),h=t.id,y=t.guild_id;o.useEffect((function(){Te.default.track(Ue.rMx.ACTIVITIES_CENTER_CONTROL_TRAY_BUTTON_HOVERED,{channel_id:h,guild_id:y})}),[h,y]);o.useEffect((function(){n||i()}),[i,n]);var v=(0,b.bp)(),m=(0,E.Z)(O.Z.ACTIVITIES_MINI_SHELF),g=m.analyticsLocations,C=m.AnalyticsLocationProvider,j=v===Ue.IlC.POPOUT,S=(0,Ce.O)(),I=function(e){var t=(0,Ze.Z)(e),n=[];t.forEach((function(e){var t,r=Ve(e,2),o=(r[0],r[1]);(t=n).push.apply(t,We(o))}));return n.slice(0,5)}(t.getGuildId()),_=o.useCallback((function(){var e;(0,ke.Z)({channel:t,guildId:null!==(e=t.getGuildId())&&void 0!==e?e:void 0,locationObject:S.location,openInPopout:j,analyticsLocations:g});u();c()}),[S,g,t,c,u,j]),w=o.useCallback((function(e){l();Te.default.track(Ue.rMx.ACTIVITIES_MINI_SHELF_HOVERED,{
|
||
channel_id:t.id,guild_id:t.getGuildId()})}),[l,t]);return(0,r.jsx)(C,{children:(0,r.jsx)(M.Z,{children:(0,r.jsxs)(f.VqE,{"aria-labelledby":Ye,className:d,children:[(0,r.jsx)(f.y5t,{forceLevel:2,children:(0,r.jsx)(f.nn4,{children:(0,r.jsx)(f.H,{id:Ye,children:H.Z.Messages.EMBEDDED_ACTIVITIES_MINI_SHELF_TITLE})})}),(0,r.jsxs)("div",{className:Fe().container,onMouseEnter:w,onMouseLeave:u,children:[(0,r.jsxs)("div",{className:Fe().titleContainer,children:[(0,r.jsxs)("div",{className:Fe().titleLeft,children:[(0,r.jsx)(Ae.Z,{className:Fe().titleLeftIcon,color:"var(--interactive-active)"}),(0,r.jsx)(f.xvT,{variant:"eyebrow",children:H.Z.Messages.EMBEDDED_ACTIVITIES_AUTO_SUGGEST_ACTIVITIES_TITLE})]}),(0,r.jsxs)(f.P3F,{className:Fe().titleRight,onClick:_,children:[(0,r.jsx)(f.xvT,{variant:"eyebrow",children:H.Z.Messages.EMBEDDED_ACTIVITIES_AUTO_SUGGEST_SEE_ALL}),(0,r.jsx)(Ne.Z,{width:12,height:12,color:"var(--interactive-active)",className:Fe().titleRightIcon})]})]}),(0,r.jsxs)("div",{
|
||
className:Fe().activityContainer,children:[I.map((function(e){return(0,r.jsx)(Me.Y,{channel:t,activityItem:e,onClick:function(){i();c()},aspectRatio:Me.Y.AspectRatio.THIRTEEN_BY_ELEVEN,animatedDivClass:Fe().activitySuggestion},e.application.id)})),(0,r.jsx)("div",{className:a()(Fe().wumpusRocketOuterContainer,He({},Fe().wumpusReducedMotion,p)),children:(0,r.jsx)("div",{className:Fe().wumpusRocketInnerContainer,children:(0,r.jsx)(De,{className:Fe().wumpusRocket})})})]})]})]})})})}var qe=n(948243),Qe=n(627342),Xe=n(15162),Je=n(560213);function $e(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function et(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function tt(e){var t,n=e.isActivityActive,o=et(e,["isActivityActive"]);(0,s.e7)([Je.Z],(function(){return Je.Z.getIsEnabled()}),[])&&(t="yellow");return(0,r.jsx)(R.d,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){$e(e,t,n[t])}))}return e}({isActive:n,color:t,iconComponent:Ae.Z},o))}var nt=n(776009),rt=n(82761),ot=n.n(rt);function it(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function at(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){it(i,r,o,a,l,"next",e)}function l(e){it(i,r,o,a,l,"throw",e)}a(void 0)}))}}
|
||
var lt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}
|
||
if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function ut(){var e=(0,s.e7)([Pe.Z],(function(){return Pe.Z.useReducedMotion}));function t(){return(t=at((function(){var e;return lt(this,(function(t){switch(t.label){case 0:return[4,n.e(29615).then(n.t.bind(n,229615,19))];case 1:e=t.sent();return[2,e.default]}}))}))).apply(this,arguments)}return(0,r.jsx)(nt.Z,{importData:function(){return t.apply(this,arguments)},shouldAnimate:!e,className:ot().sparkles})}var ct=n(494320),st=n.n(ct);function ft(e){var t=e.channel,n=je.useExperiment({},{autoTrackExposure:!0}).enableCenterControlTrayMiniShelf,i=(0,s.e7)([m.ZP],(function(){return m.ZP.isLaunchingActivity()})),a=(0,Ie.KF)(t.id),l=(0,Ie.g5)(a),u=a!==Ie.jy.CAN_LAUNCH||i,c=(0,Xe.Z)(200,300),d=c.isHovered,p=c.setIsHovered,h=c.onMouseEnter,y=c.onMouseLeave,v=(0,Se.a)({}),g=function(e){var t=e.channelId;return(0,s.e7)([m.ZP],(function(){return m.ZP.getEmbeddedActivitiesForChannel(t).some((function(e){
|
||
return e.connections.size>0}))}))}({channelId:t.id}),O=!u&&n,C=o.useCallback((function(e){"focus"!==e.type&&h()}),[h]),j=(0,Ce.O)(),S=(0,b.bp)()===Ue.IlC.POPOUT,I=(0,E.Z)().analyticsLocations,_=o.useCallback((function(){(0,ke.Z)({channel:t,guildId:t.guild_id,locationObject:j.location,openInPopout:S,analyticsLocations:I})}),[j.location,I,t,S]),w=[];n&&!u&&w.push(Ee.z$.ACTIVITIES_MINI_SHELF_SPARKLES);(0,_e.Z)(t.id)&&!u&&w.push(Ee.z$.ACTIVITY_GDM_ROCKET_SPARKLE);return(0,r.jsx)(Qe.Z,{contentTypes:w,children:function(e){var n=e.visibleContent,o=e.markAsDismissed;return(0,r.jsx)(f.yRy,{shouldShow:d,animationPosition:"bottom",position:"bottom",align:"center",spacing:16,onRequestClose:function(){p(!1)},renderPopout:function(e){var n=e.closePopout;return O?(0,r.jsx)(Ke,{channel:t,closePopout:n,onMouseEnter:h,onMouseLeave:y,isHovered:d,onClick:o}):(0,r.jsx)(r.Fragment,{})},children:function(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(tt,{disabled:u,label:O?void 0:l,isActivityActive:g||d,
|
||
className:st().controlButton,onClick:function(){_();n!==Ee.z$.ACTIVITIES_MINI_SHELF_SPARKLES&&n!==Ee.z$.ACTIVITY_GDM_ROCKET_SPARKLE||o()},onMouseEnter:C,onMouseLeave:y}),v?(0,r.jsx)(qe.A,{top:4,right:10,size:12,maskColor:qe.T.BLACK}):null,function(){switch(n){case Ee.z$.ACTIVITIES_MINI_SHELF_SPARKLES:case Ee.z$.ACTIVITY_GDM_ROCKET_SPARKLE:return(0,r.jsx)(ut,{});default:return null}}()]})}})}})}var dt=n(73407),pt=n(761449),ht=n(986279),yt=n(957430);const bt=function(e){var t=e.isHovered,n=e.closePopout,i=e.onMouseEnter,a=e.onMouseLeave,l=e.onFocus,u=e.channel;o.useEffect((function(){t||n()}),[n,t]);return(0,r.jsx)(M.Z,{children:(0,r.jsx)("div",{onMouseEnter:i,onMouseLeave:a,children:(0,r.jsx)(yt.Z,{channel:u,closePopout:n,onFocus:l})})})};function vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const gt=function(e){var t=e.channel,n=e.className,i=(0,Xe.Z)(200,300),l=i.isHovered,u=i.setIsHovered,c=i.onMouseEnter,d=i.onMouseLeave,p=i.cancelTimers,h=mt(o.useState(!1),2),y=h[0],b=h[1],v=(0,
|
||
s.e7)([ht.Z],(function(){return ht.Z.effectCooldownEndTime})),m=o.useMemo((function(){return null!=v?(v.getTime()-Date.now())/1e3:0}),[v]),g=(0,dt.Z)(null!=v?v:new Date).seconds,O=g>0,E=o.useCallback((function(e){"focus"!==e.type&&(y||O||c())}),[y,O,c]),C=o.useCallback((function(){y||d()}),[d,y]),j=o.useCallback((function(e,t){p();b(!y);l&&!y||null==t||t(e)}),[p,y,l]),S=l||y;return(0,r.jsx)(f.yRy,{shouldShow:S,animationPosition:"bottom",position:"bottom",align:"center",spacing:16,onRequestClose:function(){u(!1);b(!1)},renderPopout:function(e){var n=e.closePopout;return(0,r.jsx)(bt,{isHovered:S,channel:t,closePopout:n,onMouseEnter:c,onMouseLeave:C,onFocus:function(){return b(!0)}})},children:function(e){var t=e.onClick,o=e.onKeyDown;return(0,r.jsx)(pt.Z,{isCenterButton:!0,totalCooldownSeconds:m,remainingCooldownSeconds:g,className:a()(st().controlButton,n),onKeyDown:function(e){return function(e,t){e.keyCode===Ue.yXg.ENTER&&e.keyCode===Ue.yXg.SPACE&&j(e,t)}(e,o)},onClick:function(e){
|
||
return function(e,t){j(e,t)}(e,t)},onMouseEnter:E,onMouseLeave:C,isActive:S})}})};var Ot,Et=n(740106),Ct=n(289261),jt=n(665435),St=n(537077),It=n(904333),_t=n(358500);function wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){xt(e,t,n[t])}))}return e}function Nt(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function At(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Tt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return
|
||
;if("string"==typeof e)return wt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zt(e,t){if(pe.Z.isVideoEnabled()!==e){var n=function(){return d.Z.setVideoEnabled(e)};e?(0,It.Z)(n,t):n()}}function Mt(e){var t=e.channel,n=e.currentUser,i=e.exitFullScreen,a=e.canGoLive,l=e.hasPermission,u=e.disabled,c=(0,b.bp)(),d=(0,s.Wu)([fe.Z],(function(){return fe.Z.getAllActiveStreams()})).find((function(e){return e.ownerId===n.id})),p=t.getGuildId(),h=o.useCallback((function(){null==i||i();if(!a)return(0,jt.Z)();(0,St.Z)(p,t.id,Ue.ZY5.GUILD_CHANNEL)}),[p,t.id,a,i]),y=null!=d;return(0,r.jsx)(K.Z,{children:(0,r.jsx)(f.yRy,{
|
||
renderPopout:function(e){var o=e.closePopout;return(0,r.jsx)(M.Z,{children:(0,r.jsx)(Et.Z,{channel:t,currentUser:n,activeStreams:null!=d?[d]:[],handleGoLive:h,onClose:o,appContext:c})})},position:"top",align:"center",animation:f.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,o=At(e,["onClick"]),i=t.isShown;return(0,r.jsx)("div",{children:null!=d?(0,r.jsx)(ie.Z,Nt(Pt({},o),{centerButton:!0,className:st().controlButton,onClick:function(){return(0,T.Z)(d)},isSelfStream:!0,onPopoutClick:y?n:null,popoutOpen:i,shouldShowTooltip:!i})):(0,r.jsx)(ce,Nt(Pt({},o),{centerButton:!0,className:st().controlButton,hasPermission:l,onClick:a?h:jt.Z,onPopoutClick:y?n:null,popoutOpen:i,shouldShowTooltip:!i,disabled:u}))})}})})}function Rt(e){var t=e.channel,n=t.getGuildId();return(0,g.Z)(n,t.id)?(0,r.jsx)("div",{className:st().buttonContainer,children:(0,r.jsx)(ft,{channel:t})}):null}!function(e){e.ACTIVITY="ACTIVITY";e.STREAM="STREAM";e.CALL="CALL";e.EVENT="EVENT"}(Ot||(Ot={}))
|
||
;var Lt=o.memo((function(e){var t=e.connectedActivityApplicationId,n=e.currentUser,i=e.onDisconnectCall,a=e.channel,l=(0,s.e7)([C.Z],(function(){return C.Z.getSelectedParticipant(a.id)})),u=o.useContext(v.S).reducedMotion,d=Tt(o.useState(!1),2),y=d[0],b=d[1],m=null==l?void 0:l.id,g=(0,s.e7)([fe.Z],(function(){return null!=m?fe.Z.getActiveStreamForStreamKey(m):null}),[m]),O=(null==l?void 0:l.type)===_t.fO.STREAM&&null!=g&&g.ownerId!==(null==n?void 0:n.id),E=(0,s.Wu)([fe.Z],(function(){return fe.Z.getAllActiveStreamsForChannel(a.id).filter((function(e){return e.ownerId!==(null==n?void 0:n.id)}))})),j=(0,Z.qY)(a.id),S=o.useCallback((function(){return(null==l?void 0:l.type)===_t.fO.ACTIVITY&&l.id===t?Ot.ACTIVITY:O?Ot.STREAM:null!=j?Ot.EVENT:Ot.CALL}),[l,t,O,j]),I=Tt(o.useState(S()),2),_=I[0],w=I[1],x=(0,c.useSpring)({opacity:y?.2:1,transform:y&&!u.enabled?"scale(0.7)":"scale(1)",config:{mass:2,tension:y?600:1e3,friction:45,precision:.01,clamp:y},onRest:function(){w(S());b(!1)}})
|
||
;o.useEffect((function(){S()!==_&&b(!0)}),[_,S]);var P=function(e,t){var o={centerButton:!0,className:st().controlButton,popoutOpen:e};switch(_){case Ot.ACTIVITY:if(null==l||null==n)return;return(0,r.jsx)(ne.Z,Nt(Pt({},o),{applicationId:l.id,color:"red",channelId:a.id,onPopoutClick:E.length>0?t:null}));case Ot.STREAM:return(0,r.jsx)(ie.Z,Nt(Pt({},o),{color:"red",onClick:function(){if(null!=g)(0,h.g)((0,N.V9)(g));else{var e=!0,t=!1,n=void 0;try{for(var r,o=E[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value;(0,h.g)((0,N.V9)(i))}}catch(e){t=!0;n=e}finally{try{e||null==o.return||o.return()}finally{if(t)throw n}}}},onPopoutClick:E.length>1?t:null,isSelfStream:!1}));case Ot.CALL:return(0,r.jsx)(re.Z,Nt(Pt({},o),{color:"red",onClick:function(){p.default.disconnect();null==i||i()},onPopoutClick:E.length>0?t:null}));case Ot.EVENT:return(0,r.jsx)(z,{guildId:a.guild_id,channelId:a.id,onClick:function(){p.default.disconnect();null==i||i()}})}};return(0,r.jsx)(f.yRy,{
|
||
renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(Et.Z,{channel:a,currentUser:n,activeStreams:E,handleGoLive:Ue.VqG,hideSelfOptions:!0,onClose:t})},position:"top",align:"center",animation:f.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,o=t.isShown;return(0,r.jsx)(c.animated.div,{style:x,children:P(o,n)})}})}));function Dt(e){var t=e.channel,n=e.cameraUnavailable,i=e.hasCameraPermission,l=e.currentUser,u=(0,b.bp)(),c=(0,me.Z)(t),f=c.reachedLimit,d=c.limit,h=o.useCallback((function(){(0,It.Z)((function(){return p.default.selectVoiceChannel(t.id,!0)}),u)}),[t.id,u]),y=o.useCallback((function(){p.default.selectVoiceChannel(t.id,!1)}),[t.id]),v=o.useCallback((function(){n?(0,Ct.Z)():h()}),[n,h]),m=(0,s.e7)([de.Z],(function(){var e=de.Z.getCall(t.id);return!0===(null==e?void 0:e.ringing.includes(l.id))}));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(se.C,{enabled:!0,centerButton:!0,join:!0,color:"green",channelLimitReached:f,channelLimit:d,channel:t,
|
||
cameraUnavailable:n,hasPermission:i,onCameraUnavailable:v,className:st().controlButton,iconClassName:st().joinIcon,onChange:h}),(0,r.jsx)(te.Z,{centerButton:!0,color:"green",channel:t,className:a()(st().controlButton,st().lastButton),onClick:y}),m?(0,r.jsx)(ee,{color:"red",channel:t,className:st().controlButton}):null]})}const kt=(0,w.Z)((function(e){var t,n=e.channel,o=e.className,i=e.onDisconnectCall,l=e.exitFullScreen,c=(0,s.e7)([ye.default],(function(){var e=ye.default.getCurrentUser();u()(null!=e,"CenterControlTray: currentUser cannot be undefined");return e})),d=(0,ve.Z)(),p=d.cameraUnavailable,h=d.enabled,b=(0,ge.Z)(n),v=(0,Oe.Z)(n),g=v.suppress,C=v.selfMute,w=v.mute,N=(0,s.cj)([pe.Z],(function(){return{canGoLive:(0,A.Z)(pe.Z)}})).canGoLive,T=(0,P.Z)(),Z=(0,s.e7)([x.Z],(function(){return null!=x.Z.getAwaitingRemoteSessionInfo()})),R=null!=T,L=(0,s.e7)([he.Z],(function(){return(null!==(t=null==T?void 0:T.channelId)&&void 0!==t?t:he.Z.getVoiceChannelId())===n.id})),D=(0,
|
||
j.Z)(n,!0),k=(0,s.e7)([m.ZP],(function(){var e=m.ZP.getSelfEmbeddedActivityForChannel(n.id);return null!=e?e.application_id:null})),U=(0,me.Z)(n),B=U.reachedLimit,F=U.limit,G=(0,E.Z)(O.Z.VOICE_CONTROL_TRAY).AnalyticsLocationProvider;if(!L)return(0,r.jsx)(G,{children:(0,r.jsx)(Dt,{channel:n,cameraUnavailable:p,hasCameraPermission:b,currentUser:c})});var H=be.ZP.can({permission:Ue.Plq.ADD_REACTIONS,user:c,context:n})&&!n.isPrivate()&&!D;return(0,r.jsx)(G,{children:(0,r.jsxs)(y.Z,{section:Ue.jXE.VOICE_CONTROL_TRAY,children:[(0,r.jsx)("div",{className:st().eventPromptsContainer,children:(0,r.jsx)(Y.Z,{guildId:n.guild_id,channelId:n.id})}),(0,r.jsxs)("div",{className:a()(st().wrapper,o),children:[!R&&(0,r.jsx)(f.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(M.Z,{children:(0,r.jsx)(I.Z,{onClose:t})})},position:"top",align:"center",animation:f.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,o=t.isShown;return(0,r.jsx)(se.C,{centerButton:!0,hasPermission:b,
|
||
className:st().controlButton,enabled:h,cameraUnavailable:p,onChange:Zt,onCameraUnavailable:Ct.Z,channelLimitReached:B,channelLimit:F,popoutOpen:o,onPopoutClick:n})}}),!R&&(0,r.jsx)(Rt,{channel:n}),!R&&(0,r.jsx)(Mt,{channel:n,currentUser:c,exitFullScreen:l,canGoLive:N,hasPermission:b}),(0,r.jsx)(f.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(M.Z,{children:(0,r.jsx)(S.default,{onClose:t,renderInputDevices:!0,renderOutputDevices:!0,renderInputModes:!0})})},align:"center",position:"top",animation:f.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,o=t.isShown;return(0,r.jsx)(oe.Z,{centerButton:!0,onPopoutClick:R?null:n,className:st().controlButton,selfMute:C,serverMute:w,suppress:g,popoutOpen:o,awaitingRemote:Z,onClick:function(){return(0,_.Z)(w,g)}})}}),H&&!R?(0,r.jsx)("div",{className:st().buttonContainer,children:(0,r.jsx)(gt,{channel:n})}):null,(0,r.jsx)(Lt,{connectedActivityApplicationId:k,currentUser:c,channel:n,onDisconnectCall:i})]})]})})}))},
|
||
173388:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(441143),l=n.n(a),u=n(202351),c=n(707961),s=n(269300),f=n(427054),d=n(567403),p=n(682776),h=n(2590),y=n(473708),b=n(459595),v=n.n(b);function m(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){m(i,r,o,a,l,"next",e)}function l(e){m(i,r,o,a,l,"throw",e)}a(void 0)}))}}function O(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){O(e,t,n[t])}))}return e}
|
||
function C(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function j(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var S=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},
|
||
"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function I(e){
|
||
var t=e.stream,o=e.applicationId,a=e.channel,b=e.exitFullScreen,m=e.appContext,O=e.analyticsLocation,I=e.className,_=j(e,["stream","applicationId","channel","exitFullScreen","appContext","analyticsLocation","className"]),w=null==a?void 0:a.getGuildId(),x=null==a?void 0:a.id,P=(0,u.e7)([d.Z],(function(){return null!=w?d.Z.getGuild(w):null}),[w]),N=(0,u.e7)([s.ZP],(function(){return s.ZP.getActiveEventByChannel(x)}),[x]);if(!function(e,t){return null!=e&&null!=t&&p.Z.can(h.Plq.CREATE_INSTANT_INVITE,t)}(P,a))return null;var A=y.Z.Messages.INSTANT_INVITE;null!=t?A=y.Z.Messages.INVITE_STREAM_HEADER:null!=o&&(A=y.Z.Messages.EMBEDDED_ACTIVITIES_INVITE_TO_ACTIVITY);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.zxk,C(E({size:c.zxk.Sizes.SMALL,color:v().buttonColor,onClick:function(){l()(null!=P,"guild cannot be null");l()(null!=a,"channel cannot be null");!function(e){
|
||
var t=e.guild,o=e.channel,i=e.streamUserId,a=e.applicationId,l=e.appContext,u=e.exitFullScreen,s=e.analyticsLocation,f=e.guildScheduledEvent;null==u||u();(0,c.ZDy)(g((function(){var e,l;return S(this,(function(u){switch(u.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:e=u.sent(),l=e.default;return[2,function(e){return(0,r.jsx)(l,C(E({},e),{guild:t,channel:o,streamUserId:i,applicationId:a,analyticsLocation:s,source:o.isGuildStageVoice()?h.t4x.STAGE_CHANNEL:h.t4x.STREAM_INVITE,guildScheduledEvent:f}))}]}}))})),{modalKey:"stream-invite-modal",contextKey:l===h.IlC.POPOUT?c.u1M:c.z1l})}({guild:P,channel:a,streamUserId:null==t?void 0:t.ownerId,applicationId:o,appContext:m,exitFullScreen:b,analyticsLocation:O,guildScheduledEvent:N})},className:i()(I,v().textButton)},_),{children:A})),(0,r.jsx)(f.Z,{channel:a,stream:t,appContext:m,className:i()(I,v().iconButton),exitFullScreen:b,analyticsLocation:O,guildScheduledEvent:N})]})}},
|
||
667286:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(785893),o=(n(667294),n(503857)),i=n(294184),a=n.n(i),l=n(707961),u=n(265367),c=n(636398),s=n(471870),f=n.n(s);function d(e){var t=e.errorMessage,n=e.className;return(0,r.jsx)(l.DY3,{className:a()(n,f().root),text:t,position:"bottom",color:l.FGA.GREY,children:(0,r.jsx)(c.Z,{children:(0,r.jsx)(u.Z,{"aria-label":null!=t?t:"",className:f().warningIcon})})})}var p=n(440031);function h(e){var t=e.participant,n=e.className,i=function(e){return null==e?null:p.Z.isDeveloper?"".concat(e.message," (").concat(e.errorType,")"):e.message}((0,o.Z)(t));return null!=i?(0,r.jsx)(d,{className:n,errorMessage:i}):null}},575907:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(785893),o=n(667294),i=n(636398);function a(e){var t=e.children,n=(0,i.Y)("popup"),a=n.preventIdle,l=n.allowIdle;o.useEffect((function(){a();return function(){return l()}}),[l,a]);return(0,r.jsx)(r.Fragment,{children:t})}},299836:(e,t,n)=>{"use strict";n.d(t,{z:()=>M,Z:()=>L})
|
||
;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n(248088),c=n(202351),s=n(707961),f=n(744564),d=n(247250),p=n(665472),h=n(908741),y=n(804808),b=n(550131),v=n(513586),m=n(600277),g=n(598123),O=n(840922),E=n(763536),C=n(775173),j=n(72580),S=n(463473),I=n(2590),_=n(939198),w=n(832684),x=n.n(w);function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||Z(e,t)||function(){
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Z(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}var M=1e4;function R(e){var t,n=e.message,i=(0,c.e7)([O.Z],(function(){return O.Z.isBlocked(n.author.id)})),l=(0,
|
||
b.Uj)(n),u=o.useContext(h.Z),f=A(o.useState(!1),2),g=f[0],j=f[1],S=o.useCallback((function(e){if("A"!==e.target.nodeName){d.Z.updateChatOpen(n.channel_id,!0);p.Z.jumpToMessage({channelId:n.channel_id,messageId:n.id,flash:!0})}}),[n.channel_id,n.id]),I=null!=n.content&&""!==n.content?(0,y.ZP)(n,{isInteracting:g}).content:null,w=(0,E.f)(n,I,i,x().messageContent,{iconClass:x().messageContentIcon,iconSize:_.WW}),P=w.contentPlaceholder,T=w.renderedContent,Z=w.icon,M=(0,v.cv)(n),R=M.length>0?M.map((function(e){return(0,r.jsx)(m.ZP,{className:x().sticker,size:128,sticker:e,isInteracting:g},e.id)})):null;return(0,r.jsxs)(s.P3F,{className:x().toast,onMouseEnter:function(){j(!0)},onMouseLeave:function(){j(!1)},onClick:S,children:[(0,r.jsxs)("div",{className:a()(x().messageContentWrapper,N({},x().mentioned,n.mentioned)),children:[null!==(t=null!=T?T:R)&&void 0!==t?t:(0,r.jsx)("span",{children:P}),null!=R?null:Z]}),(0,r.jsx)("img",{alt:"",src:null!=(null==l?void 0:l.guildMemberAvatar)&&null!=u?(0,
|
||
C.JM)({guildId:u,userId:n.author.id,avatar:l.guildMemberAvatar}):n.author.getAvatarURL(u,32),className:x().avatar})]})}function L(e){var t=e.channelId,n=e.className,i=A(o.useState(!1),2),s=i[0],d=i[1],p=function(e){var t,n=e.channelId,r=e.isFrozen,i=e.count,a=e.lingerMs,l=A(o.useState([]),2),u=l[0],s=l[1],d=A(o.useState(!1),2),p=d[0],h=d[1],y=o.useRef(null),b=o.useRef(),v=o.useCallback((function(){s([]);h(!0)}),[]);o.useEffect((function(){var e=function(e){var t=e.channelId,r=e.message;if(t===n&&r.type!==I.uaV.STAGE_START&&r.type!==I.uaV.STAGE_END&&r.type!==I.uaV.STAGE_TOPIC&&r.type!==I.uaV.STAGE_SPEAKER&&r.type!==I.uaV.STAGE_RAISE_HAND){clearTimeout(b.current);b.current=setTimeout(v,a);s((function(e){return T(e).concat([r.id])}))}};f.Z.subscribe("MESSAGE_CREATE",e);return function(){f.Z.unsubscribe("MESSAGE_CREATE",e)}}),[n,v,i,a]);o.useEffect((function(){return function(){clearTimeout(b.current)}}),[]);o.useEffect((function(){u.length>3&&s((function(e){var t=e.length-3
|
||
;return T(e.slice(t))}))}),[u]);r&&null==y.current?y.current=u:r||null==y.current||(y.current=null);var m=null!==(t=y.current)&&void 0!==t?t:u;return{toastsHidden:p,toastMessages:(0,c.Wu)([g.Z],(function(){return m.map((function(e){return g.Z.getMessage(n,e)}))}),[m]).filter(j.lm)}}({channelId:t,isFrozen:s,count:3,lingerMs:M}),h=p.toastsHidden,y=p.toastMessages,b=o.useRef({}),v=A(o.useState({}),2),m=v[0],O=v[1],E=o.useCallback((function(e,t){null==t?delete b.current[e]:b.current[e]=t}),[]);o.useLayoutEffect((function(){var e={},t=0,n=!0,r=!1,o=void 0;try{for(var i,a=y[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u,c=i.value,s=null!==(u=b.current[c.id])&&void 0!==u?u:0;e[c.id]=t;t+=s+8}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}(0,l.isEqual)(e,m)||O(e)}),[y]);var C=y.map((function(e){return{message:e,height:b.current[e.id],y:m[e.id]}})),_=(0,u.useTransition)(C,{keys:function(e){return e.message.id},from:function(){return{opacity:0}},
|
||
enter:function(e){return{opacity:1,translateY:e.y}},update:function(e){return{translateY:e.y}},leave:function(e){var t=e.height,n=e.y;return{opacity:0,translateY:h?n:-(null!=t?t:0)-8,pointerEvents:"none"}}});return(0,r.jsx)("div",{className:a()(n,(0,S.Q)(I.BRd.DARK)),onMouseEnter:function(){d(!0)},onMouseLeave:function(){d(!1)},children:_((function(e,t){return(0,r.jsx)(u.animated.div,{ref:function(e){return E(t.message.id,null!=e?e.offsetHeight:null)},className:x().toastWrapper,style:e,children:(0,r.jsx)(R,{message:t.message})})}))})}},729139:(e,t,n)=>{"use strict";n.d(t,{e:()=>r,Z:()=>y});var r,o=n(785893),i=(n(667294),n(294184)),a=n.n(i),l=n(107364),u=n(419375),c=n(817333),s=n.n(c);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}!function(e){e[e.TOP=0]="TOP";e[e.BOTTOM=1]="BOTTOM"}(r||(r={}));function h(e){var t=e.disableGradients,n=void 0!==t&&t,i=e.renderHeader,a=e.renderBottomLeft,u=e.renderBottomCenter,c=e.renderBottomRight,f=e.renderCenter,d=n===r.TOP||!0===n,p=n===r.BOTTOM||!0===n;return(0,o.jsxs)("div",{className:s().videoControls,children:[!d&&(0,o.jsx)("div",{className:s().gradientTop}),!p&&(0,o.jsx)("div",{
|
||
className:s().gradientBottom}),(0,o.jsx)("div",{className:s().topControls,children:null==i?void 0:i()}),null==f?void 0:f(),(0,o.jsxs)("div",{className:s().bottomControls,children:[(0,o.jsx)(l.Z,{grow:0,shrink:1,basis:"50%",align:l.Z.Align.CENTER,children:null==a?void 0:a()}),(0,o.jsx)(l.Z,{grow:1,justify:l.Z.Justify.CENTER,align:l.Z.Align.CENTER,children:null==u?void 0:u()}),(0,o.jsx)(l.Z,{grow:0,shrink:1,justify:l.Z.Justify.END,basis:"50%",align:l.Z.Align.CENTER,children:null==c?void 0:c()})]})]})}function y(e){var t=e.screenMessage,n=e.onDoubleClick,r=e.onActive,i=e.onForceIdle,l=e.idle,c=e.children,y=e.renderChatButton,b=e.renderChatToasts,v=e.renderVoiceChannelEffects,m=e.style,g=p(e,["screenMessage","onDoubleClick","onActive","onForceIdle","idle","children","renderChatButton","renderChatToasts","renderVoiceChannelEffects","style"]);return(0,o.jsxs)("div",{className:a()(s().root,f({},s().idle,l)),style:m,onMouseMove:r,onMouseDown:r,onMouseLeave:i,onDoubleClick:n,
|
||
children:[c,null!=t?(0,o.jsx)(u.Z,d({size:"large"},t)):null,(0,o.jsx)(h,d({},g)),null==y?void 0:y({className:s().chatButton,showingClassName:s().chatButtonShowing}),null==b?void 0:b(),null==v?void 0:v()]})}},372417:(e,t,n)=>{"use strict";n.d(t,{T:()=>A});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n(468811),c=n.n(u),s=n(202351),f=n(707961),d=n(247250),p=n(566706),h=n(717091),y=n(715107),b=n(788169),v=n(194212),m=n(299836),g=n(732068),O=n(2590),E=n(473708),C=n(919776),j=n.n(C);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e)
|
||
;for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
function x(e){var t=(0,s.e7)([b.Z],(function(){return!(0,l.isEmpty)(b.Z.getTypingUsers(e))}),[e]),n=(0,s.e7)([y.Z],(function(){return y.Z.getVoiceChannelId()===e}),[e]),r=(0,s.cj)([h.ZP],(function(){return{unreadCount:h.ZP.getUnreadCount(e),mentionCount:h.ZP.getMentionCount(e)}}),[e]);return{unreadCount:r.unreadCount,mentionCount:r.mentionCount,voiceChannelIsSelected:n,isTyping:t}}function P(e){var t=e.width,n=void 0===t?24:t,i=e.height,a=void 0===i?24:i,l=e.isBadged,u=void 0!==l&&l,s=e.isTyping,d=void 0!==s&&s,p=w(o.useState((function(){return c().v4()})),1)[0];return(0,r.jsxs)("svg",{width:n,height:a,viewBox:"0 0 24 24",children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("mask",{id:p,children:[(0,r.jsx)("rect",{fill:"white",width:"100%",height:"100%"}),d&&(0,r.jsx)("g",{fill:"black",transform:"translate(5.5, 8.5) scale(".concat(11/24,")"),children:(0,r.jsx)(f.IJ0,{dotRadius:3.5,spacing:3,fill:"black"})}),u&&(0,r.jsx)("circle",{cx:"20",cy:"19",r:"10",fill:"black"})]})}),(0,r.jsx)("path",{
|
||
fill:"currentColor",d:"M4.79805 3C3.80445 3 2.99805 3.8055 2.99805 4.8V15.6C2.99805 16.5936 3.80445 17.4 4.79805 17.4H7.49805V21L11.098 17.4H19.198C20.1925 17.4 20.998 16.5936 20.998 15.6V4.8C20.998 3.8055 20.1925 3 19.198 3H4.79805Z",mask:"url(#".concat(p,")")})]})}function N(e){var t,n=e.className,o=x(e.channelId),i=o.unreadCount,l=o.mentionCount,u=o.isTyping,c=null!=l&&l>0,s=null!==(t=c?l:i)&&void 0!==t?t:0,d=s>99?"99+":s,p=o.voiceChannelIsSelected&&null!=i&&i>0;return(0,r.jsxs)("div",{className:a()(j().chatIcon,n),children:[(0,r.jsx)(P,{isBadged:p,isTyping:u}),p&&(0,r.jsx)(f.xvT,{className:a()(j().unreadCount,I({},j().mention,c)),variant:"text-xs/normal",children:d})]})}function A(e){
|
||
var t=e.channelId,n=e.className,i=e.showingClassName,l=e.onClick,u=e.inPopout,c=e.showRequestToSpeakSidebar,f=e.toggleRequestToSpeakSidebar,h=_(e,["channelId","className","showingClassName","onClick","inPopout","showRequestToSpeakSidebar","toggleRequestToSpeakSidebar"]),y=h.disabled,b=o.useRef(null),C=(0,s.e7)([p.Z],(function(){return p.Z.getChatOpen(t)}),[t]),j=function(e){var t=x(e),n=t.unreadCount,r=t.mentionCount,i=t.isTyping,a=w(o.useState(!1),2),l=a[0],u=a[1];o.useEffect((function(){u(n>0);var e=setTimeout((function(){u(!1)}),m.z);return function(){clearTimeout(e);u(!1)}}),[n]);return{isShowing:l||r>0||i,unreadCount:n,mentionCount:r}}(t),S=j.isShowing,P=j.unreadCount,A=j.mentionCount,T=o.useCallback((function(){null==l||l();!C&&c&&(null==f||f());d.Z.updateChatOpen(t,!C)}),[t,C,l,c,f]),Z=o.useCallback((function(e){var n=e.className;return(0,r.jsx)(N,{className:n,channelId:t})}),[t]),M=o.useCallback((function(){var e;null===(e=b.current)||void 0===e||e.focus()}),[]);(0,v.yp)({
|
||
event:O.CkL.FOCUS_CHAT_BUTTON,handler:y?null:M});var R,L=w(o.useState(!1),2),D=L[0],k=L[1],U=o.useCallback((function(){u&&k(!0)}),[u]);(0,v.yp)({event:O.CkL.SHOW_TEXT_IN_VOICE_POPOUT_COMING_SOON_TIP,handler:U});o.useEffect((function(){var e;D&&(e=setTimeout((function(){k(!1)}),3e3));return function(){clearTimeout(e)}}),[D]);var B=[R=u&&y?E.Z.Messages.TEXT_IN_VOICE_POPOUT_DISABLED:C?E.Z.Messages.VIDEO_CALL_HIDE_CHAT:E.Z.Messages.VIDEO_CALL_SHOW_CHAT];A>0&&B.push(E.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_MENTIONS.format({mentionCount:A}));P>0&&B.push(E.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_UNREAD);return(0,r.jsx)(g.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){I(e,t,n[t])}))}return e}({buttonRef:b,onClick:T,label:R,
|
||
"aria-label":B.join(", "),iconComponent:Z,tooltipPosition:"bottom",wrapperClassName:a()(n,null!=i&&I({},i,S)),forceTooltipOpen:D},h))}},353945:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(186440)),i=n(732068),a=n(473708);function l(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function u(){u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return u.apply(this,arguments)}function c(e){var t=u({},e);return(0,r.jsx)(i.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){l(e,t,n[t])}))}return e}({label:a.Z.Messages.MORE,iconComponent:o.Z,
|
||
tooltipPosition:"bottom"},t))}},761449:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(785893),o=(n(667294),n(248088)),i=n(781453),a=n(732068),l=n(473708),u=n(553858),c=n.n(u);function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){s(e,t,n[t])}))}return e}function d(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n
|
||
}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var h=(0,o.animated)((function(e){var t=e.className,n=e.percentComplete,o=52;return(0,r.jsx)("svg",{className:t,width:o,height:o,viewBox:"0 0 ".concat(o," ").concat(o),children:(0,r.jsx)("circle",{style:{strokeDashoffset:100*n},className:c().progress,cx:26,cy:26,r:20,fill:"none",stroke:"#4F545C",pathLength:"100"})})}));function y(e){
|
||
var t=e.totalCooldownSeconds,n=e.remainingCooldownSeconds,u=e.onClick,s=e.onKeyDown,y=e.onMouseEnter,b=e.onMouseLeave,v=e.isActive,m=void 0!==v&&v,g=e.isCenterButton,O=void 0!==g&&g,E=p(e,["totalCooldownSeconds","remainingCooldownSeconds","onClick","onKeyDown","onMouseEnter","onMouseLeave","isActive","isCenterButton"]),C=n>0,j=(0,o.useSpring)({percentComplete:0!==n?(t-n)/t:0,config:d(f({},o.config.molasses),{duration:1e3})}),S=C?l.Z.Messages.VOICE_CHANNEL_EFFECTS_COOLDOWN.format({seconds:n}):void 0,I=O?a.d:a.Z;return(0,r.jsxs)("div",{className:c().container,children:[(0,r.jsx)(I,d(f({},E),{disabled:C,label:S,iconComponent:i.Z,onClick:u,onKeyDown:s,onMouseEnter:y,onMouseLeave:b,isActive:m,grow:!1})),C?(0,r.jsx)(h,{className:c().countdown,percentComplete:j.percentComplete}):null]})}},427054:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=(n(667294),n(441143)),i=n.n(o),a=n(202351),l=n(707961),u=n(26468),c=n(567403),s=n(682776),f=n(226919),d=n(732068),p=n(2590),h=n(473708)
|
||
;function y(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,l,"next",e)}function l(e){y(i,r,o,a,l,"throw",e)}a(void 0)}))}}function v(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){v(e,t,n[t])}))}return e}function g(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e)
|
||
;t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function O(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,
|
||
r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function C(e){var t=e.stream,o=e.channel,y=e.exitFullScreen,v=e.appContext,C=e.analyticsLocation,j=e.guildScheduledEvent,S=O(e,["stream","channel","exitFullScreen","appContext","analyticsLocation","guildScheduledEvent"]),I=(0,u.bp)(),_=null==o?void 0:o.getGuildId(),w=(0,
|
||
a.e7)([c.Z],(function(){return null!=_?c.Z.getGuild(_):null}),[_]);return function(e,t){return null!=e&&null!=t&&s.Z.can(p.Plq.CREATE_INSTANT_INVITE,t)}(w,o)?(0,r.jsx)(d.Z,m({onClick:function(){i()(null!=w,"guild cannot be null");i()(null!=o,"channel cannot be null");!function(e){var t=e.guild,o=e.channel,i=e.streamUserId,a=e.appContext,u=e.exitFullScreen,c=e.analyticsLocation,s=e.guildScheduledEvent;null==u||u();(0,l.ZDy)(b((function(){var e,a;return E(this,(function(l){switch(l.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:e=l.sent(),a=e.default;return[2,function(e){return(0,r.jsx)(a,g(m({},e),{guild:t,channel:o,streamUserId:i,analyticsLocation:c,source:o.isGuildStageVoice()?p.t4x.STAGE_CHANNEL:p.t4x.STREAM_INVITE,guildScheduledEvent:s}))}]}}))})),{modalKey:"stream-invite-modal",contextKey:a===p.IlC.POPOUT?l.u1M:l.z1l})}({guild:w,channel:o,streamUserId:null==t?void 0:t.ownerId,appContext:null!=v?v:I,exitFullScreen:y,
|
||
analyticsLocation:C,guildScheduledEvent:j})},iconComponent:f.Z,label:h.Z.Messages.ACTIVITY_INVITE_MODAL_SEARCH_PLACEHOLDER},S)):null}},731209:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(785893),o=(n(667294),n(164760)),i=n(732068),a=n(473708);function l(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function u(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o
|
||
}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function s(e){var t=e.channel,n=e.centerButton,s=void 0!==n&&n,f=c(e,["channel","centerButton"]),d=s?i.d:i.Z,p=t.isManaged()||!t.isPrivate()?a.Z.Messages.CONNECT:a.Z.Messages.JOIN_CALL;return(0,r.jsx)(d,u(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){l(e,t,n[t])}))}return e}({},f),{iconComponent:o.Z,label:p}))}},65200:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=(n(667294),n(180306)),i=n(961241),a=n(554647),l=n(732068),u=n(783240),c=n.n(u);function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,
|
||
writable:!0}):e[t]=n;return e}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function d(e){var t=e.className;return(0,r.jsx)(a.Z,{foreground:c().slash,className:t})}function p(e){var t=e.selfMute,n=e.serverMute,a=e.suppress,u=e.centerButton,c=void 0!==u&&u,p=e.awaitingRemote,h=f(e,["selfMute","serverMute","suppress","centerButton","awaitingRemote"]),y=t||n||a,b=c?l.d:l.Z,v=(0,o.Z)(t,n,a,p),m=y?d:i.Z;return(0,r.jsx)(b,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){s(e,t,n[t])}))}return e}({isActive:y,iconComponent:m,label:v},h))}},631443:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(785893),o=(n(667294),n(467853)),i=n(552675),a=n(732068),l=n(473708);function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function s(e){var t=e.popoutWindowAlwaysOnTop,n=e.onToggleStayOnTop,s=c(e,["popoutWindowAlwaysOnTop","onToggleStayOnTop"]),f=t?l.Z.Messages.POPOUT_REMOVE_FROM_TOP:l.Z.Messages.POPOUT_STAY_ON_TOP,d=t?i.Z:o.Z;return(0,
|
||
r.jsx)(a.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){u(e,t,n[t])}))}return e}({onClick:function(){return n(!t)},label:f,iconComponent:d},s))}},821297:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(202351),l=n(656645),u=n(736097),c=n(474993),s=n(615457),f=n(120415),d=n(636398),p=n(817374),h=n.n(p);const y=a.ZP.connectStores([u.Z],(function(e){var t=e.userId,n=e.context;return{currentVolume:u.Z.getLocalVolume(t,n),muted:u.Z.isLocalMute(t,n)}}))((function(e){var t=e.className,n=e.iconClassName,o=e.sliderClassName,a=e.userId,u=e.currentVolume,p=e.muted,y=e.context,b=e.currentWindow,v=void 0===b?window:b;return(0,r.jsx)(d.Z,{children:(0,r.jsx)(c.Z,{currentWindow:v,
|
||
iconClassName:i()(n,h().controlIcon),sliderClassName:o,className:t,value:(0,s.P)(u),muted:p,maxValue:f.FB?200:100,onValueChange:function(e){return function(e,t,n,r){e>0&&n&&l.Z.toggleLocalMute(t,r);l.Z.setLocalVolume(t,(0,s.A)(e),r)}(e,a,p,y)},onToggleMute:function(){return function(e,t){l.Z.toggleLocalMute(e,t)}(a,y)}})})}))},242942:(e,t,n)=>{"use strict";n.d(t,{yX:()=>E,Lx:()=>w,kq:()=>j});var r=n(496486),o=n(281110),i=n(744564),a=n(396043),l=n(61209),u=n(563367),c=n(671723),s=n(715107),f=n(652591),d=n(2590),p=n(203600);var h=n(797815),y=n(38004),b=n(986279),v=n(143692),m=n(460214);function g(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function O(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var E,C=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},
|
||
"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};!function(e){e.EMOJI_PICKER="emoji_picker";e.EFFECT_BAR="effect_bar"}(E||(E={}))
|
||
;function j(e,t,n,i){var a,y,b=h.Z.getCustomEmojiById(null!==(a=t.emojiId)&&void 0!==a?a:""),v=new AbortController,g=(0,r.throttle)((function(t){s.Z.getVoiceChannelId()!==e&&v.abort()}),1e3),O={sound_id:t.soundId,emoji_id:t.emojiId,emoji_name:null!==(y=t.emojiName)&&void 0!==y?y:null==b?void 0:b.name,override_path:t.overridePath};t.guildId!==m.X8&&(O.source_guild_id=t.guildId);o.Z.post({url:d.ANM.VOICE_CHANNEL_EFFECTS(e),body:O,signal:v.signal,onRequestProgress:g}).then(d.VqG,(function(){v.signal.aborted}));!function(e,t,n){var r,o=l.Z.getChannel(s.Z.getVoiceChannelId()),i=null==o?void 0:o.getGuildId(),a=u.Z.getMediaSessionId(),h=u.Z.getRTCConnectionId(),y=null===(r=c.ZP.getCurrentGame())||void 0===r?void 0:r.name;f.default.track(d.rMx.PREMIUM_FEATURE_USAGE,{feature_name:p.QP.SOUNDBOARD_PLAY,feature_tier:p.h1.FREE,guild_id:i,location_stack:e,rtc_connection_id:h,media_session_id:a,in_overlay:t,application_name:y,emoji_count:null!=n.emojiId||null!=n.emojiName?1:0,
|
||
feature_selection:null!=n.overridePath?"default":"custom",feature_selection_id:n.soundId})}(null!=i?i:[],n,t)}var S,I,_,w=(I=(S=function(e){var t,n,r,a,l,u,c,s,f,p;return C(this,(function(h){switch(h.label){case 0:t=e.channel,n=e.emoji,r=e.location,a=e.animationType,l=e.animationId,u=e.isPremium;if(null==n||b.Z.isOnCooldown)return[2];c=u&&null!=a?a:v.q.BASIC;h.label=1;case 1:h.trys.push([1,3,,4]);s=null!=n.id?{emoji_id:n.id,emoji_name:n.name,animation_type:c,animation_id:l}:{emoji_id:null,emoji_name:n.optionallyDiverseSequence,animation_type:c,animation_id:l};return[4,o.Z.post({url:d.ANM.VOICE_CHANNEL_EFFECTS(t.id),body:s})];case 2:h.sent();P(t,n,r,c);i.Z.dispatch({type:"VOICE_CHANNEL_EFFECT_SENT_LOCAL"});return[3,4];case 3:if(429===(f=h.sent()).status&&null!=f.body.retry_after){p=1e3*f.body.retry_after;i.Z.dispatch({type:"VOICE_CHANNEL_EFFECT_UPDATE_TIME_STAMP",cooldownEndsAtMs:p})}return[3,4];case 4:return[2]}}))},function(){var e=this,t=arguments;return new Promise((function(n,r){
|
||
var o=S.apply(e,t);function i(e){g(o,n,r,i,a,"next",e)}function a(e){g(o,n,r,i,a,"throw",e)}i(void 0)}))}),function(e){return I.apply(this,arguments)}),x=(O(_={},v.q.BASIC,"Basic"),O(_,v.q.PREMIUM,"Premium"),_),P=function(e,t,n,r){var o=(0,y.sp)([t],e.getGuildId()),i=o.unicode,l=o.custom,u=o.customExternal,c=o.managed,s=o.managedExternal,f=o.animated,p=x[r];a.ZP.trackWithMetadata(d.rMx.VOICE_CHANNEL_EFFECT_SENT,{channel_id:e.id,guild_id:e.getGuildId(),location:n,emoji_unicode:i,emoji_custom:l,emoji_custom_external:u,emoji_managed:c,emoji_managed_external:s,emoji_animated:f,animation_type:p})}},986279:(e,t,n)=>{"use strict";n.d(t,{H:()=>C,Z:()=>T});var r=n(496486),o=n(202351),i=n(445316),a=n(744564),l=n(285629),u=n(358500);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n]
|
||
;r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(e,r.key,r)}}function d(e){d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return d(e)}function p(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e,t){h=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return h(e,t)}function y(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n)
|
||
;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var b,v=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}var g=[],O={},E=[],C=function(e){null!=e&&a.Z.dispatch({type:"VOICE_CHANNEL_EFFECT_CLEAR",userId:e})},j=[],S=1e4,I=function(){var e=new Date;if((j=[e].concat(y(j)).slice(0,20)).length>=20){
|
||
var t=j[j.length-1],n=e.getTime()-t.getTime();n<S&&(b=new Date(e.getTime()+S-n))}},_=function(e){var t=e.cooldownEndsAtMs;b=new Date(Date.now()+t)},w=(0,r.debounce)((function(){var e=(0,l.cX)(E);i.uv.announce(e,"polite");E=[]}),500),x=function(e){var t=e.emoji,n=e.userId,r=e.animationType;if(null!=t&&null!=r){O[n]={emoji:t,sentAt:Date.now(),animationType:r};E=y(E).concat([{emojiName:t.name,userId:n}]);w()}},P=function(e){var t=e.emoji;if(null!=t){g.unshift(t);(g=(0,r.uniqBy)(g,"name")).length>u.e5+1&&g.pop()}},N=function(e){var t=e.userId;null!=O[t]&&delete O[t]},A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&h(e,t)}(n,e);var t=m(n);function n(){s(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getEffectForUserId=function(e){return O[e]};r.__getLocalVars=function(){return{
|
||
effectCooldownEndTime:b,recentlyUsedEmojis:g,effectsByUserId:O,effectsToAnnounce:E,lastSentEffects:j,MAX_EFFECTS_COUNT:20,MAX_EFFECTS_INTERVAL_MS:S,handleVoiceChannelEffectSentLocal:I,handleTimestampUpdate:_,announceReaction:w,handleReceivedVoiceChannelEffect:x,handleAddRecentlyUsedEmojis:P,handleClearVoiceChannelEffect:N}};!function(e,t,n){t&&f(e.prototype,t);n&&f(e,n)}(n,[{key:"recentlyUsedEmojis",get:function(){return g}},{key:"isOnCooldown",get:function(){return null!=b&&new Date<b}},{key:"effectCooldownEndTime",get:function(){return b}}]);return n}(o.ZP.Store);A.displayName="VoiceChannelEffectsStore";const T=new A(a.Z,{VOICE_CHANNEL_EFFECT_CLEAR:N,VOICE_CHANNEL_EFFECT_RECENT_EMOJI:P,VOICE_CHANNEL_EFFECT_SEND:x,VOICE_CHANNEL_EFFECT_SENT_LOCAL:I,VOICE_CHANNEL_EFFECT_UPDATE_TIME_STAMP:_})},957430:(e,t,n)=>{"use strict";n.d(t,{Z:()=>X})
|
||
;var r=n(785893),o=n(667294),i=n(496486),a=n(202351),l=n(418705),u=n(707961),c=n(744564),s=n(734691),f=n(732016),d=n(316878),p=n(396043),h=n(627342),y=n(589503),b=n(620597),v=n(473903),m=n(38004),g=n(72580),O=n(850841),E=n(242942),C=n(143692);function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e){S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return S(e)}function I(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e,t){_=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return _(e,t)}var w,x=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1
|
||
;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}var N=function(){w=w===C.q.BASIC?C.q.PREMIUM:C.q.BASIC},A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_(e,t)}(n,e);var t=P(n);function n(){j(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){var t;w=null!==(t=null==e?void 0:e.animationType)&&void 0!==t?t:C.q.PREMIUM};r.getState=function(){return{animationType:w}};r.__getLocalVars=function(){return{animationType:w,handleToggleAnimationType:N}};return n}(a.ZP.PersistedStore);A.displayName="VoiceChannelEffectsPersistedStore"
|
||
;A.persistKey="VoiceChannelEffectsPersistedStore";const T=new A(c.Z,{VOICE_CHANNEL_EFFECT_TOGGLE_ANIMATION_TYPE:N});var Z=n(986279),M=n(285629),R=n(175241),L=n(473708);function D(e){var t=e.value,n=e.labelText,o=e.onChange,i=e.onShowUpsell,l=(0,a.e7)([v.default],(function(){return v.default.getCurrentUser()})),u=O.ZP.canUseFancyVoiceChannelReactions(l),c="";c=u?t?L.Z.Messages.VOICE_CHANNEL_EFFECTS_TOGGLE_TOOLTIP_ENABLED:L.Z.Messages.VOICE_CHANNEL_EFFECTS_TOGGLE_TOOLTIP_DISABLED:L.Z.Messages.VOICE_CHANNEL_EFFECTS_TOGGLE_UPSELL;return(0,r.jsx)(R.Z,{checked:t,onChange:o,labelText:n,tooltipText:c,iconAltText:L.Z.Messages.VOICE_CHANNEL_EFFECTS_TOGGLE_TADA_ALT,canToggle:u,onClick:u?function(){}:i})}var k=n(74568),U=n(869530),B=n(2590),F=n(358500),G=n(203600),H=n(131559),V=n(687042),W=n.n(V);function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Y(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){
|
||
if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var K=B.HzX.CHAT,q={section:B.jXE.VOICE_CHANNEL_EFFECTS_EMOJI_PICKER,openPopoutType:"voice_channel_effect_emoji_picker"},Q=[f.ZP.getByName("thumbsup"),f.ZP.getByName("eyes"),f.ZP.getByName("laughing"),f.ZP.getByName("watermelon"),f.ZP.getByName("fork_and_knife"),f.ZP.getByName("yum")].filter(g.lm);function X(e){var t,n=e.channel,f=e.closePopout,g=e.onFocus,j=(0,a.e7)([d.Z],(function(){return d.Z.useReducedMotion
|
||
})),S=(0,a.e7)([v.default],(function(){return v.default.getCurrentUser()})),I=O.ZP.canUseFancyVoiceChannelReactions(S),_=(0,a.e7)([T],(function(){return T.getState().animationType})),w=o.useRef(!1),x=(0,y.wC)(n.guild_id),P=(0,i.uniqBy)(Y(x).concat(Y(Q)),"name").filter((function(e){return!m.ZP.isEmojiFilteredOrLocked(e,n,K)})).slice(0,F.e5),N=(null!==(t=Z.Z.recentlyUsedEmojis)&&void 0!==t?t:[]).filter((function(e){return!P.slice(0,F.e5-1).some((function(t){return t.name===e.name}))}));N.length>0&&P.splice(P.length-1,1,N[0]);var A=(0,M.Iu)(_),R=function(e){c.Z.dispatch({type:"VOICE_CHANNEL_EFFECT_RECENT_EMOJI",emoji:e});(0,E.Lx)({channel:n,emoji:e,location:E.yX.EMOJI_PICKER,animationType:_,animationId:A,isPremium:I})},V=function(){(0,k.openEffectsUpsellModal)({analytics:{type:G.cd.EMOJI_PICKER_EMOJI_CLICKED,object:B.qAy.BUTTON_CTA,section:B.jXE.VOICE_CHANNEL_EFFECTS_BAR}})},z=function(e){w.current=e;e&&p.ZP.trackWithMetadata(B.rMx.VOICE_CHANNEL_EFFECT_EMOJI_PICKER_EXPANDED,{channel_id:X,
|
||
guild_id:J})},X=n.id,J=n.guild_id;o.useEffect((function(){p.ZP.trackWithMetadata(B.rMx.VOICE_CHANNEL_EFFECT_BAR_VIEWED,{channel_id:X,guild_id:J})}),[X,J]);var $=j?[l.z$.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP]:[],ee=_===C.q.PREMIUM;return(0,r.jsx)(h.Z,{contentTypes:$,children:function(e){var t=e.visibleContent,o=e.markAsDismissed,i=j&&t===l.z$.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP;return(0,r.jsx)(u.yRy,{position:"left","aria-label":L.Z.Messages.VOICE_CHANNEL_EFFECTS_MORE,shouldShow:i,renderPopout:function(){return(0,r.jsx)("div",{onMouseEnter:g,children:(0,r.jsx)(b.ZP,{className:W().reducedMotionTooltip,header:L.Z.Messages.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP_TITLE,content:L.Z.Messages.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP_BODY,onClick:function(){s.Z.open(B.oAB.ACCESSIBILITY,null,{scrollPosition:H.rP.REDUCED_MOTION});f()},markAsDismissed:o,buttonCTA:L.Z.Messages.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP_CONFIRM,
|
||
secondaryButtonCTA:L.Z.Messages.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP_CANCEL,caretPosition:b.DF.RIGHT_CENTER})})},children:function(){return(0,r.jsx)(U.Z,{title:L.Z.Messages.VOICE_CHANNEL_EFFECTS_HOTBAR_TITLE,channel:n,closePopout:f,onSelectEmoji:R,onSelectDisabledEmoji:V,onFocus:g,onExpandedToggle:z,analyticsOverride:q,emojiSearchProps:{accessory:(0,r.jsx)(D,{labelText:L.Z.Messages.VOICE_CHANNEL_EFFECTS_TOGGLE,value:ee,onChange:function(){if(I){p.ZP.trackWithMetadata(B.rMx.VOICE_CHANNEL_EFFECT_FANCY_ANIMATION_TOGGLED,{channel_id:X,guild_id:J,enabled:!ee});return c.Z.dispatch({type:"VOICE_CHANNEL_EFFECT_TOGGLE_ANIMATION_TYPE"})}},onShowUpsell:function(){return(0,k.openEffectsUpsellModal)({analytics:{type:w.current?G.cd.VOICE_CHANNEL_EFFECTS_TOGGLE_CLICKED_EXPANDED:G.cd.VOICE_CHANNEL_EFFECTS_TOGGLE_CLICKED,object:B.qAy.VOICE_CHANNEL_EFFECTS_TOGGLE,section:w.current?B.jXE.VOICE_CHANNEL_EFFECTS_EMOJI_PICKER:B.jXE.VOICE_CHANNEL_EFFECTS_BAR}})}})},recentlyUsedEmojis:N})}})}})}},
|
||
74568:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>C,openEffectsUpsellModal:()=>j});var r=n(785893),o=(n(667294),n(707961)),i=n(73202),a=n(593166),l=n(442212),u=n(786170),c=n(652591),s=n(2590),f=n(473708),d=n(147209),p=n.n(d),h=n(77015),y=n.n(h);function b(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,l,"next",e)}function l(e){b(i,r,o,a,l,"throw",e)}a(void 0)}))}}function m(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){m(e,t,n[t])}))}
|
||
return e}function O(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue
|
||
;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function C(e){var t=e.onClose,n=e.analytics,o=O(e,["onClose","analytics"]),d=f.Z.Messages.VOICE_CHANNEL_EFFECTS_UPSELL_BODY_2.format({onPressMore:function(){(0,i.Z)();t();c.default.track(s.rMx.PREMIUM_PROMOTION_OPENED,{location_section:s.jXE.VOICE_CHANNEL_EFFECTS_UPSELL_MODAL,location_object:s.qAy.NAVIGATION_LINK});(0,a.z)()}});return(0,r.jsx)(l.Z,g({title:f.Z.Messages.VOICE_CHANNEL_EFFECTS_UPSELL_HEADER_2,glowUp:d,body:d,artContainerClassName:p().artContainer,enableArtBoxShadow:!1,type:n.type,analyticsLocation:{
|
||
section:s.jXE.VOICE_CHANNEL_EFFECTS_UPSELL_MODAL,object:n.object},analyticsSource:{page:s.ZY5.CHANNEL_CALL,section:n.section},onClose:t,onSubscribeClick:i.Z,artElement:(0,r.jsx)(u.Z,{className:p().video,src:y(),loop:!0,autoPlay:!0})},o))}function j(e){var t=e.analytics;(0,o.ZDy)(v((function(){var e,o;return E(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then(n.bind(n,74568))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,g({analytics:t},e))}]}}))})))}},869530:(e,t,n)=>{"use strict";n.d(t,{Z:()=>D});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n(248088),c=n(707961),s=n(77413),f=n(662478),d=n(732016),p=n(589503),h=n(77918),y=n(394352),b=n(470643),v=n(443812),m=n(377463),g=n(38004),O=n(72580),E=n(2590),C=n(358500),j=n(668785),S=n(687042),I=n.n(S);function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,
|
||
configurable:!0,writable:!0}):e[t]=n;return e}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){w(e,t,n[t])}))}return e}function P(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]
|
||
;if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name)
|
||
;return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}var Z=E.HzX.CHAT,M=[d.ZP.getByName("thumbsup"),d.ZP.getByName("eyes"),d.ZP.getByName("laughing"),d.ZP.getByName("watermelon"),d.ZP.getByName("fork_and_knife"),d.ZP.getByName("yum")].filter(O.lm);function R(e){var t=e.emoji,n=e.isDisabled,i=void 0!==n&&n,l=e.onClick,d=o.useRef(null),p=(0,f.Z)(d);return(0,r.jsx)("span",{ref:d,children:(0,r.jsx)(c.zxk,{onClick:l,look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.NONE,children:(0,r.jsx)(u.Spring,{config:b.u,from:{value:0},to:{value:p?1:0},children:function(e){var n=e.value;return(0,r.jsx)(u.animated.div,{style:{transform:n.to([0,1],[1,1.14]).to((function(e){return"scale(".concat(e,")")}))},children:(0,r.jsx)(s.Z,{className:a()(I().emoji,w({},I().emojiItemDisabled,i)),emojiId:t.id,emojiName:null==t?void 0:t.surrogates,animated:t.animated})})}})})})}function L(e){
|
||
var t=e.otherAccessories,n=e.isEmojiPickerExpanded,o=e.onSetExpanded,i=e.onFocus;return(0,r.jsxs)(r.Fragment,{children:[t,(0,r.jsx)(c.P3F,{className:I().dropDownContainer,onClick:function(){o(!n);i()},children:(0,r.jsx)(m.Z,{className:I().dropDown})})]})}function D(e){var t=e.channel,n=e.title,i=e.closePopout,u=e.onFocus,s=e.onSelectEmoji,f=e.onSelectDisabledEmoji,d=e.onExpandedToggle,b=e.emojiSearchProps,m=e.recentlyUsedEmojis,O=e.analyticsOverride,S=(0,v.Dt)(),_=N(o.useState(!1),2),T=_[0],D=_[1],k=(0,p.wC)(t.guild_id),U=(0,l.uniqBy)(A(k).concat(A(M)),"name").filter((function(e){return!g.ZP.isEmojiFilteredOrLocked(e,t,Z)})).slice(0,C.e5);null!=m&&m.length>0&&U.splice(U.length-1,1,m[0]);var B=function(e){D(e);null==d||d(e)},F=function(e,t){if(null==e&&t)i();else{null!=e&&s(e);B(!t);t&&(0,y.$2)(null)}};return(0,r.jsxs)(c.VqE,{"aria-labelledby":S,children:[(0,r.jsx)(c.y5t,{forceLevel:2,children:(0,r.jsx)(c.nn4,{children:(0,r.jsx)(c.H,{id:S,children:n})})}),(0,r.jsxs)("div",{
|
||
className:I().container,children:[(0,r.jsx)(h.Z,{analyticsOverride:O,channel:t,className:a()(I().animatedPicker,w({},I().animatedPickerTall,T)),headerClassName:a()(I().emojiPickerHeader,w({},I().emojiPickerHeaderExpanded,T)),closePopout:i,onSelectEmoji:T?F:function(){},shouldHidePickerActions:!T,wrapper:"div",pickerIntention:Z,searchProps:P(x({},b),{accessory:(0,r.jsx)(L,{otherAccessories:null==b?void 0:b.accessory,isEmojiPickerExpanded:T,onSetExpanded:B,onFocus:u}),onKeyDown:function(e){null!=e&&e.key!==j.vn.TAB&&(e.key!==j.vn.ENTER||e.shiftKey?B(!0):B(!T))}})}),(0,r.jsx)("div",{className:I().slotsContainer,children:(0,r.jsx)("div",{className:a()(I().slots,I().slotsWide),children:U.map((function(e){var n=g.ZP.isEmojiDisabled(e,t,E.HzX.CHAT);return(0,r.jsx)("div",{className:I().slot,children:(0,r.jsx)(c.DY3,{text:e.name,position:"top","aria-label":e.name,tooltipClassName:I().tooltipContainer,color:c.ua7.Colors.BRAND,children:(0,r.jsx)(R,{emoji:e,isDisabled:n,onClick:function(){
|
||
n?null==f||f(e):F(e,!0)}})})},e.name)}))})})]})]})}},135750:(e,t,n)=>{"use strict";n.d(t,{y0:()=>s,RM:()=>f,Xb:()=>d,sm:()=>p,VP:()=>h,Es:()=>y});var r=n(281110),o=n(744564),i=n(2590);function a(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function l(e){a(i,r,o,l,u,"next",e)}function u(e){a(i,r,o,l,u,"throw",e)}l(void 0)}))}}var u,c=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value])
|
||
;switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o.Z.dispatch({type:"WELCOME_SCREEN_VIEW",guildId:e,isLurking:t})},f=(u=l((function(e){var t;return c(this,(function(n){switch(n.label){case 0:o.Z.dispatch({type:"WELCOME_SCREEN_FETCH_START"});n.label=1;case 1:n.trys.push([1,3,,4]);return[4,r.Z.get({url:i.ANM.GUILD_WELCOME_SCREEN(e),oldFormErrors:!0})];case 2:t=n.sent();o.Z.dispatch({
|
||
type:"WELCOME_SCREEN_FETCH_SUCCESS",guildId:e,welcomeScreen:t.body});return[2,t.body];case 3:n.sent();o.Z.dispatch({type:"WELCOME_SCREEN_FETCH_FAIL"});return[3,4];case 4:return[2]}}))})),function(e){return u.apply(this,arguments)}),d=function(){o.Z.dispatch({type:"WELCOME_SCREEN_SETTINGS_RESET"})},p=function(){o.Z.dispatch({type:"WELCOME_SCREEN_SETTINGS_CLEAR"})},h=function(e){o.Z.dispatch({type:"WELCOME_SCREEN_SETTINGS_UPDATE",settings:e})},y=function(){var e=l((function(e,t){var n;return c(this,(function(a){switch(a.label){case 0:o.Z.dispatch({type:"WELCOME_SCREEN_SUBMIT"});a.label=1;case 1:a.trys.push([1,3,,4]);return[4,r.Z.patch({url:i.ANM.GUILD_WELCOME_SCREEN(e),body:{description:t.description,welcome_channels:t.channels,enabled:t.enabled},oldFormErrors:!0})];case 2:n=a.sent();o.Z.dispatch({type:"WELCOME_SCREEN_SUBMIT_SUCCESS",guildId:e,welcomeScreen:n.body});return[3,4];case 3:a.sent();o.Z.dispatch({type:"WELCOME_SCREEN_SUBMIT_FAILURE"});return[3,4];case 4:return[2]}}))}))
|
||
;return function(t,n){return e.apply(this,arguments)}}()},102909:(e,t,n)=>{"use strict";n.d(t,{a:()=>f,Z:()=>O});var r=n(202351),o=n(744564);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return a(e)}function l(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){u=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return u(e,t)}var c=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0
|
||
}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var f={},d={},p={},h=!1,y=!1,b=!1;function v(e){var t=e.invite.guild;if(null!=(null==t?void 0:t.welcome_screen)){d[t.id]=t.welcome_screen;return!0}return!1}function m(e){var t=e.welcomeScreen,n=e.guildId;d[n]=null!=t?t:f}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&u(e,t)}(n,e);var t=s(n);function n(){i(this,n);return t.apply(this,arguments)}var r=n.prototype;r.get=function(e){if(null!=e)return d[e]};r.isFetching=function(){return y};r.hasError=function(){return b};r.hasSeen=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return null!=e&&(t?h:p[e]||!1)};r.__getLocalVars=function(){return{
|
||
welcomeScreens:d,seenGuilds:p,lurkingGuildSeen:h,fetching:y,hasError:b}};return n}(r.ZP.Store);g.displayName="WelcomeScreenStore";const O=new g(o.Z,{INVITE_RESOLVE_SUCCESS:v,INVITE_ACCEPT_SUCCESS:v,WELCOME_SCREEN_SUBMIT_SUCCESS:m,WELCOME_SCREEN_UPDATE:m,WELCOME_SCREEN_VIEW:function(e){var t=e.guildId,n=e.isLurking;p[t]=!0;n&&(h=!0)},GUILD_STOP_LURKING:function(){h=!1},GUILD_DELETE:function(e){var t=e.guild.id;p[t]=!1},WELCOME_SCREEN_FETCH_START:function(){y=!0;b=!1},WELCOME_SCREEN_FETCH_SUCCESS:function(e){y=!1;b=!1;var t=e.welcomeScreen,n=e.guildId;d[n]=null!=t?t:f},WELCOME_SCREEN_FETCH_FAIL:function(){y=!1;b=!0}})},180172:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(496486),o=n.n(r),i=n(202351),a=n(744564),l=n(481008),u=n(306263),c=n(443132);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e){f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return f(e)}function d(e,t){
|
||
return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e,t){p=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return p(e,t)}var h=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var b=12e4,v={},m={},g=new Set;function O(){v={};m={}}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function")
|
||
;e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&p(e,t)}(n,e);var t=y(n);function n(){s(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getPreviewURL=function(e,t,n){var r=(0,u.V9)({streamType:null!=e?c.lo.GUILD:c.lo.CALL,guildId:e,channelId:t,ownerId:n}),o=v[r];if(null==o||Date.now()>o.expires){if(!g.has(r)){g.add(r);a.Z.wait((function(){(0,l.n9)(e,t,n)}))}return null}return o.url};r.getPreviewURLForStreamKey=function(e){var t=(0,u.my)(e),n=t.guildId,r=t.channelId,o=t.ownerId;return this.getPreviewURL(n,r,o)};r.getIsPreviewLoading=function(e,t,n){var r=(0,u.V9)({streamType:null!=e?c.lo.GUILD:c.lo.CALL,guildId:e,channelId:t,ownerId:n});return g.has(r)};r.__getLocalVars=function(){return{READ_PREVIEW_EXPIRY:b,READ_PREVIEW_DEFAULT_RETRY:1e4,streamPreviews:v,fetchAttempts:m,fetchingPreviews:g}};return n}(i.ZP.Store);E.displayName="ApplicationStreamPreviewStore";const C=new E(a.Z,{CONNECTION_OPEN:O,LOGOUT:O,
|
||
STREAM_PREVIEW_FETCH_START:function(e){var t,n=e.streamKey;m[n]=(null!==(t=m[n])&&void 0!==t?t:0)+1;g.add(n)},STREAM_PREVIEW_FETCH_SUCCESS:function(e){var t=e.streamKey,n=e.previewURL;v[t]={url:n,expires:Date.now()+b};m[t]=0;g.delete(t)},STREAM_PREVIEW_FETCH_FAIL:function(e){var t=e.streamKey,n=e.retryAfter;v[t]={url:null,expires:Date.now()+(null!=n?n:1e4*m[t])};g.delete(t)},VOICE_STATE_UPDATES:function(e){var t=e.voiceStates;return(!o().isEmpty(v)||!o().isEmpty(m))&&t.reduce((function(e,t){var n=t.userId,r=t.guildId,o=t.channelId;if(t.selfStream)return e;var i=(0,u.V9)({streamType:null!=r?c.lo.GUILD:c.lo.CALL,guildId:r,channelId:o,ownerId:n});delete v[i];delete m[i];return!0}),!1)}})},77457:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(202351),o=n(744564);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return a(e)}
|
||
function l(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){u=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return u(e,t)}var c=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var f={toastsEnabledForChannel:{}},d=f;var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function")
|
||
;e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&u(e,t)}(n,e);var t=s(n);function n(){i(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){d=null!=e?e:f};r.getToastsEnabled=function(e){var t;return null===(t=d.toastsEnabledForChannel[e])||void 0===t||t};r.getState=function(){return d};r.__getLocalVars=function(){return{initialState:f,state:d}};return n}(r.ZP.PersistedStore);p.displayName="CallChatToastsStore";p.persistKey="CallChatToasts";const h=new p(o.Z,{CALL_CHAT_TOASTS_SET_ENABLED:function(e){var t=e.channelId,n=e.toastsEnabled;d.toastsEnabledForChannel[t]=n},LOGOUT:function(){d.toastsEnabledForChannel={}}})},82863:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(202351),o=n(744564);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return a(e)}
|
||
function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){u=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return u(e,t)}var c,s=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}!function(e){e.FAILED="failed";e.SUCCEEDED="succeeded"}(c||(c={}));var d={};var p=function(e){!function(e,t){
|
||
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&u(e,t)}(n,e);var t=f(n);function n(){i(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getFollowerStatsForChannel=function(e){return d[e]};r.__getLocalVars=function(){return{ChannelFollowerStatsFetchStates:c,channelIdToFollowerStats:d}};return n}(r.ZP.Store);p.displayName="ChannelFollowerStatsStore";const h=new p(o.Z,{CONNECTION_OPEN:function(){d={}},CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS:function(e){var t=e.channelId,n=e.stats;n=null!=n?n:{};d[t]={loadingStatus:c.SUCCEEDED,lastFetched:Date.now(),channelsFollowing:n.channels_following,guildMembers:n.guild_members,guildsFollowing:n.guilds_following,usersSeenEver:n.users_seen_ever,subscribersGainedSinceLastPost:n.subscribers_gained_since_last_post,subscribersLostSinceLastPost:n.subscribers_lost_since_last_post}},
|
||
CHANNEL_FOLLOWER_STATS_FETCH_FAILURE:function(e){var t=e.channelId;d[t]={loadingStatus:c.FAILED,lastFetched:Date.now(),channelsFollowing:0,guildMembers:0,guildsFollowing:0,usersSeenEver:0,subscribersGainedSinceLastPost:0,subscribersLostSinceLastPost:0}}})},780861:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(202351),o=n(744564),i=n(473419);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e){l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return l(e)}function u(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t){c=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return c(e,t)}var s=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function f(e){var t=function(){
|
||
if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}var d=new Set;var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&c(e,t)}(n,e);var t=f(n);function n(){a(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){null!=e&&(d=new Set(e.expandedFolders));this.waitFor(i.Z)};r.getState=function(){return{expandedFolders:Array.from(d)}};r.getExpandedFolders=function(){return d};r.isFolderExpanded=function(e){return d.has(e)}
|
||
;r.__getLocalVars=function(){return{expandedFolders:d}};return n}(r.ZP.PersistedStore);p.displayName="ExpandedGuildFolderStore";p.persistKey="ExpandedGuildFolderStore";const h=new p(o.Z,{TOGGLE_GUILD_FOLDER_EXPAND:function(e){var t=e.folderId;(d=new Set(d)).has(t)?d.delete(t):d.add(t)},SET_GUILD_FOLDER_EXPANDED:function(e){var t=e.folderId,n=e.expanded;d=new Set(d);n?d.add(t):d.has(t)&&d.delete(t)},USER_SETTINGS_PROTO_UPDATE:function(){var e=i.Z.getGuildFolders();if(null==e)return!1;var t=!1,n=!0,r=!1,o=void 0;try{for(var a,l=function(){var n=a.value;if(!e.some((function(e){return e.folderId===n}))){(d=new Set(d)).delete(n);t=!0}},u=d[Symbol.iterator]();!(n=(a=u.next()).done);n=!0)l()}catch(e){r=!0;o=e}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}return t},GUILD_FOLDER_COLLAPSE:function(){if(0===d.size)return!1;d=new Set}})},3862:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(496486),o=n.n(r),i=n(202351),a=n(744564),l=n(75509);function u(e,t){
|
||
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function s(e){s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return s(e)}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){c(e,t,n[t])}))}return e}function d(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}
|
||
return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function p(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e,t){h=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return h(e,t)}var y=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}var v,m,g=Object.freeze({}),O={};function E(e){var t=e.lobbyId;delete O[t]}
|
||
var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&h(e,t)}(n,e);var t=b(n);function n(){u(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getAllVoiceStates=function(){return O};r.getVoiceStates=function(e){var t;return null!==(t=O[e])&&void 0!==t?t:g};r.getVoiceState=function(e,t){return this.getVoiceStates(e)[t]};r.getLobbyIdsForUser=function(e){return Object.keys(O).filter((function(t){return null!=O[t][e]}))};r.__getLocalVars=function(){return{EMPTY_MAP:g,lobbies:O,currentUserId:v,currentSessionId:m}};return n}(i.ZP.Store);C.displayName="LobbyVoiceStateStore";const j=new C(a.Z,{CONNECTION_OPEN:function(e){var t=e.user,n=e.sessionId;O={};v=t.id;m=n},OVERLAY_INITIALIZE:function(e){var t=e.lobbyVoiceStates,n=e.user,r=e.sessionId;O={};o().each(t,(function(e,t){O[t]={}
|
||
;o().each(e,(function(e,n){O[t][n]=new l.Z(e)}))}));v=n.id;m=r},LOBBY_VOICE_STATE_UPDATE:function(e){var t,n,r=e.sessionId,o=e.userId,i=e.lobbyId,a=e.channelId,u=e.mute,s=e.deaf,p=e.selfMute,h=e.selfDeaf,y=o===v&&r!==m,b=null!==(t=O[i])&&void 0!==t?t:{},g=b[o];null==a||y||(n=null==g?new l.Z({userId:o,sessionId:r,channelId:a,mute:u,deaf:s,selfMute:p,selfDeaf:h}):g.merge({userId:o,sessionId:r,channelId:a,mute:u,deaf:s,selfMute:p,selfDeaf:h}));if(g===n)return!1;null==n?delete(b=f({},b))[o]:b=d(f({},b),c({},o,n));O[i]=b},LOBBY_DELETE:E,LOBBY_DISCONNECT:E})},66768:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(202351),o=n(744564),i=n(382060),a=n(295652),l=n(61209),u=n(717091),c=n(715107),s=n(796909);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e){d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return d(e)}function p(e,t){
|
||
return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e,t){h=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return h(e,t)}var y=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}var v=[];function m(){var e=s.Z.getPrivateChannelIds().filter((function(e){return u.ZP.getMentionCount(e)>0}));e.length>20&&(e.length=20);if((0,a.EF)(e,v))return!1;v=e;return!0}function g(){return m()}
|
||
function O(e){var t=e.channelId,n=l.Z.getChannel(t);return!(null==n||!(0,i.hv)(n.type))&&m()}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&h(e,t)}(n,e);var t=b(n);function n(){f(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(s.Z,l.Z,c.Z,u.ZP)};r.getUnreadPrivateChannelIds=function(){return v};r.__getLocalVars=function(){return{MAX_UNREAD_CHANNELS:20,unreadPrivateChannelIds:v}};return n}(r.ZP.Store);E.displayName="PrivateChannelReadStateStore";const C=new E(o.Z,{CONNECTION_OPEN:g,OVERLAY_INITIALIZE:g,MESSAGE_CREATE:O,MESSAGE_ACK:O,CHANNEL_SELECT:function(e){var t=e.channelId,n=l.Z.getChannel(t);return!(null==n||!(0,i.hv)(n.type))&&m()},CHANNEL_DELETE:function(e){var t=e.channel.id,n=l.Z.getChannel(t);return!(null==n||!(0,i.hv)(n.type))&&m()},
|
||
WINDOW_FOCUS:function(){var e=l.Z.getChannel(c.Z.getChannelId());return!(null==e||!(0,i.hv)(e.type))&&m()},CHANNEL_CREATE:function(e){var t=e.channel.id,n=l.Z.getChannel(t);return!(null==n||!(0,i.hv)(n.type))&&m()},CHANNEL_UPDATES:function(e){var t=e.updates,n=!1,r=!0,o=!1,a=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done);r=!0){var s=u.value.channel.id,f=l.Z.getChannel(s);null!=f&&(0,i.hv)(f.type)&&(n=!0)}}catch(e){o=!0;a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return!!n&&m()}})},876296:(e,t,n)=>{"use strict";n.d(t,{Z:()=>V});var r=n(496486),o=n.n(r),i=n(202351),a=n(744564),l=n(456837),u=n(382060),c=n(421281),s=n(749565),f=n(61209),d=n(213818),p=n(840922),h=n(473903),y=n(2590);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e){
|
||
m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return m(e)}function g(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e,t){O=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return O(e,t)}function E(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e)||function(){
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var C=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var S,I=!1,_="",w=0,x=[],P=!1,N=new Set,A=null;function T(){_="";w=0;x=[];N=new Set;I=!1;A=null}function Z(e){_=e;w=0;M()}function M(){if(!I)return!1;var e=f.Z.getChannel(A);if(0===_.trim().length){null!=S&&S.clearQuery();x=function(e){var t=p.Z.getFriendIDs();(null==e?void 0:e.isPrivate())&&(t=t.filter((function(t){
|
||
return!e.recipients.includes(t)})));return t.reduce((function(e,t){var n=h.default.getUser(t);if(null==n)return e;e.push({user:n});return e}),[]).sort(L)}(e);return!0}var t=null!=e?e.recipients:[];null!=S&&S.setQuery(_,{friends:!0},t,function(){var e,t=d.Z.getFrequently().filter((function(e){return e instanceof u.mn&&e.isDM()})),n=(e=Math).max.apply(e,E(t.map((function(e){var t=e.id;return d.Z.getScore(t)})))),r={};t.forEach((function(e){var t=d.Z.getScore(e.id),o=e.getRecipientId(),i=p.Z.isFriend(o)?.2:0,a=null!=f.Z.getDMFromUserId(o)?.1:0;r[o]=1+t/n+i+a}));return r}());return!1}function R(){if(!I)return!1;var e=P;return(P=o().some(p.Z.getRelationships(),(function(e){return e===y.OGo.FRIEND})))!==e}function L(e,t){return(0,c._I)(s.ZP.getName(e.user).toLocaleLowerCase()).localeCompare((0,c._I)(s.ZP.getName(t.user).toLocaleLowerCase()))}function D(e){var t=e.results;if(I&&""!==_){x=t.map((function(e){var t=e.user,n=e.id,r=e.score,o=e.comparator;return{
|
||
user:null!=t?t:h.default.getUser(n),score:r,comparator:o}}));H.emitChange()}}function k(){if(null!=S){S.destroy();S=null}return l.Z.getSearchContext(D,1e3)}function U(e){if(e.key!==y.vTt)return!1;I=!0;R();S=k();A=null;Z("")}function B(e){if(e.key!==y.vTt)return!1;F()}function F(){if(null!=S){S.destroy();S=null}T()}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&O(e,t)}(n,e);var t=j(n);function n(){v(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(h.default,f.Z,p.Z);this.syncWith([h.default,f.Z],M);this.syncWith([p.Z],R)};r.getResults=function(){return x};r.hasFriends=function(){return P};r.getSelectedUsers=function(){return N};r.getQuery=function(){return _};r.getState=function(){return{query:_,selectedRow:w,selectedUsers:N,results:x,hasFriends:P}}
|
||
;r.__getLocalVars=function(){return{LIMIT:1e3,userSearchContext:S,isOpen:I,query:_,selectedRow:w,results:x,hasFriends:P,selectedUsers:N,selectedChannelId:A,instance:H}};return n}(i.ZP.Store);G.displayName="PrivateChannelRecipientsInviteStore";var H=new G(a.Z,{CONNECTION_OPEN:function(){T()},CHANNEL_SELECT:function(e){var t=e.guildId,n=e.channelId;if(null!=t)return!1;var r=I;T();I=r;A=n;return M()},MODAL_PUSH:U,SHOW_ACTION_SHEET:U,PRIVATE_CHANNEL_RECIPIENTS_INVITE_OPEN:function(e){I=!0;R();S=k();A=e.channelId;Z("")},MODAL_POP:B,HIDE_ACTION_SHEET:B,PRIVATE_CHANNEL_RECIPIENTS_INVITE_CLOSE:F,PRIVATE_CHANNEL_RECIPIENTS_INVITE_QUERY:function(e){A=e.channelId;Z(e.query)},PRIVATE_CHANNEL_RECIPIENTS_INVITE_SELECT:function(e){w=e.row},PRIVATE_CHANNEL_RECIPIENTS_ADD_USER:function(e){var t=e.userId;N.add(t);N=new Set(N)},PRIVATE_CHANNEL_RECIPIENTS_REMOVE_USER:function(e){var t=e.userId;N.delete(t);N=new Set(N)}});const V=H},269839:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v})
|
||
;var r=n(496486),o=n.n(r),i=n(202351),a=n(744564),l=n(567403);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e){c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return c(e)}function s(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t){f=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return f(e,t)}var d=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){
|
||
var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}var h=null,y={};var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&f(e,t)}(n,e);var t=p(n);function n(){u(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(l.Z)};r.getOptimalRegion=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.getRegions(t);return null!=n?null!==(e=n.find((function(e){return e.optimal})))&&void 0!==e?e:o().sample(n):null};r.getOptimalRegionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.getOptimalRegion(e);return null!=t?t.id:null};r.getRandomRegion=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.getRegions(e)
|
||
;return null!=t?o().sample(t):null};r.getRandomRegionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.getRandomRegion(e);return null!=t?t.id:null};r.getRegions=function(e){return null!=e?y[e]:h};r.__getLocalVars=function(){return{defaultRegions:h,guildRegions:y}};return n}(i.ZP.Store);b.displayName="RegionStore";const v=new b(a.Z,{LOAD_REGIONS:function(e){var t=o().sortBy(e.regions,(function(e){return e.name}));null!=e.guildId?y[e.guildId]=t:h=t},GUILD_DELETE:function(e){delete y[e.guild.id]}})},107218:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B});var r=n(110251),o=n.n(r),i=n(441143),a=n.n(i),l=n(896812),u=n(944522),c=n(473419),s=n(295652),f=n(72580),d=n(837067),p=n(567403),h=n(637493),y=n(9430),b=n(473903);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e){m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return m(e)}
|
||
function g(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function O(e,t){return!t||"object"!==j(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e,t){E=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return E(e,t)}function C(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1)
|
||
;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var j=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}var I,_=new l.g8;function w(e){switch(e.type){case l.eD.FOLDER:return{folderId:e.id,folderName:e.name,
|
||
folderColor:e.color,expanded:e.expanded,guildIds:e.children.map((function(e){return e.id}))};case l.eD.GUILD:return{folderId:void 0,guildIds:[e.id]};default:throw Error("[SortedGuildStore] Unexpected guilds tree node type.")}}function x(e,t){var n=_;_=new l.g8;if(0===e.length&&t.length>0){var r=!0,i=!1,a=void 0;try{for(var c,s=t[Symbol.iterator]();!(r=(c=s.next()).done);r=!0){var f=c.value;_.addNode((0,l.Mg)(f))}}catch(e){i=!0;a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}}else{var h=!0,y=!1,b=void 0;try{for(var v,m=e[Symbol.iterator]();!(h=(v=m.next()).done);h=!0){var g=v.value;if(0!==g.guildIds.length)if(null==g.folderId)_.addNode((0,l.Mg)(g.guildIds[0]));else{var O=(0,l.qQ)(g);_.addNode(O);var E=!0,C=!1,j=void 0;try{for(var S,I=g.guildIds[Symbol.iterator]();!(E=(S=I.next()).done);E=!0){var w=S.value;_.addNode((0,l.Mg)(w),O)}}catch(e){C=!0;j=e}finally{try{E||null==I.return||I.return()}finally{if(C)throw j}}}}}catch(e){y=!0;b=e}finally{try{
|
||
h||null==m.return||m.return()}finally{if(y)throw b}}}var x=!0,P=!1,N=void 0;try{for(var A,T=_.allNodes()[Symbol.iterator]();!(x=(A=T.next()).done);x=!0){var Z=A.value;Z.type===l.eD.GUILD&&(u.Z.isLurking(Z.id)||null==p.Z.getGuild(Z.id)&&!d.Z.isUnavailable(Z.id))&&_.removeNode(Z)}}catch(e){P=!0;N=e}finally{try{x||null==T.return||T.return()}finally{if(P)throw N}}var M=!0,R=!1,L=void 0;try{for(var D,k=Object.values(_.nodes)[Symbol.iterator]();!(M=(D=k.next()).done);M=!0){var U=D.value;U.type===l.eD.FOLDER&&0===U.children.length&&_.removeNode(U)}}catch(e){R=!0;L=e}finally{try{M||null==k.return||k.return()}finally{if(R)throw L}}for(var B in p.Z.getGuilds())null!=_.nodes[B]||u.Z.isLurking(B)||_.addNode((0,l.Mg)(B),_.root,!1);return!o()(n,_)}function P(){var e,t,n;return x(null!==(t=c.Z.getGuildFolders())&&void 0!==t?t:[],null!==(n=null===(e=c.Z.settings.guildFolders)||void 0===e?void 0:e.guildPositions)&&void 0!==n?n:[])}function N(){var e,t,n=c.Z.getGuildFolders()
|
||
;return(null==I||!o()(I,n))&&x(null!=(I=n)?I:[],null!==(t=null===(e=c.Z.settings.guildFolders)||void 0===e?void 0:e.guildPositions)&&void 0!==t?t:[])}function A(e){var t=e.sourceId,n=e.targetId,r=e.moveToBelow,o=e.combine,i=_.getNode(t),u=_.getNode(n);if(null==i||null==u)return!1;a()(!(o&&i.type===l.eD.FOLDER),"[SORTED GUILDS] Can't combine a folder ".concat(i.id," with another guilds list item"));a()(!(o&&null!=u.parentId),"[SORTED GUILDS] Can't combine with a guild ".concat(u.id," that's already inside of a folder"));a()(!(i.type===l.eD.FOLDER&&null!=u.parentId),"[SORTED GUILDS] Can't move a folder ".concat(i.id," to inside of another folder ").concat(u.parentId));if(o){var c=u.type!==l.eD.FOLDER?_.convertToFolder(u):u;_.moveInto(i,c,r)}else _.moveNextTo(i,u,r)}function T(e){var t=e.sourceIds,n=e.name,r=t.shift();if(null==r)return!1;var o=_.getNode(r);if(null==o)return!1;var i=_.convertToFolder(o);i.name=n;t.forEach((function(e){var t=_.getNode(e);null!=t&&_.moveInto(t,i,!0)}))}
|
||
function Z(e){var t=e.targetId,n=e.sourceIds,r=g(e,["targetId","sourceIds"]),o=_.getNode(t);if(null==o)return!1;if(o.type!==l.eD.FOLDER)return!1;var i=""===r.name?void 0:r.name;if(i!==o.name){var u=_.cloneNode(o);a()(u.id===o.id,"[SORTED GUILDS] Replacement folder node must have same id.");u.name=i;_.replaceNode(o,u)}var c=_.getNode(t);if(null==c)return!1;var s=c.children.map((function(e){return e.id})).filter(f.lm),d=new Set(s),p=new Set(n),h=new Set(C(s).filter((function(e){return!p.has(e)})));n.filter((function(e){return!d.has(e)})).forEach((function(e){var t=_.getNode(e);null!=t&&_.moveInto(t,c,!0)}));h.forEach((function(e){var t=_.getNode(e);null!=t&&_.moveNextTo(t,c,!0)}))}function M(e){var t=e.targetId,n=_.getNode(t);if(null==n)return!1;if(n.type!==l.eD.FOLDER)return!1;n.children.map((function(e){return e.id})).filter(f.lm).forEach((function(e){var t=_.getNode(e);null!=t&&_.moveNextTo(t,n,!0)}))}function R(e){
|
||
var t=e.guildId,n=e.joinedAt,r=e.user,o=b.default.getCurrentUser(),i=p.Z.getGuild(t);if((null==o?void 0:o.id)!==r.id||null==i)return!1;var a="string"==typeof n?new Date(n):n;return a!==i.joinedAt&&null!=a&&P()}var L=(0,s.oH)((function(e,t){return e.sortedGuildNodes().map((function(e){return p.Z.getGuild(e.id)})).filter(f.lm)})),D=(0,s.oH)((function(e,t){return e.sortedGuildNodes().map((function(e){return e.id}))})),k=(0,s.oH)((function(e,t){return e.getRoots().map(w)})),U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&E(e,t)}(n,e);var t=S(n);function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var e;(e=t.call(this)).loadCache=function(){var t=e.readSnapshot(n.LATEST_SNAPSHOT_VERSION),r=null==t?void 0:t.tree
|
||
;null!=r&&(_=new l.g8).loadSnapshot(r)};e.registerActionHandlers({CONNECTION_OPEN:P,OVERLAY_INITIALIZE:P,CACHE_LOADED_LAZY:e.loadCache,GUILD_CREATE:P,GUILD_DELETE:P,GUILD_MEMBER_ADD:R,USER_SETTINGS_PROTO_UPDATE:N,GUILD_MOVE_BY_ID:A,GUILD_FOLDER_CREATE_LOCAL:T,GUILD_FOLDER_EDIT_LOCAL:Z,GUILD_FOLDER_DELETE_LOCAL:M});e.waitFor(p.Z,y.Z,c.Z,d.Z,u.Z);return e}var r=n.prototype;r.getGuildsTree=function(){return _};r.getGuildFolders=function(){return k(_,_.version)};r.getFlattenedGuilds=function(){return L(_,_.version)};r.getFlattenedGuildIds=function(){return D(_,_.version)};r.getCompatibleGuildFolders=function(){return _.root.children.map(w)};r.takeSnapshot=function(){return{version:n.LATEST_SNAPSHOT_VERSION,data:{tree:_.getSnapshot()}}};return n}(h.Z);U.displayName="SortedGuildStore";U.LATEST_SNAPSHOT_VERSION=1;const B=new U},191677:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(202351),o=n(630631),i=n(744564),a=n(399663);function l(e,t){
|
||
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return u(e)}function c(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e,t){s=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return s(e,t)}var f=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments)
|
||
;return c(this,n)}}var p="SpellcheckStore",h=!0,y=new Set;function b(){o.Z.set(p,{enabled:h,learnedWords:y})}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&s(e,t)}(n,e);var t=d(n);function n(){l(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){var e=o.Z.get(p);if(null!=e){h=e.enabled;y=new Set(e.learnedWords);(0,a.gL)(h);(0,a.fG)(y)}};r.isEnabled=function(){return h};r.__getLocalVars=function(){return{STORAGE_KEY:p,enabled:h,learnedWords:y}};return n}(r.ZP.Store);v.displayName="SpellcheckStore";const m=new v(i.Z,{SPELLCHECK_TOGGLE:function(){h=!h;(0,a.gL)(h);b()},SPELLCHECK_LEARN_WORD:function(e){var t=e.word;y.add(t.toLocaleLowerCase());(0,a.fG)(y);b()},I18N_LOAD_SUCCESS:function(e){var t=e.locale;(0,a._2)(t)}})},10712:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g})
|
||
;var r=n(785893),o=(n(667294),n(707961)),i=n(744564),a=n(651921),l=n(2590);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(e,t){if(null==e)return{}
|
||
;var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var p,h,y=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop()
|
||
;continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},b=null;function v(e){null!=p&&e?p():null!=h&&h();p=null;h=null}function m(){var e=!1;(0,o.ZDy)(c((function(){var t,o;return y(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(84604)]).then(n.bind(n,184604))];case 1:t=i.sent(),o=t.default;return[2,function(t){var n=t.onClose,i=d(t,["onClose"]);return(0,r.jsx)(o,f(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){s(e,t,n[t])}))}return e}({},i),{onClose:function(t){e=t;n()}}))}]}}))})),{onCloseCallback:function(){(0,a.M)(e)}})}const g={init:function(){i.Z.subscribe("PREMIUM_REQUIRED_MODAL_OPEN",(function(e){v(!1);b=e.context;p=e.resolve;h=e.reject;l.e3s===e.context&&m()}));i.Z.subscribe("PREMIUM_REQUIRED_MODAL_CLOSE",(function(e){var t=e.shouldContinue;b=null;v(t)}));i.Z.subscribe("OVERLAY_SET_INPUT_LOCKED",(function(e){if(e.locked&&null!=b){b=null;v(!1)}}))}}},801991:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(785893),o=(n(667294),n(707961)),i=n(744564),a=n(584452),l=n(2590);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function s(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var p,h,y=function(e,t){var n,r,o,i,a={label:0,sent:function(){
|
||
if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}
|
||
}([i,l])}}},b=null,v=null;function m(e){null!=p&&null!=b?p(b):null!=h&&h(e);p=null;h=null}function g(e,t,i,u){var p=null;(0,o.ZDy)(c((function(){var o,a;return y(this,(function(c){switch(c.label){case 0:return[4,Promise.all([n.e(40532),n.e(70232),n.e(56167)]).then(n.bind(n,782158))];case 1:o=c.sent(),a=o.default;return[2,function(n){var o=n.onClose,c=d(n,["onClose"]);return(0,r.jsx)(a,f(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){s(e,t,n[t])}))}return e}({},c),{onClose:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;p=e;o()},applicationId:t,skuId:i,analyticsSource:u,isIAP:e===l.IlC.OVERLAY}))}]}}))})),{onCloseCallback:function(){(0,a.J)(p)}})}const O={init:function(){
|
||
i.Z.subscribe("PURCHASE_CONFIRMATION_MODAL_OPEN",(function(e){m();v=e.context;b=e.entitlements;p=e.resolve;h=e.reject;l.e3s===e.context&&g(e.context,e.applicationId,e.skuId,e.analyticsSource)}));i.Z.subscribe("PURCHASE_CONFIRMATION_MODAL_CLOSE",(function(e){var t=e.error;v=null;m(t)}));i.Z.subscribe("OVERLAY_SET_INPUT_LOCKED",(function(e){if(e.locked&&null!=v){v=null;m()}}))}}},412732:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>z,yk:()=>Y});var r=n(940060),o=n(202351),i=n(630631),a=n(744564),l=n(761953),u=n(247250),c=n(327499),s=n(32162),f=n(842629),d=n(773011),p=n(358969),h=n(382840),y=n(996344),b=n(784426),v=n(451458),m=n(915840),g=n(766496),O=n(367406),E=n(61209),C=n(567403),j=n(288263),S=n(682776),I=n(840922),_=n(715107),w=n(436154),x=n(793461),P=n(473903),N=n(407561),A=n(773148),T=n(537079),Z=n(374092),M=n(120415),R=n(716118),L=n(749565),D=n(2590),k=n(3155),U=n(473708);function B(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e){
|
||
F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return F(e)}function G(e,t){return!t||"object"!==V(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function H(e,t){H=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return H(e,t)}var V=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=F(e);if(t){var o=F(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return G(this,n)}}
|
||
var z="message1",Y=.4,K="message3",q="message2",Q="discord_dismissed_notification_shown",X=document.hasFocus(),J=null,$=["FR","GF","PF","TF","RE","GP","MQ","YT","NC","PM","WF"],ee=new(function(){function e(){B(this,e);this._channels={}}var t=e.prototype;t.track=function(e,t){var n=this._channels[e];if(null==n){n=[];this._channels[e]=n}n.push(t);for(;n.length>1;){var r=n.shift();null!=r&&null!=r.close&&r.close()}};t.clearChannel=function(e){var t=this._channels[e];if(null!=t){delete this._channels[e];t.forEach((function(e){return e.close()}))}};return e}());function te(){return j.Z.getDesktopType()===D.qrD.NEVER||w.Z.getStatus()===D.Skl.DND}function ne(e){return null!=N.Z.getVoiceStateForChannel(e)}var re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&H(e,t)}(n,e);var t=W(n);function n(){B(this,n)
|
||
;return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(P.default,E.Z,j.Z,C.Z,g.Z,I.Z,S.Z,N.Z,y.Z)};r.__getLocalVars=function(){return{MESSAGE_SAME_CHANNEL_SOUND:K,MESSAGE_SAME_CHANNEL_SOUND_VOLUME:.4,ACTIVITY_START_SOUND:q,ACTIVITY_START_SOUND_VOLUME:.4,MAX_PER_CHANNEL:1,DISCORD_DISMISSED_NOTIF_KEY:Q,focused:X,userCountryCode:J,NOTIFY_ON_CLOSE_COUNTRIES:$,notificationTracker:ee}};return n}(o.ZP.Store);re.displayName="NotificationStore";new re(a.Z,__OVERLAY__?{}:{NOTIFICATIONS_SET_PERMISSION_STATE:function(e){e.enabled!==D.$Ab.ENABLED||M.FB||Z.Z.showNotification(n(998634),U.Z.Messages.NOTIFICATION_TITLE_DISCORD,U.Z.Messages.BROWSER_NOTIFICATIONS_ENABLED_BODY,{notif_type:"NOTIFICATIONS_SET_PERMISSION_STATE"},{omitViewTracking:!0,sound:z,volume:Y,tag:"hello",onClick:function(){window.focus()}})},NOTIFICATION_CREATE:function(e){var t=e.icon,n=e.title,r=e.body,o=e.trackingProps,i=e.options;if(te())return!1;Z.Z.showNotification(t,n,r,o,i);return!1},
|
||
WINDOW_FOCUS:function(e){if(X=e.focused){var t=_.Z.getChannelId();null!=t&&ee.clearChannel(t)}},MESSAGE_CREATE:function(e){var t=e.channelId,r=e.message;if(e.optimistic)return!1;var o=E.Z.getChannel(t),i=P.default.getUser(r.author.id);if(null==o||null==i)return!1;var l=(0,T.eF)(r,t,!X),c=j.Z.getNotifyMessagesInSelectedChannel()&&(0,T.N_)(r,t);if(!l&&!c)return!1;var f=!j.Z.isSoundDisabled(z);if(c){f&&R.GN(K,.4);if(!X)return!1}if(!l)return!1;var d=n(304275).Z,p=n(674482).Z;if(null!=d.getFocusedPID()&&p.getTextChatNotificationMode()===D.Ypu.ENABLED&&!x.Z.disableNotifications)return!1;var h=(0,T.Xi)(o,r,i),y=h.icon,b=h.title,m=h.body;a.Z.dispatch({type:"RPC_NOTIFICATION_CREATE",channelId:o.id,message:r,icon:y,title:b,body:m});if(j.Z.getDesktopType()===D.qrD.NEVER){f&&R.GN(z,Y);return!1}var g=Z.Z.showNotification(y,b,m,{notif_type:"MESSAGE_CREATE",notif_user_id:r.author.id,message_id:r.id,message_type:r.type,channel_id:o.id,channel_type:o.type,guild_id:o.guild_id},{omitViewTracking:!0,
|
||
tag:r.id,sound:f?z:void 0,volume:Y,onClick:function(){(0,v.Kh)(o.id);o.type!==D.d4z.GUILD_VOICE&&o.type!==D.d4z.GUILD_STAGE_VOICE||u.Z.updateChatOpen(o.id,!0);s.default.clickedNotification()}});null!=g&&ee.track(o.id,g)},CHANNEL_SELECT:function(e){var t=e.channelId;null!=t&&ee.clearChannel(t);return!1},MESSAGE_ACK:function(e){var t=e.channelId;ee.clearChannel(t);return!1},ACTIVITY_START:function(e){var t=e.userId,n=e.activity;if(te())return!1;if(n.type===D.IIU.PLAYING){var r=P.default.getUser(t);if(null==r)return!1;var o=L.ZP.getName(r),i=n.name,a=r.getAvatarURL(void 0,128),u=U.Z.Messages.NOTIFICATION_TITLE_START_GAME,c=U.Z.Messages.NOTIFICATION_BODY_START_GAME.format({username:o,gameName:i});Z.Z.showNotification(a,u,c,{notif_type:"ACTIVITY_START",activity_type:D.IIU.PLAYING,notif_user_id:t,activity_name:i},{sound:q,playSoundIfDisabled:!1,volume:.4,onClick:function(){l.Z.openPrivateChannel(t)}});return!1}return!1},VOICE_STATE_UPDATES:function(e){var t=e.voiceStates;if(!te()){
|
||
var n=P.default.getCurrentUser();if(null!=n){var r=t.find((function(e){return e.userId===n.id}));if(null!=r){var o=r.channelId,i=r.guildId,a=r.suppress,l=r.requestToSpeakTimestamp;if(null!=o&&null!=i&&(!a&&null!=l)){var u=C.Z.getGuild(i),c=E.Z.getChannel(o),s=g.Z.getStageInstanceByChannel(o);null!=u&&null!=c&&null!=s&&Z.Z.showNotification(u.getIconURL(128),c.name,U.Z.Messages.STAGE_SPEAK_INVITE_PUSH_NOTIFICATION.format({channelName:(0,d.F6)(c,P.default,I.Z),channelTopic:null==s?void 0:s.topic}),{notif_type:"Stage Speak Invite"},{})}}}}},STAGE_INSTANCE_UPDATE:function(e){var t=e.instance;if(te())return!1;if(!t.send_start_notification)return!1;if(ne(t.channel_id))return!1;var n=P.default.getCurrentUser(),o=C.Z.getGuild(t.guild_id),i=E.Z.getChannel(t.channel_id),a=P.default.getUser(t.host_id);if(null==n||null==i||null==o||null==a)return!1;if(!(0,T.LL)(n,a,i))return!1;if(!S.Z.can(r.Z.combine(D.Plq.CONNECT,D.Plq.VIEW_CHANNEL),i))return!1
|
||
;Z.Z.showNotification(o.getIconURL(128),U.Z.Messages.STAGE_START_PUSH_NOTIFICATION_TITLE.format({guildName:o.name}),U.Z.Messages.STAGE_START_PUSH_NOTIFICATION_BODY.format({username:A.Z.getName(o.id,i.id,a),topic:t.topic}),{notif_type:"STAGE_INSTANCE_CREATE",guild_id:o.id,channel_id:i.id},{onClick:function(){(0,m.Cq)(i)}})},GUILD_SCHEDULED_EVENT_UPDATE:function(e){var t=e.guildScheduledEvent;if(te())return!1;if(null==t.notification_type)return!1;t.notification_type===k.sy.EVENT_START&&(t.entity_type===k.WX.STAGE_INSTANCE||t.entity_type===k.WX.VOICE?function(e){if(te())return!1;var t=e.channel_id;if(null==t)return!1;if(ne(t))return!1;var n=P.default.getCurrentUser(),o=C.Z.getGuild(e.guild_id),i=E.Z.getChannel(e.channel_id),a=P.default.getUser(e.host_id);if(null==n||null==i||null==o||null==a)return!1;if(!S.Z.can(r.Z.combine(D.Plq.CONNECT,D.Plq.VIEW_CHANNEL),i))return!1;Z.Z.showNotification(o.getIconURL(128),U.Z.Messages.GUILD_SCHEDULED_EVENT_STAGE_START_TITLE.format({guildName:o.name
|
||
}),U.Z.Messages.GUILD_SCHEDULED_EVENT_STAGE_START_BODY.format({topic:e.name,username:A.Z.getName(o.id,i.id,a)}),{notif_type:"GUILD_SCHEDULED_EVENT_UPDATE",guild_id:o.id,channel_id:i.id},{onClick:function(){e.entity_type===k.WX.STAGE_INSTANCE&&(0,m.Cq)(i);e.entity_type===k.WX.VOICE&&f.default.selectVoiceChannel(i.id)}})}(t):t.entity_type===k.WX.EXTERNAL&&function(e){if(te())return!1;var t=P.default.getCurrentUser(),n=C.Z.getGuild(e.guild_id);if(null==t||null==n)return!1;Z.Z.showNotification(n.getIconURL(128),U.Z.Messages.GUILD_SCHEDULED_EVENT_STAGE_START_TITLE.format({guildName:n.name}),U.Z.Messages.GUILD_SCHEDULED_EVENT_EXTERNAL_START_BODY.format({topic:e.name}),{notif_type:"GUILD_SCHEDULED_EVENT_UPDATE",guild_id:n.id},{onClick:function(){c.Z.transitionToGuildSync(e.guild_id);(0,h.bO)({eventId:e.id})}})}(t))},THREAD_CREATE:function(e){var t=e.channel,n=e.isNewlyCreated;if(te())return!1;var r=E.Z.getChannel(t.parent_id);if(null==r||r.type!==D.d4z.GUILD_FORUM)return!1;if(!n)return!1
|
||
;if(!(0,T.FI)(t,r,!X))return!1;var o=(0,p.MC)(t),i=o.author,a=o.user;if(null==a)return!1;var l=C.Z.getGuild(r.guild_id);if(null==l)return!1;var u,c=U.Z.Messages.FORUM_CHANNEL_THREAD_CREATED_PUSH_TITLE_MOBILE.format({channelName:r.name,guildName:l.name}),s=U.Z.Messages.FORUM_CHANNEL_THREAD_CREATED_PUSH_BODY_MOBILE.format({channelName:t.name,userUsername:null!==(u=null==i?void 0:i.nick)&&void 0!==u?u:null==a?void 0:a.username}),f=a.getAvatarURL(void 0,128);Z.Z.showNotification(f,c,s,{notif_type:"THREAD_CREATE",notif_user_id:a.id},{onClick:function(){(0,O.ok)(t)}})},GENERIC_PUSH_NOTIFICATION_SENT:function(e){var t=e.icon,n=e.title,r=e.body,o=e.route,i=e.trackingType,a=e.tag;if(te())return!1;if(null==n||null==r||null==i)return!1;Z.Z.showNotification(t,n,r,{notif_type:i},{onClick:function(){null!=o&&(0,b.uL)(o)},tag:a});return!1},WINDOW_HIDDEN:function(){var e=(0,M.ED)(),t=(0,M.IJ)();if(!(!i.Z.get(Q,!1)&&M.FB&&(e||t)))return!1;var r=!1;null!=J&&(r=$.includes(J));if(!r)return!1
|
||
;Z.Z.showNotification(n(482773),U.Z.Messages.NOTIFICATION_TITLE_DISCORD,U.Z.Messages.NOTIFICATION_BODY_DISCORD_HIDDEN,{notif_type:"WINDOW_HIDDEN"},{overrideStreamerMode:!0,onClick:function(){(0,b.uL)(D.Z5c.SETTINGS(e?"windows":"linux"))},onShown:function(){i.Z.set(Q,!0)}});return!1},LOGOUT:function(){i.Z.remove(Q);return!1},CONNECTION_OPEN:function(e){var t=e.countryCode;J=t}})},489881:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(785893),o=n(667294),i=n(496486),a=n.n(i),l=n(70145),u=n(473708);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return s(e)}function f(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e,t){d=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e}
|
||
;return d(e,t)}var p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&d(e,t)}(n,e);var t=h(n);function n(){c(this,n);return t.apply(this,arguments)}var o=n.prototype;o.componentDidMount=function(){var e=this,t=this.props,n=t.intervalDuration,r=t.onInterval;this._interval=setInterval((function(){
|
||
e.forceUpdate();null==r||r()}),n)};o.componentWillUnmount=function(){null!=this._interval&&clearInterval(this._interval)};o.defaultRender=function(e){var t=this.props,n=t.showDays,o=t.showUnits,i=t.className,l=[e.days,e.hours,e.minutes,e.seconds],c=[u.Z.Messages.COUNTDOWN_UNITS_SECONDS,u.Z.Messages.COUNTDOWN_UNITS_MINUTES,u.Z.Messages.COUNTDOWN_UNITS_HOURS,u.Z.Messages.COUNTDOWN_UNITS_DAYS];if(0===e.days)l.shift();else if(!n){var s=l.shift();l[0]+=24*s}var f=a()(l).map((function(e){return e<10?"0".concat(e):e})).map((function(e,t){return[t>0&&!o?":":" ",(0,r.jsxs)("span",{children:[e,o?c[l.length-t-1]:null]},t)]})).flatten().value();return(0,r.jsx)("span",{className:i,children:f})};o.render=function(){var e=this.props,t=e.deadline,n=e.children,o=e.className,i=e.stopAtOneSec;if(t===1/0)return(0,r.jsx)("span",{className:o,"aria-label":u.Z.Messages.MAX_AGE_NEVER,children:"∞"});var a=(0,l.TD)(Date.now(),t,i);return null!=n?n(a,this.defaultRender.bind(this,a)):this.defaultRender(a)}
|
||
;return n}(o.PureComponent);y.defaultProps={showDays:!0,showUnits:!1,stopAtOneSec:!1,intervalDuration:1e3};const b=y},470643:(e,t,n)=>{"use strict";n.d(t,{u:()=>C,Z:()=>j});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(248088),u=n(202351),c=n(707961),s=n(760014),f=n(464187),d=n(990554),p=n(2590),h=n(473708),y=n(244414),b=n.n(y);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){m(e,t,n[t])}))}return e}function O(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name)
|
||
;if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var C={tension:800,friction:24};const j=function(e){var t=e.tabIndex,n=e.className,i=e.renderButtonContents,y=e.active,v=e.onClick,m=e["aria-controls"],j=e.focusProps,S=E(o.useState(!1),2),I=S[0],_=S[1],w=E(o.useState(0),2),x=w[0],P=w[1],N=(0,u.e7)([f.Z],(function(){return f.Z.getGuildId()})),A=I||y,T=(0,d.l)(b(),"emojiButton",A?"Hovered":"Normal"),Z=function(e){var t=-e%p.DCN.PickerPerRow*22,n=22*-Math.floor(e/p.DCN.PickerPerRow);return{backgroundPosition:"".concat(t,"px ").concat(n,"px"),backgroundSize:"".concat(22*p.DCN.PickerPerRow,"px ").concat(22*Math.ceil(p.DCN.PickerCount/p.DCN.PickerPerRow),"px")}}(x),M=o.useCallback((function(){if(!A){
|
||
var e=Math.floor(Math.random()*p.DCN.PickerCount);_(!0);P(e);(0,s.O)(N)}}),[A,_,P,N]),R=o.useCallback((function(){_(!1)}),[_]),L=o.useCallback((function(){(0,s.O)(N)}),[N]);return(0,r.jsx)(c.zxk,{look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.NONE,tabIndex:t,className:a()(T,n),onMouseEnter:M,onMouseOver:M,onMouseLeave:R,onFocus:L,onClick:v,"aria-label":h.Z.Messages.SELECT_EMOJI,"aria-controls":m,"aria-expanded":y,"aria-selected":y,"aria-haspopup":"dialog",focusProps:j,children:null!=i?i():(0,r.jsx)(l.Spring,{config:C,to:{value:A?1:0},children:function(e){var t=e.value;return(0,r.jsx)(l.animated.div,{className:b().sprite,style:O(g({},Z),{transform:t.to([0,1],[1,1.14]).to((function(e){return"scale(".concat(e,")")})),filter:t.to((function(e){return"grayscale(".concat(100-100*e,"%)")}))})})}})})}},327860:(e,t,n)=>{"use strict";n.d(t,{ox:()=>w,OZ:()=>x,ZP:()=>P});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(107364),c=n(2590),s=n(952861),f=n.n(s),d=n(518280),p=n.n(d)
|
||
;function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function b(e){b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return b(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&E(e,t)}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){y(e,t,n[t])}))}return e}function g(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function O(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e,t){E=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return E(e,t)}var C=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{
|
||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}var S=o.createContext(c.BRd.DARK),I=S.Provider,_=S.Consumer,w=function(e){v(n,e);var t=j(n);function n(){h(this,n);return t.apply(this,arguments)}n.prototype.render=function(){var e=this.props,t=e.lightSrc,n=e.darkSrc,o=e.width,i=e.height,l=e.offsetX,s=e.offsetY,d=e.style;return(0,r.jsx)(_,{children:function(e){return(0,r.jsx)(u.Z.Child,{grow:0,className:a()(f().image,p().marginBottom40),style:g(m({},d),{width:o,height:i,marginLeft:l,marginTop:s,backgroundImage:"url(".concat(e===c.BRd.DARK?n:t,")")})})}})};return n}(o.PureComponent),x=function(e){var t=e.children,n=e.className,o=e.noteClassName,i=e.note,c=e.style;return(0,r.jsxs)(u.Z.Child,{grow:0,direction:u.Z.Direction.VERTICAL,style:c,children:[null!=t&&(0,r.jsx)(l.H,{
|
||
className:a()(n,f().title),children:t}),null!=i?(0,r.jsx)("div",{className:a()(o,f().text,p().marginTop8),children:i}):null]})},P=function(e){v(n,e);var t=j(n);function n(){h(this,n);return t.apply(this,arguments)}n.prototype.render=function(){var e=this.props,t=e.children,n=e.theme,o=e.className,i=e.style;return(0,r.jsx)(I,{value:n,children:(0,r.jsx)(u.Z,{direction:u.Z.Direction.VERTICAL,align:u.Z.Align.CENTER,justify:u.Z.Justify.CENTER,className:a()(f().wrapper,o),style:i,children:t})})};return n}(o.PureComponent);P.Text=x;P.Image=w},301041:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(173857),u=n.n(l);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return s(e)}function f(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){
|
||
if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e,t){d=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return d(e,t)}var p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}var y=Object.freeze({SMALL:1,MEDIUM:2,LARGE:4}),b=20,v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,
|
||
configurable:!0}});t&&d(e,t)}(n,e);var t=h(n);function n(){c(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderCircle=function(){var e=this.props,t=e.strokeSize,n=e.percent,o=e.colorOverride,i=e.background,l=Math.min(Math.max(n,0),100),c=(b-t)/2,s=c*Math.PI*2;return(0,r.jsxs)("svg",{viewBox:"0 0 ".concat(b," ").concat(b),className:u().circle,children:[(0,r.jsx)("circle",{className:u().circleBackgroundAlt,cx:10,cy:10,r:10}),(0,r.jsx)("circle",{className:a()(u().circleBackground,i),cx:10,cy:10,r:(b-2*t)/2}),(0,r.jsx)("circle",{className:u().circleProgress,cx:10,cy:10,r:c,strokeWidth:"".concat(t,"px"),strokeLinecap:"round",transform:"rotate(-90 ".concat(10," ").concat(10,")"),stroke:null!=o?o:"currentColor",style:{strokeDasharray:s,strokeDashoffset:(1-l/100)*s}})]})};o.render=function(){var e=this.props,t=e.className,n=e.children;return(0,r.jsxs)("div",{className:a()(u().progressCircle,t),children:[this.renderCircle(),null!=n?(0,r.jsx)("div",{className:u().circleOverlay,
|
||
children:n}):null]})};return n}(o.Component);v.StrokeSizes=y;v.defaultProps={strokeSize:y.MEDIUM};const m=v},26708:(e,t,n)=>{"use strict";n.d(t,{W:()=>N,Z:()=>A});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(457217),u=n(798159),c=n(707961),s=n(107364),f=n(443812),d=n(853925),p=n.n(d);function h(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){h(i,r,o,a,l,"next",e)}function l(e){h(i,r,o,a,l,"throw",e)}a(void 0)}))}}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function m(e){m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return m(e)}function g(e,t){
|
||
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&S(e,t)}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){v(e,t,n[t])}))}return e}function E(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}
|
||
function C(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function j(e,t){return!t||"object"!==I(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e,t){S=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return S(e,t)}var I=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))
|
||
;return!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}var w=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}
|
||
if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},x=function(e){g(n,e);var t=_(n);function n(){b(this,n);return t.apply(this,arguments)}n.prototype.render=function(){var e=this.props,t=e.label,n=e.value,o=e.renderValue,i=e.className;return(0,r.jsxs)(s.Z,{className:a()(p().quickSelect,i),align:s.Z.Align.CENTER,children:[(0,r.jsx)("div",{className:p().quickSelectLabel,children:t}),(0,r.jsxs)(s.Z,{align:s.Z.Align.CENTER,className:p().quickSelectClick,children:[(0,r.jsx)("div",{className:p().quickSelectValue,children:null!=o?o(n):n.label}),(0,r.jsx)("div",{className:p().quickSelectArrow})]})]})};return n}(o.PureComponent),P=function(e){g(n,e);var t=_(n);function n(){b(this,n);var e;(e=t.apply(this,arguments)).handleClick=function(){var t=e.props,n=t.option,r=t.onChange
|
||
;null==r||r(n)};return e}n.prototype.render=function(){var e=this,t=this.props,n=t.selected,o=t.renderOption,i=t.option;return(0,r.jsx)(l.mh,{id:i.key,children:function(t){return(0,r.jsx)(c.P3F,E(O({focusProps:{enabled:!1},className:a()(p().quickSelectPopoutOption,{selected:n}),onClick:e.handleClick},t),{role:"option",children:o(i,n)}))}})};return n}(o.PureComponent);function N(e){var t=e.options,n=e.value,o=e.scroller,i=e.renderOption,s=e.onChange,d=e.className,h=a()(p().quickSelectPopout,d,v({},p().quickSelectPopoutScroll,o)),b=t.map((function(e){var t=null!=n&&e.value===n.value,o=t?void 0:s;return(0,r.jsx)(P,{className:p().quickSelectPopoutOption,renderOption:i,option:e,onChange:o,selected:t},e.key||e.value)})),m=(0,f.Dt)(),g=(0,u.ZP)({id:m,isEnabled:!0,wrap:!0,scrollToStart:function(){return y((function(){return w(this,(function(e){return[2]}))}))()},scrollToEnd:function(){return y((function(){return w(this,(function(e){return[2]}))}))()}}),j=g.containerProps,S=j.ref,I=C(j,["ref"])
|
||
;(0,c.Tbt)(S);return(0,r.jsx)(l.bG,{navigator:g,children:(0,r.jsx)("div",E(O({ref:S,className:h},I),{role:"listbox",children:o?(0,r.jsx)(c.Ttm,{className:p().quickSelectScroller,children:b}):b}))})}const A=x},37689:(e,t,n)=>{"use strict";n.d(t,{iu:()=>S,cy:()=>I,ZP:()=>P});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(652591),c=n(463473),s=n(107364),f=n(2590),d=n(473708),p=n(280350),h=n.n(p);function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function v(e){v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return v(e)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&j(e,t)}function g(e){
|
||
for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){b(e,t,n[t])}))}return e}function O(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){
|
||
var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function C(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function j(e,t){j=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return j(e,t)}var S,I,_=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}!function(e){e.CENTER="center"
|
||
;e.LEFT="left"}(S||(S={}));!function(e){e.TOP="top";e.MIDDLE="middle"}(I||(I={}));var x=function(e){m(n,e);var t=w(n);function n(){y(this,n);var e;(e=t.apply(this,arguments)).state={confirmed:!1};e.handleDismiss=function(){var t=e.props.onClickComplete;e.setState({confirmed:!0},(function(){return null==t?void 0:t()}))};return e}var o=n.prototype;o.componentDidMount=function(){var e=this.props.uniqueId;u.default.track(f.rMx.SHOW_TUTORIAL,{tutorial:e})};o.componentWillUnmount=function(){u.default.track(f.rMx.CLOSE_TUTORIAL,{tutorial:this.props.uniqueId,acknowledged:this.state.confirmed})};o.render=function(){var e,t,n=this.props,o=n.renderMedia,i=n.textAlign,u=n.isLongText,c=n.title,p=n.body,y=n.className,v=n.forceTheme,m=n.onClickSkipAll,g="string"==typeof p?"p":"div",O=i===S.LEFT||u,E=i===S.CENTER||!O;return(0,r.jsxs)(l.VqE,{className:a()(h().popoutRoot,y),children:[null!=o&&(0,r.jsx)(s.Z,{className:h().mediaContainer,justify:O?s.Z.Justify.START:s.Z.Justify.CENTER,children:o()}),(0,
|
||
r.jsx)(l.H,{className:a()((e={},b(e,h().titleCenter,E),b(e,h().titleLeft,O),e)),children:c}),(0,r.jsx)(g,{className:a()((t={},b(t,h().bodyCenter,E),b(t,h().bodyLeft,O),t)),children:p}),(0,r.jsxs)(s.Z,{className:h().buttonContainer,justify:O?s.Z.Justify.BETWEEN:s.Z.Justify.CENTER,children:[(0,r.jsx)(l.zxk,{size:l.PhG.SMALL,onClick:this.handleDismiss,children:d.Z.Messages.TUTORIAL_CLOSE}),(0,r.jsx)(l.zxk,{size:l.PhG.SMALL,look:l.zxk.Looks.BLANK,onClick:m,color:v===f.BRd.LIGHT?l.zxk.Colors.PRIMARY:l.zxk.Colors.WHITE,className:O?h().buttonSkipLeftAlign:h().buttonSkipCenterAlign,children:d.Z.Messages.SKIP_ALL_TIPS})]})]})};return n}(o.PureComponent),P=function(e){m(n,e);var t=w(n);function n(){y(this,n);var e;(e=t.apply(this,arguments)).onClickComplete=function(t){t();e.props.onComplete()};e.onClickSkipAll=function(t){var n=e.props,r=n.onSkipAll,o=n.uniqueId;t();r();u.default.track(f.rMx.DISMISS_ALL_TUTORIALS,{tutorial:o})};e.renderPopoutContent=function(t){
|
||
var n,o=t.closePopout,i=t.position,l=e.props,u=l.forceTheme,s=l.isLongText,f=l.arrowAlignment,d=null!=l.renderMedia;return(0,r.jsx)(x,O(g({},e.props),{className:a()((n={},b(n,h().bottom,"bottom"===i),b(n,h().contentNarrowNoMedia,!s&&!d),b(n,h().contentNarrowWithMedia,!s&&d),b(n,h().contentWideNoMedia,s&&!d),b(n,h().contentWideWithMedia,s&&d),b(n,h().right,"right"===i),b(n,h().top,"top"===i),b(n,h().left,"left"===i),b(n,h().arrowAlignmentTop,f===I.TOP),b(n,h().arrowAlignmentMiddle,f===I.MIDDLE),b(n,"force-theme",null!=u),n),(0,c.Q)(u)),onClickComplete:function(){return e.onClickComplete(o)},onClickSkipAll:function(){return e.onClickSkipAll(o)}}))};return e}n.prototype.render=function(){var e=this.props,t=(e.renderMedia,e.textAlign,e.onComplete,e.onSkipAll,e.isLongText,e.title,e.body,e.children),n=e.spacing,o=(e.forceTheme,
|
||
E(e,["renderMedia","textAlign","onComplete","onSkipAll","isLongText","title","body","children","spacing","forceTheme"])),i="top"===o.position||"bottom"===o.position?"center":"top";return(0,r.jsx)(l.yRy,O(g({},o),{align:i,spacing:null!=n?n:0,renderPopout:this.renderPopoutContent,nudgeAlignIntoViewport:!0,children:t}))};return n}(o.PureComponent);P.TextAlignments=S;P.defaultProps={textAlign:S.LEFT}},633997:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(23279),u=n.n(l),c=n(853158),s=n(199731),f=n(859853),d=n(532975),p=n.n(d);function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function b(e){b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return b(e)}function v(e,t){
|
||
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&O(e,t)}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){y(e,t,n[t])}))}return e}function g(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e,t){O=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return O(e,t)}var E=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function C(e){var t=function(){
|
||
if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var j={friction:10,tension:300},S=function(e){v(n,e);var t=C(n);function n(e){h(this,n);var r;(r=t.call(this,e)).state={translateY:new c.Z.Value,reduceMotion:!1};return r}var o=n.prototype;o.shouldComponentUpdate=function(e,t){return!(0,s.Z)(this.props,e,["animate"])||!(0,s.Z)(this.state,t)};o.componentDidMount=function(){this.props.hide?this.state.translateY.setValue(1):this.state.translateY.setValue(0)};o.componentDidUpdate=function(e){var t=e.hide,n=this.props.hide;n&&!t?this.animateOut():!n&&t&&this.animateIn()};o.componentWillUnmount=function(){null!=this._timeout&&clearTimeout(this._timeout)}
|
||
;o.animateIn=function(){var e=this.state.translateY;null!=this._timeout&&clearTimeout(this._timeout);this.props.animate?this._timeout=setTimeout((function(){c.Z.spring(e,m({toValue:0},j)).start()}),100):e.setValue(0)};o.animateOut=function(){var e=this.state.translateY;null!=this._timeout&&clearTimeout(this._timeout);this.props.animate?c.Z.spring(e,m({toValue:1},j)).start():e.setValue(1)};o.render=function(){var e=this.props,t=e.className,n=e.text,o=e.hide,i=e.onClick;return(0,r.jsx)(c.Z.div,{className:a()(p().bar,t),onClick:i,style:this.getAnimatedStyle(),"aria-hidden":o,children:(0,r.jsx)("span",{className:p().text,children:n})})};o.getAnimatedStyle=function(){var e=this.state.translateY,t=this.props.reverse;return{transform:[{translateY:e.interpolate({inputRange:[0,1],outputRange:["0%",t?"180%":"-180%"]})}]}};return n}(o.Component),I=function(e){v(n,e);var t=C(n);function n(){h(this,n);var e;(e=t.apply(this,arguments)).state={unread:null,mention:null}
|
||
;e.calculateState=u()((function(){var t=e.props,n=t.items,r=t.expandedFolders,o=t.isVisible,i=t.isUnread,a=t.isMentioned,l=t.reverse,u=t.onCalculate,c=null,s=null,f=[];n.forEach((function(e){if("string"==typeof e)f.push(e);else if("object"==typeof e&&null!=e.folderId)if(null!=r&&r.has(e.folderId)){f.push("folder:".concat(e.folderId));e.guildIds.forEach((function(e){return f.push(e)}))}else f.push(e.guildIds);else f.push(e.guildIds[0])}));for(var d=function(e){null==c&&a(e,l,f)&&(c=e);null==s&&i(e,l,f)&&(s=e)},p=l?f.length-1:0,h=f[p];null!=h;){if("string"==typeof h){if(o(h,l,f))break;d(h)}else{var y=!1,b=!0,v=!1,m=void 0;try{for(var g,O=h[Symbol.iterator]();!(b=(g=O.next()).done);b=!0){var E=g.value;if(o(E,l,f)){y=!0;break}d(E)}}catch(e){v=!0;m=e}finally{try{b||null==O.return||O.return()}finally{if(v)throw m}}if(y)break}h=f[p+=l?-1:1]}null!=u&&u(c,s,l);e.setState({mention:c,unread:s})}),200);e.handleClick=function(t){t.preventDefault();t.stopPropagation()
|
||
;var n=e.state,r=n.unread,o=n.mention,i=e.props.onJumpTo,a=null!=o?o:r;null!=a&&i(a,[o,r])};return e}var o=n.prototype;o.componentDidMount=function(){this.calculateState()};o.componentDidUpdate=function(){this.calculateState()};o.componentWillUnmount=function(){this.calculateState.cancel()};o.render=function(){var e=this.state,t=e.unread,n=e.mention,o=this.props,i=o.textMention,l=o.textUnread,u=o.reverse,c=o.className,s=o.barClassName,f=o.hide,d=o.animate,h=this.context.reducedMotion;return(0,r.jsx)("div",{className:null!=c?c:void 0,children:(0,r.jsx)(S,{hide:!0===f||null==t&&null==n,className:a()(s,null!=n?p().mention:p().unread),text:null!=n?i:l,reverse:u,animate:d&&!h.enabled,onClick:this.handleClick})})};return n}(o.PureComponent);I.contextType=f.S;I.defaultProps={className:p().container,reverse:!1,hide:!1,animate:!0};const _=I},225253:(e,t,n)=>{"use strict";n.d(t,{L:()=>r,Z:()=>v})
|
||
;var r,o=n(785893),i=n(667294),a=n(294184),l=n.n(a),u=n(707961),c=n(587683),s=n(990554),f=n(993137),d=n(109217),p=n.n(d);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n)
|
||
;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(e){e.CONTAIN="contain";e.COVER="cover"}(r||(r={}));const v=i.memo((function(e){var t=e.streamId,n=e.onResize,a=e.wrapperClassName,d=e.videoComponent,h=e.className,v=e.fit,m=void 0===v?r.CONTAIN:v,g=e.mirror,O=void 0!==g&&g,E=e.paused,C=void 0!==E&&E,j=e.streamPreviewURL,S=e.videoSpinnerContext,I=e.userId,_=b(i.useState(!0),2),w=_[0],x=_[1],P=b(i.useState((function(){return new c.o("VideoStream")})),1)[0];i.useEffect((function(){C||(w?P.onSpinnerStarted():null!=t&&P.trackSpinnerDuration(S,I,t))}),[w,C,t,P,S,I]);var N=i.useCallback((function(){x(!1)}),[]);return(0,o.jsxs)("div",{className:l()(p().wrapper,a),children:[null!=t&&(0,o.jsx)(d,{className:l()(p().video,(0,s.l)(p(),"video",m),y({},p().mirror,O),h),
|
||
streamId:t,onResize:n,onReady:N,paused:C}),C?null:(0,o.jsx)("div",{className:l()(p().previewWrapper,y({},p().loading,w)),children:w&&(0,o.jsxs)(i.Fragment,{children:[null!=j?(0,o.jsx)("img",{src:j,alt:"",className:p().previewImage}):(0,o.jsx)(f.Z,{aspectRatio:16/9,className:p().emptyPreviewWrapper,children:(0,o.jsx)("div",{className:p().emptyPreview})}),(0,o.jsx)(u.$jN,{className:p().spinner})]})})]})}))},3219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){
|
||
Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?32:t,u=e.height,c=void 0===u?32:u,s=e.color,f=void 0===s?"currentColor":s,d=l(e,["width","height","color"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(d)),{width:n,height:c,
|
||
viewBox:"0 0 12 12",fill:"none",children:[(0,r.jsx)("path",{d:"M7.25 1H4.75V7.25H7.25V1Z",fill:f}),(0,r.jsx)("path",{d:"M4.75 9.75C4.75 10.4167 5.33333 11 6 11C6.66667 11 7.25 10.4167 7.25 9.75C7.25 9.08333 6.66667 8.5 6 8.5C5.33333 8.5 4.75 9.08333 4.75 9.75Z",fill:f})]}))}},120306:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){
|
||
if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{
|
||
d:"M20.414 2.58599C21.195 3.36699 21.195 4.63299 20.414 5.41399L14.051 11.779L11.222 8.94999L17.586 2.58599C18.367 1.80499 19.633 1.80499 20.414 2.58599Z",className:d,fill:f}),(0,r.jsx)("path",{d:"M13.622 15.035L6.552 16.449L7.966 9.378L13.344 4H4C2.897 4 2 4.898 2 6V20C2 21.103 2.897 22 4 22H18C19.103 22 20 21.103 20 20V8.656L13.622 15.035Z",className:d,fill:f}),(0,r.jsx)("path",{d:"M9.80801 10.365L12.636 13.192L9.10101 13.899L9.80801 10.365Z",className:d,fill:f})]}))}},177001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(785893),o=(n(667294),n(873308));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable
|
||
})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e){return(0,r.jsx)(o.Z,a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},e),{direction:o.Z.Directions.RIGHT}))}},105538:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e)
|
||
;t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=e.background,h=l(e,["width","height","color","foreground","background"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(h)),{width:n,height:c,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{className:d,fill:f,d:"M21.178 1.70703L22.592 3.12103L4.12103 21.593L2.70703 20.178L21.178 1.70703Z"}),(0,r.jsx)("path",{className:p,fill:f,d:"M18 10.5283L10.5287 18H21V17C19.344 17 18 15.657 18 14V10.5283Z"}),(0,r.jsx)("path",{className:p,fill:f,d:"M8.957 19.5718L9.52877 19H15.4449C14.7519 20.19 13.4759 21 11.9999 21C10.7748 21 9.68752 20.442 8.957 19.5718Z"}),(0,r.jsx)("path",{className:p,fill:f,d:"M12 3C13.417 3 14.71 3.5 15.734 4.321L5.99805 14.058C5.99805 14.0479 5.99856 14.038 5.99907 14.0283C5.99956 14.0188 6.00005 14.0094 6.00005 14V9C6.00005 5.686 8.68605 3 12 3Z"})]}))}},742257:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){
|
||
var t=e.width,n=void 0===t?32:t,u=e.height,c=void 0===u?32:u,s=e.color,f=void 0===s?"currentColor":s,d=l(e,["width","height","color"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(d)),{width:n,height:c,viewBox:"0 0 16 16",fill:"none",children:[(0,r.jsx)("clipPath",{children:(0,r.jsx)("path",{d:"m.000183 0h16v16h-16z"})}),(0,r.jsx)("g",{clipPath:"url(#a)",children:(0,r.jsx)("path",{d:"m7.90039 1c-3.9 0-6.999999 3.1-6.999999 7s3.099999 7 6.999999 7c3.90001 0 7.00001-3.1 7.00001-7s-3.2-7-7.00001-7zm0 2.3c.8 0 1.6.3 2.30001.7l-6.40001 6.4c-.3-.7-.6-1.5-.6-2.4 0-2.6 2.1-4.7 4.7-4.7zm0 9.4c-.9 0-1.7-.3-2.4-.7l6.40001-6.4c.4.7.7 1.5.7 2.4-.1 2.6-2.2 4.7-4.70001 4.7z",fill:f})})]
|
||
}))}},914563:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.color,n=void 0===t?"currentColor":t,u=e.height,c=void 0===u?24:u,s=e.width,f=void 0===s?24:s,d=l(e,["color","height","width"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(d)),{width:f,height:c,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{
|
||
d:"M4.25947 16.5917C3.14082 14.7059 2.74905 12.4766 3.15775 10.3224C3.56644 8.16824 4.74748 6.23734 6.47909 4.89231C8.2107 3.54728 10.3738 2.88064 12.5621 3.01758C14.7504 3.15452 16.8135 4.08562 18.3639 5.63603C19.9144 7.18644 20.8455 9.24952 20.9824 11.4379C21.1194 13.6262 20.4527 15.7893 19.1077 17.5209C17.7627 19.2525 15.8318 20.4335 13.6776 20.8422C11.5234 21.2509 9.29412 20.8592 7.40833 19.7405L7.40835 19.7405L4.29862 20.6289C4.16996 20.6657 4.03381 20.6674 3.90428 20.6338C3.77475 20.6003 3.65655 20.5327 3.56194 20.4381C3.46732 20.3434 3.39973 20.2252 3.36616 20.0957C3.3326 19.9662 3.33429 19.83 3.37105 19.7014L4.25954 16.5916L4.25947 16.5917Z",stroke:n,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",
|
||
d:"M8.30605 8.30602C7.89802 8.71404 7.89802 9.37558 8.30605 9.78361L10.5224 12L8.30606 14.2164C7.89803 14.6244 7.89803 15.2859 8.30606 15.694C8.71409 16.102 9.37563 16.102 9.78365 15.694L12 13.4776L14.2164 15.694C14.6244 16.102 15.286 16.102 15.694 15.694C16.102 15.2859 16.102 14.6244 15.694 14.2164L13.4776 12L15.694 9.78361C16.102 9.37558 16.102 8.71404 15.694 8.30602C15.286 7.89799 14.6244 7.89799 14.2164 8.30602L12 10.5224L9.78364 8.30602C9.37562 7.89799 8.71408 7.89799 8.30605 8.30602Z",fill:n})]}))}},164760:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{className:d,fill:f,fillRule:"evenodd",clipRule:"evenodd",d:"M11 5V3C16.515 3 21 7.486 21 13H19C19 8.589 15.411 5 11 5ZM17 13H15C15 10.795 13.206 9 11 9V7C14.309 7 17 9.691 17 13ZM11 11V13H13C13 11.896 12.105 11 11 11ZM14 16H18C18.553 16 19 16.447 19 17V21C19 21.553 18.553 22 18 22H13C6.925 22 2 17.075 2 11V6C2 5.447 2.448 5 3 5H7C7.553 5 8 5.447 8 6V10C8 10.553 7.553 11 7 11H6C6.063 14.938 9 18 13 18V17C13 16.447 13.447 16 14 16Z"})}))}},781736:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e)
|
||
;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.74273 19H16C17.103 19 18 18.104 18 17V14.618L20.553 15.894C20.694 15.965 20.847 16 21 16C21.183 16 21.365 15.949 21.526 15.851C21.82 15.668 22 15.347 22 15V9C22 8.653 21.82 8.332 21.526 8.149C21.231 7.966 20.862 7.951 20.553 8.105L18 9.382V7.74273L6.74273 19ZM12.2574 5H4C2.897 5 2 5.897 2 7V15.2574L12.2574 5Z",fill:f}),(0,r.jsx)("rect",{y:"19.9623",width:"26",height:"2",transform:"rotate(-45 0 19.9623)",className:d,fill:f})]}))}},634193:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}
|
||
function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){
|
||
var t=e.width,n=void 0===t?16:t,u=e.height,c=void 0===u?16:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 16 16",fill:"none",children:(0,r.jsx)("path",{className:d,fill:f,
|
||
d:"M12.1668 1.33331H3.8335C3.17045 1.33331 2.53457 1.59671 2.06573 2.06555C1.59689 2.53439 1.3335 3.17027 1.3335 3.83331V12.1666C1.3335 12.8297 1.59689 13.4656 2.06573 13.9344C2.53457 14.4033 3.17045 14.6666 3.8335 14.6666H12.1668C12.8299 14.6666 13.4658 14.4033 13.9346 13.9344C14.4034 13.4656 14.6668 12.8297 14.6668 12.1666V3.83331C14.6668 3.17027 14.4034 2.53439 13.9346 2.06555C13.4658 1.59671 12.8299 1.33331 12.1668 1.33331ZM6.37933 5.49998L7.21266 2.99998H9.621L8.78766 5.49998H6.37933ZM3.8335 2.99998H5.45433L4.621 5.49998H3.00016V3.83331C3.00016 3.6123 3.08796 3.40034 3.24424 3.24406C3.40052 3.08778 3.61248 2.99998 3.8335 2.99998ZM13.0002 12.1666C13.0002 12.3877 12.9124 12.5996 12.7561 12.7559C12.5998 12.9122 12.3878 13 12.1668 13H3.8335C3.61248 13 3.40052 12.9122 3.24424 12.7559C3.08796 12.5996 3.00016 12.3877 3.00016 12.1666V7.16665H13.0002V12.1666ZM13.0002 5.49998H10.546L11.3793 2.99998H12.1668C12.3878 2.99998 12.5998 3.08778 12.7561 3.24406C12.9124 3.40034 13.0002 3.6123 13.0002 3.83331V5.49998Z"
|
||
})}))}},436187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?20:t,u=e.height,c=void 0===u?20:u,s=e.className,f=l(e,["width","height","className"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({width:n,height:c,className:s},(0,o.Z)(f)),{viewBox:"0 0 20 20",children:(0,r.jsxs)("g",{clipPath:"url(#clip0_198_5469)",children:[(0,r.jsx)("path",{"aria-hidden":!0,d:"M19.15 17C19.41 17.11 19.6 17 19.51 16.73L18.89 15.15L18.28 13.56C18.23 13.4421 18.1442 13.3429 18.0348 13.2765C17.9253 13.2101 17.7977 13.1798 17.67 13.19L13.67 14.28C13.4 14.36 13.56 14.79 13.92 14.93L19.15 17Z",fill:"#FF73FA"}),(0,r.jsx)("path",{
|
||
"aria-hidden":!0,d:"M9.80009 14L7.08009 8.67001L0.440092 18C0.351927 18.1221 0.299095 18.2662 0.287392 18.4163C0.275688 18.5665 0.305566 18.7169 0.373746 18.8512C0.441926 18.9855 0.545775 19.0985 0.673902 19.1776C0.802029 19.2568 0.949484 19.2991 1.10009 19.3H12.5201L9.80009 14Z",fill:"#8086FF"}),(0,r.jsx)("path",{"aria-hidden":!0,d:"M12.27 19C11.57 19 9.92997 17.31 8.52997 14.57C7.86795 13.3426 7.37674 12.0304 7.06997 10.67C6.83997 9.54999 6.99997 8.99999 7.19997 8.89999H7.32997C8.03997 8.89999 9.66997 10.59 11.07 13.32C12.68 16.46 12.93 18.76 12.4 19.03C12.3549 19.0306 12.3103 19.0203 12.27 19Z",fill:"#05124A"}),(0,r.jsx)("path",{"aria-hidden":!0,
|
||
d:"M7.33009 9.14999C7.86009 9.14999 9.42009 10.67 10.8301 13.43C12.4501 16.57 12.5201 18.55 12.2701 18.77C11.7401 18.77 10.1801 17.25 8.77009 14.49C7.15009 11.35 7.08009 9.35999 7.32009 9.14999H7.33009ZM7.32009 8.60999C7.233 8.60831 7.14693 8.62897 7.07009 8.66999C6.23009 9.08999 6.78009 11.81 8.28009 14.74C9.65009 17.4 11.3401 19.31 12.2801 19.31C12.3672 19.3117 12.4532 19.291 12.5301 19.25C13.3701 18.82 12.8301 16.11 11.3201 13.18C9.96009 10.52 8.26009 8.60999 7.32009 8.60999Z",fill:"#373BE1"}),(0,r.jsx)("path",{"aria-hidden":!0,d:"M3.53991 17.22C3.16017 16.4754 2.85534 15.6949 2.62991 14.89L1.40991 16.6C1.5797 17.0776 1.77669 17.545 1.99991 18C2.21943 18.4301 2.46316 18.8475 2.72991 19.25H4.84991C4.34607 18.6191 3.90718 17.939 3.53991 17.22Z",fill:"#373BE1"}),(0,r.jsx)("path",{"aria-hidden":!0,
|
||
d:"M6.83003 19.25H9.23003C8.09101 18.2623 7.1538 17.0636 6.47003 15.72C5.75671 14.3452 5.32173 12.8432 5.19003 11.3L3.78003 13.3C4.05054 14.4137 4.46044 15.4889 5.00003 16.5C5.49463 17.4884 6.10927 18.4121 6.83003 19.25Z",fill:"#373BE1"}),(0,r.jsx)("path",{"aria-hidden":!0,d:"M12.2699 18.77C11.7199 18.7 10.2699 17.3 8.7899 14.49C7.2499 11.49 7.1199 9.57 7.3199 9.19L6.9999 8.69C6.2199 9.19 6.7699 11.86 8.2499 14.74C9.5699 17.31 11.2499 19.19 12.1399 19.3C12.2557 19.3201 12.3748 19.3026 12.4799 19.25L12.2699 18.77Z",fill:"#373BE1"}),(0,r.jsx)("path",{"aria-hidden":!0,
|
||
d:"M15.5901 9.23L14.6201 8C14.5734 7.94051 14.5118 7.89439 14.4416 7.8663C14.3713 7.8382 14.2949 7.82913 14.2201 7.84L10.8601 8.28C10.786 8.29082 10.7158 8.32037 10.6563 8.36587C10.5968 8.41137 10.5499 8.47131 10.5201 8.54L9.22008 11.68C9.18969 11.7486 9.1792 11.8243 9.18981 11.8986C9.20042 11.9729 9.2317 12.0427 9.28008 12.1L10.2801 13.37C10.3268 13.4295 10.3884 13.4756 10.4586 13.5037C10.5288 13.5318 10.6052 13.5409 10.6801 13.53L14.0001 13.05C14.0742 13.0392 14.1443 13.0096 14.2038 12.9641C14.2633 12.9186 14.3102 12.8587 14.3401 12.79L15.6401 9.65C15.6718 9.58232 15.684 9.50709 15.6751 9.43285C15.6663 9.35862 15.6368 9.28834 15.5901 9.23Z",fill:"#FFD836"}),(0,r.jsx)("path",{"aria-hidden":!0,
|
||
d:"M12.6801 10.21L11.4101 9.74001C11.3617 9.72337 11.3182 9.69501 11.2834 9.65748C11.2487 9.61994 11.2238 9.57439 11.2109 9.52489C11.198 9.47539 11.1976 9.42347 11.2097 9.37376C11.2217 9.32405 11.2459 9.27811 11.2801 9.24001L14.7201 5.24001C14.7617 5.1903 14.8178 5.15488 14.8806 5.13873C14.9434 5.12259 15.0096 5.12653 15.0701 5.15001L16.3401 5.61001C16.3871 5.62978 16.4288 5.66018 16.4621 5.69881C16.4954 5.73745 16.5193 5.78327 16.5319 5.83268C16.5445 5.8821 16.5454 5.93376 16.5347 5.98361C16.524 6.03346 16.5019 6.08015 16.4701 6.12001L13.0301 10.12C12.9884 10.1697 12.9323 10.2051 12.8695 10.2213C12.8067 10.2374 12.7405 10.2335 12.6801 10.21Z",fill:"#AEC7FF"}),(0,r.jsx)("path",{"aria-hidden":!0,
|
||
d:"M11.61 17.25L11.35 16.33C11.3396 16.2949 11.3383 16.2577 11.346 16.2219C11.3537 16.1861 11.3702 16.1527 11.394 16.1249C11.4179 16.0971 11.4483 16.0757 11.4825 16.0626C11.5167 16.0495 11.5536 16.0452 11.59 16.05L15.31 16.37C15.3545 16.373 15.397 16.3901 15.4311 16.4189C15.4653 16.4477 15.4894 16.4866 15.5 16.53L15.76 17.45C15.7697 17.4856 15.7707 17.523 15.763 17.5591C15.7552 17.5952 15.7388 17.6289 15.7153 17.6574C15.6918 17.6858 15.6617 17.7082 15.6277 17.7225C15.5937 17.7369 15.5568 17.7429 15.52 17.74L11.8 17.42C11.7546 17.4149 11.7119 17.3958 11.6778 17.3653C11.6438 17.3349 11.6201 17.2946 11.61 17.25Z",fill:"#AEC7FF"}),(0,r.jsx)("path",{"aria-hidden":!0,
|
||
d:"M10.51 4.87L9.51004 4.8C9.47171 4.79882 9.43428 4.78808 9.40117 4.76875C9.36805 4.74942 9.34029 4.72212 9.32041 4.68932C9.30054 4.65653 9.28918 4.61928 9.28737 4.58098C9.28555 4.54268 9.29335 4.50453 9.31004 4.47L10.93 0.900003C10.9491 0.856352 10.9819 0.820078 11.0234 0.796634C11.0648 0.773191 11.1128 0.763846 11.16 0.770003L12.16 0.840003C12.1984 0.841182 12.2358 0.851926 12.2689 0.871256C12.302 0.890587 12.3298 0.917891 12.3497 0.950685C12.3695 0.98348 12.3809 1.02072 12.3827 1.05903C12.3845 1.09733 12.3767 1.13548 12.36 1.17L10.74 4.73C10.7213 4.77455 10.689 4.81205 10.6477 4.83718C10.6064 4.86231 10.5582 4.87379 10.51 4.87Z",fill:"#FF73FA"}),(0,r.jsx)("path",{"aria-hidden":!0,
|
||
d:"M9.11995 3.16L9.38995 3.89C9.40593 3.92181 9.43011 3.94877 9.46 3.96811C9.48988 3.98744 9.52439 3.99846 9.55995 4H10.3699C10.5599 4 10.6099 4.26 10.4499 4.41L9.76995 5.07C9.71086 5.13269 9.67549 5.21403 9.66995 5.3V6.13C9.66965 6.17649 9.6589 6.22232 9.63849 6.2641C9.61808 6.30587 9.58854 6.34252 9.55204 6.37133C9.51555 6.40013 9.47305 6.42037 9.42768 6.43052C9.38231 6.44068 9.33524 6.4405 9.28995 6.43L8.59995 6.1C8.56441 6.08159 8.52497 6.07198 8.48495 6.07198C8.44492 6.07198 8.40549 6.08159 8.36995 6.1L7.57995 6.57C7.38995 6.69 7.20995 6.57 7.26995 6.35L7.51995 5.49C7.53745 5.45777 7.54662 5.42168 7.54662 5.385C7.54662 5.34833 7.53745 5.31223 7.51995 5.28L6.99995 4.81C6.86995 4.68 6.99995 4.42 7.18995 4.37L7.99995 4.17C8.04629 4.1582 8.08971 4.13702 8.12755 4.10779C8.16539 4.07855 8.19684 4.04187 8.21995 4L8.68995 3.2C8.79995 3 9.05995 3 9.11995 3.16Z",fill:"#A5F7DE"})]})}))}},460490:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){
|
||
t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){
|
||
var t=e.width,n=void 0===t?16:t,u=e.height,c=void 0===u?16:u,s=e.color,f=void 0===s?"currentColor":s,d=l(e,["width","height","color"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(d)),{width:n,height:c,viewBox:"0 0 4 14",children:(0,r.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,r.jsx)("ellipse",{fill:f,cx:"3.75",cy:"1",rx:"1.125",ry:"1.08333333"}),(0,r.jsx)("ellipse",{fill:f,cx:"3.75",cy:"4.61111107",rx:"1.125",ry:"1.08333333"}),(0,r.jsx)("ellipse",{fill:f,cx:"0",cy:"4.61111107",rx:"1.125",ry:"1.08333333"}),(0,r.jsx)("ellipse",{fill:f,cx:"3.75",cy:"8.22222227",rx:"1.125",ry:"1.08333333"}),(0,r.jsx)("ellipse",{fill:f,cx:"0",cy:"8.22222227",rx:"1.125",
|
||
ry:"1.08333333"}),(0,r.jsx)("ellipse",{fill:f,cx:"3.75",cy:"11.83333337",rx:"1.125",ry:"1.08333333"}),(0,r.jsx)("ellipse",{fill:f,cx:"0",cy:"11.83333337",rx:"1.125",ry:"1.08333333"}),(0,r.jsx)("ellipse",{fill:f,cx:"0",cy:"1",rx:"1.125",ry:"1.08333333"})]})}))}},308377:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){
|
||
if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{
|
||
d:"M6.16204 15.0065C6.10859 15.0022 6.05455 15 6 15H4V12C4 7.588 7.589 4 12 4C13.4809 4 14.8691 4.40439 16.0599 5.10859L17.5102 3.65835C15.9292 2.61064 14.0346 2 12 2C6.486 2 2 6.485 2 12V19.1685L6.16204 15.0065Z",fill:f}),(0,r.jsx)("path",{d:"M19.725 9.91686C19.9043 10.5813 20 11.2796 20 12V15H18C16.896 15 16 15.896 16 17V20C16 21.104 16.896 22 18 22H20C21.105 22 22 21.104 22 20V12C22 10.7075 21.7536 9.47149 21.3053 8.33658L19.725 9.91686Z",fill:f}),(0,r.jsx)("path",{d:"M3.20101 23.6243L1.7868 22.2101L21.5858 2.41113L23 3.82535L3.20101 23.6243Z",className:d,fill:f})]}))}},348311:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){
|
||
var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=l(e,["width","height","color"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(d)),{width:n,height:c,viewBox:"0 0 24 24",fill:"none",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.25 18L13.25 6L11.75 6L11.75 18L13.25 18Z",fill:f}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 12.75C6.30964 12.75 5.75 13.3096 5.75 14V18H4.25V14C4.25 12.4812 5.48122 11.25 7 11.25H18C19.5188 11.25 20.75 12.4812 20.75 14V18H19.25V14C19.25 13.3096 18.6904 12.75 18 12.75H7Z",fill:f}),(0,r.jsx)("path",{d:"M12.5 7C11.1193 7 10 5.88071 10 4.5C10 3.11929 11.1193 2 12.5 2C13.8807 2 15 3.11929 15 4.5C15 5.88071 13.8807 7 12.5 7Z",fill:f}),(0,r.jsx)("path",{d:"M20 22C18.6193 22 17.5 20.8807 17.5 19.5C17.5 18.1193 18.6193 17 20 17C21.3807 17 22.5 18.1193 22.5 19.5C22.5 20.8807 21.3807 22 20 22Z",fill:f}),(0,r.jsx)("path",{
|
||
d:"M12.5 22C11.1193 22 10 20.8807 10 19.5C10 18.1193 11.1193 17 12.5 17C13.8807 17 15 18.1193 15 19.5C15 20.8807 13.8807 22 12.5 22Z",fill:f}),(0,r.jsx)("path",{d:"M5 22C3.61929 22 2.5 20.8807 2.5 19.5C2.5 18.1193 3.61929 17 5 17C6.38071 17 7.5 18.1193 7.5 19.5C7.5 20.8807 6.38071 22 5 22Z",fill:f})]}))}},6171:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){
|
||
if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?16:t,u=e.height,c=void 0===u?16:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:(0,r.jsxs)("g",{fill:"none",fillRule:"evenodd",
|
||
children:[(0,r.jsx)("rect",{width:"24",height:"24"}),(0,r.jsx)("path",{fill:f,className:d,d:"M9,7 L11,7 L11,5 L9,5 L9,7 Z M10,18 C5.59,18 2,14.41 2,10 C2,5.59 5.59,2 10,2 C14.41,2 18,5.59 18,10 C18,14.41 14.41,18 10,18 L10,18 Z M10,4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16,4.4771525 0,10 C-1.33226763e-15,12.6521649 1.0535684,15.195704 2.92893219,17.0710678 C4.80429597,18.9464316 7.3478351,20 10,20 C12.6521649,20 15.195704,18.9464316 17.0710678,17.0710678 C18.9464316,15.195704 20,12.6521649 20,10 C20,7.3478351 18.9464316,4.80429597 17.0710678,2.92893219 C15.195704,1.0535684 12.6521649,2.22044605e-16 10,0 L10,4.4408921e-16 Z M9,15 L11,15 L11,9 L9,9 L9,15 L9,15 Z",transform:"translate(2 2)"})]})}))}},554647:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,
|
||
r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M6.7 11H5C5 12.19 5.34 13.3 5.9 14.28L7.13 13.05C6.86 12.43 6.7 11.74 6.7 11Z",fill:f}),(0,r.jsx)("path",{d:"M9.01 11.085C9.015 11.1125 9.02 11.14 9.02 11.17L15 5.18V5C15 3.34 13.66 2 12 2C10.34 2 9 3.34 9 5V11C9 11.03 9.005 11.0575 9.01 11.085Z",fill:f}),(0,r.jsx)("path",{d:"M11.7237 16.0927L10.9632 16.8531L10.2533 17.5688C10.4978 17.633 10.747 17.6839 11 17.72V22H13V17.72C16.28 17.23 19 14.41 19 11H17.3C17.3 14 14.76 16.1 12 16.1C11.9076 16.1 11.8155 16.0975 11.7237 16.0927Z",fill:f}),(0,r.jsx)("path",{
|
||
d:"M21 4.27L19.73 3L3 19.73L4.27 21L8.46 16.82L9.69 15.58L11.35 13.92L14.99 10.28L21 4.27Z",className:d,fill:f})]}))}},425454:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){
|
||
var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{className:d,fill:f,fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M4 2.5C2.897 2.5 2 3.397 2 4.5V15.5C2 16.604 2.897 17.5 4 17.5H11V19.5H7V21.5H17V19.5H13V17.5H20C21.103 17.5 22 16.604 22 15.5V4.5C22 3.397 21.103 2.5 20 2.5H4ZM20 4.5V13.5H4V4.5H20Z"})}))}},226919:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}function l(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function c(e){var t=e.width,n=void 0===t?24:t,i=e.height,c=void 0===i?24:i,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=u(e,["width","height","color","foreground"]);return 16===n||16===c?(0,r.jsxs)("svg",l(a({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 16 16",children:[(0,r.jsx)("path",{className:d,fill:f,d:"M14 2H16V3H14V5H13V3H11V2H13V0H14V2Z"}),(0,r.jsx)("path",{className:d,fill:f,
|
||
d:"M6.5 8.00667C7.88 8.00667 9 6.88667 9 5.50667C9 4.12667 7.88 3.00667 6.5 3.00667C5.12 3.00667 4 4.12667 4 5.50667C4 6.88667 5.12 8.00667 6.5 8.00667Z"}),(0,r.jsx)("path",{className:d,fill:f,d:"M6.5 8.34C3.26 8.34 1 9.98666 1 12.34V13.0067H12V12.34C12 9.98 9.74 8.34 6.5 8.34Z"})]})):(0,r.jsx)("svg",l(a({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{className:d,fill:f,fillRule:"evenodd",clipRule:"evenodd",d:"M21 3H24V5H21V8H19V5H16V3H19V0H21V3ZM10 12C12.205 12 14 10.205 14 8C14 5.795 12.205 4 10 4C7.795 4 6 5.795 6 8C6 10.205 7.795 12 10 12ZM10 13C5.289 13 2 15.467 2 19V20H18V19C18 15.467 14.711 13 10 13Z"})}))}},467853:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?16:t,u=e.height,c=void 0===u?16:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,
|
||
r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,r.jsx)("path",{className:d,fill:f,d:"M19 3H5V5H7V12H5V14H11V22H13V14H19V12H17V5H19V3Z"})})}))}},423871:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){
|
||
var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?18:t,u=e.height,c=void 0===u?18:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 18 18",children:(0,r.jsx)("path",{className:d,fillRule:"evenodd",clipRule:"evenodd",
|
||
d:"M17.7516 12.8667C17.4035 13.3058 16.5507 13.6191 16.5507 13.6191L10.2065 15.8979V14.2173L14.8754 12.5538C15.4052 12.364 15.4866 12.0956 15.0559 11.9547C14.6261 11.8135 13.8477 11.854 13.3175 12.0446L10.2065 13.1403V11.3962L10.3858 11.3355C10.3858 11.3355 11.2848 11.0173 12.5488 10.8773C13.8129 10.738 15.3607 10.8963 16.5758 11.3569C17.9451 11.7896 18.0993 12.4275 17.7516 12.8667ZM10.8104 10.005V5.70728C10.8104 5.20255 10.7173 4.73788 10.2437 4.60633C9.88107 4.49017 9.65602 4.82693 9.65602 5.33126V16.0938L6.75349 15.1726V2.34009C7.9876 2.56918 9.78554 3.11075 10.7521 3.43658C13.2102 4.2805 14.0436 5.33085 14.0436 7.69748C14.0436 10.0042 12.6197 10.8785 10.8104 10.005ZM1.42767 14.0417C0.0219393 13.6458 -0.212012 12.8209 0.428722 12.3457C1.02089 11.907 2.02793 11.5767 2.02793 11.5767L6.18966 10.0969V11.7839L3.19485 12.8557C2.66583 13.0456 2.58447 13.3143 3.01432 13.4552C3.44458 13.596 4.22334 13.556 4.75317 13.3657L6.18966 12.8444V14.3537C6.09859 14.3699 5.997 14.3861 5.90309 14.4019C4.4662 14.6367 2.9358 14.5387 1.42767 14.0417Z",
|
||
fill:f})}))}},753724:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?16:t,u=e.height,c=void 0===u?16:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 60 60",children:(0,r.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,r.jsx)("path",{className:d,fill:f,
|
||
d:"M8.95185131,8.62650012 L8.92775494,8.65059649 C3.20486729,14.2891468 -0.0119979765,21.9758886 5.02080018e-05,29.9999795 C-0.0119979765,36.56624 2.14462705,42.9517778 6.13257613,48.1686417 C6.16872068,48.2168345 6.24100979,48.252979 6.28920253,48.2168345 C6.33739527,48.1806899 6.34944345,48.120449 6.32534708,48.0602081 C4.03619202,40.9879237 15.722931,23.8433572 21.7711196,16.6626392 C21.795216,16.6385428 21.8193124,16.6144465 21.8193124,16.5783019 C21.8193124,16.5421573 21.795216,16.5060128 21.7590715,16.4819164 C11.6024519,6.37348961 8.8795622,8.68674104 8.92775494,8.65059649 M51.048208,8.62650012 L51.0723044,8.65059649 C56.795192,14.2770987 60.0000091,21.9758886 59.9879609,29.9999795 C60.0000091,36.56624 57.8433841,42.9517778 53.855435,48.1686417 C53.8192905,48.2168345 53.7470014,48.252979 53.6988086,48.2168345 C53.6506159,48.1806899 53.6506159,48.120449 53.6626641,48.0602081 C55.9518191,40.9879237 44.2650801,23.831309 38.2289397,16.650591 C38.2048433,16.6264946 38.180747,16.6023983 38.180747,16.5662537 C38.180747,16.518061 38.2048433,16.4939646 38.2409879,16.4698682 C48.4096556,6.36144143 51.0964008,8.68674104 51.0602562,8.65059649 M30.0000297,0 C36.0482183,0 41.0361667,1.66264946 45.626525,4.38553917 C45.6867659,4.40963554 45.6988141,4.48192464 45.6747177,4.53011738 C45.6506214,4.57831012 45.5903804,4.5903583 45.5301395,4.57831012 C39.7229146,3.32529893 30.8915953,8.33734369 30.0602706,8.84336744 C30.0361742,8.85541562 30.024126,8.86746381 30.0000297,8.86746381 C29.9759333,8.86746381 29.9518369,8.85541562 29.9397887,8.84336744 C27.7229228,7.56625988 19.5663019,3.28915437 14.4217271,4.61445467 C14.3614862,4.62650286 14.3012452,4.61445467 14.2771489,4.56626193 C14.2530525,4.50602101 14.2771489,4.44578009 14.3253416,4.42168372 C18.9156999,1.66264946 23.9638892,0 30.0000297,0 M30.0000297,24.0602245 C30.0361742,24.0602245 30.0723188,24.0843209 30.0964151,24.1084172 C39.0723126,30.9397379 54.4337479,47.8071962 49.7470041,52.5782773 L49.7590523,52.5662291 L49.7590523,52.5782773 L49.7470041,52.5782773 C44.2771283,57.3734547 37.2650849,60.0120071 30.0000297,59.9999589 C22.7349744,60.0120071 15.7108828,57.3734547 10.2530552,52.5782773 L10.2410071,52.5662291 L10.2530552,52.5782773 C5.56631146,47.8071962 20.9277467,30.9276897 29.9036442,24.1084172 C29.9156924,24.0843209 29.9638851,24.0602245 30.0000297,24.0602245"
|
||
})})}))}},256827:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{fill:f,className:d,
|
||
d:"M12 2C6.485 2 2 6.485 2 12H5.33333C5.33333 8.32333 8.32333 5.33333 12 5.33333C15.6767 5.33333 18.6667 8.32333 18.6667 12C18.6667 15.6767 15.6767 18.6667 12 18.6667C10.2033 18.6667 8.55833 17.9333 7.315 16.6867L10.3333 13.6667H2V22L4.935 19.065C6.79833 20.94 9.30167 22 12 22C17.515 22 22 17.515 22 12C22 6.48667 17.515 2 12 2Z"})}))}},517451:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(785893);n(667294);function o(e){var t=e.width,n=void 0===t?16:t,o=e.height,i=void 0===o?16:o,a=e.color,l=void 0===a?"currentColor":a,u=e.className,c=e.foreground;return(0,r.jsx)("svg",{className:u,width:n,height:i,viewBox:"0 0 16 16",children:(0,r.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,r.jsx)("rect",{width:"16",height:"16"}),(0,r.jsx)("polygon",{className:c,fill:l,points:"12 2.32 10.513 2 4 13.68 5.487 14"})]})})}},203158:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,
|
||
configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){
|
||
var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=l(e,["width","height","color"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(d)),{fill:"none",xmlns:"http://www.w3.org/2000/svg",width:n,height:c,viewBox:"0 0 24 24",children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_414_20322)",children:[(0,r.jsx)("path",{d:"M2 6.00299V18.003C2 19.107 2.895 20.003 4 20.003H5V4.00299H4C2.895 4.00299 2 4.89799 2 6.00299Z",fill:f}),(0,r.jsx)("path",{
|
||
d:"M20 4.00299H7V20.003H20C21.104 20.003 22 19.107 22 18.003V6.00299C22 4.89799 21.104 4.00299 20 4.00299ZM19 14.003C19 15.107 18.104 16.003 17 16.003C15.896 16.003 15 15.107 15 14.003C15 12.899 15.896 12.003 17 12.003V9.38999L13 10.724C13 10.724 13 14.984 13 15.003C13 16.107 12.104 17.003 11 17.003C9.896 17.003 9 16.107 9 15.003C9 13.899 9.896 13.003 11 13.003V10.003C11 9.57199 11.275 9.19099 11.684 9.05399L17.684 7.05399C17.989 6.95199 18.323 7.00299 18.585 7.19199C18.846 7.37899 19 7.68199 19 8.00299C19 8.00299 19 13.983 19 14.003Z",fill:f})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_414_20322",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]}))}},298182:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{}
|
||
;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?12:t,u=e.height,c=void 0===u?12:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,
|
||
r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 12 12",children:[(0,r.jsx)("path",{className:d,d:"M7.00168 1.08381C7.00168 0.485238 6.51645 0 5.91788 0C5.31931 0 4.83408 0.485238 4.83408 1.08381V2.18568C4.83408 2.78425 5.31931 3.26949 5.91788 3.26949C6.51645 3.26949 7.00168 2.78425 7.00168 2.18568V1.08381Z",fill:f}),(0,r.jsx)("path",{className:d,d:"M7.00159 9.81428C7.00159 9.21571 6.51636 8.73047 5.91779 8.73047C5.31922 8.73047 4.83398 9.21571 4.83398 9.81428V10.9161C4.83398 11.5147 5.31922 12 5.91779 12C6.51636 12 7.00159 11.5147 7.00159 10.9161V9.81428Z",fill:f}),(0,r.jsx)("path",{className:d,
|
||
d:"M10.9162 7.10561C11.5148 7.10561 12 6.62037 12 6.0218C12 5.42323 11.5148 4.93799 10.9162 4.93799H9.81433C9.21576 4.93799 8.73053 5.42323 8.73053 6.0218C8.73053 6.62037 9.21576 7.10561 9.81433 7.10561H10.9162Z",fill:f}),(0,r.jsx)("path",{className:d,d:"M2.18573 7.04555C2.7843 7.04555 3.26953 6.56031 3.26953 5.96174C3.26953 5.36317 2.7843 4.87793 2.18573 4.87793H1.08386C0.485292 4.87793 5.67436e-05 5.36317 5.67436e-05 5.96174C5.67436e-05 6.56031 0.485292 7.04555 1.08386 7.04555H2.18573Z",fill:f})]}))}},509644:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?10:t,u=e.height,c=void 0===u?10:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 10 10",children:(0,r.jsx)("path",{className:d,
|
||
d:"M4.59185 1.69642L1.32007 0.0611887C1.14437 -0.00404167 0.953613 -0.0174513 0.770466 0.0225611C0.587319 0.0625734 0.419488 0.154328 0.286908 0.286908C0.154328 0.419488 0.0625738 0.587318 0.0225614 0.770466C-0.0174511 0.953613 -0.00404127 1.14437 0.0611893 1.32007L1.69642 4.59185C1.78832 4.83513 1.78825 5.10365 1.69623 5.34698L0.122153 8.68254C0.0375916 8.84984 0.00799916 9.03955 0.0375831 9.2246C0.0671671 9.40965 0.154425 9.58061 0.286913 9.7131C0.419402 9.84559 0.59035 9.93283 0.775402 9.96242C0.960453 9.992 1.15016 9.96241 1.31746 9.87785L4.65302 8.30377C4.89635 8.21175 5.16487 8.21168 5.40815 8.30358L8.67993 9.93881C8.85563 10.004 9.04639 10.0175 9.22953 9.97744C9.41268 9.93743 9.58051 9.84567 9.71309 9.71309C9.84567 9.58051 9.93743 9.41268 9.97744 9.22953C10.0175 9.04639 10.004 8.85563 9.93881 8.67993L8.30358 5.40815C8.24152 5.292 8.20906 5.16233 8.2091 5.03061C8.20913 4.89889 8.24165 4.7692 8.30377 4.65302L9.87785 1.31746C9.96241 1.15016 9.992 0.960453 9.96242 0.775401C9.93283 0.59035 9.84559 0.419401 9.7131 0.286913C9.58061 0.154424 9.40965 0.0671663 9.2246 0.0375824C9.03955 0.00799847 8.84984 0.037591 8.68254 0.122152L5.34698 1.69623C5.2308 1.75835 5.10111 1.79087 4.96939 1.7909C4.83767 1.79094 4.708 1.75848 4.59185 1.69642Z",
|
||
fill:f})}))}},161482:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r]
|
||
;t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.className,p=e.foreground,h=l(e,["width","height","color","className","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(h)),{className:d,width:n,height:c,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{className:p,fill:f,
|
||
d:"M22 16.53C22 18.3282 20.2485 19.7837 18.089 19.7837C15.9285 19.7837 14.5396 18.3277 14.5396 16.53C14.5396 14.7319 15.9286 13.2746 18.089 13.2746C18.7169 13.2746 19.3089 13.4013 19.8353 13.6205V5.814L9.46075 7.32352V18.7449C9.46075 20.5424 7.70957 22 5.54941 22C3.38871 22 2 20.5443 2 18.7456C2 16.9481 3.3892 15.4898 5.54941 15.4898C6.17823 15.4898 6.76966 15.6162 7.29604 15.836C7.29604 11.3608 7.29604 8.5366 7.29604 4.1395L21.9996 2L22 16.53Z"})}))}},102770:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})))
|
||
;n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.slashColor,p=e.className,h=e.foreground,y=l(e,["width","height","color","slashColor","className","foreground"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){
|
||
return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(y)),{className:p,width:n,height:c,viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{className:h,fill:f,fillRule:"evenodd",clipRule:"evenodd",d:"M5.25208 21.9906C5.34946 21.9968 5.44859 22 5.54939 22C7.70956 22 9.46073 20.5424 9.46073 18.7449V17.782L5.25208 21.9906ZM11.7699 6.98753L9.46073 7.32352V9.29667L7.29603 11.4614V4.13949L15.8647 2.89267L11.7699 6.98753ZM19.8353 7.4074V13.6205C19.3089 13.4013 18.7169 13.2746 18.089 13.2746C15.9286 13.2746 14.5395 14.7319 14.5395 16.53C14.5395 18.3277 15.9284 19.7837 18.089 19.7837C20.2485 19.7837 22 18.3282 22 16.53L21.9996 5.24304L19.8353 7.4074Z"}),(0,r.jsx)("rect",{fill:null!=d?d:f,x:"2.80762",y:"18.7783",width:"24",height:"2",transform:"rotate(-45 2.80762 18.7783)"})]}))}},422557:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,
|
||
enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){
|
||
var t=e.width,n=void 0===t?32:t,u=e.height,c=void 0===u?32:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){i(e,t,n[t])}))}return e}({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 32 32",children:[(0,r.jsx)("rect",{width:"32",height:"32",rx:"16",fill:f}),(0,r.jsx)("path",{
|
||
d:"M23 9.99995C19.56 9.99995 16.826 6.43495 16.799 6.39795C16.421 5.89795 15.579 5.89795 15.201 6.39795C15.174 6.43495 12.44 9.99995 9 9.99995C8.447 9.99995 8 10.4479 8 10.9999V17.9999C8 21.8069 14.764 25.4779 15.534 25.8839C15.68 25.9609 15.84 25.9979 16 25.9979C16.16 25.9979 16.32 25.9599 16.466 25.8839C17.236 25.4779 24 21.8069 24 17.9999V10.9999C24 10.4479 23.553 9.99995 23 9.99995ZM19 19.9999L16 17.9999L13 19.9999L14 16.9999L12 14.9999H15L16 11.9999L17 14.9999H20L18 16.9999L19 19.9999Z",className:d})]}))}},552675:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(336194)),i=n(633878);function a(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function l(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){
|
||
return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function c(e){var t=e.width,n=void 0===t?24:t,c=e.height,s=void 0===c?24:c,f=e.color,d=void 0===f?"currentColor":f,p=e.foregroundColor,h=void 0===p?o.Z.unsafe_rawColors.RED_400.css:p,y=e.foreground,b=e.background,v=u(e,["width","height","color","foregroundColor","foreground","background"]);return(0,r.jsxs)("svg",l(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n)
|
||
;"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){a(e,t,n[t])}))}return e}({},(0,i.Z)(v)),{width:n,height:s,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("g",{fill:"none",fillRule:"evenodd",children:(0,r.jsx)("path",{className:y,fill:h,d:"M21.47,3.39,20.14,2.05,2.53,19.66,3.86,21l4.41-4.4,1.3-1.31,1.75-1.74,3.83-3.83Z"})}),(0,r.jsxs)("g",{fill:"none",children:[(0,r.jsx)("polygon",{points:"17 11.14 16.55 11.59 14.14 14 19 14 19 12 17 12 17 11.14",className:b,fill:d}),(0,r.jsx)("polygon",{points:"16.91 3 5 3 5 5 7 5 7 12 5 12 5 14 5.91 14 16.91 3",className:b,fill:d}),(0,r.jsx)("polygon",{points:"12.72 15.42 11 17.14 11 22 13 22 13 15.14 12.72 15.42",className:b,fill:d})]})]}))}},941498:(e,t,n)=>{"use strict";n.d(t,{ZT:()=>y,pk:()=>v,XX:()=>m,iv:()=>g,Pb:()=>O,M9:()=>E,ZP:()=>C});var r=n(785893),o=(n(667294),
|
||
n(294184)),i=n.n(o),a=n(496486),l=n.n(a),u=n(707961),c=n(67826),s=n.n(c);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){f(e,t,n[t])}))}return e}function p(e){return"".concat(e/16,"rem")}function h(){return(0,r.jsx)("div",{className:s().avatar,style:{opacity:.08}})}function y(e){var t=e.width,n=e.opacity,o=e.className;return(0,r.jsx)("div",{className:i()(o,f({},s().blob,!0)),style:{width:p(t),opacity:null!=n?n:l().random(.02,.08)}})}function b(e){var t,n,o=e.groupStart,a=void 0!==o&&o,c=e.compact,p=void 0!==c&&c,b=e.attachmentSpecs,v=e.usernameWidth,m=e.usernameOpacity,g=e.className,O=e.style,E=p?50:l().random(40,50)
|
||
;if(!p&&a)t=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h,{}),(0,r.jsx)(u.H,{className:s().header,children:(0,r.jsx)(y,{width:v,opacity:m,className:s().username})})]});else if(p){var C;t=(0,r.jsxs)(r.Fragment,{children:[p&&(0,r.jsx)(y,{width:E,className:i()((C={},f(C,s().compactTimestamp,!0),f(C,s().hidden,!a),C))}),(0,r.jsx)(u.H,{className:s().header,children:(0,r.jsx)(y,{width:v,opacity:m})})]})}return(0,r.jsxs)("div",{"aria-hidden":!0,className:i()(g,(n={},f(n,s().wrapper,!0),f(n,s().compact,p),f(n,s().cozy,!p),n)),style:O,children:[(0,r.jsxs)("div",{className:s().contents,children:[t,(0,r.jsx)("div",{className:s().content,children:new Array(l().random(3,8)).fill(null).map((function(){return l().random(30,80)})).map((function(e,t){return(0,r.jsx)(y,{width:e,opacity:.06},t)}))})]}),null!=b&&(0,r.jsx)("div",{className:s().attachmentContainer,children:(0,r.jsx)("div",{className:s().attachment,style:d({opacity:.03},b)})})]})}var v=44,m=22,g=26,O=26,E=6;function C(e){
|
||
var t=e.messages,n=e.groupSpacing,o=void 0===n?0:n,i=e.compact,a=void 0!==i&&i,u=e.attachmentSpecs,c=e.className,s=null!=u?u.last?t-1:l().random(0,t-1):-1,f=l().random(80,120),d=l().random(.1,.2);return(0,r.jsx)(r.Fragment,{children:new Array(t).fill(null).map((function(e,t){return(0,r.jsx)(b,{compact:a,className:c,usernameWidth:f,usernameOpacity:d,groupStart:0===t,attachmentSpecs:t===s?u:void 0,style:0===t?{marginTop:p(o)}:void 0},t)}))})}},630395:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(778613),c=n(2590),s=n(473708),f=n(150814),d=n.n(f),p=n(518280),h=n.n(p);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m=0,g=function(e){switch(e){case c._vf.TOP_LEFT:return s.Z.Messages.OVERLAY_NOTIFICATIONS_TOP_LEFT;case c._vf.TOP_RIGHT:return s.Z.Messages.OVERLAY_NOTIFICATIONS_TOP_RIGHT;case c._vf.BOTTOM_LEFT:
|
||
return s.Z.Messages.OVERLAY_NOTIFICATIONS_BOTTOM_LEFT;case c._vf.BOTTOM_RIGHT:return s.Z.Messages.OVERLAY_NOTIFICATIONS_BOTTOM_RIGHT;default:return s.Z.Messages.OVERLAY_NOTIFICATIONS_DISABLED}},O=[c._vf.DISABLED,c._vf.TOP_LEFT,c._vf.TOP_RIGHT,c._vf.BOTTOM_LEFT,c._vf.BOTTOM_RIGHT];function E(e){var t=e.position,n=e.onChange,i=v(o.useState((function(){return"notification-position-selector-".concat(m++)})),1)[0],f=t===c._vf.DISABLED?s.Z.Messages.OVERLAY_NOTIFICATION_SETTINGS_DISABLED:s.Z.Messages.OVERLAY_NOTIFICATION_SETTINGS_POSITION.format({position:g(t)});return(0,r.jsxs)("div",{children:[(0,r.jsx)(l.tEY,{within:!0,offset:-2,children:(0,r.jsx)("div",{className:a()(d().wrapper,b({},d().disabledSelected,t===c._vf.DISABLED)),children:O.map((function(e){var o;return(0,r.jsxs)("label",{className:a()((o={},b(o,d().selected,e===t),b(o,d().disabled,e===c._vf.DISABLED),b(o,d().topRight,e===c._vf.TOP_RIGHT),b(o,d().topLeft,e===c._vf.TOP_LEFT),b(o,d().bottomRight,e===c._vf.BOTTOM_RIGHT),
|
||
b(o,d().bottomLeft,e===c._vf.BOTTOM_LEFT),o)),children:[g(e),e===c._vf.DISABLED?(0,r.jsx)(u.Z,{className:d().disabledIcon}):null,(0,r.jsx)("input",{type:"radio",name:i,value:e,onChange:function(t){return n(t,e)},className:d().hiddenInput})]},e)}))})}),(0,r.jsx)(l.R94,{type:l.geA.DESCRIPTION,className:h().marginTop8,children:f})]})}E.Positions=c._vf;const C=E},168775:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(211482),u=n(987687),c=n.n(u);function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n
|
||
}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){n=i[r];t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function p(e){var t=e.tooltipText,n=e.children,o=e.onContextMenu,u=e.onClick,p=e.disabled,h=e.icon,y=e.iconForeground,b=e.innerClassName,v=e.tooltipClassName,m=e.onMouseEnter,g=e.onMouseLeave,O=e["aria-label"],E=e["aria-checked"],C=e.role,j=e.tooltipColor,S=e.tooltipForceOpen,I=(0,r.jsx)(h,{width:20,height:20,foreground:y});return(0,r.jsx)(a.ua7,{tooltipClassName:v,text:t,"aria-label":O,color:j,forceOpen:S,children:function(e){
|
||
var t,h=e.onClick,y=e.onMouseEnter,v=e.onMouseLeave,O=d(e,["onClick","onMouseEnter","onMouseLeave"]);return(0,r.jsxs)(a.zxk,f(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){s(e,t,n[t])}))}return e}({},O),{look:a.zxk.Looks.BLANK,size:a.zxk.Sizes.NONE,disabled:p,innerClassName:b,wrapperClassName:c().button,className:i()(c().button,(t={},s(t,c().disabled,p),s(t,c().enabled,!p),t)),onClick:function(e){null!=h&&h();null!=u&&u(e)},onMouseEnter:function(){null==y||y();null==m||m()},onMouseLeave:function(){null==v||v();null==g||g()},onContextMenu:o,role:C,"aria-checked":E,children:[null!=n?(0,r.jsx)(l.ZP,{width:20,height:20,mask:l.ZP.Masks.PANEL_BUTTON,children:I}):I,n]}))}})}},630781:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c})
|
||
;var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(777051),u=n.n(l);function c(e){var t=e.children,n=e.className;return(0,r.jsx)(a.xvT,{color:"none",className:i()(u().subtext,n),variant:"text-xs/normal",children:t})}},984479:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(153806),u=n.n(l);function c(e){var t=e.children,n=e.className;return(0,r.jsx)(a.xvT,{color:"none",className:i()(u().title,n),variant:"text-sm/normal",children:t})}},661782:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(308377),c=n(554647),s=n(211482),f=n(629978),d=n.n(f);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e){y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){
|
||
return e.__proto__||Object.getPrototypeOf(e)};return y(e)}function b(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e,t){v=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return v(e,t)}var m,g=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}!function(e){e[e.OUTGOING=0]="OUTGOING";e[e.INCOMING=1]="INCOMING"}(m||(m={}));var E=function(e){!function(e,t){
|
||
if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&v(e,t)}(n,e);var t=O(n);function n(){p(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderStatus=function(){var e=this.props,t=e.muted,n=e.deafen,o=n?u.Z:c.Z;return t||n?(0,r.jsx)(o,{className:d().status},"status"):null};o.renderBorder=function(){var e=this.props.speaking;return(0,r.jsx)("div",{className:a()(d().border,h({},d().speaking,e))},"border")};o.renderVoiceCallAvatar=function(){var e=this.props,t=e.src,n=e.disabled,o=e.ringing,i=e.ringingType,u=e.avatarClassName,c=e.muted,f=e.deafen,p=e.size,y=e.renderIcon,b=(0,l.pxk)(p),v=(0,r.jsx)("img",{src:t,alt:" ",className:a()(d().voiceAvatar,u,h({},d().ringingOutgoing,o&&i===m.OUTGOING))});if(n)return v;var g=s.QS.AVATAR_DEFAULT
|
||
;null!=y?g=p===l.EFr.SIZE_32?s.QS.AVATAR_CALL_ICON_32:s.QS.AVATAR_CALL_ICON:(c||f)&&(g=s.QS.AVATAR_VOICE_CALL_80);return(0,r.jsxs)("div",{className:d().callAvatarMaskContainer,children:[(0,r.jsxs)(s.ZP,{className:d().callAvatarMask,width:b,height:b,mask:g,children:[null==y?void 0:y(),v]}),c||f?this.renderStatus():this.renderBorder()]})};o.render=function(){var e,t=this.props,n=t.size,o=t.onClick,i=t.style,u=t.onContextMenu,c=t.className,s=t.ringingType,f=t.ringing,p=a()(d().wrapper,(h(e={},d().clickable,null!=o),h(e,d().ringingOutgoing,f&&s===m.OUTGOING),h(e,d().ringingIncoming,f&&s===m.INCOMING),e),c),y=(0,l.pxk)(n),b=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){h(e,t,n[t])}))}return e}({height:y,width:y},i);return(0,r.jsx)("div",{
|
||
style:b,onContextMenu:u,className:p,children:this.renderVoiceCallAvatar()})};return n}(o.PureComponent);E.defaultProps={size:l.EFr.SIZE_80,ringingType:m.OUTGOING,speaking:!1,soundsharing:!1,ringing:!1,muted:!1,deafen:!1,hasVideo:!1,mirror:!1,disabled:!1,paused:!1};E.RingingType=m;const C=E},91717:(e,t,n)=>{"use strict";n.d(t,{e:()=>N,Z:()=>T});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(807801),c=n(542231),s=n(781736),f=n(532378),d=n(308377),p=n(554647),h=n(423871),y=n(753724),b=n(108206),v=n(977005),m=n(2590),g=n(550677),O=n(473708),E=n(754012),C=n.n(E);function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e){I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return I(e)}function _(e,t){
|
||
return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function w(e,t){w=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return w(e,t)}var x=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=I(e);if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}var N=function(e){var t=e.children,n=e.collapsed,o=void 0!==n&&n,i=e.className;return(0,r.jsx)("div",{className:a()(i,C().list,o?C().listCollapse:C().listDefault),role:"group",children:t})},A=function(e){
|
||
!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&w(e,t)}(n,e);var t=P(n);function n(){j(this,n);var e;(e=t.apply(this,arguments)).handleClick=function(t){var n=e.props,r=n.onClick,o=n.user;null==r||r(t,o)};e.handleDoubleClick=function(t){var n=e.props,r=n.onDoubleClick,o=n.user;null==r||r(t,o)};e.handleContextMenu=function(t){var n=e.props,r=n.onContextMenu,o=n.user;null==r||r(t,o)};e.handleMouseLeave=function(t){var n=e.props,r=n.onMouseLeave,o=n.user;null==r||r(t,o)};e.handleMouseEnter=function(t){var n=e.props,r=n.onMouseEnter,o=n.user;null==r||r(t,o)};e.handleMouseDown=function(t){var n=e.props,r=n.onMouseDown,o=n.user;null==r||r(t,o)};return e}var o=n.prototype;o.renderPrioritySpeaker=function(){var e=this.props,t=e.speaking,n=e.priority,o=e.collapsed,i=e.mute,u=e.serverMute;return n&&!o?(0,r.jsx)(l.ua7,{
|
||
text:O.Z.Messages.PRIORITY_SPEAKER,children:function(e){return(0,r.jsx)("div",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){S(e,t,n[t])}))}return e}({className:a()(C().iconPriortySpeaker,S({},C().iconPriortySpeakerSpeaking,!i&&!u&&t))},e))}}):null};o.renderAvatar=function(){var e,t=this.props,n=t.speaking,o=t.user,i=t.size,l=t.avatarContainerClass,u=t.guildId;return(0,r.jsx)("div",{className:a()(l,C().avatar,(e={},S(e,C().avatarLarge,i===m.ipw.LARGE),S(e,C().avatarSmall,i===m.ipw.SMALL),S(e,C().avatarSpeaking,n),e)),style:{backgroundImage:"url(".concat(o.getAvatarURL(u,i===m.ipw.LARGE?38:24),")")}})};o.renderName=function(){var e,t=this.props,n=t.nick,o=t.user,i=t.collapsed,l=t.speaking,u=t.userNameClassName,c=t.mute,s=t.serverMute
|
||
;return i?null:(0,r.jsx)("div",{className:a()(u,(e={},S(e,C().username,!0),S(e,C().usernameSpeaking,!c&&!s&&l),e)),children:null!=n?n:o.username})};o.renderIcons=function(){var e=this.props,t=e.mute,n=e.localMute,o=e.localVideoDisabled,i=e.serverMute,m=e.deaf,E=e.serverDeaf,j=e.collapsed,I=e.video,_=e.isStreaming,w=e.disabled,x=e.isWatching,P=e.iconClassName,N=e.embeddedApplication,A=e.otherClientSessionType;if(j||w)return null;var T=[];if(t){T.push((0,r.jsx)(l.DY3,{text:n?O.Z.Messages.LOCAL_MUTED:i?O.Z.Messages.SERVER_MUTED:O.Z.Messages.VOICE_CHANNEL_MUTED,className:C().iconSpacing,children:(0,r.jsx)(p.Z,{className:a()(C().icon,P,S({},C().iconServer,i)),foreground:n?C().strikethrough:void 0})},"mute"))}(E||m)&&T.push((0,r.jsx)(l.DY3,{className:C().iconSpacing,text:E?O.Z.Messages.SERVER_DEAFENED:O.Z.Messages.VOICE_CHANNEL_DEAFENED,children:(0,r.jsx)(d.Z,{className:a()(C().icon,P,S({},C().iconServer,E))})},"deaf"));I&&(o?T.push((0,r.jsx)(l.DY3,{className:C().iconSpacing,
|
||
text:O.Z.Messages.LOCAL_VIDEO_DISABLED,children:(0,r.jsx)(s.Z,{className:a()(C().icon,P),foreground:C().strikethrough})},"video")):T.push((0,r.jsx)(l.DY3,{className:C().iconSpacing,text:O.Z.Messages.VIDEO,children:(0,r.jsx)(c.Z,{className:a()(C().icon,P)})},"video")));null!=N&&T.push((0,r.jsx)(l.DY3,{text:(0,u.Z)(N.name),className:C().iconSpacing,children:(0,r.jsx)(b.Z,{className:a()(C().icon,P)})},"activity"));_?T.push((0,r.jsx)("div",{className:a()(C().iconSpacing,C().liveIconSpacing),children:(0,r.jsx)(v.ZP,{size:v.ZP.Sizes.SMALL})},"stream")):x&&T.push((0,r.jsx)(l.DY3,{className:C().iconSpacing,text:O.Z.Messages.WATCH_STREAM_WATCHING,children:(0,r.jsx)(f.Z,{className:a()(C().icon,P)})},"watch"));switch(A){case g.YE.XBOX:T.push((0,r.jsx)("div",{className:a()(C().iconSpacing),children:(0,r.jsx)(y.Z,{className:a()(C().icon,P)})},"xbox"));break;case g.YE.PLAYSTATION:T.push((0,r.jsx)("div",{className:a()(C().iconSpacing),children:(0,r.jsx)(h.Z,{className:a()(C().icon,P)})
|
||
},"playstation"))}return 0===T.length?null:(0,r.jsx)("div",{className:C().icons,children:T})};o.render=function(){var e,t=this.props,n=t.onClick,o=t.onKeyDown,i=t.flipped,u=t.size,c=t.className,s=t.selected,f=t.disabled,d=t.overlap,p=t["aria-label"],h=t.tabIndex;return(0,r.jsx)(l.P3F,{className:a()(c,(e={},S(e,C().voiceUser,!0),S(e,C().overlap,d),S(e,C().selected,s),S(e,C().clickable,null!=n),S(e,C().userSmall,u===m.ipw.SMALL),S(e,C().userLarge,u===m.ipw.LARGE),S(e,C().disabled,!s&&f),e)),onClick:this.handleClick,onDoubleClick:this.handleDoubleClick,onContextMenu:this.handleContextMenu,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseDown:this.handleMouseDown,onKeyDown:o,"aria-label":p,tabIndex:h,children:(0,r.jsxs)("div",{className:a()(C().content,S({},C().flipped,i)),children:[this.renderPrioritySpeaker(),this.renderAvatar(),this.renderName(),this.renderIcons()]})})};return n}(o.Component);A.defaultProps={avatarContainerClass:C().avatarContainer,
|
||
userNameClassName:C().usernameFont,size:m.ipw.SMALL,selected:!1,disabled:!1};const T=A},194212:(e,t,n)=>{"use strict";n.d(t,{oo:()=>p,I3:()=>h,yp:()=>y,d9:()=>b});var r=n(785893),o=n(667294),i=n(717187),a=n.n(i),l=n(930948);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var f=function(){function e(){c(this,e);this.emitter=new(a())}var t=e.prototype;t.subscribe=function(e,t){l.S.subscribe(e,t);this.emitter.on(e,t)};t.unsubscribe=function(e,t){l.S.unsubscribe(e,t);this.emitter.off(e,t)};t.bumpDispatchPriority=function(){var e=!0,t=!1,n=void 0;try{for(var r,o=this.emitter.eventNames()[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value,a=!0,u=!1,c=void 0;try{for(var s,f=this.emitter.listeners(i)[Symbol.iterator]();!(a=(s=f.next()).done);a=!0){var d=s.value;l.S.resubscribe(i,d)}}catch(e){u=!0;c=e}finally{try{a||null==f.return||f.return()}finally{if(u)throw c}}}}catch(e){t=!0;n=e}finally{try{e||null==o.return||o.return()}finally{if(t)throw n}}};return e}(),d=function(){function e(){c(this,e)}var t=e.prototype;t.subscribe=function(e,t){l.S.subscribe(e,t)};t.unsubscribe=function(e,t){
|
||
l.S.unsubscribe(e,t)};t.bumpDispatchPriority=function(){0};return e}(),p=o.createContext(new d),h=o.forwardRef((function(e,t){var n=e.children,i=function(){null===a.current&&(a.current=new f);return a.current},a=o.useRef(null);o.useImperativeHandle(t,i);return(0,r.jsx)(p.Provider,{value:i(),children:n})}));function y(e){var t=e.event,n=e.handler,r=o.useContext(p),i=o.useRef(n);o.useEffect((function(){i.current=n}),[n]);var a=null==n;o.useEffect((function(){if(!a){var e=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o;null===(o=i.current)||void 0===o||(r=o).call.apply(r,[i].concat(s(t)))};r.subscribe(t,e);return function(){r.unsubscribe(t,e)}}}),[r,t,a]);return null}function b(e){y(e);return null}},537079:(e,t,n)=>{"use strict";n.d(t,{LL:()=>P,eF:()=>N,N_:()=>A,FI:()=>T,Xi:()=>R})
|
||
;var r=n(773011),o=n(296602),i=n(944522),a=n(996344),l=n(30027),u=n(435949),c=n(791707),s=n(487685),f=n(665783),d=n(382060),p=n(804185),h=n(61209),y=n(567403),b=n(563367),v=n(840922),m=n(715107),g=n(464187),O=n(436154),E=n(9430),C=n(473903),j=n(661123),S=n(773148),I=n(674301),_=n(2590),w=n(379364),x=n(473708);function P(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t.hasFlag(_.xW$.SPAMMER))return!1;if(n.isManaged())return!1;var a=n.getGuildId();return(null==a||!i.Z.isLurking(a))&&(t.id!==e.id&&(!v.Z.isBlocked(t.id)&&(!(!r&&O.Z.getStatus()===_.Skl.DND)&&!(!o&&E.Z.allowNoMessages(n)))))}function N(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(null!=e.flags&&(0,j.yE)(e.flags,_.iLy.SUPPRESS_NOTIFICATIONS))return!1;var o=h.Z.getChannel(t);e.type===_.uaV.THREAD_STARTER_MESSAGE&&(o=h.Z.getChannel(null==o?void 0:o.parent_id))
|
||
;var i=C.default.getCurrentUser(),l=C.default.getUser(e.author.id);if(null==o||null==i||null==l)return!1;if(o.type===_.d4z.GROUP_DM&&e.type===_.uaV.RECIPIENT_REMOVE)return!1;if(!P(i,l,o,r))return!1;if(a.Z.isMessageRequest(t))return!1;if(!n){var c=m.Z.getChannelId(g.Z.getGuildId());if(c===o.id)return!1;if(p.ZP.getCurrentSidebarChannelId(c)===o.id)return!1}if(d.Ec.has(o.type)){if(s.Z.isMuted(o.id))return!1;var y=(0,f.J)(o);return y!==w.iN.NO_MESSAGES&&(y===w.iN.ALL_MESSAGES||(0,u.Hl)({rawMessage:e,userId:i.id,suppressEveryone:!1,suppressRoles:!1}))}var v=!d.tx.has(o.type)||b.Z.getChannelId()===o.id;if(E.Z.allowAllMessages(o)&&v)return!0;var O=E.Z.isSuppressEveryoneEnabled(o.getGuildId()),S=E.Z.isSuppressRolesEnabled(o.getGuildId());return(0,u.Hl)({rawMessage:e,userId:i.id,suppressEveryone:O,suppressRoles:S})}function A(e,t){if(m.Z.getChannelId(g.Z.getGuildId())!==t)return!1;var n=h.Z.getChannel(t);e.type===_.uaV.THREAD_STARTER_MESSAGE&&(n=h.Z.getChannel(null==n?void 0:n.parent_id))
|
||
;var r=C.default.getCurrentUser(),o=C.default.getUser(e.author.id);return null!=n&&null!=r&&null!=o&&(!n.isManaged()&&(!o.hasFlag(_.xW$.SPAMMER)&&(!v.Z.isBlocked(o.id)&&(o.id!==r.id&&(O.Z.getStatus()!==_.Skl.DND&&!E.Z.allowNoMessages(n))))))}function T(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=C.default.getCurrentUser(),i=C.default.getUser(e.ownerId);if(null==t||null==o||null==i)return!1;if(!P(o,i,t,r,!0))return!1;if(E.Z.isGuildOrCategoryOrChannelMuted(t.guild_id,t.id))return!1;if(!n){var a=m.Z.getChannelId(g.Z.getGuildId());if(a===t.id)return!1}return E.Z.getNewForumThreadsCreated(t)}var Z=function(e,t,n){return"".concat(e," (").concat((0,r.F6)(t,C.default,v.Z,!0)).concat(null!=n?", ".concat((0,r.F6)(n,C.default,v.Z)):"",")")};function M(e,t,n,r){switch(e.type){case _.d4z.GUILD_ANNOUNCEMENT:case _.d4z.GUILD_TEXT:return t;case _.d4z.GROUP_DM:return n;case _.d4z.DM:default:return r}}
|
||
function R(e,t,n){var i=S.Z.getName(e.getGuildId(),e.id,n),a=i;switch(e.type){case _.d4z.GUILD_ANNOUNCEMENT:case _.d4z.GUILD_TEXT:case _.d4z.GUILD_VOICE:case _.d4z.ANNOUNCEMENT_THREAD:case _.d4z.PUBLIC_THREAD:case _.d4z.PRIVATE_THREAD:var u=h.Z.getChannel(e.parent_id);if(t.type===_.uaV.THREAD_STARTER_MESSAGE&&null!=u)a=Z(a,u,h.Z.getChannel(u.parent_id));else if((0,c.Z)(t)){null!=y.Z.getGuild(e.getGuildId())&&(a=Z(a,e,u))}else a=Z(a,e,u);break;case _.d4z.GROUP_DM:e.isManaged()&&n.bot&&a===(0,r.F6)(e,C.default,v.Z)||(a="".concat(a," (").concat((0,r.F6)(e,C.default,v.Z,!0),")"))}var s,f=t.content;if((0,c.Z)(t)&&null==(f=I.Z.stringify(t,e))){new o.Z("NotificationTextUtils").warn("SystemMessageUtils.stringify(...) could not convert",t);throw new Error("failed to stringify system message")}var d,p=null!==(s=t.sticker_items)&&void 0!==s?s:t.stickers
|
||
;if(null!=t.activity&&null!=t.application)d=t.activity.type===_.mFx.JOIN?M(e,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_GUILD_ACTIVITY_JOIN,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_GROUP_DM_ACTIVITY_JOIN,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN).format({user:i,game:t.application.name}):t.activity.type===_.mFx.JOIN_REQUEST?M(e,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN_REQUEST,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN_REQUEST,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN_REQUEST).format({user:i,game:t.application.name}):"";else if(null!=t.activity&&t.activity.type===_.mFx.LISTEN){d=M(e,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_GUILD_ACTIVITY_LISTEN,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_GROUP_DM_ACTIVITY_LISTEN,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_LISTEN).format({user:i})}else d=null!=p&&p.length>0?x.Z.Messages.STICKER_NOTIFICATION_BODY.format({stickerName:p[0].name
|
||
}):t.type===_.uaV.PREMIUM_REFERRAL?x.Z.Messages.SHARE_NITRO_EMBEDDED_MESSAGE_BODY_SHORT.format({username:n.username}):l.ZP.unparse(f,e.id,!0);0===d.length&&(d=function(e){if(e.embeds.length>0){var t=e.embeds[0];if(null!=t.description)return null!=t.title?"".concat(t.title," ").concat(t.description):t.description;if(null!=t.title)return t.title;if(null!=t.fields){var n=t.fields[0];return"".concat(n.name," ").concat(n.value)}}var r;if((0,j.yE)(null!==(r=e.flags)&&void 0!==r?r:0,_.iLy.IS_VOICE_MESSAGE))return x.Z.Messages.VOICE_MESSAGES_SENT_NOTIFICATION;if(e.attachments.length>0){var o=e.attachments[0].filename;return x.Z.Messages.NOTIFICATION_BODY_ATTACHMENT.format({filename:o})}return""}(t));return{icon:n.getAvatarURL(e.guild_id,128),title:a,body:d}}},374092:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});n(895072);const r=n(895072).Z},2255:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(2590),o=n(473708);const i={getStatus:function(e){
|
||
var t,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e){case r.hes.CONNECTING:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_CONNECTING;break;case r.hes.AUTHENTICATING:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_AUTHENTICATING;break;case r.hes.AWAITING_ENDPOINT:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_AWAITING_ENDPOINT;break;case r.hes.RTC_CONNECTED:t=r.QKv.CONNECTED;n=i?o.Z.Messages.CONNECTION_STATUS_VIDEO_CONNECTED:o.Z.Messages.CONNECTION_STATUS_VOICE_CONNECTED;break;case r.hes.RTC_CONNECTING:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_RTC_CONNECTING;break;case r.hes.ICE_CHECKING:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_ICE_CHECKING;break;case r.hes.DTLS_CONNECTING:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_DTLS_CONNECTING;break;case r.hes.NO_ROUTE:t=r.QKv.ERROR;n=o.Z.Messages.CONNECTION_STATUS_NO_ROUTE;break;case r.hes.RTC_DISCONNECTED:t=r.QKv.ERROR;n=o.Z.Messages.CONNECTION_STATUS_RTC_DISCONNECTED;break
|
||
;case r.hes.DISCONNECTED:default:t=r.QKv.ERROR;n=o.Z.Messages.CONNECTION_STATUS_DISCONNECTED}return{connectionStatus:t,connectionStatusText:n}},getShortHostname:function(e){return null==e?"":e.split(".")[0]}}},455049:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>b});var r=n(120637),o=n(496486),i=n.n(o);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
|
||
function u(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}var s={1:"bold",4:"underline"},f={30:"black",31:"red",32:"green",33:"yellow",34:"blue",35:"magenta",36:"cyan",37:"white"},d={40:"black",41:"red",42:"green",43:"yellow",44:"blue",45:"magenta",46:"cyan",47:"white"},p=/\x1B\[(\d+(?:[:;]\d+)*)m/,h=new RegExp("(?=".concat(p.source,")"));function y(e,t,n,r){var o=["0"].concat(u(n));if(r){var i
|
||
;(i=o).push.apply(i,u(Object.keys(t)))}return Object.entries(t).map((function(t){var n=l(t,2),r=n[0],i=n[1];return function(e,t,n,r){return{className:"ansi-".concat(e,"-").concat(t),endsParent:!0,begin:h,"on:begin":function(e,t){var o=e[1].split(";");void 0===t.data.isOn&&(t.data.isOn=!1);var i=!0,a=!1,l=void 0;try{for(var u,c=o[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var s=u.value;s===n?t.data.isOn=!0:r.includes(s)&&(t.data.isOn=!1)}}catch(e){a=!0;l=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw l}}t.data.isOn||t.ignoreMatch()}}}(e,i,r,o)}))}r.Z.registerLanguage("ansi",(function(){var e={className:"ansi-control-sequence",begin:p,starts:{end:h,endsParent:!0}},t=u(y("foreground",f,["38","39"],!0)).concat(u(y("background",d,["48","49"],!0)),u(y("style",s,[],!1)),[e]);!function(e){for(var t=0;t<e.length;t++)e[t].contains=e.slice(t+1)}(t);return{contains:[{begin:h,contains:t}]}}));const b={highlight:function(e,t,n){if(!function(e){if(e.indexOf(v)>=0)return!1
|
||
;var t=0,n=e.split("\n"),r=!0,o=!1,i=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value;if(u.length>1e3)return!1;null==u.match(/^\s*[/][/]/)&&null!=u.match(/[^/]/)&&(t=0);var c=u.match(/[/]/g);if(null!=c&&(t+=c.length)>30)return!1}}catch(e){o=!0;i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return!0}(t))return null;var o=Date.now(),i=r.Z.highlight(e,t,n);Date.now();0;return i},hasLanguage:function(e){return null!=r.Z.getLanguage(e)}};var v=i().repeat("/",15)},495036:(e,t,n)=>{"use strict";n.r(t);n.d(t,{getSelectionText:()=>f,contextMenuCallbackNative:()=>d,contextMenuCallbackWeb:()=>p});var r=n(785893),o=(n(667294),n(971402));function i(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){i(a,r,o,l,u,"next",e)}function u(e){i(a,r,o,l,u,"throw",e)}l(void 0)
|
||
}))}}function l(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))));r.forEach((function(t){l(e,t,n[t])}))}return e}function c(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var s=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]
|
||
},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}o[2]&&a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}};function f(){var e
|
||
;if(null!=window.getSelection){var t;e=null===(t=window.getSelection())||void 0===t?void 0:t.toString()}else null!=document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text);return null!=e?e:""}function d(e){var t=f(),i=e.target;if("TEXTAREA"===(null==i?void 0:i.tagName)||"INPUT"===(null==i?void 0:i.tagName)){if("checkbox"!==(null==i?void 0:i.type))return(0,o.jW)(e,a((function(){var e,o;return s(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(17260),n.e(70606),n.e(71402),n.e(13062)]).then(n.bind(n,638525))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,c(u({},e),{text:t}))}]}}))})),{enableSpellCheck:!0})}else{if("none"===window.getComputedStyle(i).getPropertyValue("-webkit-user-select")){e.preventDefault();return}for(var l,d,p,h=e.target;null!=h;){"src"in h&&null!=h.src&&(d=h.src);if("href"in h&&null!=h.href){l=h.href;p=h.textContent}h=null==h?void 0:h.parentNode}if(null!=d)return(0,
|
||
o.jW)(e,a((function(){var e,t;return s(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(17260),n.e(26785),n.e(47007),n.e(70606),n.e(91418),n.e(88271),n.e(71402),n.e(72108)]).then(n.bind(n,637810))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,c(u({},e),{src:null!=d?d:""}))}]}}))})));if(null!=l)return(0,o.jW)(e,a((function(){var e,t;return s(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(17260),n.e(26785),n.e(47007),n.e(70606),n.e(91418),n.e(88271),n.e(71402),n.e(89842)]).then(n.bind(n,759725))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,c(u({},e),{href:l,textContent:p}))}]}}))})));if(null!=t&&""!==t)return(0,o.jW)(e,a((function(){var e,o;return s(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(17260),n.e(70606),n.e(71402),n.e(28986)]).then(n.bind(n,60240))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,c(u({},e),{text:t}))}]}
|
||
}))})))}e.preventDefault();return null}function p(e){var t=!1,n=e.target;if("INPUT"===(null==n?void 0:n.tagName)||"TEXTAREA"===(null==n?void 0:n.tagName))t=!0;else if(null!=(null==n?void 0:n.closest)&&null!=(null==n?void 0:n.closest("[contenteditable=true]")))t=!0;else if(null!=f()&&""!==f())t=!0;else{for(var r,o,i=e.target;null!=i;){"src"in i&&null!=i.src&&(o=i.src);"href"in i&&null!=i.href&&(r=i.href);i=null==i?void 0:i.parentNode}null==r&&null==o||(t=!0)}t||e.preventDefault()}},895072:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Z});var r=n(496486),o=n.n(r),i=n(131795),a=n.n(i),l=n(306472),u=n(288263),c=n(793461),s=n(652591),f=n(120415),d=n(716118),p=n(310126),h=n(2590);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b,v,m=f.FB&&(0,f.ED)(),g=m&&parseFloat(l.Z.os.release)<10,O=!0;if(m&&!g){var E=(b=l.Z.os.release.split("."),v=3,function(e){if(Array.isArray(e))return e}(b)||function(e,t){
|
||
var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(b,v)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(b,v)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),C=E[0],j=E[2];O=parseInt(C)>10||parseInt(j)>=15063}var S=m&&O||"Chrome"===a().name&&parseFloat(a().version)<47||"Firefox"===a().name&&parseFloat(a().version)<52,I=o().throttle(d.GN,1e3,{leading:!0});function _(){
|
||
p.default.flashFrame(!1)}if(m){window.addEventListener("focus",_);p.default.on("MAIN_WINDOW_FOCUS",_)}var w=window.Notification;if(g){var x,P={};p.default.on("NOTIFICATION_CLICK",(function(e,t){var n=P[t];if(null!=n){n.onclick();n.close()}}));p.default.send("NOTIFICATIONS_CLEAR");w=((x=function(){function e(t,n){var r=n.body,o=n.icon,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.id=w._id++;this.onshow=function(){};this.onclick=function(){};this.onclose=function(){};this.title=t;this.body=r;this.icon=o;setImmediate((function(){return i.onshow()}));P[this.id]=this;p.default.send("NOTIFICATION_SHOW",{id:this.id,title:this.title,body:this.body,icon:this.icon})}e.prototype.close=function(){if(null!=P[this.id]){delete P[this.id];p.default.send("NOTIFICATION_CLOSE",this.id);this.onclose()}};e.requestPermission=function(e){e()};return e}()).permission="granted",x._id=0,x)}function N(){return null!=w&&"granted"===w.permission}
|
||
function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;e.includes("message")?I(e,t):(0,d.GN)(e,t)}function T(e){return c.Z.disableNotifications&&null==e.overrideStreamerMode||!N()||f.FB&&!p.default.shouldDisplayNotifications()}const Z={hasPermission:N,requestPermission:function(e){null!=w&&w.requestPermission((function(){null!=e&&e(N())}))},showNotification:function(e,t,n,r,i){var a;if(!T(i)){if(null!=i.sound){var l;A(i.sound,null!==(l=i.volume)&&void 0!==l?l:1)}var c,d=null!==(c=null==i?void 0:i.tag)&&void 0!==c?c:null;(0,f.IJ)()&&(n=o().escape(n));var y,b={icon:e,body:n,tag:d,silent:!0};m&&u.Z.taskbarFlash&&p.default.flashFrame(!0);try{y=new w(t,b)}catch(e){return null}null===(a=i.onShown)||void 0===a||a.call(i);i.omitViewTracking||s.default.track(h.rMx.NOTIFICATION_VIEWED,r);y.onclick=function(){var e;if(f.FB)p.default.focus();else{window.focus();y.close()}i.omitClickTracking||s.default.track(h.rMx.NOTIFICATION_CLICKED,r)
|
||
;null===(e=i.onClick)||void 0===e||e.call(i)};S&&setTimeout((function(){return y.close()}),5e3);return O?y:{close:function(){var e;null==y||null===(e=y.onclose)||void 0===e||e.call(y)}}}if(null!=i.sound&&!1!==i.playSoundIfDisabled){var v;A(i.sound,null!==(v=i.volume)&&void 0!==v?v:1)}},disabled:T}},15084:(e,t,n)=>{"use strict";n.d(t,{G:()=>O,d:()=>E});var r=n(247250),o=n(567867),i=n(268319),a=n(444663),l=n(474717),u=n(396043),c=n(566706),s=n(255592),f=n(473903),d=n(652591),p=n(275374),h=n(850841),y=n(99181),b=n(2590),v=n(493254),m=n(203600),g=n(473708);function O(e,t){var n=f.default.getCurrentUser(),r=e.getGuildId(),o=p.dg(r),i=[],l=0,c=0,s=0,d=[],O=!0,E=!1,C=void 0;try{for(var j,S=t[Symbol.iterator]();!(O=(j=S.next()).done);O=!0){var I=j.value;s+=1;l+=I.size;i.push(I.size);I.size>c&&(c=I.size);null!=I.type?d.push(I.type):d.push("unknown")}}catch(e){E=!0;C=e}finally{try{O||null==S.return||S.return()}finally{if(E)throw C}}if(c>o){(0,u.yw)(b.rMx.FILE_SIZE_LIMIT_EXCEEDED,{
|
||
channel_id:e.id,guild_id:r,user_individual_file_size_limit:o,pre_compression_file_sizes:i,pre_compression_aggregate_file_size:l,num_attachments:s,error_type:v.xi.UPLOAD_ATTACHMENT_MAX_SIZE_ERROR,attachment_mimetypes:d});(0,a.openUploadError)({title:g.Z.Messages.UPLOAD_AREA_TOO_LARGE_TITLE,help:(0,y.BK)(n,r),showPremiumUpsell:!(0,h.M5)(n,m.p9.TIER_2),fileSize:c})}else(0,a.openUploadError)({title:g.Z.Messages.UPLOAD_AREA_TOO_LARGE_TITLE,help:g.Z.Messages.UPLOAD_AREA_REQUEST_LIMIT_HELP.format({maxSize:p.Ng(p.OC())})})}function E(e,t,n){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},f=u.requireConfirm,p=void 0===f||f,h=u.showLargeMessageDialog,v=void 0!==h&&h;if(!(e.length<1)){var m=t.getGuildId();if((0,y.Bf)(e,m))O(t,e);else if(s.Z.getUploadCount(t.id,n)+e.length>b.dN1){(0,a.openUploadError)({title:g.Z.Messages.ATTACHMENT_TOO_MANY_ERROR_TITLE,help:g.Z.Messages.ATTACHMENT_TOO_MANY_ERROR_MESSAGE.format({limit:b.dN1})});d.default.track(b.rMx.UPLOAD_FILE_LIMIT_ERROR,{
|
||
existing_count:s.Z.getUploadCount(t.id,n),new_count:e.length})}else{t.type!==b.d4z.GUILD_VOICE&&t.type!==b.d4z.GUILD_STAGE_VOICE||c.Z.getChatOpen(t.id)||r.Z.updateChatOpen(t.id,!0);if(p){var E=Array.from(e).map((function(e){return{file:e,platform:l.ow.WEB}}));o.Z.addFiles({files:E,channelId:t.id,showLargeMessageDialog:v,draftType:n})}else i.Z.instantBatchUpload(t.id,e,n)}}}},99181:(e,t,n)=>{"use strict";n.d(t,{BK:()=>u,Bf:()=>c,KZ:()=>s});var r=n(474717),o=n(275374),i=n(850841),a=n(203600),l=n(473708);function u(e,t){var n=o.Ng(o.dg(t));return i.ZP.isPremium(e,a.p9.TIER_2)?l.Z.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:n}):i.ZP.isPremium(e,a.p9.TIER_1)?l.Z.Messages.UPLOAD_AREA_TOO_LARGE_HELP_PREMIUM_TIER_1.format({maxSize:n}):l.Z.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:n})}function c(e,t){return o.nA(e,t)||o.vY(e)}function s(e){return e.reduce((function(e,t){t.item.platform===r.ow.WEB&&e.push(t.item.file);return e}),[])}},962392:(e,t,n)=>{"use strict";n.d(t,{
|
||
Z:()=>o});var r=n(304275);function o(){var e=r.Z.getFocusedPID();return null==e||!r.Z.isReady(e)&&!r.Z.isCrashed(e)?null:e}}}]);
|
||
//# sourceMappingURL=9321e84850c69a25237d.js.map |